{"openapi":"3.1.0","info":{"title":"Polychat API","description":"# Polychat API\n\nOne API for models, teammates and the work they do. It accepts OpenAI-compatible request bodies and adds Polychat parameters on top, so an unmodified OpenAI client works and a Polychat-aware client can do more.\n\n## Start here\n\n- **Responses** run a model, a teammate or an agent. Every run anywhere in Polychat is a Response with one sequenced event stream.\n- **Conversations** hold the items Responses produce.\n- **Chat Completions** is an OpenAI-compatible port onto the same engine.\n- **Models** lists what you can run. Pass `model_tier` instead of a model to let your plan pick.\n\n## What else is here\n\n- **Teammates, Poly, Skills and Memory** for configured agents that remember and learn.\n- **Workspaces, Projects and Tasks** for shared work, boards and pull request reviews.\n- **Environments, Machines and Jobs** for sandboxes, browsers, paired desktops and long-running work.\n- **Outputs, Documents, Sources and Sites** for what gets made and what it is made from.\n- **Recipes, Connectors, Channels and Webhooks** for integrations in and out.\n- **The model platform** (registry, datasets, training, evaluation, serving and governance) for bringing your own models into a workspace.\n\n## Authentication\n\nSend a JWT or API key as a bearer token:\n\n~~~http\nAuthorization: Bearer <jwt_or_api_key>\n~~~\n\nSee Authentication for sign-in methods, including device sign-in for CLIs.\n\n## Limits\n\nRequests are rate limited per caller: 100 a minute when authenticated and 10 a minute otherwise. Model usage is metered in credits against your plan; read your balance at `GET /usage/balance` and the plans at `GET /plans`.\n\n## Base URL\n\n~~~\nhttps://api.polychat.app\n~~~\n\n## Links\n\n- **Issues**: [GitHub Issues](https://github.com/nicholasgriffintn/assistant/issues)\n- **App**: [polychat.app](https://polychat.app)\n- **Self-hosting**: use the repository's `$polychat-setup` agent skill.","version":"0.0.1"},"tags":[{"name":"auth","description":"# Authentication\n\nSign people in and authenticate API calls.\n\n## Methods\n\n- **GitHub OAuth** and **Sign in with Apple** for social sign-in.\n- **Magic links** for passwordless email sign-in.\n- **Passkeys (WebAuthn)**, listed and removed under `/auth/webauthn/passkeys`.\n- **Device authorisation (RFC 8628)** for CLIs and other devices without a browser. Start with `POST /auth/device/code`, show the user code, and poll `POST /auth/device/token` until it returns an API key.\n- **Native code exchange** for the desktop and iOS apps.\n- **API keys** for server-to-server calls, created under Account.\n\n## Bearer tokens\n\n~~~http\nAuthorization: Bearer <jwt_or_api_key>\n~~~\n\n`GET /auth/token` mints a JWT for the signed-in session. `GET /auth/me` returns the current user.\n\n## Rate limits\n\nEvery route is rate limited per caller: 100 requests a minute when authenticated and 10 a minute otherwise. Exceeding the limit returns `429 Too Many Requests`."},{"name":"responses","description":"# Responses\n\nA Response is one execution: a Chat turn, a teammate turn, a Poly turn, a delegation, a project task stage or a channel reply. Every run anywhere in Polychat is a Response, and every surface reads it the same way.\n\n## Create\n\n~~~json\n{\n  \"conversation\": \"conv_123\",\n  \"input\": \"Summarise the attached report\",\n  \"model\": \"gpt-5.6\",\n  \"tools\": [{ \"type\": \"builtin\", \"id\": \"web_search\" }],\n  \"stream\": true\n}\n~~~\n\n- `conversation` names or creates the container. Pass `null` for a response that is never stored.\n- `input` is a string or a list of items (`message`, `tool_output`, `interaction_response`, `approval_response`).\n- `agent` selects who runs it, for example `{ \"type\": \"teammate\", \"id\": \"...\" }`.\n- `environment` selects where it runs: `hosted`, `browser`, `device`, `machine` or `sandbox`.\n- `tools` is a typed union: `function`, `builtin`, `managed`, `mcp` and the hosted tools.\n- `idempotency_key` makes a retried create return the accepted Response instead of starting another.\n\n## Stream\n\nWith `stream: true` the body is a server-sent event stream. Every event carries `type`, `sequence_number` and `response_id`:\n\n~~~\nevent: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response_id\":\"run_1\",\"response\":{...}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":4,\"output_index\":0,\"item\":{\"type\":\"message\",\"role\":\"assistant\",\"id\":\"msg_1\",\"content\":[]}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_1\",\"output_index\":0,\"delta\":\"Hello\"}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":12,\"response\":{...}}\n\ndata: [DONE]\n~~~\n\n## Follow\n\n- `GET /responses/{id}` returns the authoritative state and output items.\n- `GET /responses/{id}/events?after=N` replays lifecycle events, or returns a snapshot when the cursor is too old.\n- `POST /responses/{id}/input` answers a question, resolves an approval or steers. Set `when: \"after\"` to queue a message for when the response finishes.\n- `POST /responses/{id}/cancel` cancels an exact attempt.\n- `GET /responses` lists responses, and finds an accepted create by `idempotency_key`.\n\n## Utilities\n\n- `POST /responses/input_tokens` counts the tokens a model would read for an input and instructions.\n- `POST /responses/compact` summarises a conversation's older items so the next response fits the context window."},{"name":"conversations","description":"# Conversations\n\nA conversation is the container that Responses run in. It owns items, a title, organisation, sharing, a goal and delegations.\n\n## Items\n\nItems are the only content contract. A stored conversation is a list of items, a Response produces items, and the event stream adds items. Item types are `message`, `tool_output`, `compaction` and `goal`; stream-only items add `tool_call`.\n\n~~~json\n{\n  \"type\": \"message\",\n  \"id\": \"msg_1\",\n  \"role\": \"assistant\",\n  \"content\": [{ \"type\": \"text\", \"text\": \"Hello\" }],\n  \"parts\": [{ \"type\": \"text\", \"text\": \"Hello\" }],\n  \"metadata\": { \"model\": \"gpt-5.6\", \"provider\": \"openai\" }\n}\n~~~\n\n## Routes\n\n- `GET /conversations` lists conversations. `GET /conversations/{id}` returns one with its latest items and `latest_response`.\n- `GET /conversations/{id}/items` pages through items. `GET /conversations/items/{item_id}` returns one item. `GET /conversations/{id}/branches` lists its branches.\n- `PATCH /conversations/{id}` updates the title, archive state, permission mode, branch parent or items. `POST /conversations/archive` archives in bulk.\n- `POST /conversations/{id}/title` generates a title. `POST /conversations/{id}/share` publishes a share link read at `GET /conversations/shared/{token}`.\n- `/goal`, `/delegations`, `/queue`, `/organisation`, `/reactions`, `/check` and `/artifact_bindings/read` live under the conversation they belong to.\n- `/conversations/saved_items` organises conversations across the account, and `/notebooks` groups them with shared sources. `/conversations/handles` lists the agent handles granted to delegations."},{"name":"chat","description":"# Chat Completions\n\nAn OpenAI-compatible port onto the platform. Point an unmodified OpenAI client at Polychat and it works; a client that knows Polychat can add platform parameters on the same body.\n\n## Compatibility\n\n~~~json\n{\n  \"model\": \"gpt-5.6\",\n  \"messages\": [{ \"role\": \"user\", \"content\": \"Hello, world!\" }],\n  \"stream\": true\n}\n~~~\n\nA request with no `conversation`, `agent` or `environment` and no `store: true` runs the model directly and bills the caller. Streaming returns `chat.completion.chunk` events and ends with `[DONE]`.\n\n## Polychat extensions\n\nAdd `conversation`, `agent`, `environment`, `model_tier`, `permission_mode`, `compaction`, `budget`, `idempotency_key` or `response_id`, or pass tools in the Polychat tool union, and the request runs as a Response. The result keeps the chat completion shape and carries the Response under `response`; the final stream chunk does the same.\n\nEverything a Response can do is available directly at `POST /responses`."},{"name":"models","description":"# Models\n\nDiscover the models you can run, with their capabilities and pricing.\n\n- `GET /models` lists models the caller can use, including models on their own provider keys. Filter by `capability`, input `modality` or `output` modality, and page with `limit` and `after`.\n- `GET /models/catalogue` lists every model the platform knows about, without filtering by access.\n- `GET /models/{model_id}` returns one model.\n- `GET /models/artificial_analysis` returns cached Artificial Analysis benchmark, arena, pricing and performance data with source attribution.\n\n## Tiers\n\nInstead of naming a model, pass `model_tier` (`low`, `medium`, `high` or `ultra`) to `POST /responses` or `POST /chat/completions`. Polychat picks the model for that tier from the caller's plan. `GET /models/tiers` shows which model each tier and role resolves to for the caller on each runtime.\n\n## Examples\n\n~~~bash\ncurl \"https://api.polychat.app/models?modality=vision\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\"\n~~~\n\n~~~bash\ncurl https://api.polychat.app/models/tiers \\\n  -H \"Authorization: Bearer YOUR_TOKEN\"\n~~~"},{"name":"tools","description":"# Tools\n\nThe tools models and people can call.\n\n- `GET /tools` lists the tools in the caller's scope, or a project's or workspace's. Pass them to `POST /responses` in `tools`.\n- `GET /tools/{tool_id}` returns a form derived from the tool's input schema, and `POST /tools/{tool_id}/execute` runs it from the interface, storing the result as an output.\n- `PATCH /tools/{tool_id}/configuration` validates and saves per-user configuration for a model tool.\n- `/tools/mcp_connections` connects remote MCP servers, with a token or through an OAuth sign-in, and limits them to `allowedTools`."},{"name":"teammates","description":"# Teammates\n\nTeammates are configured agents with their own instructions, model, tools, skills and MCP servers. A teammate works as a `colleague` or a `bot`.\n\n## Create\n\nWrite one from scratch with `POST /teammates`, or hire one with `POST /teammates/hire` from a built-in role, a job description, or both.\n\n~~~json\n{\n  \"name\": \"Code reviewer\",\n  \"kind\": \"colleague\",\n  \"system_prompt\": \"Review code for security, performance and clarity. Be specific.\",\n  \"temperature\": 0.2,\n  \"enabled_tools\": [\"web_search\"],\n  \"skill_ids\": [\"skill_123\"]\n}\n~~~\n\n`servers` attaches MCP servers through an existing credential connection, limited to `allowedTools`.\n\n## Run\n\nA teammate turn is a Response. Pass the teammate as the agent:\n\n~~~json\n{\n  \"agent\": { \"type\": \"teammate\", \"id\": \"teammate_123\" },\n  \"input\": \"Review the open pull request\",\n  \"stream\": true\n}\n~~~\n\n## Contexts and autonomy\n\nA teammate works inside a scoped context, personal or project, with its own private memory. Each context has a status (`active`, `paused` or `archived`) and an autonomy level:\n\n- `observer` only reads and drafts.\n- `assistant` asks before writes.\n- `partner` writes within its connection grants.\n\nSends, spending, deletes, credentials and exports always ask. Grant exact connection operations with `PATCH /teammates/contexts/{context_id}/connections`.\n\n## Workspaces and the marketplace\n\n- `POST /teammates/{teammate_id}/publish` copies a personal teammate into a workspace. `workspace_default` gives it to every project, and a project can opt out.\n- `POST /teammates/{teammate_id}/feedback` records whether it got a conversation right, building its scorecard.\n- `/teammates/marketplace` shares teammates publicly for others to install and rate. Admins moderate and feature listings."},{"name":"poly","description":"# Poly\n\nPoly is the platform teammate, with one continuous thread per person. `GET /poly/agenda` returns that thread with what needs you, what Poly is working on and what it finished in the last week, and creates it the first time.\n\nDisagreeing with a handoff Poly kept quiet records a rule that results from that routine always reach you."},{"name":"skills","description":"# Skills\n\nReusable instructions teammates load when they are relevant.\n\n- `GET /skills` lists every skill and whether it is ready in your own conversations. `PATCH /skills/{skill_id}` turns one on or off; always-on skills cannot be changed.\n- Authored skills are revisioned documents. Save a draft without activating it, promote it, or roll back through a new immutable revision.\n- Teach a skill by demonstration: a recorded teaching session becomes a disabled draft.\n\nProject skills are managed through project capabilities."},{"name":"memory","description":"# Memory\n\nMemory is a set of revisioned documents: personal, project-scoped, or private to one teammate context.\n\n- Every save creates a revision you can list.\n- Corrections are rules teammates record after you correct them. Forgetting one removes it from the list but leaves any text it already changed.\n- Syntheses consolidate a memory namespace in the background. Queue one, then read the active synthesis."},{"name":"approvals","description":"# Approvals\n\nActions waiting on you before they run: connector operations, task questions and task tool approvals.\n\n- `PATCH /approvals/{approval_id}` approves or rejects a connector operation. Task questions and tool approvals are answered through `POST /responses/{response_id}/input`.\n- Standing approvals let Poly repeat one write to one destination without asking, for thirty days. Delete one to stop it."},{"name":"environments","description":"# Environments\n\nThe places work runs: sandbox runs, hosted browser sessions, teammate computers and paired machines. One id space covers them all; pass `kind` to skip resolution.\n\n- `POST /environments/{environment_id}/actions` takes over, views, releases, pauses, resumes, cancels, stops or answers an approval, depending on what the environment supports.\n- Sandboxes take instructions while running, keep an event log and can work toward a goal. Healthy declared services can be previewed through short-lived links.\n- Machines take runs through `POST /environments/{environment_id}/runs`."},{"name":"machines","description":"# Machines\n\nThe protocol a signed-in desktop uses to offer itself as an environment. It heartbeats its runtime metadata, claims the next queued run and reports progress. Start runs on a machine through `/environments`."},{"name":"jobs","description":"# Jobs\n\nLong-running work that outlives a request: generations, predictions, OCR batches, research runs and evaluations.\n\nStart a job by kind, then read `GET /jobs/{job_id}` for its status and result. Some kinds fan out, so the create response lists every job started and any that were rejected."},{"name":"workspaces","description":"# Workspaces\n\nThe unit of membership and ownership for shared work. Members join by invitation and hold roles, and owners can transfer ownership. Recorded spend is visible to owners and administrators, alongside the audit trail."},{"name":"projects","description":"# Projects\n\nA project is a shared work surface inside a workspace, with its own board, capabilities, environment and review policy.\n\n- Configure the project's sandbox environment with variables, whose values are write-only, and a cache you can rebuild or delete.\n- Add apps, recipes or tools as project capabilities.\n- Tasks, flows, pull request reviews and issue imports are listed under Tasks.\n\nDeleting a project archives it."},{"name":"tasks","description":"# Tasks\n\nBackground tasks and the project board.\n\n- `/tasks` lists, reads and cancels the caller's background tasks with their executions.\n- Project tasks move across the board, optionally through a project flow of stages. Starting a task queues it for its runner as the caller, with their connections and installations. Accepting a reviewed task moves it to done or the next stage.\n- Pull request reviews can run automatically under a review policy. Governed reviews are prepared, approved by a person and published to their exact commit.\n- Preview an issue from a connected tracker, then import it as a task."},{"name":"templates","description":"# Templates\n\nProject templates, personal or workspace-owned, plus built-in starters. Instantiate either to create a project."},{"name":"activity","description":"# Activity\n\nA newest-first record of what happened in your personal space or, with `project_id`, in a project."},{"name":"attention","description":"# Attention\n\nOperational work across every workspace you belong to: task interactions and sandbox run states in one filtered, faceted page. Membership is checked on every read."},{"name":"notifications","description":"# Notifications\n\nThe task inbox and how it reaches you. List inbox items unread first, mark them read or dismiss them, and register installations for delivery. `GET /notifications/{notification_id}` resolves where a notification should take you now.\n\niOS push tokens register through `/devices`."},{"name":"outputs","description":"# Outputs\n\nWhat Polychat produces and keeps: documents, files, images and tool results. Outputs are personal or project-scoped, and every save is a revision.\n\n- `PATCH /outputs/{output_id}` saves a new revision. Earlier revisions can be restored.\n- Share links are revocable and readable without signing in at `/outputs/shared/{token}`.\n- Council reviews have four seats critique the current revision and vote. An adjudicator returns ship, revise or hold with a revision brief.\n\nRoutes that only apply to documents are listed under Documents."},{"name":"documents","description":"# Documents\n\nEditing and review for document outputs. These routes live under `/outputs/{output_id}` and apply only to documents.\n\n- Comment on a selection, then resolve or reopen the thread.\n- Propose an edit to a selection, then apply it.\n- Rewrite formatting without changing what it says, keep a generated description on it, or export it as Markdown."},{"name":"sources","description":"# Sources\n\nSource material for retrieval, personal or project-scoped. Group sources into collections, search a project's knowledge, and keep connector content fresh with knowledge syncs you can pause, resume or refresh.\n\n`PATCH /sources/project_context` sets which sources form a project's standing context.\n\nSources are also the media library. Images, audio and video keep their file; audio and video can be transcribed (`POST /sources/{source_id}/transcribe`), summarised into notes and given cover art, and the transcript becomes searchable content.\n\n- `POST /sources/generations` generates images, video or model output into sources, from Image Studio's multi-model runs or a single Replicate model. Each run is a source that stays `processing` until its media arrives.\n- `POST /sources/drawings` paints a sketch into an image source.\n- `POST /sources/podcasts` turns sources or research into a two-host podcast episode with a transcript, show notes and cover art.\n- Podcast shows are collections of kind `podcast`. `POST /sources/collections/{collection_id}/feed` issues a private RSS feed link that podcast apps can subscribe to."},{"name":"notebooks","description":"# Notebooks\n\nA notebook is a conversation group that also holds sources, notes and studio outputs. Every conversation in it answers from the notebook's sources, in the style and length the notebook sets.\n\n- `POST /notebooks` creates one, personal or in a project. Move conversations in with `PATCH /conversations/{id}/organisation`, or start one inside a notebook by sending `conversation.notebook` with a new response.\n- `POST /notebooks/{notebook_id}/sources` links sources by id or reads web pages into new sources. `POST /notebooks/{notebook_id}/research` finds pages to import, or runs deep research in the background.\n- `POST /notebooks/{notebook_id}/studio` makes an audio overview, slide deck, data table, report, infographic, mind map, flashcards, quiz or video overview from the chosen sources.\n- `/notebooks/{notebook_id}/outputs/{output_id}/progress` keeps your own flashcard and quiz progress."},{"name":"discover","description":"# Discover\n\nDiscover is a daily edition Poly writes for you each morning from the topics you follow. Turn it on with `PATCH /discover/settings`, then read it with `GET /discover` or a past day with `GET /discover/editions/{date}`.\n\n- `POST /discover/feedback` tells it more, less or hide on a card, which shapes later editions.\n- `/discover/follows` follows and unfollows topics. Card actions check how an article is framed or compare how outlets covered a topic.\n- An edition can become a listen (The Perch), a weekly recap, or an illustrated, narrated episode in a season on your top topic.\n- `/discover/wind-down` makes guided wind-down sessions with shared sound beds."},{"name":"uploads","description":"# Uploads\n\nSecure ingestion of documents, media, and code artifacts for downstream processing.\n\nUse this endpoint before invoking retrieval, analysis, or memory workflows that reference external files."},{"name":"sites","description":"# Sites\n\nGenerate websites and application screens from one brief. Jev classifies the brief into a plan\n(kind, scope, tone, palette and model tier), a coding model streams the site as JSON patch events\nagainst a guardrailed component catalogue, and the result is kept as a revisioned output.\n\n- `PATCH /sites/{site_id}` applies inspector edits without a model. `POST /sites/{site_id}/verify` checks a revision in desktop and mobile browsers.\n- `POST /sites/{site_id}/images` fills empty image slots from their alt text.\n- Sites export as a runnable React Router, Next.js or TanStack Router project, open as a pull request on a connected repository, or hand off to a project's sandbox for a full build.\n- Saved records and connector data give a site live content. Enable them per revision with `/runtime`."},{"name":"capabilities","description":"# Capabilities\n\nThe teammates, experiences, model tools and skills a project or a person can enable.\n\n`GET /capabilities` is filtered by the caller's plan and access. `GET /capabilities/catalogue` is the unfiltered public catalogue of built-in experiences, tools and recipe templates. Function tools are published, and run, by `/tools`."},{"name":"experiences","description":"# Experiences\n\nSingle-purpose apps that sit beside Chat. Which ones a person or project has enabled comes from `/capabilities`.\n\n- `/experiences/strudel` generates, saves and rates Strudel patterns.\n- `/experiences/twenty_questions` plays against a sealed secret with calibrated yes probabilities.\n- `/experiences/verbatim/segments` transcribes live audio, then verifies every word against it."},{"name":"recipes","description":"# Recipes\n\nOne-tap setups for integrations and automations that start from web, iOS or messaging. Installing returns a setup payload that opens a chat to finish configuration conversationally.\n\nInstalled recipes run on demand, now or queued as a task, or from triggers: Composio events or signed webhook URLs. A webhook URL is returned once and can be rotated."},{"name":"connectors","description":"# Connectors\n\nThird-party accounts that tools, recipes and teammates act through. Authorise with OAuth, brokered by Composio, or store an API key. When you connect more than one account, label them and pick which one is used."},{"name":"connections","description":"# Connections\n\nGitHub App installations that projects, sites and sandboxes use for repository access. Choose exactly which repositories each installation may use. Auto-connect links an installation of the default Polychat app without manual setup."},{"name":"mcp","description":"# MCP\n\nUse Polychat as a Model Context Protocol server from clients such as Claude, ChatGPT and Codex. Point the client at `/mcp` over Streamable HTTP and authenticate with a Polychat API key.\n\n- `tools/list` offers the tools you can run in Polychat, plus one tool per teammate.\n- `tools/call` runs them under your authority. Anything that needs approval waits for you in Polychat.\n- Polychat sends no server-initiated messages, so `GET /mcp` answers 405."},{"name":"a2a","description":"# A2A\n\nTalk to your teammates from agents that speak the Agent2Agent protocol. Authenticate with a Polychat API key; only the teammate's owner can reach it.\n\n- `GET /a2a/teammates/{teammate_id}/.well-known/agent-card.json` describes the teammate.\n- `POST /a2a/teammates/{teammate_id}/rpc` takes JSON-RPC. Each task is a Polychat Response in the teammate's own conversation: `message/send` starts or follows one up, `message/stream` streams it, and `tasks/get` and `tasks/cancel` read and stop it.\n- Runs use the key owner's authority and wait on them in Polychat for approvals."},{"name":"channels","description":"# Channels\n\nReach Polychat from Slack channels and Telegram chats. Slack can bind to a person or a project; Telegram is personal only.\n\nA sender links their channel identity through a pairing challenge before their messages run as them. Revoke a sender to cut that link."},{"name":"webhooks","description":"# Webhooks\n\nReceive platform events at your own URL. Polychat POSTs each subscribed event to the endpoint with a `Polychat-Event-Id` header and a `Polychat-Signature` header:\n\n~~~\nPolychat-Signature: t=1760430000,v1=<hex HMAC-SHA256 of \"{t}.{raw body}\">\n~~~\n\nThe signing secret is returned once on create and once on rotation. Rotating invalidates the old secret immediately. Send a test event to check delivery."},{"name":"decisions","description":"# Decisions\n\nFast, typed judgements from a System One model (TypeSafe Jev). Send a state and a map of\nquestions; each answer is a choice with probabilities, a score along your levels, or a yes/no\nprobability. Use confidence to decide when code can act and when to escalate.\n\nAttach `images`, `audio` or `videos` as base64 data URLs and Clef Omni judges them with the\nstate: PNG, JPEG or WebP images, WAV or MP3 audio, and MP4 or WebM video with its soundtrack."},{"name":"extractions","description":"# Extractions\n\nTyped values from a System One extraction model (Cloudflare Clairic). Send a `state` and a map\nof named `fields`; each answer is a value of the declared type or `null` when the input does not\nsay. Text answers carry a `span` into the state, scalar answers carry `p_null` and\n`confidence`, and estimates and forecasts carry a median and an 80% interval (`p10` to `p90`).\n\nAttach up to four PNG, JPEG or WebP `images` as base64 data URLs to read receipts, forms or\nscreenshots alongside the text. Pass `reference_date` so dates written without a year resolve."},{"name":"code","description":"# Code\n\nEditor-style completions for code. Leave `model` out and Polychat picks the system model that supports the task.\n\n- `POST /code/fim` fills the gap between a `prompt` and a `suffix`, for autocomplete at the cursor.\n- `POST /code/next_edit` suggests the next edit to a file from a list of `messages`.\n- `POST /code/apply` merges an edit snippet into existing code from a list of `messages`.\n\nAll three accept `stream: true`.\n\n## Example\n\n~~~bash\ncurl https://api.polychat.app/code/fim \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"prompt\": \"function calculateSum(arr) {\",\n    \"suffix\": \"}\",\n    \"max_tokens\": 100,\n    \"temperature\": 0.3\n  }'\n~~~\n\nLower temperatures (0.2 to 0.4) and a `stop` list keep completions short and predictable."},{"name":"audio","description":"# Audio\n\nSpeech-to-text and text-to-speech utilities with provider abstraction.\n\nEvery endpoint requires authentication, logs usage, and returns structured payloads so downstream chat, apps, or automation flows can chain the audio artifacts safely."},{"name":"realtime","description":"# Realtime\n\nCreate low-latency live sessions for speech, translation, transcription, and multimodal voice or vision experiences.\n\nOnly authenticated users may create sessions; invalid types or models return structured error payloads, and successful responses include everything needed to negotiate WebRTC/WebSocket connections with the provider."},{"name":"guardrails","description":"# Guardrails\n\nContent safety checks on input and output. Guardrails are on by default and configured per user, not per request.\n\n## Providers\n\nSet `guardrails_provider` in user settings:\n\n- `model` (default) runs the Guardrails model from your model choices: Llama Guard on Workers AI unless you pick another, such as TypeSafe's Jev or Mistral moderation.\n- `shieldstral` calls an operator-managed Shieldstral endpoint for text, images and prompt-response pairs. It needs `SHIELDSTRAL_BASE_URL` and `SHIELDSTRAL_MODEL`, and optionally `SHIELDSTRAL_API_KEY`, `SHIELDSTRAL_POLICY`, `SHIELDSTRAL_POLICY_VERSION` and `SHIELDSTRAL_THRESHOLD`.\n- `bedrock` uses AWS Bedrock Guardrails with `bedrock_guardrail_id` and `bedrock_guardrail_version` from user settings.\n\nSet `guardrails_enabled: false` to turn checks off.\n\n## Checking a conversation\n\n`POST /conversations/{conversation_id}/check` checks the conversation as input when `role` is `user` (the default) and as output otherwise:\n\n~~~bash\ncurl -X POST https://api.polychat.app/conversations/conv_123/check \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"role\": \"user\" }'\n~~~\n\n~~~json\n{\n  \"response\": {\n    \"content\": \"Input is valid\",\n    \"data\": { \"provider\": \"typesafe\", \"isValid\": true, \"violations\": [] }\n  }\n}\n~~~\n\nChat Completions reports the same outcome under `post_processing.guardrails`."},{"name":"search","description":"# Search\n\nSearch the conversations, workspaces and projects the signed-in person can access. Web search for models is a tool, not this route."},{"name":"model-registry","description":"# Model registry\n\nBring models into a workspace and decide which may be used. Every model platform route is scoped under `/model_platform/workspaces/{workspace_id}`.\n\n- Browse sources and the library, import from a source or a storage bucket, or upload weights through a resumable multipart upload.\n- Each version is inspected statically (safetensors and GGUF headers, a pickle opcode scan that never unpickles, chat templates, remote code and model cards) and can be inspected again.\n- Workspace policies judge every version. Dry-run a policy change before saving it, and record decisions to approve what a policy flags."},{"name":"model-datasets","description":"# Model datasets\n\nVersioned datasets for training and evaluation on the model platform. Preview an upload before creating a dataset from it, page through rows, exclude rows from a version, or erase content when a data subject asks."},{"name":"model-training","description":"# Model training\n\nFine-tune models on workspace datasets. Ask for a recommendation, plan a run to see what it will take before committing, then start, follow and cancel runs."},{"name":"model-evaluation","description":"# Model evaluation\n\nGraders score outputs, deterministically or with a model judge, and eval suites group cases with graders. Preview a grader on a sample, run a suite and read per-case results with confidence intervals."},{"name":"model-serving","description":"# Model serving\n\nPut model versions behind stable names.\n\n- Deployments run a version on a provider. Plan one first, then scale it, try it in the playground or act on it.\n- Aliases point a name at a version. Promote and roll back move the pointer.\n- Routes expose models to callers, each with a health check. A version can suggest routes for itself."},{"name":"model-governance","description":"# Model governance\n\nOversight for a workspace's model platform: provider accounts, member permissions, budgets and spend requests, the audit trail and the model inventory.\n\nEach version can be revoked, and publishes a model card, a CycloneDX ML-BOM and a record of its training content."},{"name":"benchmarks","description":"# Benchmarks\n\nBoards that pit models against each other, each with official standings, a people's baseline and a medal table.\n\n- Run a benchmark against up to five models you can use, including models on your own keys, or against a workspace's active routes. `POST /benchmarks/runs/estimate` checks eligibility and cost first.\n- Vote on blind arena pairs, or play a board yourself and score the game.\n- Share a run by link. Owners can withdraw and restore their runs."},{"name":"account","description":"# Account\n\nSettings, exports, API keys and provider credentials for the signed-in person.\n\n- `PATCH /account` updates account settings. `GET /account/export` downloads chat history as JSON.\n- `/api_keys` creates long-lived keys for server-to-server use. The plaintext key is returned once; only its metadata is kept.\n- `/providers` stores your own provider keys. `POST /providers/sync` adds any configurable provider you do not have yet."},{"name":"billing","description":"# Billing\n\nSubscription management backed by Stripe.\n\n- `GET /billing/subscription` returns the caller's subscription. `PATCH` turns metered overage on or off.\n- `POST /billing/checkout_sessions` and `POST /billing/portal_sessions` return Stripe-hosted URLs to send the person to.\n- Cancelling takes effect at the end of the period and can be reversed with `reactivate` until then."},{"name":"plans","description":"# Plans\n\nThe public catalogue of subscription plans and the credits each includes. Changing a plan's credits is admin-only."},{"name":"usage","description":"# Usage\n\nCredit accounting for the period. Read the balance (included, used, reserved and overage credits), summarise spend by source and vendor, or page through ledger events.\n\n`POST /usage/events` records a zero-cost event for a model that ran outside the hosted service."},{"name":"devices","description":"# Devices\n\nRegister iOS push tokens so notifications reach the app. Registering the same token again refreshes it, and the push token doubles as the device id."},{"name":"desktop","description":"# Desktop\n\nDownloads and update checks for the desktop app. The release check returns an update when a newer build exists for the target, architecture and current version."},{"name":"sync","description":"# Sync\n\nMint a short-lived grant for the device sync socket."},{"name":"pets","description":"# Pets\n\nAnimated companions for the interface. Upload a sprite sheet, or generate a mascot image from a description and compose it into one."},{"name":"flags","description":"# Flags\n\nFeature flag and experiment assignments for the calling user or anonymous session. Clients seed their OpenFeature provider from `GET /flags/bootstrap` so they bucket the same way the API does."},{"name":"admin","description":"# Admin\n\nOperator-only routes. Every route here requires an admin account.\n\n- Set a plan's included credits, grace credits and Stripe metering.\n- Queue the refresh of cached Artificial Analysis model data.\n\nOther admin actions, such as marketplace moderation and official benchmark runs, live with the resource they act on."},{"name":"system","description":"# System\n\nEndpoints for system-level operations such as health checks and metrics retrieval."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}]},"__schema1":{"anyOf":[{"type":"object","properties":{"$state":{"type":"string","pattern":"^\\/[A-Za-z0-9_\\-/]*$"},"eq":{},"neq":{},"in":{"type":"array","items":{}},"truthy":{"type":"boolean"}},"required":["$state"],"additionalProperties":false},{"type":"object","properties":{"$item":{"type":"string","minLength":1},"eq":{},"neq":{},"in":{"type":"array","items":{}},"truthy":{"type":"boolean"}},"required":["$item"],"additionalProperties":false},{"type":"object","properties":{"and":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/__schema1"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/__schema1"}}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/components/schemas/__schema1"}},"required":["not"],"additionalProperties":false}]}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://api.polychat.app","description":"production"},{"url":"http://localhost:8787","description":"development"}],"paths":{"/":{"get":{"operationId":"getIndex","tags":["system"],"responses":{"200":{"description":"Successful response"}},"hide":false}},"/openapi":{"get":{"operationId":"getOpenapi","tags":["system"],"responses":{"200":{"description":"Successful response"}},"hide":false}},"/status":{"get":{"operationId":"getStatus","tags":["system"],"description":"Check if the API is running with optional health information","responses":{"200":{"description":"API is running","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"timestamp":{"type":"string","example":"2021-01-01T00:00:00.000Z"},"version":{"type":"string","example":"1.0.0"},"environment":{"type":"string","example":"development"},"responseTime":{"type":"number","example":100},"checks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"example":{"database":{"status":"healthy"}}}},"required":["status","timestamp","version","environment","responseTime","checks"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"503":{"description":"API is unhealthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"timestamp":{"type":"string","example":"2021-01-01T00:00:00.000Z"},"version":{"type":"string","example":"1.0.0"},"environment":{"type":"string","example":"development"},"responseTime":{"type":"number","example":100},"checks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"example":{"database":{"status":"healthy"}}}},"required":["status","timestamp","version","environment","responseTime","checks"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"detailed","schema":{"default":"false","type":"string","enum":["true","false"]}}]}},"/metrics":{"get":{"operationId":"getMetrics","tags":["system"],"description":"Get metrics from Analytics Engine","responses":{"200":{"description":"Metrics retrieved successfully"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"type","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string"}},{"in":"query","name":"timeframe","schema":{"type":"string"}}]}},"/auth/github":{"get":{"operationId":"getAuthGithub","tags":["auth"],"summary":"Initiates GitHub OAuth flow","responses":{"200":{"description":"Redirects to GitHub OAuth authorization page to authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"500":{"description":"Server error, such as missing configuration","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"platform","schema":{"type":"string","enum":["web","mobile","desktop"]}},{"in":"query","name":"redirect_uri","schema":{"type":"string"}},{"in":"query","name":"client_state","schema":{"type":"string","minLength":8,"maxLength":128}}]}},"/auth/github/callback":{"get":{"operationId":"getAuthGithubCallback","tags":["auth"],"summary":"GitHub OAuth callback handler","responses":{"200":{"description":"Given a GitHub OAuth code, this endpoint will authenticate the user and redirect to the original URL","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad request or invalid code","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"code","schema":{"type":"string","example":"a1b2c3d4"},"required":true},{"in":"query","name":"state","schema":{"type":"string","minLength":1},"required":true}]}},"/auth/apple":{"post":{"operationId":"postAuthApple","tags":["auth"],"summary":"Sign in with Apple","responses":{"200":{"description":"Returns a JWT token for the authenticated Apple user","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"expires_in":{"type":"number","example":604800},"token_type":{"type":"string","const":"Bearer","example":"Bearer"}},"required":["token","expires_in","token_type"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"401":{"description":"Invalid Apple identity token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"500":{"description":"JWT secret or Apple configuration missing","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identity_token":{"type":"string","minLength":1},"nonce":{"type":"string","minLength":1},"full_name":{"type":"string","minLength":1,"maxLength":200}},"required":["identity_token","nonce"]}}}}}},"/auth/me":{"get":{"operationId":"getAuthMe","tags":["auth"],"summary":"Get current user info","responses":{"200":{"description":"Returns the current user's information","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":["string","null"]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"github_username":{"type":["string","null"]},"company":{"type":["string","null"]},"site":{"type":["string","null"]},"location":{"type":["string","null"]},"bio":{"type":["string","null"]},"twitter_username":{"type":["string","null"]},"role":{"anyOf":[{"type":"string","enum":["user","admin","moderator"]},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"setup_at":{"type":["string","null"]},"terms_accepted_at":{"type":["string","null"]}},"required":["id","name","avatar_url","email","github_username","company","site","location","bio","twitter_username","role","created_at","updated_at","setup_at","terms_accepted_at"],"additionalProperties":false},{"type":"null"}]},"userSettings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["user"],"additionalProperties":false}}}},"401":{"description":"Invalid or expired session","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/auth/logout":{"post":{"operationId":"postAuthLogout","tags":["auth"],"summary":"Logout - clear session","responses":{"200":{"description":"Clears the session and logs the user out","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/auth/token":{"get":{"operationId":"getAuthToken","tags":["auth"],"summary":"Generate a JWT token for the authenticated user","responses":{"200":{"description":"Returns a JWT token for the authenticated user","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"expires_in":{"type":"number","example":604800},"token_type":{"type":"string","const":"Bearer","example":"Bearer"}},"required":["token","expires_in","token_type"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"500":{"description":"JWT secret not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/auth/native/exchange":{"post":{"operationId":"postAuthNativeExchange","tags":["auth"],"summary":"Exchange a native sign-in code for a user token","responses":{"200":{"description":"Returns a JWT token for the authenticated native user","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"expires_in":{"type":"number","example":604800},"token_type":{"type":"string","const":"Bearer","example":"Bearer"}},"required":["token","expires_in","token_type"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Invalid or expired sign-in code","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"500":{"description":"JWT secret not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1}},"required":["code"]}}}}}},"/auth/age":{"get":{"operationId":"getAuthAge","tags":["auth"],"summary":"Get the age check status for the current user","responses":{"200":{"description":"The current age check status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","adult","under_age"]}},"required":["status"],"additionalProperties":false}}}}},"hide":false},"post":{"operationId":"postAuthAge","tags":["auth"],"summary":"Confirm the current user's date of birth","description":"Records whether the user meets the minimum age. The date of birth itself is not stored, and the first answer is final.","responses":{"200":{"description":"The age check status after confirmation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","adult","under_age"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The date of birth is not a real date","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"birth_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["birth_date"]}}}}}},"/auth/webauthn/passkeys":{"get":{"operationId":"getAuthWebauthnPasskeys","tags":["auth"],"summary":"Get all passkeys for the authenticated user","responses":{"200":{"description":"List of user's passkeys","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"device_type":{"type":"string"},"created_at":{"type":"string"},"backed_up":{"type":"boolean"}},"required":["id","device_type","created_at","backed_up"],"additionalProperties":false}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/auth/webauthn/passkeys/{id}":{"delete":{"operationId":"deleteAuthWebauthnPasskeysById","tags":["auth"],"summary":"Delete a passkey for the authenticated user","responses":{"200":{"description":"Passkey deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"}},"required":["error","type"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/auth/magic-link/request":{"post":{"operationId":"postAuthMagicLinkRequest","tags":["auth"],"summary":"Request a magic login link","responses":{"200":{"description":"Magic link email sent successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid email or user not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"500":{"description":"Server error (e.g., email sending failed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"redirect_uri":{"type":"string"}},"required":["email"]}}}}}},"/auth/magic-link/verify":{"post":{"operationId":"postAuthMagicLinkVerify","tags":["auth"],"summary":"Verify a magic-link token and log the user in","responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Missing or invalid token in body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"401":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}}}},"/auth/device/code":{"post":{"operationId":"postAuthDeviceCode","tags":["auth"],"summary":"Start device sign-in","description":"Starts an RFC 8628 device authorisation. Show the user code to the person and poll the token endpoint.","responses":{"200":{"description":"Device and user codes","content":{"application/json":{"schema":{"type":"object","properties":{"device_code":{"type":"string","minLength":1},"user_code":{"type":"string","minLength":1},"verification_uri":{"type":"string","minLength":1},"verification_uri_complete":{"type":"string","minLength":1},"expires_in":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"503":{"description":"Device sign-in is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_name":{"type":"string","minLength":1,"maxLength":80},"scope":{"default":"full","type":"string","enum":["full","discover"]}},"required":["client_name"]}}}}}},"/auth/device/token":{"post":{"operationId":"postAuthDeviceToken","tags":["auth"],"summary":"Poll device sign-in","description":"Returns an API key once the person approves the device. Until then it returns an RFC 8628 error code.","responses":{"200":{"description":"API key for the device","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","minLength":1},"token_type":{"type":"string","const":"Bearer"}},"required":["access_token","token_type"],"additionalProperties":false}}}},"400":{"description":"Pending, slowed down, denied, expired or invalid","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grant_type":{"type":"string","const":"urn:ietf:params:oauth:grant-type:device_code"},"device_code":{"type":"string","minLength":1,"maxLength":200}},"required":["grant_type","device_code"]}}}}}},"/auth/device/{userCode}":{"get":{"operationId":"getAuthDeviceByUserCode","tags":["auth"],"summary":"Read a pending device sign-in","responses":{"200":{"description":"Pending device sign-in","content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","minLength":1},"clientName":{"type":"string","minLength":1},"scope":{"type":"string","enum":["full","discover"]},"createdAt":{"type":"string"},"expiresAt":{"type":"string"}},"required":["userCode","clientName","scope","createdAt","expiresAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Expired or already used","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"userCode","schema":{"type":"string","minLength":1,"maxLength":20},"required":true}]}},"/auth/device/{userCode}/decision":{"post":{"operationId":"postAuthDeviceByUserCodeDecision","tags":["auth"],"summary":"Approve or deny a device sign-in","responses":{"200":{"description":"Decision recorded","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["approved","denied"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Expired or already used","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"userCode","schema":{"type":"string","minLength":1,"maxLength":20},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","deny"]}},"required":["decision"]}}}}}},"/activity":{"get":{"operationId":"getActivity","tags":["activity"],"summary":"List activity","description":"Personal activity, or a project's when project_id is set. Newest first.","responses":{"200":{"description":"Activity","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"capabilityId":{"type":"string"},"groupId":{"type":["string","null"]},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]},"summary":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","capabilityId","groupId","kind","status","summary","data","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"conversation_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"capability_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"status","schema":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]}}]}},"/activity/{activity_id}":{"get":{"operationId":"getActivityByActivityId","tags":["activity"],"summary":"Read an activity record","responses":{"200":{"description":"Activity record","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"capabilityId":{"type":"string"},"groupId":{"type":["string","null"]},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]},"summary":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","capabilityId","groupId","kind","status","summary","data","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"activity_id","schema":{"type":"string","minLength":1},"required":true}]}},"/responses":{"post":{"operationId":"postResponses","tags":["responses"],"summary":"Create a response","description":"Runs a model, teammate or agent against a conversation and returns the Response. Stream the sequenced event stream with stream: true, or resume a waiting response by naming it in response_id and supplying interaction or approval input items.","responses":{"200":{"description":"The response, or its event stream","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"response"},"id":{"type":"string","minLength":1,"maxLength":200},"conversation_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","in_progress","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","completed","failed","cancelled","incomplete"]},"waiting_on":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"type":"string","enum":["user","delegation","handle","schedule","channel"]},"initiator_user_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"project_task_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"teammate_context_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computer_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolved_configuration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancellation_requested_at":{"type":["string","null"]},"terminal_reason":{"type":["string","null"]},"last_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"accepted_at":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["idempotency_key","kind","accepted_at","duplicate"],"additionalProperties":false},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}}},"required":["object","id","conversation_id","status","waiting_on","attempt","trigger","initiator_user_id","project_id","project_task_id","created_at","updated_at","started_at","completed_at","terminal_reason","last_item_id"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"403":{"description":"Date of birth not confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"project_id":{"type":"string","minLength":1},"subject":{"type":"object","properties":{"type":{"type":"string","enum":["output","source","memory","discover_card"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},"notebook":{"type":"object","properties":{"id":{"type":"string","minLength":1},"source_ids":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}}},"required":["id"],"additionalProperties":false}},"additionalProperties":false},{"type":"null"}]},"input":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"]},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"tool_call"},"call_id":{"type":"string","minLength":1},"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","call_id"]},{"type":"object","properties":{"type":{"type":"string","const":"interaction_response"},"tool_name":{"type":"string","minLength":1},"response":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","tool_name","response"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"approval_response"},"approval_id":{"type":"string","pattern":"^coa_[A-Za-z0-9-]+$"}},"required":["type","approval_id"],"additionalProperties":false}]}},{"type":"string"}]},"instructions":{"type":"string"},"model":{"type":"string","minLength":1},"models":{"type":"array","items":{"type":"string","minLength":1}},"provider":{"type":"string","minLength":1},"model_tier":{"type":"string","enum":["low","medium","high","ultra"]},"agent":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false}]},"environment":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"hosted"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"browser"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"device"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"machine"},"machine_id":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sandbox"},"executionProvider":{"type":"string","enum":["polychat","openai"]},"repo":{"type":"string"},"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"taskType":{"type":"string","enum":["feature-implementation","code-review","test-suite","bug-fix","refactoring","documentation","migration"]},"promptStrategy":{"type":"string","enum":["auto","feature-delivery","bug-fix","refactor","test-hardening"]},"deliveryPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"shouldCommit":{"type":"boolean"},"environmentSetup":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"polychat"},"definition":{"type":"object","properties":{"version":{"default":1,"type":"number","const":1},"setupCommands":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"resumeCommands":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"runtimes":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"setupTimeoutSeconds":{"default":600,"type":"integer","minimum":30,"maximum":1800},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"networkHosts":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","maxLength":253,"pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"default":".","type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"command":{"type":"string","minLength":1,"maxLength":500},"dependencies":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"}},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path"],"additionalProperties":false}]},"startupTimeoutSeconds":{"default":60,"type":"integer","minimum":5,"maximum":300},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"restartPolicy":{"default":{"mode":"never","maxRestarts":0,"backoffSeconds":1},"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"never"},"maxRestarts":{"default":0,"type":"number","const":0},"backoffSeconds":{"default":1,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"on_failure"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"always"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false}]}},"required":["name","command"],"additionalProperties":false}}},"required":["setupCommands"],"additionalProperties":false}},"required":["source","definition"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"repository"}},"required":["source"],"additionalProperties":false}]},"timeoutSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxSteps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"modelSettings":{"type":"object","properties":{"temperature":{"type":"number"},"top_p":{"type":"number"},"top_k":{"type":"number"},"max_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"presence_penalty":{"type":"number"},"frequency_penalty":{"type":"number"},"reasoning_effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]},"reasoning":{"type":"object","properties":{"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}}},"verbosity":{"type":"string","enum":["low","medium","high","caveman"]}}}},"required":["type"],"additionalProperties":{}}]},"tools":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"function"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"required":{"type":"array","items":{"type":"string"}},"strict":{"type":"boolean"},"async":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"builtin"},"id":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"},"policy":{"type":"string","enum":["enabled","approved","denied"]}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"managed"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_search","code_interpreter","file_search","computer_use","shell","image_generation","tool_search"]},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"mcp"},"servers":{"minItems":1,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["type","servers"],"additionalProperties":false}]}},"tool_choice":{"anyOf":[{"type":"string","const":"none"},{"type":"string","const":"auto"},{"type":"string","const":"required"},{"type":"object","properties":{"type":{"type":"string","const":"function","description":"Require a named function tool."},"function":{"type":"object","properties":{"name":{"type":"string","description":"Function name to require."}},"required":["name"],"description":"Required function tool."}},"required":["type","function"]}]},"parallel_tool_calls":{"type":"boolean"},"permission_mode":{"type":"string","enum":["supervised","auto_accept_edits","auto","full_access"]},"mode":{"type":"string","minLength":1},"compaction":{"type":"string","enum":["auto","off"]},"reasoning":{"anyOf":[{"type":"object","properties":{"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}}},{"type":"object","properties":{"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}},"required":["effort"],"additionalProperties":false}]},"sampling":{"type":"object","properties":{"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"top_k":{"type":"number","minimum":1,"maximum":100},"n":{"type":"number","minimum":1,"maximum":4},"seed":{"type":"number"},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"max_output_tokens":{"type":"number"},"presence_penalty":{"type":"number","minimum":-2,"maximum":2},"frequency_penalty":{"type":"number","minimum":-2,"maximum":2},"repetition_penalty":{"type":"number","minimum":0,"maximum":2},"logit_bias":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"logprobs":{"type":"boolean"},"top_logprobs":{"type":"integer","minimum":0,"maximum":20}},"additionalProperties":false},"text":{"type":"object","properties":{"format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text","description":"Plain text response format."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"json_object","description":"JSON object response format."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"json_schema","description":"JSON schema response format."},"json_schema":{"type":"object","properties":{"name":{"type":"string","description":"Response schema name."},"strict":{"description":"Whether schema matching should be strict.","default":true,"type":"boolean"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON schema definition."}},"required":["name","schema"],"description":"Structured JSON schema response settings."}},"required":["type","json_schema"]},{"type":"object","properties":{"image":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific image response format settings."}},"required":["image"]}]},"verbosity":{"type":"string","enum":["low","medium","high","caveman"]}},"additionalProperties":false},"budget":{"type":"object","properties":{"steps":{"type":"integer","minimum":1,"maximum":9007199254740991},"credits":{"type":"number"}},"additionalProperties":false},"cache_ttl_seconds":{"type":"number","minimum":0},"service_tier":{"type":"string","minLength":1},"stream":{"type":"boolean"},"store":{"type":"boolean"},"background":{"type":"boolean"},"include":{"type":"array","items":{"type":"string","enum":["reasoning.encrypted"]}},"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"response_id":{"type":"string","minLength":1,"maxLength":200},"client":{"type":"object","properties":{"platform":{"type":"string","minLength":1},"ui_context":{"type":"object","properties":{"route":{"type":"string","maxLength":512},"mode":{"type":"string","enum":["chat","work"]},"place":{"type":"string","enum":["conversations","discover","sites","attention","files","teammates","plugins","scheduled","you"]},"conversationId":{"type":"string","maxLength":128},"workspaceId":{"type":"string","maxLength":128},"projectId":{"type":"string","maxLength":128},"taskId":{"type":"string","maxLength":128},"runId":{"type":"string","maxLength":128}}}},"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"options":{"type":"object","properties":{"source":{"type":"string"},"recipe":{"type":"object","properties":{"id":{"type":"string"},"installationId":{"type":"string"},"channel":{"type":"string","enum":["web","ios","sms","slack","telegram","email","scheduled","event","tool"]},"allowedConnectorProviders":{"type":"array","items":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]}},"allowedConnectorOperations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"configuration":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},{"type":"null"}]}}},"required":["id"]},"connector":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"],"description":"Exact connector provider selected by the user in the composer."}},"required":["provider"],"additionalProperties":false},"agent":{"type":"object","properties":{"minToolCalls":{"type":"integer","minimum":0,"maximum":9007199254740991}}}},"additionalProperties":false}},"additionalProperties":false}}}}},"get":{"operationId":"getResponses","tags":["responses"],"summary":"Find a response by idempotency key","description":"Returns the response accepted for an idempotency key, so a client that lost the create stream can find its response.","responses":{"200":{"description":"The accepted response, if any","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"response"},"id":{"type":"string","minLength":1,"maxLength":200},"conversation_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","in_progress","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","completed","failed","cancelled","incomplete"]},"waiting_on":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"type":"string","enum":["user","delegation","handle","schedule","channel"]},"initiator_user_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"project_task_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"teammate_context_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computer_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolved_configuration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancellation_requested_at":{"type":["string","null"]},"terminal_reason":{"type":["string","null"]},"last_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"accepted_at":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["idempotency_key","kind","accepted_at","duplicate"],"additionalProperties":false},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}}},"required":["object","id","conversation_id","status","waiting_on","attempt","trigger","initiator_user_id","project_id","project_task_id","created_at","updated_at","started_at","completed_at","terminal_reason","last_item_id"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"No response accepted for that key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"idempotency_key","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}]}},"/responses/compact":{"post":{"operationId":"postResponsesCompact","tags":["responses"],"summary":"Compact a conversation","description":"Summarises older items so the next response fits the model context window.","responses":{"200":{"description":"Compaction outcome","content":{"application/json":{"schema":{"type":"object","properties":{"compacted":{"type":"boolean"},"conversation":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}}},"additionalProperties":{}}},"required":["compacted","conversation"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"string","minLength":1}},"required":["conversation"],"additionalProperties":false}}}}}},"/responses/input_tokens":{"post":{"operationId":"postResponsesInputTokens","tags":["responses"],"summary":"Count input tokens","description":"Counts the tokens a model would read for the given input and instructions.","responses":{"200":{"description":"Token count","content":{"application/json":{"schema":{"type":"object","properties":{"input_tokens":{"type":"number"},"model":{"type":"string"}},"required":["input_tokens","model"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string"},"input":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"]},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"tool_call"},"call_id":{"type":"string","minLength":1},"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","call_id"]},{"type":"object","properties":{"type":{"type":"string","const":"interaction_response"},"tool_name":{"type":"string","minLength":1},"response":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","tool_name","response"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"approval_response"},"approval_id":{"type":"string","pattern":"^coa_[A-Za-z0-9-]+$"}},"required":["type","approval_id"],"additionalProperties":false}]}},{"type":"string"}]},"instructions":{"type":"string"}},"required":["model","input"]}}}}}},"/responses/{response_id}":{"get":{"operationId":"getResponsesByResponseId","tags":["responses"],"summary":"Get a response","description":"Returns the authoritative state of a response with its output items.","responses":{"200":{"description":"The response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"response"},"id":{"type":"string","minLength":1,"maxLength":200},"conversation_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","in_progress","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","completed","failed","cancelled","incomplete"]},"waiting_on":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"type":"string","enum":["user","delegation","handle","schedule","channel"]},"initiator_user_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"project_task_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"teammate_context_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computer_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolved_configuration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancellation_requested_at":{"type":["string","null"]},"terminal_reason":{"type":["string","null"]},"last_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"accepted_at":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["idempotency_key","kind","accepted_at","duplicate"],"additionalProperties":false},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}}},"required":["object","id","conversation_id","status","waiting_on","attempt","trigger","initiator_user_id","project_id","project_task_id","created_at","updated_at","started_at","completed_at","terminal_reason","last_item_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Response not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"response_id","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}]}},"/responses/{response_id}/events":{"get":{"operationId":"getResponsesByResponseIdEvents","tags":["responses"],"summary":"Replay response events","description":"Returns the ordered lifecycle events after a cursor, or a snapshot when the cursor can no longer be served.","responses":{"200":{"description":"Ordered events or a snapshot reset","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"response_id":{"type":"string","minLength":1,"maxLength":200},"sequence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"type":{"type":"string","minLength":1},"occurred_at":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","response_id","sequence","attempt","type","occurred_at","data"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"response_id":{"type":"string","minLength":1,"maxLength":200},"from_cursor":{"type":"integer","minimum":0,"maximum":9007199254740991},"next_cursor":{"type":"integer","minimum":0,"maximum":9007199254740991},"reset_required":{"type":"boolean"},"snapshot":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","const":"response"},"id":{"type":"string","minLength":1,"maxLength":200},"conversation_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","in_progress","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","completed","failed","cancelled","incomplete"]},"waiting_on":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"type":"string","enum":["user","delegation","handle","schedule","channel"]},"initiator_user_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"project_task_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"teammate_context_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computer_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolved_configuration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancellation_requested_at":{"type":["string","null"]},"terminal_reason":{"type":["string","null"]},"last_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"accepted_at":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["idempotency_key","kind","accepted_at","duplicate"],"additionalProperties":false},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}},"cursor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["object","id","conversation_id","status","waiting_on","attempt","trigger","initiator_user_id","project_id","project_task_id","created_at","updated_at","started_at","completed_at","terminal_reason","last_item_id","output","cursor"],"additionalProperties":false},{"type":"null"}]}},"required":["object","data","has_more","last_id","response_id","from_cursor","next_cursor","reset_required","snapshot"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Response not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"response_id","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"after","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":100}}]}},"/responses/{response_id}/input":{"post":{"operationId":"postResponsesByResponseIdInput","tags":["responses"],"summary":"Send input to a response","description":"Answers a question, resolves an approval or steers a response in progress. Set when to after to queue a user message for when the response finishes.","responses":{"200":{"description":"The continued response, its event stream, or the queued item","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","const":"response"},"id":{"type":"string","minLength":1,"maxLength":200},"conversation_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","in_progress","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","completed","failed","cancelled","incomplete"]},"waiting_on":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"type":"string","enum":["user","delegation","handle","schedule","channel"]},"initiator_user_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"project_task_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"teammate_context_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computer_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolved_configuration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancellation_requested_at":{"type":["string","null"]},"terminal_reason":{"type":["string","null"]},"last_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"accepted_at":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["idempotency_key","kind","accepted_at","duplicate"],"additionalProperties":false},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}}},"required":["object","id","conversation_id","status","waiting_on","attempt","trigger","initiator_user_id","project_id","project_task_id","created_at","updated_at","started_at","completed_at","terminal_reason","last_item_id"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"queued_item"},"queued":{"type":"object","properties":{"id":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"preview":{"type":"string"},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","conversationId","preview","attachmentCount","createdAt"],"additionalProperties":false}},"required":["object","queued"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"403":{"description":"Date of birth not confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"404":{"description":"Response not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"409":{"description":"Too many queued items","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"response_id","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"]},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"tool_call"},"call_id":{"type":"string","minLength":1},"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","call_id"]},{"type":"object","properties":{"type":{"type":"string","const":"interaction_response"},"tool_name":{"type":"string","minLength":1},"response":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","tool_name","response"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"approval_response"},"approval_id":{"type":"string","pattern":"^coa_[A-Za-z0-9-]+$"}},"required":["type","approval_id"],"additionalProperties":false}]}},"when":{"type":"string","enum":["now","after"]},"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"stream":{"type":"boolean"},"client":{"type":"object","properties":{"platform":{"type":"string","minLength":1},"ui_context":{"type":"object","properties":{"route":{"type":"string","maxLength":512},"mode":{"type":"string","enum":["chat","work"]},"place":{"type":"string","enum":["conversations","discover","sites","attention","files","teammates","plugins","scheduled","you"]},"conversationId":{"type":"string","maxLength":128},"workspaceId":{"type":"string","maxLength":128},"projectId":{"type":"string","maxLength":128},"taskId":{"type":"string","maxLength":128},"runId":{"type":"string","maxLength":128}}}},"additionalProperties":false}},"required":["input"],"additionalProperties":false}}}}}},"/responses/{response_id}/cancel":{"post":{"operationId":"postResponsesByResponseIdCancel","tags":["responses"],"summary":"Cancel a response","responses":{"200":{"description":"Cancellation accepted","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"response"},"id":{"type":"string","minLength":1,"maxLength":200},"conversation_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","in_progress","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","completed","failed","cancelled","incomplete"]},"waiting_on":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"type":"string","enum":["user","delegation","handle","schedule","channel"]},"initiator_user_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"project_task_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"teammate_context_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computer_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolved_configuration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancellation_requested_at":{"type":["string","null"]},"terminal_reason":{"type":["string","null"]},"last_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"accepted_at":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["idempotency_key","kind","accepted_at","duplicate"],"additionalProperties":false},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}}},"required":["object","id","conversation_id","status","waiting_on","attempt","trigger","initiator_user_id","project_id","project_task_id","created_at","updated_at","started_at","completed_at","terminal_reason","last_item_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Response not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"409":{"description":"Response attempt changed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"response_id","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotency_key":{"type":"string","minLength":1,"maxLength":200}},"required":["expected_attempt"],"additionalProperties":false}}}}}},"/conversations":{"get":{"operationId":"getConversations","tags":["conversations"],"summary":"List conversations","description":"Lists stored conversations the caller can read, pinned first, then newest activity.","responses":{"200":{"description":"A page of conversations","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"title":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"model":{"type":["string","null"]},"is_archived":{"type":"boolean"},"user_id":{"type":["string","number","null"]},"share_id":{"type":["string","null"]},"subject":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["output","source","memory","discover_card"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},{"type":"null"}]}},"required":["id","type","title","created_at","updated_at","is_archived"],"additionalProperties":{}}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"archived","schema":{"type":"string","enum":["active","archived","all"]}},{"in":"query","name":"subject_type","schema":{"type":"string","enum":["output","source","memory","discover_card"]}},{"in":"query","name":"subject_id","schema":{"type":"string","minLength":1,"maxLength":128}},{"in":"query","name":"q","schema":{"type":"string","maxLength":200}},{"in":"query","name":"sort_by","schema":{"default":"updated","type":"string","enum":["updated","created","title"]}},{"in":"query","name":"updated_after","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"in":"query","name":"type","schema":{"type":"string","enum":["chat","task","poly","delegate"]}},{"in":"query","name":"teammate_threads","schema":{"type":"string","enum":["include","exclude"]},"description":"Whether to list your teammate and group conversations. Exclude them when they are shown in a teammate roster instead."}]},"delete":{"operationId":"deleteConversations","tags":["conversations"],"summary":"Delete all conversations","description":"Deletes every stored personal conversation for the caller.","responses":{"200":{"description":"Deletion status"}},"hide":false}},"/conversations/archive":{"post":{"operationId":"postConversationsArchive","tags":["conversations"],"summary":"Archive or restore many conversations","description":"Sets the archived state of every stored personal conversation matching the filters. Only conversations not already in that state change.","responses":{"200":{"description":"Number of conversations changed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"archived":{"type":"number"}},"required":["success","archived"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"archived":{"type":"boolean"},"q":{"type":"string","maxLength":200},"updated_after":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"teammate_threads":{"type":"string","enum":["include","exclude"]}},"required":["archived"]}}}}}},"/conversations/items/{item_id}":{"get":{"operationId":"getConversationsItemsByItemId","tags":["conversations"],"summary":"Get an item","description":"Returns one stored item by ID with its conversation.","responses":{"200":{"description":"The item","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"conversation_id":{"type":"string"},"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["conversation_id","type","role","content"],"additionalProperties":false},{"type":"object","properties":{"conversation_id":{"type":"string"},"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["conversation_id","type","content"],"additionalProperties":false},{"type":"object","properties":{"conversation_id":{"type":"string"},"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["conversation_id","type","content"],"additionalProperties":false},{"type":"object","properties":{"conversation_id":{"type":"string"},"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["conversation_id","type","content"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Item not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"item_id","schema":{"type":"string","minLength":1},"required":true}]}},"/conversations/shared/{token}":{"get":{"operationId":"getConversationsSharedByToken","tags":["conversations"],"summary":"Read a shared conversation","description":"Returns the items of a publicly shared conversation by its share ID.","responses":{"200":{"description":"Shared conversation items","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}},"share_id":{"type":"string"},"shared_through":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["items","share_id","shared_through"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Shared conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"token","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string"}}]}},"/conversations/saved_items":{"get":{"operationId":"getConversationsSavedItems","tags":["conversations"],"summary":"List saved items","description":"The conversation items the caller has kept for later, newest first. Filter by conversation_id to read one conversation's saved items.","responses":{"200":{"description":"Saved items","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"conversation_title":{"type":["string","null"]},"note":{"type":["string","null"]},"excerpt":{"type":"string"},"saved_at":{"type":"string"}},"required":["id","conversation_id","conversation_title","note","excerpt","saved_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"conversation_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postConversationsSavedItems","tags":["conversations"],"summary":"Save an item for later","responses":{"200":{"description":"The saved item","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"conversation_title":{"type":["string","null"]},"note":{"type":["string","null"]},"excerpt":{"type":"string"},"saved_at":{"type":"string"}},"required":["id","conversation_id","conversation_title","note","excerpt","saved_at"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Item not found in the conversation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","minLength":1},"item_id":{"type":"string","minLength":1},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["conversation_id","item_id"]}}}}}},"/conversations/saved_items/{item_id}":{"delete":{"operationId":"deleteConversationsSavedItemsByItemId","tags":["conversations"],"summary":"Stop keeping an item","responses":{"200":{"description":"Deletion status"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"item_id","schema":{"type":"string","minLength":1},"required":true}]}},"/conversations/handles":{"get":{"operationId":"getConversationsHandles","tags":["conversations"],"summary":"List conversation handles","description":"Active agent handles granted to delegations in the caller's conversations.","responses":{"200":{"description":"Successful response"}},"hide":false}},"/conversations/handles/{handle_id}":{"delete":{"operationId":"deleteConversationsHandlesByHandleId","tags":["conversations"],"summary":"Revoke a conversation handle","description":"Stops an agent from using a handle granted to one of the caller's conversations.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"handle_id","schema":{"type":"string","minLength":1},"required":true}]}},"/conversations/{conversation_id}":{"get":{"operationId":"getConversationsByConversationId","tags":["conversations"],"summary":"Get a conversation","description":"Returns a stored conversation with its most recent items and latest response.","responses":{"200":{"description":"The conversation","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"conversation"},"id":{"type":"string"},"active_operation":{"anyOf":[{"type":"string","enum":["user_message","compact","edit_messages","human_response","connector_replay","async_result","session_compaction","durable_recovery"]},{"type":"null"}]},"latest_response":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","const":"response"},"id":{"type":"string","minLength":1,"maxLength":200},"conversation_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","in_progress","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","completed","failed","cancelled","incomplete"]},"waiting_on":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"type":"string","enum":["user","delegation","handle","schedule","channel"]},"initiator_user_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"project_task_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"teammate_context_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computer_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolved_configuration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancellation_requested_at":{"type":["string","null"]},"terminal_reason":{"type":["string","null"]},"last_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"accepted_at":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["idempotency_key","kind","accepted_at","duplicate"],"additionalProperties":false},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}}},"required":["object","id","conversation_id","status","waiting_on","attempt","trigger","initiator_user_id","project_id","project_task_id","created_at","updated_at","started_at","completed_at","terminal_reason","last_item_id"],"additionalProperties":false},{"type":"null"}]},"has_branches":{"type":"boolean"},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"title":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"model":{"type":["string","null"]},"model_tier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"permission_mode":{"type":"string","enum":["supervised","auto_accept_edits","auto","full_access"]},"is_archived":{"type":"boolean"},"user_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"share_id":{"type":["string","null"]},"project_id":{"type":["string","null"]},"parent_conversation_id":{"type":["string","null"]},"parent_message_id":{"type":["string","null"]},"subject":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["output","source","memory","discover_card"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},{"type":"null"}]},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}},"item_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"has_more_items":{"type":"boolean"},"oldest_item_id":{"type":["string","null"]}},"required":["id","type","title","created_at","updated_at","is_archived","user_id","share_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."},{"in":"query","name":"refresh_pending","schema":{"default":"false","type":"string","enum":["true","false"]}},{"in":"query","name":"item_limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":100}}]},"patch":{"operationId":"patchConversationsByConversationId","tags":["conversations"],"summary":"Update a conversation","description":"Changes the title, archive state, permission mode, branch parent or replaces the stored items.","responses":{"200":{"description":"The updated conversation","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"conversation"},"id":{"type":"string"},"active_operation":{"anyOf":[{"type":"string","enum":["user_message","compact","edit_messages","human_response","connector_replay","async_result","session_compaction","durable_recovery"]},{"type":"null"}]},"latest_response":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","const":"response"},"id":{"type":"string","minLength":1,"maxLength":200},"conversation_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","in_progress","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","completed","failed","cancelled","incomplete"]},"waiting_on":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"type":"string","enum":["user","delegation","handle","schedule","channel"]},"initiator_user_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"project_task_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"teammate_context_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computer_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolved_configuration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancellation_requested_at":{"type":["string","null"]},"terminal_reason":{"type":["string","null"]},"last_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"accepted_at":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["idempotency_key","kind","accepted_at","duplicate"],"additionalProperties":false},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}}},"required":["object","id","conversation_id","status","waiting_on","attempt","trigger","initiator_user_id","project_id","project_task_id","created_at","updated_at","started_at","completed_at","terminal_reason","last_item_id"],"additionalProperties":false},{"type":"null"}]},"has_branches":{"type":"boolean"},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"title":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"model":{"type":["string","null"]},"model_tier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"permission_mode":{"type":"string","enum":["supervised","auto_accept_edits","auto","full_access"]},"is_archived":{"type":"boolean"},"user_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"share_id":{"type":["string","null"]},"project_id":{"type":["string","null"]},"parent_conversation_id":{"type":["string","null"]},"parent_message_id":{"type":["string","null"]},"subject":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["output","source","memory","discover_card"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},{"type":"null"}]},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}},"item_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"has_more_items":{"type":"boolean"},"oldest_item_id":{"type":["string","null"]}},"required":["id","type","title","created_at","updated_at","is_archived","user_id","share_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"archived":{"type":"boolean"},"items":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"]},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]}]}},"parent_conversation_id":{"type":"string"},"parent_message_id":{"type":"string"},"permission_mode":{"type":"string","enum":["supervised","auto_accept_edits","auto","full_access"]}}}}}}},"delete":{"operationId":"deleteConversationsByConversationId","tags":["conversations"],"summary":"Delete a conversation","responses":{"200":{"description":"Deletion status","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}]}},"/conversations/{conversation_id}/title":{"post":{"operationId":"postConversationsByConversationIdTitle","tags":["conversations"],"summary":"Generate a title","description":"Generates a title from the conversation and stores it.","responses":{"200":{"description":"Generated title","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"title":{"type":"string"}},"required":["success","title"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"]},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"]}]}},"messages":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool","developer","compaction","goal"]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"index":{"type":"number"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["name"]}},"required":["id","function"]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]},"status":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"completion_id":{"type":"string"},"run_id":{"type":"string"},"created":{"type":"number"},"model":{"type":"string"},"provider":{"type":"string"},"log_id":{"type":"string"},"reasoning":{"type":"object","properties":{"collapsed":{"type":"boolean"},"content":{"type":"string"}},"required":["content"]},"citations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"app":{"type":"string"},"mode":{"type":"string"},"id":{"type":"string"},"parent_message_id":{"type":"string"},"tool_call_id":{"type":"string"},"tool_call_arguments":{},"timestamp":{"type":"number"},"platform":{"type":"string"},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"]},{"type":"null"}]}},"required":["role"]},{"type":"object","properties":{"role":{"type":"string","const":"compaction"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}}]},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}}},"required":["role","content"]}]}},"store":{"type":"boolean"}}}}}}}},"/conversations/{conversation_id}/items":{"get":{"operationId":"getConversationsByConversationIdItems","tags":["conversations"],"summary":"List conversation items","description":"Pages through the stored items of a conversation.","responses":{"200":{"description":"Items","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"conversation_id":{"type":"string"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","conversation_id","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string"}},{"in":"query","name":"before","schema":{"type":"string"}}]}},"/conversations/{conversation_id}/branches":{"get":{"operationId":"getConversationsByConversationIdBranches","tags":["conversations"],"summary":"List the conversation branch family","responses":{"200":{"description":"Conversation branches","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"]},"parent_conversation_id":{"type":["string","null"]},"created_at":{"type":"string"},"is_archived":{"type":"boolean"}},"required":["id","title","parent_conversation_id","created_at","is_archived"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}]}},"/conversations/{conversation_id}/check":{"post":{"operationId":"postConversationsByConversationIdCheck","tags":["conversations","guardrails"],"summary":"Check a conversation against guardrails","responses":{"200":{"description":"Guardrail check results","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"content":{"type":"string"},"data":{"type":"object","properties":{"provider":{"type":"string"},"isValid":{"type":"boolean"},"violations":{"type":"array","items":{"type":"string"}},"rawResponse":{}},"required":["provider","isValid","violations"],"additionalProperties":false}},"required":["content","data"],"additionalProperties":false}},"required":["response"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","tool"]}}}}}}}},"/conversations/{conversation_id}/reactions":{"post":{"operationId":"postConversationsByConversationIdReactions","tags":["conversations"],"summary":"Add or remove a reaction on an item","responses":{"200":{"description":"The item's reactions after the change","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"item_id":{"type":"string"},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string","minLength":1,"maxLength":16},"actor":{"type":"string","enum":["person","teammate"]},"actor_id":{"type":"string","minLength":1},"created_at":{"type":"string","minLength":1}},"required":["emoji","actor","actor_id","created_at"],"additionalProperties":false}}},"required":["item_id","reactions"],"additionalProperties":false}},"required":["response"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation or item not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item_id":{"type":"string","minLength":1},"emoji":{"type":"string","minLength":1,"maxLength":16},"remove":{"type":"boolean"}},"required":["item_id","emoji"]}}}}}},"/conversations/{conversation_id}/share":{"post":{"operationId":"postConversationsByConversationIdShare","tags":["conversations"],"summary":"Share a conversation publicly","responses":{"200":{"description":"Share link details","content":{"application/json":{"schema":{"type":"object","properties":{"share_id":{"type":"string"},"shared_through":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["share_id","shared_through"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}]},"delete":{"operationId":"deleteConversationsByConversationIdShare","tags":["conversations"],"summary":"Unshare a conversation","responses":{"200":{"description":"Unshare result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation or share not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}]}},"/conversations/{conversation_id}/organisation":{"get":{"operationId":"getConversationsByConversationIdOrganisation","tags":["conversations"],"summary":"Get personal organisation","responses":{"200":{"description":"Personal conversation organisation","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"isPinned":{"type":"boolean"},"isUnread":{"type":"boolean"},"snooze":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"until"},"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["kind","until"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"next_response"}},"required":["kind"],"additionalProperties":false}]},{"type":"null"}]},"group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false},{"type":"null"}]},"availableGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false}},"updatedAt":{"type":["string","null"]}},"required":["conversationId","revision","isPinned","isUnread","snooze","group","availableGroups","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}]},"patch":{"operationId":"patchConversationsByConversationIdOrganisation","tags":["conversations"],"summary":"Update personal organisation","description":"Pins, marks unread, snoozes or moves the conversation into a notebook. Pin, unread and snooze changes need the current revision.","responses":{"200":{"description":"Updated organisation","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"isPinned":{"type":"boolean"},"isUnread":{"type":"boolean"},"snooze":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"until"},"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["kind","until"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"next_response"}},"required":["kind"],"additionalProperties":false}]},{"type":"null"}]},"group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false},{"type":"null"}]},"availableGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false}},"updatedAt":{"type":["string","null"]}},"required":["conversationId","revision","isPinned","isUnread","snooze","group","availableGroups","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"The notebook does not exist in the conversation's scope"},"409":{"description":"The organisation revision changed"}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"isPinned":{"type":"boolean"},"isUnread":{"type":"boolean"},"snooze":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"until"},"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["kind","until"]},{"type":"object","properties":{"kind":{"type":"string","const":"next_response"}},"required":["kind"]}]},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}}}},"/conversations/{conversation_id}/queue":{"get":{"operationId":"getConversationsByConversationIdQueue","tags":["conversations"],"summary":"List queued follow-up messages","description":"Returns the user messages waiting to be sent once the current response finishes.","responses":{"200":{"description":"Queued messages","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"preview":{"type":"string"},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","conversationId","preview","attachmentCount","createdAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}]},"post":{"operationId":"postConversationsByConversationIdQueue","tags":["conversations"],"summary":"Queue a follow-up message","description":"Queues a user message to send as the next turn once the current response finishes, even if this tab closes.","responses":{"200":{"description":"Queued message","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"preview":{"type":"string"},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","conversationId","preview","attachmentCount","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"409":{"description":"Too many queued messages","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"description":"Stable application message identifier.","type":"string","minLength":1},"role":{"type":"string","enum":["developer","system","user","assistant","tool"],"description":"Message author role."},"name":{"description":"Optional participant name.","type":"string"},"content":{"description":"OpenAI-compatible message content.","anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]},"parts":{"description":"Assistant-native structured message parts.","type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"refusal":{"description":"Assistant refusal text when present.","type":"string"},"tool_call_id":{"description":"Tool call ID this message responds to.","type":"string"},"tool_call_arguments":{"description":"Parsed or raw tool call arguments."},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Tool call ID."},"type":{"type":"string","const":"function","description":"Tool call type."},"function":{"type":"object","properties":{"name":{"type":"string","description":"Function name to call."},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}],"description":"Function call arguments."}},"required":["name","arguments"],"description":"Function tool call payload."}},"required":["id","type","function"]},"description":"Assistant tool calls requested by the model."},"status":{"description":"Provider or application message status.","type":"string"},"data":{"description":"Additional message data."}},"required":["role"]},"request":{"default":{},"type":"object","properties":{"model":{"description":"The model to use for the chat completion.","type":"string"},"models":{"description":"Explicit models to use for a multi-model chat completion.","type":"array","items":{"type":"string","minLength":1}},"provider":{"description":"The provider to use when the model name is shared by multiple providers.","type":"string"},"model_tier":{"description":"Model tier used when no explicit model is requested, or for the model an agent runs on. Omit it to use the project default tier in project conversations, otherwise Medium.","type":"string","enum":["low","medium","high","ultra"]},"permission_mode":{"description":"Permission policy for file and command actions in this conversation.","type":"string","enum":["supervised","auto_accept_edits","auto","full_access"]},"compaction":{"description":"Conversation compaction policy for this request. Use auto to compact near the model context limit, or off to disable compaction.","type":"string","enum":["auto","off"]},"mode":{"description":"The chat mode to use for default parameters and prompt configuration.","type":"string","minLength":1},"compute_site":{"description":"The compute site where the selected model should run.","type":"string","enum":["hosted","browser","device","machine"]},"system_prompt":{"description":"System instructions to apply to the request before the conversation messages.","type":"string"},"should_think":{"description":"Whether the model should think before responding when supported.","type":"boolean"},"use_multi_model":{"description":"Whether the request should run against multiple models.","type":"boolean"},"temperature":{"description":"Sampling temperature; higher values produce more varied responses.","type":"number","minimum":0,"maximum":2},"top_p":{"description":"Nucleus sampling probability.","type":"number","minimum":0,"maximum":1},"top_k":{"description":"Top-K sampling limit for providers that support it.","type":"number","minimum":1,"maximum":100},"n":{"description":"Number of completions to generate.","type":"number","minimum":1,"maximum":4},"stop":{"description":"Stop sequence or sequences.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"max_tokens":{"description":"Maximum output tokens; mutually exclusive with max_completion_tokens and max_output_tokens.","type":"number"},"max_completion_tokens":{"description":"Maximum output tokens for OpenAI reasoning models; mutually exclusive with max_tokens and max_output_tokens.","type":"number"},"presence_penalty":{"description":"Penalty for tokens already present in the prompt or completion.","type":"number","minimum":-2,"maximum":2},"frequency_penalty":{"description":"Penalty for repeated token frequency.","type":"number","minimum":-2,"maximum":2},"repetition_penalty":{"description":"Penalty for repeated tokens on providers that support repetition penalties.","type":"number","minimum":0,"maximum":2},"logit_bias":{"description":"Provider token bias map.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"logprobs":{"description":"Whether to return token log probabilities.","type":"boolean"},"top_logprobs":{"description":"Number of top token log probabilities to return.","type":"integer","minimum":0,"maximum":20},"user":{"description":"OpenAI-compatible end-user identifier passed to providers when supported.","type":"string"},"seed":{"description":"Deterministic sampling seed for providers that support it.","type":"number"},"metadata":{"description":"Provider metadata attached to the request.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"reasoning_effort":{"description":"Reasoning effort shortcut; mutually exclusive with reasoning.","type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]},"reasoning":{"description":"Structured reasoning controls; mutually exclusive with reasoning_effort.","type":"object","properties":{"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}}},"verbosity":{"description":"Desired response verbosity.","type":"string","enum":["low","medium","high","caveman"]},"max_steps":{"description":"Maximum sequential model/tool steps for agent-like modes.","type":"integer","minimum":1,"maximum":9007199254740991},"budget_constraint":{"description":"Optional budget constraint for model routing.","type":"number"},"enabled_tools":{"description":"Tool IDs enabled for this request.","type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},"tool_selection_mode":{"description":"How function tools are chosen. Managed lets the server add its baseline and capability discovery activations to enabled_tools; explicit (the default) uses enabled_tools as sent.","type":"string","enum":["managed","explicit"]},"approved_tools":{"description":"Tool IDs pre-approved for approval-gated modes.","type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},"denied_tools":{"description":"Tool IDs explicitly unavailable for this request.","type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},"connector_approval_id":{"description":"One-time approval for the exact connector action in this request.","type":"string","pattern":"^coa_[A-Za-z0-9-]+$"},"tools":{"description":"OpenAI-compatible function tools.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function","description":"Tool type."},"function":{"type":"object","properties":{"name":{"type":"string","description":"Function name."},"description":{"description":"Function description shown to the model.","type":"string"},"parameters":{"description":"Function parameters JSON schema.","default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"required":{"description":"Required function parameter names.","type":"array","items":{"type":"string"}},"strict":{"description":"Whether arguments must match the schema exactly.","type":"boolean"},"async":{"description":"Whether an Astra tool call may complete after the response continues.","type":"boolean"}},"required":["name"],"description":"Function tool definition."}},"required":["type","function"]}},"tool_choice":{"description":"OpenAI-compatible tool choice.","anyOf":[{"type":"string","const":"none"},{"type":"string","const":"auto"},{"type":"string","const":"required"},{"type":"object","properties":{"type":{"type":"string","const":"function","description":"Require a named function tool."},"function":{"type":"object","properties":{"name":{"type":"string","description":"Function name to require."}},"required":["name"],"description":"Required function tool."}},"required":["type","function"]}]},"parallel_tool_calls":{"description":"Whether providers may call tools in parallel.","type":"boolean"},"tool_options":{"description":"Provider-hosted tool settings keyed by hosted tool name.","type":"object","properties":{"code_interpreter":{"description":"Settings for the hosted code interpreter tool.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"web_search":{"description":"Settings for the hosted web search tool.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file_search":{"description":"Settings for the hosted file search tool.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"mcp_servers":{"description":"Hosted MCP server definitions available to the request.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"computer_use":{"description":"Settings for hosted computer-use tools.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"image_generation":{"type":"object","properties":{"size":{"description":"Requested generated image size.","type":"string"},"quality":{"description":"Requested generated image quality.","type":"string"}},"description":"Settings for hosted image generation."},"shell":{"type":"object","properties":{"environment":{"type":"object","properties":{"type":{"description":"Shell environment type to request.","type":"string"}},"description":"Shell environment settings."}},"description":"Settings for hosted shell execution."},"tool_search":{"description":"Settings for hosted tool discovery.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"responses_tools":{"description":"Raw OpenAI Responses tool definitions.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":{}},"response_format":{"description":"OpenAI-compatible response format.","anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text","description":"Plain text response format."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"json_object","description":"JSON object response format."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"json_schema","description":"JSON schema response format."},"json_schema":{"type":"object","properties":{"name":{"type":"string","description":"Response schema name."},"strict":{"description":"Whether schema matching should be strict.","default":true,"type":"boolean"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON schema definition."}},"required":["name","schema"],"description":"Structured JSON schema response settings."}},"required":["type","json_schema"]},{"type":"object","properties":{"image":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific image response format settings."}},"required":["image"]}]},"replicate_wait_seconds":{"description":"Replicate Prefer wait value for async-capable predictions.","type":"number"},"web_search_options":{"description":"OpenAI-compatible web search options.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"audio":{"description":"OpenAI-compatible audio output options.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"audio_format":{"description":"Audio output format for providers that support it.","type":"string"},"modalities":{"description":"Output modalities requested from the provider.","type":"array","items":{"type":"string"}},"prediction":{"description":"OpenAI-compatible prediction hint.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"service_tier":{"description":"Provider service tier.","type":"string"},"stream_options":{"description":"Streaming options passed to compatible providers.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"voice":{"description":"Voice for audio-capable responses.","type":"string"},"cache_ttl_seconds":{"description":"Provider response cache TTL in seconds.","type":"number","minimum":0},"background":{"description":"Whether to use OpenAI Responses background mode.","type":"boolean"},"use_responses":{"description":"Whether to force OpenAI Responses API use when supported.","type":"boolean"},"previous_response_id":{"description":"Explicit previous OpenAI response ID.","type":"string"},"auto_previous_response_id":{"description":"Whether to infer the previous OpenAI response ID from stored history.","type":"boolean"},"conversation":{"description":"OpenAI Responses conversation value."},"input":{"description":"Explicit OpenAI Responses input payload."},"input_items":{"description":"Extra OpenAI Responses input items.","type":"array","items":{}},"text":{"description":"OpenAI Responses text settings.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"include":{"description":"OpenAI Responses include list.","type":"array","items":{"type":"string"}},"include_defaults":{"description":"Whether default OpenAI Responses include values should be added.","type":"boolean"},"include_encrypted_reasoning":{"description":"Whether encrypted reasoning content should be included when supported.","type":"boolean"},"truncation":{"description":"OpenAI Responses truncation strategy.","type":"string"},"prompt_cache_key":{"description":"Prompt cache key for compatible providers.","type":"string"},"prompt_cache_retention":{"description":"Prompt cache retention for compatible providers.","type":"string"},"prompt_cache_options":{"description":"Prompt cache policy for GPT-5.6 and later OpenAI models.","type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string","const":"30m"},"comparison_response_id":{"type":"string"}},"additionalProperties":false},"max_output_tokens":{"description":"OpenAI Responses output token limit; equivalent to max_tokens and max_completion_tokens.","type":"number"},"max_tool_calls":{"description":"Maximum provider tool calls.","type":"number"},"safety_identifier":{"description":"Provider safety identifier.","type":"string"},"conversation_type":{"description":"The product conversation type that owns this completion.","type":"string","enum":["chat","task","poly","delegate"]},"conversation_subject":{"description":"The file a new conversation is about. Ignored once the conversation exists.","type":"object","properties":{"type":{"type":"string","enum":["output","source","memory","discover_card"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},"conversation_notebook":{"description":"The notebook a new conversation joins, and the notebook sources this turn may read. The notebook id is ignored once the conversation exists.","type":"object","properties":{"id":{"type":"string","minLength":1},"source_ids":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}}},"required":["id"],"additionalProperties":false},"command_payload":{"description":"Durable command metadata for resumable or approval-gated runs.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"require_approval_for":{"description":"Tool permissions that require explicit user approval for this run.","type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"enforce_mode_tool_policy":{"description":"Whether the selected mode policy must be enforced for this run.","type":"boolean"},"platform":{"description":"Client platform sending the request.","type":"string","minLength":1},"poly":{"description":"Marks the request as the signed-in user's Poly conversation, which only receives product-operating tools, and carries the client's current UI context.","type":"object","properties":{"ui_context":{"type":"object","properties":{"route":{"type":"string","maxLength":512},"mode":{"type":"string","enum":["chat","work"]},"place":{"type":"string","enum":["conversations","discover","sites","attention","files","teammates","plugins","scheduled","you"]},"conversationId":{"type":"string","maxLength":128},"workspaceId":{"type":"string","maxLength":128},"projectId":{"type":"string","maxLength":128},"taskId":{"type":"string","maxLength":128},"runId":{"type":"string","maxLength":128}}}}},"options":{"description":"Grouped feature settings that are not model generation controls.","type":"object","properties":{"source":{"description":"Request source marker for server-created flows.","type":"string"},"channel":{"description":"The inbound messaging channel this turn arrived on, such as SMS.","type":"object","properties":{"id":{"type":"string","enum":["sms","slack","telegram","email"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["id"]},"recipe":{"description":"Settings for recipe mode, which enables connector-backed workflows.","type":"object","properties":{"id":{"type":"string"},"installationId":{"type":"string"},"channel":{"type":"string","enum":["web","ios","sms","slack","telegram","email","scheduled","event","tool"]},"allowedConnectorProviders":{"type":"array","items":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]}},"allowedConnectorOperations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"configuration":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},{"type":"null"}]}}},"required":["id"]},"connector":{"description":"The exact connector selected for this chat turn.","type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"],"description":"Exact connector provider selected by the user in the composer."}},"required":["provider"],"additionalProperties":false},"agent":{"description":"Settings for agent mode, which enables multi-step reasoning and tool usage.","type":"object","properties":{"minToolCalls":{"description":"Minimum number of tool calls to make before responding","type":"integer","minimum":0,"maximum":9007199254740991}}},"sandbox":{"description":"Settings for sandbox execution in a project coding conversation.","type":"object","properties":{"enabled":{"type":"boolean"},"executionProvider":{"type":"string","enum":["polychat","openai"]},"repo":{"type":"string"},"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"taskType":{"type":"string","enum":["feature-implementation","code-review","test-suite","bug-fix","refactoring","documentation","migration"]},"promptStrategy":{"type":"string","enum":["auto","feature-delivery","bug-fix","refactor","test-hardening"]},"deliveryPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"shouldCommit":{"type":"boolean"},"environmentSetup":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"polychat"},"definition":{"type":"object","properties":{"version":{"default":1,"type":"number","const":1},"setupCommands":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"resumeCommands":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"runtimes":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"setupTimeoutSeconds":{"default":600,"type":"integer","minimum":30,"maximum":1800},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"networkHosts":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","maxLength":253,"pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"default":".","type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"command":{"type":"string","minLength":1,"maxLength":500},"dependencies":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"}},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path"],"additionalProperties":false}]},"startupTimeoutSeconds":{"default":60,"type":"integer","minimum":5,"maximum":300},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"restartPolicy":{"default":{"mode":"never","maxRestarts":0,"backoffSeconds":1},"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"never"},"maxRestarts":{"default":0,"type":"number","const":0},"backoffSeconds":{"default":1,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"on_failure"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"always"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false}]}},"required":["name","command"],"additionalProperties":false}}},"required":["setupCommands"],"additionalProperties":false}},"required":["source","definition"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"repository"}},"required":["source"],"additionalProperties":false}]},"timeoutSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxSteps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"modelSettings":{"type":"object","properties":{"temperature":{"type":"number"},"top_p":{"type":"number"},"top_k":{"type":"number"},"max_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"presence_penalty":{"type":"number"},"frequency_penalty":{"type":"number"},"reasoning_effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]},"reasoning":{"type":"object","properties":{"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}}},"verbosity":{"type":"string","enum":["low","medium","high","caveman"]}}}},"required":["enabled"],"additionalProperties":{}},"toolInteraction":{"description":"Structured resolution for a pending human-in-the-loop tool result.","type":"object","properties":{"toolName":{"type":"string","minLength":1,"description":"Tool whose pending interaction this user turn resolves."},"response":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Structured response submitted through the tool view."}},"required":["toolName","response"],"additionalProperties":false},"toolInteractions":{"description":"Every approval resolution for a run that is waiting on several approvals at once.","minItems":2,"type":"array","items":{"type":"object","properties":{"toolName":{"type":"string","minLength":1,"description":"Tool whose pending interaction this user turn resolves."},"response":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Structured response submitted through the tool view."}},"required":["toolName","response"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}}}}}},"/conversations/{conversation_id}/artifact_bindings/read":{"post":{"operationId":"postConversationsByConversationIdArtifactBindingsRead","tags":["conversations"],"summary":"Read an artifact's declared data source","description":"Runs one read-only data source that an artifact declared when it was written. The declaration is read from the stored item, so the caller only names it.","responses":{"200":{"description":"The data source's latest result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"fetchedAt":{"type":"string"},"cached":{"type":"boolean"}},"required":["data","fetchedAt","cached"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"403":{"description":"The data source would change something","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"404":{"description":"Data source not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"429":{"description":"Read too often","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"string","minLength":1,"maxLength":200},"artifactIdentifier":{"type":"string","minLength":1,"maxLength":200},"bindingId":{"type":"string","minLength":1,"maxLength":60},"args":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["messageId","artifactIdentifier","bindingId"],"additionalProperties":false}}}}}},"/conversations/{conversation_id}/queue/{queued_item_id}":{"delete":{"operationId":"deleteConversationsByConversationIdQueueByQueuedItemId","tags":["conversations"],"summary":"Remove a queued follow-up message","responses":{"200":{"description":"Removal outcome"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."},{"in":"path","name":"queued_item_id","schema":{"type":"string","minLength":1},"required":true}]}},"/conversations/{conversation_id}/goal":{"get":{"operationId":"getConversationsByConversationIdGoal","tags":["conversations"],"summary":"Get the conversation goal","responses":{"200":{"description":"The active goal, or null","content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":["string","null"]},"sandbox_run_id":{"type":["string","null"]},"user_id":{"type":"number"},"objective":{"type":"string"},"status":{"type":"string","enum":["active","paused","completed","cleared","blocked","stalled","limit_reached"]},"source":{"type":"string","enum":["user","model"]},"iteration_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"stall_streak":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens_spent":{"type":"integer","minimum":0,"maximum":9007199254740991},"progress":{"type":"array","items":{"type":"object","properties":{"iteration":{"type":"integer","minimum":0,"maximum":9007199254740991},"surface":{"type":"string","enum":["chat","agent","sandbox"]},"summary":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"string"}},"next":{"type":"string"},"steer":{"description":"A user instruction that redirected the work.","type":"string"},"at":{"type":"string"}},"required":["iteration","surface","summary","evidence","at"],"additionalProperties":false}},"evidence":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},{"type":"null"}]},"stopped_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"last_continued_at":{"type":["string","null"]}},"required":["id","conversation_id","sandbox_run_id","user_id","objective","status","source","iteration_count","stall_streak","tokens_spent","progress","evidence","stopped_reason","created_at","updated_at","completed_at","last_continued_at"],"additionalProperties":false},{"type":"null"}]}},"required":["goal"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}]},"post":{"operationId":"postConversationsByConversationIdGoal","tags":["conversations"],"summary":"Set the conversation goal","description":"Sets a persistent objective. Replaces the objective in place when one is active.","responses":{"200":{"description":"The stored goal","content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":["string","null"]},"sandbox_run_id":{"type":["string","null"]},"user_id":{"type":"number"},"objective":{"type":"string"},"status":{"type":"string","enum":["active","paused","completed","cleared","blocked","stalled","limit_reached"]},"source":{"type":"string","enum":["user","model"]},"iteration_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"stall_streak":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens_spent":{"type":"integer","minimum":0,"maximum":9007199254740991},"progress":{"type":"array","items":{"type":"object","properties":{"iteration":{"type":"integer","minimum":0,"maximum":9007199254740991},"surface":{"type":"string","enum":["chat","agent","sandbox"]},"summary":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"string"}},"next":{"type":"string"},"steer":{"description":"A user instruction that redirected the work.","type":"string"},"at":{"type":"string"}},"required":["iteration","surface","summary","evidence","at"],"additionalProperties":false}},"evidence":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},{"type":"null"}]},"stopped_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"last_continued_at":{"type":["string","null"]}},"required":["id","conversation_id","sandbox_run_id","user_id","objective","status","source","iteration_count","stall_streak","tokens_spent","progress","evidence","stopped_reason","created_at","updated_at","completed_at","last_continued_at"],"additionalProperties":false},{"type":"null"}]}},"required":["goal"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"objective":{"type":"string","minLength":1,"maxLength":2000},"project_id":{"type":"string","minLength":1}},"required":["objective"]}}}}},"patch":{"operationId":"patchConversationsByConversationIdGoal","tags":["conversations"],"summary":"Update the conversation goal lifecycle","description":"Pauses, resumes, or clears the active goal.","responses":{"200":{"description":"The updated goal","content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":["string","null"]},"sandbox_run_id":{"type":["string","null"]},"user_id":{"type":"number"},"objective":{"type":"string"},"status":{"type":"string","enum":["active","paused","completed","cleared","blocked","stalled","limit_reached"]},"source":{"type":"string","enum":["user","model"]},"iteration_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"stall_streak":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens_spent":{"type":"integer","minimum":0,"maximum":9007199254740991},"progress":{"type":"array","items":{"type":"object","properties":{"iteration":{"type":"integer","minimum":0,"maximum":9007199254740991},"surface":{"type":"string","enum":["chat","agent","sandbox"]},"summary":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"string"}},"next":{"type":"string"},"steer":{"description":"A user instruction that redirected the work.","type":"string"},"at":{"type":"string"}},"required":["iteration","surface","summary","evidence","at"],"additionalProperties":false}},"evidence":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},{"type":"null"}]},"stopped_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"last_continued_at":{"type":["string","null"]}},"required":["id","conversation_id","sandbox_run_id","user_id","objective","status","source","iteration_count","stall_streak","tokens_spent","progress","evidence","stopped_reason","created_at","updated_at","completed_at","last_continued_at"],"additionalProperties":false},{"type":"null"}]}},"required":["goal"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"No goal on this conversation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused","cleared"]}},"required":["status"]}}}}}},"/conversations/{conversation_id}/delegations":{"get":{"operationId":"getConversationsByConversationIdDelegations","tags":["conversations"],"summary":"List conversation delegations","responses":{"200":{"description":"Conversation delegations","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"parentConversationId":{"type":"string","minLength":1},"childConversationId":{"type":"string","minLength":1},"parentRunId":{"type":"string","minLength":1,"maxLength":200},"depth":{"type":"integer","minimum":1,"maximum":1},"teammateId":{"type":"string","minLength":1},"goal":{"type":"string","minLength":1},"waitFor":{"type":"string","enum":["all","any","none"]},"budget":{"type":"object","properties":{"maxCreditMicros":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxSteps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"deadline":{"type":"string","minLength":1}},"required":["maxCreditMicros","maxSteps","deadline"],"additionalProperties":false},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"result":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"outputIds":{"type":"array","items":{"type":"string"}},"finalMessageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"citations":{"type":"array","items":{"type":"string","minLength":1}},"outstandingQuestions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"prompt":{"type":"string","minLength":1,"maxLength":500},"options":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"description":{"default":null,"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]}},"required":["label","description"],"additionalProperties":false}},"allowOther":{"default":true,"type":"boolean"},"requestsFile":{"type":"boolean"}},"required":["id","prompt","options","allowOther"],"additionalProperties":false}}},"required":["summary","outputIds"],"additionalProperties":false},{"type":"null"}]},"memoryBindings":{"default":[],"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"access":{"type":"string","enum":["read","read-write"]}},"required":["documentId","access"],"additionalProperties":false}},"predecessorDelegationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"continuationMode":{"default":"new","type":"string","enum":["new","resume","fresh"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","parentConversationId","childConversationId","parentRunId","depth","teammateId","goal","waitFor","budget","state","result","memoryBindings","continuationMode","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"canControl":{"type":"boolean"},"teammates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"avatarUrl":{"type":["string","null"]}},"required":["id","name","avatarUrl"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","ready","failed","archived"]}},"required":["id","title","kind","status"],"additionalProperties":false}}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}]}},"/conversations/{conversation_id}/delegations/cancel":{"post":{"operationId":"postConversationsByConversationIdDelegationsCancel","tags":["conversations"],"summary":"Cancel conversation delegations","responses":{"200":{"description":"Delegations cancelled"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"conversation_id","schema":{"type":"string","minLength":1},"required":true,"description":"The conversation ID."}]}},"/chat/completions":{"post":{"operationId":"postChatCompletions","tags":["chat"],"summary":"Create chat completion","description":"OpenAI-compatible chat completions. An unmodified OpenAI client works as-is; Polychat adds conversation, agent, environment, model_tier, permission_mode and the Polychat tool union on the same body. A stateless request runs the model directly and bills the caller; a request that names a conversation, agent or environment runs as a Response and is returned in chat completion shape with the Response attached.","responses":{"200":{"description":"Chat completion, or a chat.completion.chunk stream","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Completion identifier."},"log_id":{"type":"string","description":"Provider or gateway log identifier."},"object":{"type":"string","description":"OpenAI-compatible response object type."},"created":{"type":"number","description":"Response creation timestamp."},"model":{"description":"Model that generated the response.","type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number","description":"Choice index."},"message":{"type":"object","properties":{"id":{"description":"Message identifier.","type":"string"},"log_id":{"description":"Provider or gateway log identifier.","type":"string"},"role":{"type":"string","enum":["developer","system","user","assistant","tool"],"description":"Response message role."},"name":{"description":"Tool or participant name.","type":"string"},"content":{"description":"Response message content.","anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]},"parts":{"description":"Assistant-native structured message parts.","type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{"description":"Additional response message data.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"tool_calls":{"description":"Tool calls returned by the model.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"tool_call_id":{"description":"Tool call ID for tool-result messages.","type":"string"},"tool_call_arguments":{"description":"Tool call arguments for tool-result messages.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"citations":{"description":"Citations returned with the response.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"status":{"description":"Response message status.","type":"string"},"timestamp":{"description":"Message timestamp from runtime or persistence.","type":["number","string"]},"provenance":{"description":"Where the run executed.","anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]}},"required":["role"],"additionalProperties":{},"description":"Response message."},"finish_reason":{"type":"string","description":"Reason generation finished."}},"required":["index","message","finish_reason"],"additionalProperties":false},"description":"Generated response choices."},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"number","description":"Prompt token count."},"completion_tokens":{"type":"number","description":"Completion token count."},"total_tokens":{"type":"number","description":"Total token count."},"input_tokens":{"description":"Provider-normalised input token count.","type":"number"},"output_tokens":{"description":"Provider-normalised output token count.","type":"number"},"cached_input_tokens":{"description":"Input tokens served from the provider prompt cache.","type":"number"},"cache_creation_tokens":{"description":"Input tokens billed for writing to the provider prompt cache.","type":"number"},"reasoning_tokens":{"description":"Output tokens spent on reasoning or thinking.","type":"number"},"audio_input_tokens":{"description":"Audio input token count.","type":"number"},"audio_output_tokens":{"description":"Audio output token count.","type":"number"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"additionalProperties":false,"description":"Token usage for the response."},"post_processing":{"description":"Post-processing metadata.","type":"object","properties":{"guardrails":{"description":"Guardrail result metadata.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"compaction":{"type":"object","properties":{"message":{"description":"Persisted display-only compaction marker message.","type":"object","properties":{"role":{"allOf":[{"type":"string","enum":["user","assistant","system","tool","developer","compaction","goal"]},{"type":"string","const":"compaction","description":"Display-only compaction marker role."}]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"index":{"type":"number"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["name"],"additionalProperties":false}},"required":["id","function"],"additionalProperties":false}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]},"status":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"completion_id":{"type":"string"},"run_id":{"type":"string"},"created":{"type":"number"},"model":{"type":"string"},"provider":{"type":"string"},"log_id":{"type":"string"},"reasoning":{"type":"object","properties":{"collapsed":{"type":"boolean"},"content":{"type":"string"}},"required":["content"],"additionalProperties":false},"citations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"app":{"type":"string"},"mode":{"type":"string"},"id":{"allOf":[{"type":"string"},{"type":"string","description":"Persisted compaction marker message ID."}]},"parent_message_id":{"type":"string"},"tool_call_id":{"type":"string"},"tool_call_arguments":{},"timestamp":{"type":"number"},"platform":{"type":"string"},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]}},"required":["role","id"],"additionalProperties":false}},"required":["message"],"additionalProperties":false,"description":"Conversation compaction metadata."},"steps":{"description":"Tool step metadata.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"total_usage":{"description":"Aggregate usage across post-processing steps.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":{}},"usage_limits":{"description":"Usage limit metadata.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"run":{"description":"Persisted acknowledgement for the accepted run command.","type":"object","properties":{"protocolVersion":{"type":"number","const":1},"commandId":{"type":"string","minLength":1,"maxLength":200},"run":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":200},"conversationId":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"projectTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"initiatorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"default":"user","type":"string","enum":["user","delegation","handle","schedule","channel"]},"status":{"type":"string","enum":["accepted","running","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","succeeded","failed","cancelled","interrupted"]},"interactionKind":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"teammateContextId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"recipeInstallationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolvedConfiguration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"cancellationRequestedAt":{"type":["string","null"]},"terminalReason":{"type":["string","null"]},"lastMessageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false}},"required":["protocolVersion","id","conversationId","projectId","projectTaskId","initiatorUserId","trigger","status","attempt","createdAt","updatedAt","startedAt","completedAt","terminalReason","lastMessageId"],"additionalProperties":false},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"acceptedAt":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["protocolVersion","commandId","run","kind","acceptedAt","duplicate"],"additionalProperties":false},"response":{"description":"The Polychat Response this completion was rendered from, when one was run.","type":"object","properties":{"object":{"type":"string","const":"response"},"id":{"type":"string","minLength":1,"maxLength":200},"conversation_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["queued","in_progress","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","completed","failed","cancelled","incomplete"]},"waiting_on":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"type":"string","enum":["user","delegation","handle","schedule","channel"]},"initiator_user_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"project_task_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"teammate_context_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computer_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolved_configuration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancellation_requested_at":{"type":["string","null"]},"terminal_reason":{"type":["string","null"]},"last_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"accepted_at":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["idempotency_key","kind","accepted_at","duplicate"],"additionalProperties":false},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_output"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"data":{},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"goal"},"content":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"],"additionalProperties":false},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"],"additionalProperties":false},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"],"additionalProperties":false},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"additionalProperties":false,"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"additionalProperties":false,"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","type":"string","enum":["auto","low","high"]}},"required":["url","detail"],"additionalProperties":false,"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"additionalProperties":false,"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false}]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"id":{"type":"string","minLength":1},"status":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","content"],"additionalProperties":false}]}}},"required":["object","id","conversation_id","status","waiting_on","attempt","trigger","initiator_user_id","project_id","project_task_id","created_at","updated_at","started_at","completed_at","terminal_reason","last_item_id"],"additionalProperties":false}},"required":["id","log_id","object","created","choices","usage"],"additionalProperties":false,"description":"Chat completion response."}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"403":{"description":"Model not available, or date of birth not confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"description":"Stable application message identifier.","type":"string","minLength":1},"role":{"type":"string","enum":["developer","system","user","assistant","tool"],"description":"Message author role."},"name":{"description":"Optional participant name.","type":"string"},"content":{"description":"OpenAI-compatible message content.","anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","audio_url","video_url","input_audio","thinking","file","tool_result","document_url","markdown_document","selection"],"description":"Content part type."},"text":{"description":"Text content for text parts.","type":"string"},"audio_url":{"description":"Audio URL payload.","type":"object","properties":{"url":{"type":"string","description":"Audio URL."}},"required":["url"]},"video_url":{"description":"Video URL payload.","type":"object","properties":{"url":{"type":"string","description":"Video URL."}},"required":["url"]},"thinking":{"description":"Reasoning or thinking content.","type":"string"},"signature":{"description":"Provider signature for reasoning content.","type":"string"},"image":{"description":"Inline image payload.","anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"tool_use_id":{"description":"Tool use identifier.","type":"string"},"id":{"description":"Content part identifier.","type":"string"},"name":{"description":"Content part name.","type":"string"},"source_id":{"description":"Durable source identifier.","type":"string","minLength":1},"content":{"description":"Nested content payload.","type":"string"},"input":{"description":"Tool input payload.","anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"cache_control":{"description":"Provider cache control settings.","type":"object","properties":{"type":{"type":"string","const":"ephemeral","description":"Cache control type."}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false,"description":"An exact prompt cache boundary."},"document_url":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Document URL."},"name":{"description":"Display name for the document.","type":"string"}},"required":["url"],"description":"Document URL payload for document_url parts."},"markdown_document":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown document content."},"name":{"description":"Display name for the document.","type":"string"}},"required":["markdown"],"description":"Markdown payload for markdown_document parts."},"selection":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"artifact"},"identifier":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","identifier","type"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"messageId":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant"]},"runId":{"type":"string","minLength":1}},"required":["kind","messageId","role"],"additionalProperties":false}]},"selectedText":{"type":"string","minLength":1},"comment":{"type":"string","minLength":1}},"required":["source","selectedText"],"additionalProperties":false,"description":"Selected text from a message or artifact."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URL."},"detail":{"description":"Image detail level.","default":"auto","type":"string","enum":["auto","low","high"]}},"required":["url"],"description":"Image payload for image_url parts."},"input_audio":{"type":"object","properties":{"data":{"description":"Base64-encoded audio data.","type":"string"},"format":{"description":"Input audio format.","type":"string","enum":["wav","mp3"]}},"description":"Audio payload for input_audio parts."},"file":{"description":"File payload for file parts.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"]}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]},"parts":{"description":"Assistant-native structured message parts.","type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"refusal":{"description":"Assistant refusal text when present.","type":"string"},"tool_call_id":{"description":"Tool call ID this message responds to.","type":"string"},"tool_call_arguments":{"description":"Parsed or raw tool call arguments."},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Tool call ID."},"type":{"type":"string","const":"function","description":"Tool call type."},"function":{"type":"object","properties":{"name":{"type":"string","description":"Function name to call."},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}],"description":"Function call arguments."}},"required":["name","arguments"],"description":"Function tool call payload."}},"required":["id","type","function"]},"description":"Assistant tool calls requested by the model."},"status":{"description":"Provider or application message status.","type":"string"},"data":{"description":"Additional message data."}},"required":["role"]}},"model":{"type":"string","minLength":1},"models":{"type":"array","items":{"type":"string","minLength":1}},"provider":{"type":"string","minLength":1},"stream":{"type":"boolean"},"store":{"type":"boolean"},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"n":{"type":"number","minimum":1,"maximum":4},"seed":{"type":"number"},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"max_tokens":{"type":"number"},"max_completion_tokens":{"type":"number"},"presence_penalty":{"type":"number","minimum":-2,"maximum":2},"frequency_penalty":{"type":"number","minimum":-2,"maximum":2},"logit_bias":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"logprobs":{"type":"boolean"},"top_logprobs":{"type":"integer","minimum":0,"maximum":20},"user":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"reasoning_effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]},"reasoning":{"type":"object","properties":{"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}}},"verbosity":{"type":"string","enum":["low","medium","high","caveman"]},"tools":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function","description":"Tool type."},"function":{"type":"object","properties":{"name":{"type":"string","description":"Function name."},"description":{"description":"Function description shown to the model.","type":"string"},"parameters":{"description":"Function parameters JSON schema.","default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"required":{"description":"Required function parameter names.","type":"array","items":{"type":"string"}},"strict":{"description":"Whether arguments must match the schema exactly.","type":"boolean"},"async":{"description":"Whether an Astra tool call may complete after the response continues.","type":"boolean"}},"required":["name"],"description":"Function tool definition."}},"required":["type","function"]}},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"function"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"required":{"type":"array","items":{"type":"string"}},"strict":{"type":"boolean"},"async":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"builtin"},"id":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"},"policy":{"type":"string","enum":["enabled","approved","denied"]}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"managed"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_search","code_interpreter","file_search","computer_use","shell","image_generation","tool_search"]},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"mcp"},"servers":{"minItems":1,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["type","servers"],"additionalProperties":false}]}}]},"tool_choice":{"anyOf":[{"type":"string","const":"none"},{"type":"string","const":"auto"},{"type":"string","const":"required"},{"type":"object","properties":{"type":{"type":"string","const":"function","description":"Require a named function tool."},"function":{"type":"object","properties":{"name":{"type":"string","description":"Function name to require."}},"required":["name"],"description":"Required function tool."}},"required":["type","function"]}]},"parallel_tool_calls":{"type":"boolean"},"response_format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text","description":"Plain text response format."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"json_object","description":"JSON object response format."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"json_schema","description":"JSON schema response format."},"json_schema":{"type":"object","properties":{"name":{"type":"string","description":"Response schema name."},"strict":{"description":"Whether schema matching should be strict.","default":true,"type":"boolean"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON schema definition."}},"required":["name","schema"],"description":"Structured JSON schema response settings."}},"required":["type","json_schema"]},{"type":"object","properties":{"image":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific image response format settings."}},"required":["image"]}]},"service_tier":{"type":"string"},"stream_options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"web_search_options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"audio":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"modalities":{"type":"array","items":{"type":"string"}},"prediction":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"prompt_cache_key":{"type":"string"},"prompt_cache_retention":{"type":"string"},"safety_identifier":{"type":"string"},"conversation":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"project_id":{"type":"string","minLength":1},"subject":{"type":"object","properties":{"type":{"type":"string","enum":["output","source","memory","discover_card"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},"notebook":{"type":"object","properties":{"id":{"type":"string","minLength":1},"source_ids":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}}},"required":["id"],"additionalProperties":false}},"additionalProperties":false},{"type":"null"}]},"agent":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false}]},"environment":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"hosted"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"browser"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"device"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"machine"},"machine_id":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sandbox"},"executionProvider":{"type":"string","enum":["polychat","openai"]},"repo":{"type":"string"},"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"taskType":{"type":"string","enum":["feature-implementation","code-review","test-suite","bug-fix","refactoring","documentation","migration"]},"promptStrategy":{"type":"string","enum":["auto","feature-delivery","bug-fix","refactor","test-hardening"]},"deliveryPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"shouldCommit":{"type":"boolean"},"environmentSetup":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"polychat"},"definition":{"type":"object","properties":{"version":{"default":1,"type":"number","const":1},"setupCommands":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"resumeCommands":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"runtimes":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"setupTimeoutSeconds":{"default":600,"type":"integer","minimum":30,"maximum":1800},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"networkHosts":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","maxLength":253,"pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"default":".","type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"command":{"type":"string","minLength":1,"maxLength":500},"dependencies":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"}},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path"],"additionalProperties":false}]},"startupTimeoutSeconds":{"default":60,"type":"integer","minimum":5,"maximum":300},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"restartPolicy":{"default":{"mode":"never","maxRestarts":0,"backoffSeconds":1},"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"never"},"maxRestarts":{"default":0,"type":"number","const":0},"backoffSeconds":{"default":1,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"on_failure"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"always"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false}]}},"required":["name","command"],"additionalProperties":false}}},"required":["setupCommands"],"additionalProperties":false}},"required":["source","definition"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"repository"}},"required":["source"],"additionalProperties":false}]},"timeoutSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxSteps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"modelSettings":{"type":"object","properties":{"temperature":{"type":"number"},"top_p":{"type":"number"},"top_k":{"type":"number"},"max_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"presence_penalty":{"type":"number"},"frequency_penalty":{"type":"number"},"reasoning_effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]},"reasoning":{"type":"object","properties":{"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}}},"verbosity":{"type":"string","enum":["low","medium","high","caveman"]}}}},"required":["type"],"additionalProperties":{}}]},"model_tier":{"type":"string","enum":["low","medium","high","ultra"]},"permission_mode":{"type":"string","enum":["supervised","auto_accept_edits","auto","full_access"]},"compaction":{"type":"string","enum":["auto","off"]},"mode":{"type":"string","minLength":1},"budget":{"type":"object","properties":{"steps":{"type":"integer","minimum":1,"maximum":9007199254740991}},"additionalProperties":false},"idempotency_key":{"type":"string","minLength":1,"maxLength":200},"response_id":{"type":"string","minLength":1,"maxLength":200}},"required":["messages"],"additionalProperties":false}}}}}},"/mcp":{"post":{"operationId":"postMcp","tags":["mcp"],"summary":"Polychat as an MCP server","description":"Streamable HTTP endpoint for MCP clients such as Claude, ChatGPT and Codex. Authenticate with a Polychat API key. tools/list offers the tools you can run in Polychat plus one tool per teammate; tools/call runs them under your authority, and anything that needs approval waits for you in Polychat.","responses":{"200":{"description":"JSON-RPC response or batch, or an event stream","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["number","string","null"]},"result":{},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["number","string","null"]},"result":{},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id"],"additionalProperties":false}}]}}}},"202":{"description":"Notifications accepted"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}]}}}}},"get":{"operationId":"getMcp","tags":["mcp"],"summary":"Open an MCP event stream","description":"Polychat sends no server-initiated MCP messages, so this answers 405 as Streamable HTTP allows.","responses":{"405":{"description":"No server stream","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/mcp/work":{"post":{"operationId":"postMcpWork","tags":["mcp"],"summary":"Polychat Work as an MCP server for one task run","description":"Streamable HTTP endpoint a coding agent on a member's desktop uses while it runs a Work task. Authenticate with the short-lived run token Polychat gave that run; it reaches only the Work tools for that task's project, as that teammate.","responses":{"200":{"description":"JSON-RPC response or batch, or an event stream","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["number","string","null"]},"result":{},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["number","string","null"]},"result":{},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id"],"additionalProperties":false}}]}}}},"202":{"description":"Notifications accepted"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Missing or expired run token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}]}}}}}},"/a2a/teammates/{teammate_id}/.well-known/agent-card.json":{"get":{"operationId":"getA2aTeammatesByTeammateIdWellKnownAgentCardJson","tags":["a2a"],"summary":"A teammate's A2A agent card","description":"Describes one of your teammates to agents that speak the Agent2Agent protocol. Authenticate with a Polychat API key; cards are only shown to the teammate's owner.","responses":{"200":{"description":"Agent card","content":{"application/json":{"schema":{"type":"object","properties":{"protocolVersion":{"type":"string","const":"0.3.0"},"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string","format":"uri"},"preferredTransport":{"type":"string","const":"JSONRPC"},"version":{"type":"string"},"iconUrl":{"type":"string"},"provider":{"type":"object","properties":{"organization":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["organization","url"],"additionalProperties":false},"capabilities":{"type":"object","properties":{"streaming":{"type":"boolean"},"pushNotifications":{"type":"boolean"},"stateTransitionHistory":{"type":"boolean"}},"required":["streaming","pushNotifications","stateTransitionHistory"],"additionalProperties":false},"defaultInputModes":{"type":"array","items":{"type":"string"}},"defaultOutputModes":{"type":"array","items":{"type":"string"}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","tags"],"additionalProperties":false}},"securitySchemes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","const":"http"},"scheme":{"type":"string","const":"bearer"},"description":{"type":"string"}},"required":["type","scheme","description"],"additionalProperties":false}},"security":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}}},"required":["protocolVersion","name","description","url","preferredTransport","version","provider","capabilities","defaultInputModes","defaultOutputModes","skills","securitySchemes","security"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Teammate not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}]}},"/a2a/teammates/{teammate_id}/rpc":{"post":{"operationId":"postA2aTeammatesByTeammateIdRpc","tags":["a2a"],"summary":"Talk to a teammate over A2A","description":"JSON-RPC endpoint for Agent2Agent clients. Each task is a Polychat Response in the teammate's own conversation: message/send starts or follows one up, message/stream streams it, and tasks/get and tasks/cancel read and stop it. Runs use the key owner's authority and wait on them in Polychat for approvals.","responses":{"200":{"description":"JSON-RPC response, or an event stream","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["number","string","null"]},"result":{},"error":{"type":"object","properties":{"code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"},"data":{}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Teammate not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1,"maxLength":200},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}},"/code/fim":{"post":{"operationId":"postCodeFim","tags":["code"],"summary":"Create fill-in-the-middle completion","description":"Generates code completions by filling the gap between a prefix and suffix using supported FIM models.","responses":{"200":{"description":"Fill-in-the-middle completion response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"text_completion"},"created":{"type":"number"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"number"},"finish_reason":{"type":["string","null"]}},"required":["text","index","finish_reason"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"number"},"completion_tokens":{"type":"number"},"total_tokens":{"type":"number"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"additionalProperties":false}},"required":["id","object","created","model","choices"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"description":"The model to use for FIM completion","type":"string"},"provider":{"description":"The provider to use when the model name is shared by multiple providers","type":"string"},"prompt":{"type":"string","description":"The code prefix (before cursor)"},"suffix":{"description":"The code suffix (after cursor)","type":"string"},"max_tokens":{"description":"Maximum tokens to generate","type":"number"},"min_tokens":{"description":"Minimum tokens to generate","type":"number"},"temperature":{"description":"Sampling temperature","type":"number","minimum":0,"maximum":2},"top_p":{"description":"Nucleus sampling","type":"number","minimum":0,"maximum":1},"stream":{"description":"Enable streaming response","type":"boolean"},"stop":{"description":"Stop sequences","type":"array","items":{"type":"string"}}},"required":["prompt"]}}}}}},"/code/next_edit":{"post":{"operationId":"postCodeNextEdit","tags":["code"],"summary":"Create next edit completion","description":"Produces the next edit suggestion for a file using Mercury's code edit model.","responses":{"200":{"description":"Edit suggestion response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"created":{"type":"number"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool","developer","compaction","goal"]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"index":{"type":"number"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["name"],"additionalProperties":false}},"required":["id","function"],"additionalProperties":false}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]},"status":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"completion_id":{"type":"string"},"run_id":{"type":"string"},"created":{"type":"number"},"model":{"type":"string"},"provider":{"type":"string"},"log_id":{"type":"string"},"reasoning":{"type":"object","properties":{"collapsed":{"type":"boolean"},"content":{"type":"string"}},"required":["content"],"additionalProperties":false},"citations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"app":{"type":"string"},"mode":{"type":"string"},"id":{"type":"string"},"parent_message_id":{"type":"string"},"tool_call_id":{"type":"string"},"tool_call_arguments":{},"timestamp":{"type":"number"},"platform":{"type":"string"},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]}},"required":["role"],"additionalProperties":false},"finish_reason":{"type":["string","null"]}},"required":["index","message","finish_reason"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"number"},"completion_tokens":{"type":"number"},"total_tokens":{"type":"number"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"additionalProperties":false},"log_id":{"type":"string"},"run":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"commandId":{"type":"string","minLength":1,"maxLength":200},"run":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":200},"conversationId":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"projectTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"initiatorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"default":"user","type":"string","enum":["user","delegation","handle","schedule","channel"]},"status":{"type":"string","enum":["accepted","running","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","succeeded","failed","cancelled","interrupted"]},"interactionKind":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"teammateContextId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"recipeInstallationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolvedConfiguration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"cancellationRequestedAt":{"type":["string","null"]},"terminalReason":{"type":["string","null"]},"lastMessageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false}},"required":["protocolVersion","id","conversationId","projectId","projectTaskId","initiatorUserId","trigger","status","attempt","createdAt","updatedAt","startedAt","completedAt","terminalReason","lastMessageId"],"additionalProperties":false},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"acceptedAt":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["protocolVersion","commandId","run","kind","acceptedAt","duplicate"],"additionalProperties":false}},"required":["id","object","created","model","choices"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"description":"The Mercury model to use for the edit operation.","type":"string"},"provider":{"description":"The provider to use when the model name is shared by multiple providers.","type":"string"},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool","developer","compaction","goal"]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"index":{"type":"number"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["name"]}},"required":["id","function"]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]},"status":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"completion_id":{"type":"string"},"run_id":{"type":"string"},"created":{"type":"number"},"model":{"type":"string"},"provider":{"type":"string"},"log_id":{"type":"string"},"reasoning":{"type":"object","properties":{"collapsed":{"type":"boolean"},"content":{"type":"string"}},"required":["content"]},"citations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"app":{"type":"string"},"mode":{"type":"string"},"id":{"type":"string"},"parent_message_id":{"type":"string"},"tool_call_id":{"type":"string"},"tool_call_arguments":{},"timestamp":{"type":"number"},"platform":{"type":"string"},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"]},{"type":"null"}]}},"required":["role"]},"description":"Conversation-style inputs providing the current file state and instructions for the edit."},"stream":{"description":"Whether to stream the edit response as server-sent events.","type":"boolean"}},"required":["messages"]}}}}}},"/code/apply":{"post":{"operationId":"postCodeApply","tags":["code"],"summary":"Apply edit completion","description":"Applies an edit snippet to existing code using Mercury's apply edit capability.","responses":{"200":{"description":"Edit application response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"created":{"type":"number"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool","developer","compaction","goal"]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"index":{"type":"number"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["name"],"additionalProperties":false}},"required":["id","function"],"additionalProperties":false}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"],"additionalProperties":false}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"],"additionalProperties":false}},"required":["type","changes"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"],"additionalProperties":false}},"required":["type","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false}]}},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]},"status":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"completion_id":{"type":"string"},"run_id":{"type":"string"},"created":{"type":"number"},"model":{"type":"string"},"provider":{"type":"string"},"log_id":{"type":"string"},"reasoning":{"type":"object","properties":{"collapsed":{"type":"boolean"},"content":{"type":"string"}},"required":["content"],"additionalProperties":false},"citations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"app":{"type":"string"},"mode":{"type":"string"},"id":{"type":"string"},"parent_message_id":{"type":"string"},"tool_call_id":{"type":"string"},"tool_call_arguments":{},"timestamp":{"type":"number"},"platform":{"type":"string"},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]}},"required":["role"],"additionalProperties":false},"finish_reason":{"type":["string","null"]}},"required":["index","message","finish_reason"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"number"},"completion_tokens":{"type":"number"},"total_tokens":{"type":"number"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"additionalProperties":false},"log_id":{"type":"string"},"run":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"commandId":{"type":"string","minLength":1,"maxLength":200},"run":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":200},"conversationId":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"projectTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"initiatorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"trigger":{"default":"user","type":"string","enum":["user","delegation","handle","schedule","channel"]},"status":{"type":"string","enum":["accepted","running","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","succeeded","failed","cancelled","interrupted"]},"interactionKind":{"anyOf":[{"type":"string","enum":["question","approval","takeover"]},{"type":"null"}]},"teammateContextId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"computerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"recipeInstallationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resolvedConfiguration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"cancellationRequestedAt":{"type":["string","null"]},"terminalReason":{"type":["string","null"]},"lastMessageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"generatedAt":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"contextWindow":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reservedOutputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["reported","estimated"]}},"required":["inputTokens","contextWindow","source"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["instructions","memory","project","tools","conversation","tool_results","summary","subject","notebook"]},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","tokens"],"additionalProperties":false}},"messages":{"type":"object","properties":{"included":{"type":"integer","minimum":0,"maximum":9007199254740991},"omitted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["included","omitted"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted","unavailable"]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","status","retrievalPath","messageId"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["conversation_brief","memory","subject"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"access":{"type":"string","enum":["read","read-write"]}},"required":["id","kind","revision","access"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["available","loaded"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","type","status","toolName","messageId"],"additionalProperties":false}},"summary":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"status":{"type":"string","enum":["included","omitted"]},"text":{"type":"string","maxLength":16000},"representedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"fallback":{"type":"boolean"}},"required":["messageId","status","text","representedMessageCount","candidateMessageCount","fallback"],"additionalProperties":false},{"type":"null"}]},"omissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["history","tool_result","source"]},"reason":{"type":"string","enum":["context_window","bounded","unavailable"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"retrievalPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","kind","reason","count","messageId","retrievalPath"],"additionalProperties":false}}},"required":["protocolVersion","runId","conversationId","attempt","step","model","generatedAt","usage","messages","sources","skills","summary","omissions"],"additionalProperties":false},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"step":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":2,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":2,"maximum":9007199254740991},"runRetry":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxRunRetries":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["waiting","attempting"]},"classification":{"type":"string","enum":["rate_limited","timeout","network","provider_unavailable"]},"reason":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"type":"string"},"retryAt":{"type":["string","null"]}},"required":["protocolVersion","step","attempt","maxAttempts","runRetry","maxRunRetries","phase","classification","reason","scheduledAt","retryAt"],"additionalProperties":false},{"type":"null"}]},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false}},"required":["protocolVersion","id","conversationId","projectId","projectTaskId","initiatorUserId","trigger","status","attempt","createdAt","updatedAt","startedAt","completedAt","terminalReason","lastMessageId"],"additionalProperties":false},"kind":{"type":"string","enum":["turn","interaction_response","cancel"]},"acceptedAt":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["protocolVersion","commandId","run","kind","acceptedAt","duplicate"],"additionalProperties":false}},"required":["id","object","created","model","choices"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"description":"The Mercury model to use for the edit operation.","type":"string"},"provider":{"description":"The provider to use when the model name is shared by multiple providers.","type":"string"},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool","developer","compaction","goal"]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"index":{"type":"number"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["name"]}},"required":["id","function"]}},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_use"},"name":{"type":"string"},"toolCallId":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"tool_result"},"name":{"type":"string"},"toolCallId":{"type":"string"},"status":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"data":{}},"required":["type"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"reasoning"},"text":{"type":"string"},"signature":{"type":"string"},"collapsed":{"type":"boolean"}},"required":["type","text"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"snapshot"},"summary":{"type":"string"},"title":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","summary"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"compaction"},"status":{"type":"string","enum":["pending","completed"]},"label":{"type":"string"},"coverage":{"type":"object","properties":{"coveredMessageIds":{"type":"array","items":{"type":"string","minLength":1}},"coveredMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"summaryInputCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["model_summary","fallback_transcript"]}},"required":["coveredMessageIds","coveredMessageCount","candidateMessageCount","summaryInputCharacters","strategy"]}},"required":["type","status"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"goal"},"event":{"type":"string","enum":["set","paused","resumed","cleared","completed","blocked","stalled","limit_reached","steered"]},"label":{"type":"string"},"objective":{"type":"string"}},"required":["type","event"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"file"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]}]}},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]},"status":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"completion_id":{"type":"string"},"run_id":{"type":"string"},"created":{"type":"number"},"model":{"type":"string"},"provider":{"type":"string"},"log_id":{"type":"string"},"reasoning":{"type":"object","properties":{"collapsed":{"type":"boolean"},"content":{"type":"string"}},"required":["content"]},"citations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"app":{"type":"string"},"mode":{"type":"string"},"id":{"type":"string"},"parent_message_id":{"type":"string"},"tool_call_id":{"type":"string"},"tool_call_arguments":{},"timestamp":{"type":"number"},"platform":{"type":"string"},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"provenance":{"anyOf":[{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"]},{"type":"null"}]}},"required":["role"]},"description":"Conversation-style inputs providing the current file state and instructions for the edit."},"stream":{"description":"Whether to stream the edit response as server-sent events.","type":"boolean"}},"required":["messages"]}}}}}},"/jobs":{"get":{"operationId":"getJobs","tags":["jobs"],"summary":"List jobs","description":"Lists generations, predictions, OCR batches, research runs and evaluations, newest first. Filter by kind, project or the provider's external ID.","responses":{"200":{"description":"A page of jobs","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"ocr_batch"},"result":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":{}}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"research"},"result":{"type":"object","properties":{"provider":{"type":"string"},"run":{"type":"object","properties":{"run_id":{"type":"string"},"status":{"type":"string"},"is_active":{"type":"boolean"},"warnings":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"processor":{"type":"string"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"modified_at":{"type":"string"},"error":{"type":["string","null"]},"taskgroup_id":{"type":["string","null"]}},"required":["run_id","status","is_active","processor","created_at","modified_at"],"additionalProperties":{}},"output":{"type":"object","properties":{"content":{},"basis":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"reasoning":{"type":"string"},"confidence":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"title":{"type":["string","null"]},"url":{"type":["string","null"]},"excerpts":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["field"],"additionalProperties":false}},"type":{"type":"string"}},"required":["content"],"additionalProperties":false},"warnings":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"poll":{"type":"object","properties":{"interval_ms":{"type":"number"},"timeout_seconds":{"type":"number"},"attempts":{"type":"number"},"elapsed_ms":{"type":"number"}},"additionalProperties":false}},"additionalProperties":false}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"site_evaluation"},"result":{"anyOf":[{"type":"object","properties":{"key":{"type":"string"},"best":{"anyOf":[{"type":"object","properties":{"variantId":{"type":"string"},"score":{"type":"number"}},"required":["variantId","score"],"additionalProperties":false},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"ok":{"type":"boolean"},"score":{"type":["number","null"]},"durationMs":{"type":"number","minimum":0},"error":{"type":["string","null"]}},"required":["variantId","ok","score","durationMs","error"],"additionalProperties":false}},"runs":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"brief":{"type":"string"},"ok":{"type":"boolean"},"durationMs":{"type":"number","minimum":0},"score":{"type":"number","minimum":0,"maximum":1},"quality":{"anyOf":[{"type":"object","properties":{"coverage":{"type":"number","minimum":0,"maximum":1},"placeholders":{"type":"number","minimum":0,"maximum":1},"coherent":{"type":"number","minimum":0,"maximum":1},"readable":{"type":"number","minimum":0,"maximum":1},"repairs":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsRepair":{"type":"boolean"},"confidence":{"type":"number","minimum":0,"maximum":1},"repairConfidence":{"type":"number","minimum":0,"maximum":1}},"required":["coverage","placeholders","coherent","repairs","needsRepair","confidence"],"additionalProperties":false},{"type":"null"}]},"issues":{"type":"integer","minimum":0,"maximum":9007199254740991},"pages":{"type":"integer","minimum":0,"maximum":9007199254740991},"model":{"type":["string","null"]},"error":{"type":"string"}},"required":["variantId","brief","ok","durationMs","score","quality","issues","pages","model"],"additionalProperties":false}}},"required":["key","best","variants","runs"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false}]}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"kind","schema":{"type":"string","enum":["ocr_batch","research","site_evaluation"]}},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"external_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postJobs","tags":["jobs"],"summary":"Start a job","description":"Starts long-running work of the given kind. The response lists every job started and any that were rejected.","responses":{"200":{"description":"The jobs started","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"ocr_batch"},"result":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":{}}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"research"},"result":{"type":"object","properties":{"provider":{"type":"string"},"run":{"type":"object","properties":{"run_id":{"type":"string"},"status":{"type":"string"},"is_active":{"type":"boolean"},"warnings":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"processor":{"type":"string"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"modified_at":{"type":"string"},"error":{"type":["string","null"]},"taskgroup_id":{"type":["string","null"]}},"required":["run_id","status","is_active","processor","created_at","modified_at"],"additionalProperties":{}},"output":{"type":"object","properties":{"content":{},"basis":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"reasoning":{"type":"string"},"confidence":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"title":{"type":["string","null"]},"url":{"type":["string","null"]},"excerpts":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["field"],"additionalProperties":false}},"type":{"type":"string"}},"required":["content"],"additionalProperties":false},"warnings":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"poll":{"type":"object","properties":{"interval_ms":{"type":"number"},"timeout_seconds":{"type":"number"},"attempts":{"type":"number"},"elapsed_ms":{"type":"number"}},"additionalProperties":false}},"additionalProperties":false}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"site_evaluation"},"result":{"anyOf":[{"type":"object","properties":{"key":{"type":"string"},"best":{"anyOf":[{"type":"object","properties":{"variantId":{"type":"string"},"score":{"type":"number"}},"required":["variantId","score"],"additionalProperties":false},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"ok":{"type":"boolean"},"score":{"type":["number","null"]},"durationMs":{"type":"number","minimum":0},"error":{"type":["string","null"]}},"required":["variantId","ok","score","durationMs","error"],"additionalProperties":false}},"runs":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"brief":{"type":"string"},"ok":{"type":"boolean"},"durationMs":{"type":"number","minimum":0},"score":{"type":"number","minimum":0,"maximum":1},"quality":{"anyOf":[{"type":"object","properties":{"coverage":{"type":"number","minimum":0,"maximum":1},"placeholders":{"type":"number","minimum":0,"maximum":1},"coherent":{"type":"number","minimum":0,"maximum":1},"readable":{"type":"number","minimum":0,"maximum":1},"repairs":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsRepair":{"type":"boolean"},"confidence":{"type":"number","minimum":0,"maximum":1},"repairConfidence":{"type":"number","minimum":0,"maximum":1}},"required":["coverage","placeholders","coherent","repairs","needsRepair","confidence"],"additionalProperties":false},{"type":"null"}]},"issues":{"type":"integer","minimum":0,"maximum":9007199254740991},"pages":{"type":"integer","minimum":0,"maximum":9007199254740991},"model":{"type":["string","null"]},"error":{"type":"string"}},"required":["variantId","brief","ok","durationMs","score","quality","issues","pages","model"],"additionalProperties":false}}},"required":["key","best","variants","runs"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false}]}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"rejected":{"type":"array","items":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["error"],"additionalProperties":false}}},"required":["object","data","has_more","last_id","rejected"],"additionalProperties":false}}}},"400":{"description":"Nothing could be started","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"project_id":{"type":"string","minLength":1},"kind":{"type":"string","const":"ocr_batch"},"input":{"type":"object","properties":{"title":{"default":"OCR batch","type":"string","minLength":1,"maxLength":200},"model":{"default":"mistral-ocr-latest","type":"string","enum":["mistral-ocr-latest","mistral-ocr-4-1"]},"requests":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"document":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"document_url"},"document_url":{"type":"string","format":"uri"},"document_name":{"type":"string","minLength":1,"maxLength":255}},"required":["type","document_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"type":"string","maxLength":29360128}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"source"},"source_id":{"type":"string","minLength":1}},"required":["type","source_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"output"},"output_id":{"type":"string","minLength":1}},"required":["type","output_id"],"additionalProperties":false}]},"pages":{"anyOf":[{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"type":"string","pattern":"^\\d+(?:-\\d+)?(?:,\\d+(?:-\\d+)?)*$"}]},"include_image_base64":{"type":"boolean"},"image_limit":{"type":"integer","minimum":0,"maximum":1000},"image_min_size":{"type":"integer","minimum":0,"maximum":100000},"include_blocks":{"type":"boolean"},"confidence_scores_granularity":{"type":"string","enum":["page","block","word"]},"table_format":{"type":"string","enum":["markdown","html"]},"extract_header":{"type":"boolean"},"extract_footer":{"type":"boolean"},"document_annotation_format":{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"json_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"strict":{"default":true,"type":"boolean"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","schema"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false},"bbox_annotation_format":{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"json_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"strict":{"default":true,"type":"boolean"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","schema"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false},"document_annotation_prompt":{"type":"string","maxLength":16384}},"required":["document"],"additionalProperties":false}}},"required":["requests"],"additionalProperties":false}},"required":["kind","input"]},{"type":"object","properties":{"project_id":{"type":"string","minLength":1},"kind":{"type":"string","const":"research"},"input":{"type":"object","properties":{"provider":{"type":"string","enum":["parallel","exa"]},"input":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"wait_for_completion":{"type":"boolean"},"options":{"type":"object","properties":{"processor":{"type":"string"},"enable_events":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"task_spec":{"type":"object","properties":{"input_schema":{},"output_schema":{"type":"object","properties":{"type":{"type":"string","enum":["json","text","auto"]},"json_schema":{},"description":{"type":"string"}},"required":["type"]}}},"polling":{"type":"object","properties":{"interval_ms":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_attempts":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"timeout_seconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}}}}},"required":["input"]}},"required":["kind","input"]},{"type":"object","properties":{"project_id":{"type":"string","minLength":1},"kind":{"type":"string","const":"site_evaluation"},"input":{"type":"object","properties":{"briefs":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":4000}},"guidance":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"boolean"}},"subset":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"boolean"}},"tiers":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["low","medium","high","ultra"]}},"model":{"type":"string","minLength":1},"concurrency":{"type":"integer","minimum":1,"maximum":4}},"required":["briefs"],"additionalProperties":false}},"required":["kind","input"]}]}}}}}},"/jobs/{job_id}":{"get":{"operationId":"getJobsByJobId","tags":["jobs"],"summary":"Get a job","description":"Returns the job's status and result. Research jobs refresh from the provider.","responses":{"200":{"description":"The job","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"ocr_batch"},"result":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":{}}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"research"},"result":{"type":"object","properties":{"provider":{"type":"string"},"run":{"type":"object","properties":{"run_id":{"type":"string"},"status":{"type":"string"},"is_active":{"type":"boolean"},"warnings":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"processor":{"type":"string"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"modified_at":{"type":"string"},"error":{"type":["string","null"]},"taskgroup_id":{"type":["string","null"]}},"required":["run_id","status","is_active","processor","created_at","modified_at"],"additionalProperties":{}},"output":{"type":"object","properties":{"content":{},"basis":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"reasoning":{"type":"string"},"confidence":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"title":{"type":["string","null"]},"url":{"type":["string","null"]},"excerpts":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["field"],"additionalProperties":false}},"type":{"type":"string"}},"required":["content"],"additionalProperties":false},"warnings":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"poll":{"type":"object","properties":{"interval_ms":{"type":"number"},"timeout_seconds":{"type":"number"},"attempts":{"type":"number"},"elapsed_ms":{"type":"number"}},"additionalProperties":false}},"additionalProperties":false}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"site_evaluation"},"result":{"anyOf":[{"type":"object","properties":{"key":{"type":"string"},"best":{"anyOf":[{"type":"object","properties":{"variantId":{"type":"string"},"score":{"type":"number"}},"required":["variantId","score"],"additionalProperties":false},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"ok":{"type":"boolean"},"score":{"type":["number","null"]},"durationMs":{"type":"number","minimum":0},"error":{"type":["string","null"]}},"required":["variantId","ok","score","durationMs","error"],"additionalProperties":false}},"runs":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"brief":{"type":"string"},"ok":{"type":"boolean"},"durationMs":{"type":"number","minimum":0},"score":{"type":"number","minimum":0,"maximum":1},"quality":{"anyOf":[{"type":"object","properties":{"coverage":{"type":"number","minimum":0,"maximum":1},"placeholders":{"type":"number","minimum":0,"maximum":1},"coherent":{"type":"number","minimum":0,"maximum":1},"readable":{"type":"number","minimum":0,"maximum":1},"repairs":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsRepair":{"type":"boolean"},"confidence":{"type":"number","minimum":0,"maximum":1},"repairConfidence":{"type":"number","minimum":0,"maximum":1}},"required":["coverage","placeholders","coherent","repairs","needsRepair","confidence"],"additionalProperties":false},{"type":"null"}]},"issues":{"type":"integer","minimum":0,"maximum":9007199254740991},"pages":{"type":"integer","minimum":0,"maximum":9007199254740991},"model":{"type":["string","null"]},"error":{"type":"string"}},"required":["variantId","brief","ok","durationMs","score","quality","issues","pages","model"],"additionalProperties":false}}},"required":["key","best","variants","runs"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"job_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"kind","schema":{"type":"string","enum":["ocr_batch","research","site_evaluation"]}},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/jobs/{job_id}/cancel":{"post":{"operationId":"postJobsByJobIdCancel","tags":["jobs"],"summary":"Cancel a job","responses":{"200":{"description":"The job after cancellation was requested","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"ocr_batch"},"result":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":{}}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"research"},"result":{"type":"object","properties":{"provider":{"type":"string"},"run":{"type":"object","properties":{"run_id":{"type":"string"},"status":{"type":"string"},"is_active":{"type":"boolean"},"warnings":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"processor":{"type":"string"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"modified_at":{"type":"string"},"error":{"type":["string","null"]},"taskgroup_id":{"type":["string","null"]}},"required":["run_id","status","is_active","processor","created_at","modified_at"],"additionalProperties":{}},"output":{"type":"object","properties":{"content":{},"basis":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"reasoning":{"type":"string"},"confidence":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"title":{"type":["string","null"]},"url":{"type":["string","null"]},"excerpts":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["field"],"additionalProperties":false}},"type":{"type":"string"}},"required":["content"],"additionalProperties":false},"warnings":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"poll":{"type":"object","properties":{"interval_ms":{"type":"number"},"timeout_seconds":{"type":"number"},"attempts":{"type":"number"},"elapsed_ms":{"type":"number"}},"additionalProperties":false}},"additionalProperties":false}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"job"},"id":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","succeeded","failed","cancelled"]},"project_id":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"error":{"type":["string","null"]},"kind":{"type":"string","const":"site_evaluation"},"result":{"anyOf":[{"type":"object","properties":{"key":{"type":"string"},"best":{"anyOf":[{"type":"object","properties":{"variantId":{"type":"string"},"score":{"type":"number"}},"required":["variantId","score"],"additionalProperties":false},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"ok":{"type":"boolean"},"score":{"type":["number","null"]},"durationMs":{"type":"number","minimum":0},"error":{"type":["string","null"]}},"required":["variantId","ok","score","durationMs","error"],"additionalProperties":false}},"runs":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"brief":{"type":"string"},"ok":{"type":"boolean"},"durationMs":{"type":"number","minimum":0},"score":{"type":"number","minimum":0,"maximum":1},"quality":{"anyOf":[{"type":"object","properties":{"coverage":{"type":"number","minimum":0,"maximum":1},"placeholders":{"type":"number","minimum":0,"maximum":1},"coherent":{"type":"number","minimum":0,"maximum":1},"readable":{"type":"number","minimum":0,"maximum":1},"repairs":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsRepair":{"type":"boolean"},"confidence":{"type":"number","minimum":0,"maximum":1},"repairConfidence":{"type":"number","minimum":0,"maximum":1}},"required":["coverage","placeholders","coherent","repairs","needsRepair","confidence"],"additionalProperties":false},{"type":"null"}]},"issues":{"type":"integer","minimum":0,"maximum":9007199254740991},"pages":{"type":"integer","minimum":0,"maximum":9007199254740991},"model":{"type":["string","null"]},"error":{"type":"string"}},"required":["variantId","brief","ok","durationMs","score","quality","issues","pages","model"],"additionalProperties":false}}},"required":["key","best","variants","runs"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","status","project_id","created_at","updated_at","error","kind","result"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"The job finished or cannot be cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"job_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"kind","schema":{"type":"string","enum":["ocr_batch","research","site_evaluation"]}},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/approvals":{"get":{"operationId":"getApprovals","tags":["approvals"],"summary":"List pending approvals","description":"Connector operations, task questions and task tool approvals waiting on the caller, newest first.","responses":{"200":{"description":"Pending approvals","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"approval"},"id":{"type":"string"},"kind":{"type":"string","enum":["connector_operation","task_input","task_approval"]},"state":{"type":"string","enum":["pending","approved","rejected","consumed","expired"]},"title":{"type":"string"},"detail":{"type":["string","null"]},"conversation_id":{"type":["string","null"]},"response_id":{"type":["string","null"]},"project_id":{"type":["string","null"]},"provider":{"type":["string","null"]},"operation":{"type":["string","null"]},"created_at":{"type":"string"},"expires_at":{"type":["string","null"]},"resolved_at":{"type":["string","null"]},"consumed_at":{"type":["string","null"]},"deep_link":{"type":["string","null"]}},"required":["object","id","kind","state","title","detail","conversation_id","response_id","project_id","provider","operation","created_at","expires_at","resolved_at","consumed_at","deep_link"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"kind","schema":{"type":"string","enum":["connector_operation","task_input","task_approval"]}}]}},"/approvals/standing":{"get":{"operationId":"getApprovalsStanding","tags":["approvals"],"summary":"List standing approvals","description":"Actions Poly may take without asking, for one tool and destination each.","responses":{"200":{"description":"Standing approvals","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"standing_approval"},"id":{"type":"string"},"tool_name":{"type":"string"},"destination":{"type":"string"},"granted_at":{"type":"string"},"expires_at":{"type":"string"}},"required":["object","id","tool_name","destination","granted_at","expires_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false},"post":{"operationId":"postApprovalsStanding","tags":["approvals"],"summary":"Always allow a waiting action here","description":"Approves the write Poly is waiting on for the next thirty days, for that tool and destination only.","responses":{"200":{"description":"The standing approval","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"standing_approval"},"id":{"type":"string"},"tool_name":{"type":"string"},"destination":{"type":"string"},"granted_at":{"type":"string"},"expires_at":{"type":"string"}},"required":["object","id","tool_name","destination","granted_at","expires_at"],"additionalProperties":false}}}},"400":{"description":"The action cannot be allowed ahead of time","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"409":{"description":"The approval is no longer waiting","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"interaction_id":{"type":"string","minLength":1}},"required":["interaction_id"]}}}}}},"/approvals/standing/{standing_approval_id}":{"delete":{"operationId":"deleteApprovalsStandingByStandingApprovalId","tags":["approvals"],"summary":"Stop allowing an action ahead of time","responses":{"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Standing approval not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"standing_approval_id","schema":{"type":"string","minLength":3},"required":true}]}},"/approvals/{approval_id}":{"get":{"operationId":"getApprovalsByApprovalId","tags":["approvals"],"summary":"Get an approval","responses":{"200":{"description":"The approval","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"approval"},"id":{"type":"string"},"kind":{"type":"string","enum":["connector_operation","task_input","task_approval"]},"state":{"type":"string","enum":["pending","approved","rejected","consumed","expired"]},"title":{"type":"string"},"detail":{"type":["string","null"]},"conversation_id":{"type":["string","null"]},"response_id":{"type":["string","null"]},"project_id":{"type":["string","null"]},"provider":{"type":["string","null"]},"operation":{"type":["string","null"]},"created_at":{"type":"string"},"expires_at":{"type":["string","null"]},"resolved_at":{"type":["string","null"]},"consumed_at":{"type":["string","null"]},"deep_link":{"type":["string","null"]}},"required":["object","id","kind","state","title","detail","conversation_id","response_id","project_id","provider","operation","created_at","expires_at","resolved_at","consumed_at","deep_link"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Approval not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"approval_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchApprovalsByApprovalId","tags":["approvals"],"summary":"Approve or reject","description":"Resolves a connector operation approval. Task questions and tool approvals are answered through the response input.","responses":{"200":{"description":"The resolved approval","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"approval"},"id":{"type":"string"},"kind":{"type":"string","enum":["connector_operation","task_input","task_approval"]},"state":{"type":"string","enum":["pending","approved","rejected","consumed","expired"]},"title":{"type":"string"},"detail":{"type":["string","null"]},"conversation_id":{"type":["string","null"]},"response_id":{"type":["string","null"]},"project_id":{"type":["string","null"]},"provider":{"type":["string","null"]},"operation":{"type":["string","null"]},"created_at":{"type":"string"},"expires_at":{"type":["string","null"]},"resolved_at":{"type":["string","null"]},"consumed_at":{"type":["string","null"]},"deep_link":{"type":["string","null"]}},"required":["object","id","kind","state","title","detail","conversation_id","response_id","project_id","provider","operation","created_at","expires_at","resolved_at","consumed_at","deep_link"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"Answer through the response input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"approval_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["approved","rejected"]}},"required":["state"]}}}}}},"/attention":{"get":{"operationId":"getAttention","tags":["attention"],"summary":"List operational work across the caller's workspaces","description":"Derives filtered task interactions and sandbox run states through current membership. Facets and the filtered total come with each page.","responses":{"200":{"description":"Operational work","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["approval","input","review","failed","running","completed"]},"type":{"type":"string","enum":["task","run"]},"resourceId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"workspaceName":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"projectName":{"type":"string","minLength":1},"conversationId":{"type":["string","null"]},"ownerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"ownerName":{"type":"string","minLength":1},"isUnread":{"type":"boolean"},"title":{"type":"string","minLength":1},"detail":{"type":["string","null"]},"occurredAt":{"type":"string","minLength":1}},"required":["id","kind","type","resourceId","workspaceId","workspaceName","projectId","projectName","conversationId","ownerUserId","ownerName","isUnread","title","detail","occurredAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"facets":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["id","name"],"additionalProperties":false}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1}},"required":["id","name","workspaceId"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1}},"required":["id","name"],"additionalProperties":false}}},"required":["workspaces","projects","owners"],"additionalProperties":false}},"required":["object","data","has_more","last_id","total","facets"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"kind","schema":{"type":"string","enum":["approval","input","review","failed","running","completed"]}},{"in":"query","name":"workspace_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"owner_user_id","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"in":"query","name":"type","schema":{"type":"string","enum":["task","run"]}},{"in":"query","name":"from","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"in":"query","name":"to","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}]}},"/attention/inbox":{"get":{"operationId":"getAttentionInbox","tags":["attention"],"summary":"List Work decisions waiting on the caller","description":"Hire proposals, budget warnings, standups to answer, escalations and setup plans.","responses":{"200":{"description":"Inbox","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["hire","budget","standup","escalation","setup","paused","waiting","breakdown","models"]},"workspaceId":{"type":["string","null"]},"projectId":{"type":["string","null"]},"taskId":{"type":["string","null"]},"teammateId":{"type":["string","null"]},"title":{"type":"string"},"detail":{"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"conversationId":{"default":null,"type":["string","null"]},"since":{"type":"string"},"deepLink":{"type":"string"}},"required":["id","kind","workspaceId","projectId","taskId","teammateId","title","detail","dueAt","conversationId","since","deepLink"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"places":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","name","projects"],"additionalProperties":false}}},"required":["object","data","has_more","last_id","places"],"additionalProperties":false}}}}},"hide":false}},"/attention/tasks":{"get":{"operationId":"getAttentionTasks","tags":["attention"],"summary":"List the caller's tasks across workspaces","description":"Tasks the caller owns, or is responsible for through a teammate.","responses":{"200":{"description":"Tasks","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}}},"required":["tasks"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"owner_teammate_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"include_done","schema":{"type":"boolean"}}]}},"/experiences/strudel":{"get":{"operationId":"getExperiencesStrudel","tags":["experiences"],"summary":"List Strudel patterns","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postExperiencesStrudel","tags":["experiences"],"summary":"Save a Strudel pattern","responses":{"200":{"description":"The pattern","content":{"application/json":{"schema":{"type":"object","properties":{"pattern":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","code","createdAt","updatedAt"],"additionalProperties":false}},"required":["pattern"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"The Strudel pattern code to save"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Name for this pattern"},"description":{"description":"Optional description","type":"string","maxLength":500},"tags":{"description":"Tags for categorization","type":"array","items":{"type":"string"}}},"required":["code","name"]}}}}}},"/experiences/strudel/generate":{"post":{"operationId":"postExperiencesStrudelGenerate","tags":["experiences"],"summary":"Generate Strudel code from a prompt","responses":{"200":{"description":"Generated code","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Generated Strudel pattern code"},"explanation":{"description":"Explanation of the generated pattern","type":"string"},"generationId":{"type":"string","description":"Unique ID for feedback tracking"}},"required":["code","generationId"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"Natural language description of the music pattern to generate"},"style":{"description":"Musical style preset","type":"string","enum":["techno","ambient","house","jazz","drums","experimental"]},"tempo":{"description":"Beats per minute (BPM)","type":"number","minimum":60,"maximum":200},"complexity":{"default":"medium","description":"Pattern complexity level","type":"string","enum":["simple","medium","complex"]},"model":{"description":"Model ID to use for generation (if not specified, uses auxiliary model)","type":"string"},"options":{"description":"Additional generation options","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["prompt"]}}}}}},"/experiences/strudel/feedback":{"post":{"operationId":"postExperiencesStrudelFeedback","tags":["experiences"],"summary":"Rate a Strudel generation","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"generationId":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"type":"string"}},"required":["generationId"]}}}}}},"/experiences/strudel/{pattern_id}":{"get":{"operationId":"getExperiencesStrudelByPatternId","tags":["experiences"],"summary":"Get a Strudel pattern","responses":{"200":{"description":"The pattern","content":{"application/json":{"schema":{"type":"object","properties":{"pattern":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","code","createdAt","updatedAt"],"additionalProperties":false}},"required":["pattern"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"pattern_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"patch":{"operationId":"patchExperiencesStrudelByPatternId","tags":["experiences"],"summary":"Update a Strudel pattern","responses":{"200":{"description":"The pattern","content":{"application/json":{"schema":{"type":"object","properties":{"pattern":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","code","createdAt","updatedAt"],"additionalProperties":false}},"required":["pattern"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"pattern_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"tags":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"operationId":"deleteExperiencesStrudelByPatternId","tags":["experiences"],"summary":"Delete a Strudel pattern","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"pattern_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/experiences/twenty_questions":{"post":{"operationId":"postExperiencesTwentyQuestions","tags":["experiences"],"summary":"Start a game of Twenty Questions","description":"Picks a secret from the category and returns it sealed inside an opaque game token.","responses":{"200":{"description":"A new game","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":2048},"category":{"type":"string","enum":["animals","food","objects","places"]},"maxQuestions":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["token","category","maxQuestions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["animals","food","objects","places"]}},"required":["category"],"additionalProperties":false}}}}}},"/experiences/twenty_questions/ask":{"post":{"operationId":"postExperiencesTwentyQuestionsAsk","tags":["experiences"],"summary":"Ask a yes or no question","description":"Judges a question or guess against the sealed secret and returns a calibrated yes probability with a warmth reading.","responses":{"200":{"description":"The answer","content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string"},"kind":{"type":"string","enum":["question","guess","unanswerable"]},"yes":{"type":"number","minimum":0,"maximum":1},"warmth":{"type":"object","properties":{"level":{"type":"integer","minimum":0,"maximum":9007199254740991},"label":{"type":"string"}},"required":["level","label"],"additionalProperties":false},"solved":{"type":"boolean"},"secret":{"type":["string","null"]}},"required":["question","kind","yes","warmth","solved","secret"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":2048},"question":{"type":"string","minLength":2,"maxLength":200}},"required":["token","question"],"additionalProperties":false}}}}}},"/experiences/twenty_questions/reveal":{"post":{"operationId":"postExperiencesTwentyQuestionsReveal","tags":["experiences"],"summary":"Reveal the secret","responses":{"200":{"description":"The secret","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":2048}},"required":["token"],"additionalProperties":false}}}}}},"/experiences/verbatim/segments":{"post":{"operationId":"postExperiencesVerbatimSegments","tags":["experiences"],"summary":"Transcribe and verify a live audio segment","description":"Streams a draft transcript of a short WAV segment as soon as it is transcribed, then the verified segment once Clef Omni has checked every word against the audio.","responses":{"200":{"description":"Server-sent draft and segment events","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"draft"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"segment"},"segment":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"silence"},"timings":{"type":"object","properties":{"transcribeMs":{"type":"number","minimum":0},"decideMs":{"type":"number","minimum":0},"repairMs":{"type":"number","minimum":0}},"required":["transcribeMs","decideMs","repairMs"],"additionalProperties":false}},"required":["status","timings"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"no_speech"},"rawText":{"type":"string"},"speech":{"type":"number","minimum":0,"maximum":1},"timings":{"type":"object","properties":{"transcribeMs":{"type":"number","minimum":0},"decideMs":{"type":"number","minimum":0},"repairMs":{"type":"number","minimum":0}},"required":["transcribeMs","decideMs","repairMs"],"additionalProperties":false}},"required":["status","rawText","speech","timings"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"transcribed"},"text":{"type":"string"},"rawText":{"type":"string"},"words":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"probability":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"removed":{"type":"boolean"}},"required":["text","probability","removed"],"additionalProperties":false}},"checks":{"type":"object","properties":{"speech":{"type":"number","minimum":0,"maximum":1},"verbatim":{"type":"number","minimum":0,"maximum":1},"fluent":{"type":"number","minimum":0,"maximum":1},"coherent":{"type":"number","minimum":0,"maximum":1}},"required":["speech","verbatim","fluent","coherent"],"additionalProperties":false},"delivery":{"type":"object","properties":{"pace":{"type":"object","properties":{"label":{"type":"string"},"score":{"type":"number","minimum":0,"maximum":1},"scale":{"type":"array","items":{"type":"string"}}},"required":["label","score","scale"],"additionalProperties":false},"noise":{"type":"object","properties":{"label":{"type":"string"},"score":{"type":"number","minimum":0,"maximum":1},"scale":{"type":"array","items":{"type":"string"}}},"required":["label","score","scale"],"additionalProperties":false},"tone":{"type":"object","properties":{"label":{"type":"string"},"score":{"type":"number","minimum":0,"maximum":1},"scale":{"type":"array","items":{"type":"string"}}},"required":["label","score","scale"],"additionalProperties":false}},"required":["pace","noise","tone"],"additionalProperties":false},"repair":{"anyOf":[{"type":"object","properties":{"applied":{"type":"boolean"},"candidate":{"type":"string"},"probability":{"type":"number","minimum":0,"maximum":1},"keptProbability":{"type":"number","minimum":0,"maximum":1}},"required":["applied","candidate","probability","keptProbability"],"additionalProperties":false},{"type":"null"}]},"model":{"type":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["input_tokens","output_tokens"],"additionalProperties":false},"timings":{"type":"object","properties":{"transcribeMs":{"type":"number","minimum":0},"decideMs":{"type":"number","minimum":0},"repairMs":{"type":"number","minimum":0}},"required":["transcribeMs","decideMs","repairMs"],"additionalProperties":false}},"required":["status","text","rawText","words","checks","delivery","repair","model","usage","timings"],"additionalProperties":false}]}},"required":["type","segment"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"error"},"error":{"type":"string"}},"required":["type","error"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"audio":{},"context":{"type":"string","maxLength":600}},"required":["audio"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{},"context":{"type":"string","maxLength":600}},"required":["audio"]}}}}}},"/recipes":{"get":{"operationId":"getRecipes","tags":["recipes"],"summary":"List recipes","description":"One-tap setups for integrations and automations that can start from web, iOS or messaging.","responses":{"200":{"description":"Recipes","content":{"application/json":{"schema":{"type":"object","properties":{"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["automate","integrate"]},"category":{"type":"string","enum":["Calendar","Community","Developer","Email","Finance","Health","Home","Productivity","Scheduling","Shopping","Students","To-dos","Travel"]},"featured":{"type":"boolean"},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"requiresConnection":{"default":true,"type":"boolean"},"connectionGroup":{"type":"string"},"operationIds":{"type":"array","items":{"type":"string"}},"configurationKeys":{"type":"array","items":{"type":"string"}},"connectionStatus":{"type":"string","enum":["connected","missing","not_required","unconfigured","unknown"]},"setupUrl":{"type":"string"}},"required":["id","providerId","name","description","requiresConnection"],"additionalProperties":false}},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["message","schedule","event"]},"label":{"type":"string"},"description":{"type":"string"}},"required":["type","label","description"],"additionalProperties":false}},"actions":{"type":"array","items":{"type":"string"}},"setupPrompt":{"type":"string"},"resultPath":{"type":"string"},"enabledTools":{"default":[],"type":"array","items":{"type":"string"}},"configurationFields":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["text","textarea","number","boolean","string_list"]},"required":{"type":"boolean"},"placeholder":{"type":"string"},"defaultValue":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},{"type":"null"}]},"minimum":{"type":"number"},"maximum":{"type":"number"},"integer":{"type":"boolean"},"pattern":{"type":"string"}},"required":["key","label","type"],"additionalProperties":false}},"connectorPolicy":{"type":"object","properties":{"access":{"type":"string","enum":["read","write"]},"requireConfiguredIntegration":{"type":"boolean"},"parameters":{"type":"string","enum":["explicit","configuration"]}},"additionalProperties":false},"invocationContext":{"type":"object","properties":{"instructions":{"type":"string"},"windowHoursKey":{"type":"string"}},"required":["instructions"],"additionalProperties":false},"readOnly":{"description":"Runs as a teammate routine only read and draft, whatever the teammate's dial says","type":"boolean"},"modelRole":{"type":"string","enum":["titling","compaction","housekeeping","retrieval","writing","routines","vision","guardrails","decision","extraction","reranking","transcription","ocr","image","repaint","video","music","speech","fim","nextEdit","applyEdit"]},"capability":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["recipe","dynamic_app","frontend_app","connector","teammate","skill","tool"]},"name":{"type":"string"},"description":{"type":"string"},"availability":{"type":"string","enum":["available","installed","connected","disconnected","unconfigured","blocked","unavailable"]},"launch":{"type":"object","properties":{"method":{"type":"string","enum":["conversation","form","navigation","external","tool_toggle","schedule"]},"href":{"type":"string"},"action":{"type":"string"}},"required":["method"],"additionalProperties":false},"executionMode":{"type":"string","enum":["workflow","function","navigation","connector_operation","tool","teammate"]},"authRequirement":{"type":"string","enum":["none","signed_in","pro","connector"]},"authState":{"type":"string","enum":["not_required","signed_in","pro_required","connected","disconnected","unconfigured","unknown"]},"operationAccess":{"type":"string","enum":["read","write","mixed"]},"approvalPolicy":{"type":"string","enum":["never","on_write","always"]},"requiredModelCapabilities":{"default":[],"type":"array","items":{"type":"string"}},"requiredConnectors":{"default":[],"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"state":{"type":"string","enum":["connected","disconnected","missing","not_required","unconfigured","unknown"]}},"required":["provider","state"],"additionalProperties":false}},"availabilityReason":{"type":"string"},"savedState":{"type":"object","properties":{"supported":{"type":"boolean"},"kind":{"type":"string","enum":["installation","stored_response","connection"]}},"required":["supported"],"additionalProperties":false},"tags":{"default":[],"type":"array","items":{"type":"string"}}},"required":["id","kind","name","availability","launch","executionMode","authRequirement","requiredModelCapabilities","requiredConnectors","savedState","tags"],"additionalProperties":false}},"required":["id","title","summary","description","kind","category","featured","integrations","triggers","actions","setupPrompt","enabledTools","configurationFields"],"additionalProperties":false}},"categories":{"type":"array","items":{"type":"string","enum":["Calendar","Community","Developer","Email","Finance","Health","Home","Productivity","Scheduling","Shopping","Students","To-dos","Travel"]}},"filters":{"type":"array","items":{"type":"string","enum":["automate","integrate"]}}},"required":["recipes","categories","filters"],"additionalProperties":false}}}}},"hide":false}},"/recipes/installations":{"get":{"operationId":"getRecipesInstallations","tags":["recipes"],"summary":"List installed recipes","description":"Each installation carries its recipe, so callers need not load the catalogue.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/recipes/installations/{installation_id}":{"patch":{"operationId":"patchRecipesInstallationsByInstallationId","tags":["recipes"],"summary":"Update an installed recipe","responses":{"200":{"description":"The installation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"recipeId":{"type":"string"},"userId":{"type":"number"},"projectId":{"type":["string","null"]},"status":{"type":"string","enum":["active","paused"]},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"type":{"type":"string","enum":["manual","schedule","once"]},"enabled":{"default":true,"type":"boolean"},"cronExpression":{"type":"string"},"timezone":{"default":"UTC","type":"string","minLength":1,"maxLength":120},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"prompt":{"type":"string"},"notificationChannel":{"type":"string","enum":["sms","slack","telegram"]},"notificationTarget":{"type":"string"}},"required":["type","enabled"],"additionalProperties":false}},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},{"type":"null"}]}},"teammateContextId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"pausedReason":{"anyOf":[{"type":"string","enum":["person","budget"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","recipeId","userId","status","triggers","configuration","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Installation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused"]},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"type":{"type":"string","enum":["manual","schedule","once"]},"enabled":{"default":true,"type":"boolean"},"cronExpression":{"type":"string"},"timezone":{"default":"UTC","type":"string","minLength":1,"maxLength":120},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"prompt":{"type":"string"},"notificationChannel":{"type":"string","enum":["sms","slack","telegram"]},"notificationTarget":{"type":"string"}},"required":["type"]}},"configuration":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},{"type":"null"}]}},"teammateContextId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteRecipesInstallationsByInstallationId","tags":["recipes"],"summary":"Remove an installed recipe","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"string","minLength":1},"required":true}]}},"/recipes/installations/{installation_id}/spend":{"get":{"operationId":"getRecipesInstallationsByInstallationIdSpend","tags":["recipes"],"summary":"Read what an installed recipe has spent this month","responses":{"200":{"description":"Spend this period","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"runCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"capCreditMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"state":{"type":"string","enum":["uncapped","ok","near","reached"]},"resetsAt":{"type":"string"}},"required":["period","creditMicros","costMicros","runCount","capCreditMicros","state","resetsAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Installation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"string","minLength":1},"required":true}]}},"/recipes/installations/{installation_id}/trigger_types":{"get":{"operationId":"getRecipesInstallationsByInstallationIdTriggerTypes","tags":["recipes"],"summary":"List event types a connected account can trigger on","responses":{"200":{"description":"Trigger types","content":{"application/json":{"schema":{"type":"object","properties":{"triggerTypes":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["webhook","poll"]},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["slug","name","description","kind","configuration"],"additionalProperties":false}}},"required":["triggerTypes"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"provider_id","schema":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"required":true}]}},"/recipes/installations/{installation_id}/triggers":{"get":{"operationId":"getRecipesInstallationsByInstallationIdTriggers","tags":["recipes"],"summary":"List the installation's triggers","description":"Composio event triggers and signed webhook triggers, each with its broker.","responses":{"200":{"description":"Triggers","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"installationId":{"type":"string"},"projectId":{"type":["string","null"]},"providerId":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"triggerSlug":{"type":"string"},"externalTriggerId":{"type":"string"},"connectedAccountId":{"type":"string"},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"condition":{"type":["string","null"]},"status":{"type":"string","enum":["active","paused","error"]},"lastError":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"broker":{"type":"string","const":"composio"}},"required":["id","installationId","projectId","providerId","triggerSlug","externalTriggerId","connectedAccountId","configuration","condition","status","lastError","createdAt","updatedAt","broker"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"installationId":{"type":"string"},"projectId":{"type":["string","null"]},"condition":{"type":["string","null"]},"status":{"type":"string","enum":["active","paused","error"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"broker":{"type":"string","const":"webhook"}},"required":["id","installationId","projectId","condition","status","createdAt","updatedAt","broker"],"additionalProperties":false}]}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postRecipesInstallationsByInstallationIdTriggers","tags":["recipes"],"summary":"Add a trigger","description":"Subscribes to a Composio event or creates a signed webhook URL. Webhook triggers return their URL once.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"providerId":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"triggerSlug":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Z0-9_]+$"},"connectedAccountId":{"type":"string","minLength":1,"maxLength":200},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":160},"additionalProperties":{}},"condition":{"type":"string","minLength":1,"maxLength":2000},"broker":{"type":"string","const":"composio"}},"required":["providerId","triggerSlug","connectedAccountId","broker"]},{"type":"object","properties":{"condition":{"type":"string","minLength":1,"maxLength":2000},"broker":{"type":"string","const":"webhook"}},"required":["broker"]}]}}}}}},"/recipes/installations/{installation_id}/triggers/{trigger_id}":{"patch":{"operationId":"patchRecipesInstallationsByInstallationIdTriggersByTriggerId","tags":["recipes"],"summary":"Pause or resume a trigger","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"trigger_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused"]}},"required":["status"]}}}}},"delete":{"operationId":"deleteRecipesInstallationsByInstallationIdTriggersByTriggerId","tags":["recipes"],"summary":"Remove a trigger","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"trigger_id","schema":{"type":"string","minLength":1},"required":true}]}},"/recipes/installations/{installation_id}/triggers/{trigger_id}/rotate":{"post":{"operationId":"postRecipesInstallationsByInstallationIdTriggersByTriggerIdRotate","tags":["recipes"],"summary":"Rotate a webhook trigger's URL","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"trigger_id","schema":{"type":"string","minLength":1},"required":true}]}},"/recipes/{recipe_id}":{"get":{"operationId":"getRecipesByRecipeId","tags":["recipes"],"summary":"Get a recipe","responses":{"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Recipe not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"recipe_id","schema":{"type":"string","minLength":1},"required":true}]}},"/recipes/{recipe_id}/install":{"post":{"operationId":"postRecipesByRecipeIdInstall","tags":["recipes"],"summary":"Start recipe setup","description":"Creates the setup payload a client uses to open a chat and finish configuration conversationally.","responses":{"200":{"description":"Setup payload","content":{"application/json":{"schema":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["automate","integrate"]},"category":{"type":"string","enum":["Calendar","Community","Developer","Email","Finance","Health","Home","Productivity","Scheduling","Shopping","Students","To-dos","Travel"]},"featured":{"type":"boolean"},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"requiresConnection":{"default":true,"type":"boolean"},"connectionGroup":{"type":"string"},"operationIds":{"type":"array","items":{"type":"string"}},"configurationKeys":{"type":"array","items":{"type":"string"}},"connectionStatus":{"type":"string","enum":["connected","missing","not_required","unconfigured","unknown"]},"setupUrl":{"type":"string"}},"required":["id","providerId","name","description","requiresConnection"],"additionalProperties":false}},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["message","schedule","event"]},"label":{"type":"string"},"description":{"type":"string"}},"required":["type","label","description"],"additionalProperties":false}},"actions":{"type":"array","items":{"type":"string"}},"setupPrompt":{"type":"string"},"resultPath":{"type":"string"},"enabledTools":{"default":[],"type":"array","items":{"type":"string"}},"configurationFields":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["text","textarea","number","boolean","string_list"]},"required":{"type":"boolean"},"placeholder":{"type":"string"},"defaultValue":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},{"type":"null"}]},"minimum":{"type":"number"},"maximum":{"type":"number"},"integer":{"type":"boolean"},"pattern":{"type":"string"}},"required":["key","label","type"],"additionalProperties":false}},"connectorPolicy":{"type":"object","properties":{"access":{"type":"string","enum":["read","write"]},"requireConfiguredIntegration":{"type":"boolean"},"parameters":{"type":"string","enum":["explicit","configuration"]}},"additionalProperties":false},"invocationContext":{"type":"object","properties":{"instructions":{"type":"string"},"windowHoursKey":{"type":"string"}},"required":["instructions"],"additionalProperties":false},"readOnly":{"description":"Runs as a teammate routine only read and draft, whatever the teammate's dial says","type":"boolean"},"modelRole":{"type":"string","enum":["titling","compaction","housekeeping","retrieval","writing","routines","vision","guardrails","decision","extraction","reranking","transcription","ocr","image","repaint","video","music","speech","fim","nextEdit","applyEdit"]},"capability":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["recipe","dynamic_app","frontend_app","connector","teammate","skill","tool"]},"name":{"type":"string"},"description":{"type":"string"},"availability":{"type":"string","enum":["available","installed","connected","disconnected","unconfigured","blocked","unavailable"]},"launch":{"type":"object","properties":{"method":{"type":"string","enum":["conversation","form","navigation","external","tool_toggle","schedule"]},"href":{"type":"string"},"action":{"type":"string"}},"required":["method"],"additionalProperties":false},"executionMode":{"type":"string","enum":["workflow","function","navigation","connector_operation","tool","teammate"]},"authRequirement":{"type":"string","enum":["none","signed_in","pro","connector"]},"authState":{"type":"string","enum":["not_required","signed_in","pro_required","connected","disconnected","unconfigured","unknown"]},"operationAccess":{"type":"string","enum":["read","write","mixed"]},"approvalPolicy":{"type":"string","enum":["never","on_write","always"]},"requiredModelCapabilities":{"default":[],"type":"array","items":{"type":"string"}},"requiredConnectors":{"default":[],"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"state":{"type":"string","enum":["connected","disconnected","missing","not_required","unconfigured","unknown"]}},"required":["provider","state"],"additionalProperties":false}},"availabilityReason":{"type":"string"},"savedState":{"type":"object","properties":{"supported":{"type":"boolean"},"kind":{"type":"string","enum":["installation","stored_response","connection"]}},"required":["supported"],"additionalProperties":false},"tags":{"default":[],"type":"array","items":{"type":"string"}}},"required":["id","kind","name","availability","launch","executionMode","authRequirement","requiredModelCapabilities","requiredConnectors","savedState","tags"],"additionalProperties":false}},"required":["id","title","summary","description","kind","category","featured","integrations","triggers","actions","setupPrompt","enabledTools","configurationFields"],"additionalProperties":false},"conversationStarter":{"type":"string"},"messageUrl":{"type":"string"},"checklist":{"type":"array","items":{"type":"string"}},"connections":{"type":"array","items":{"type":"object","properties":{"integrationId":{"type":"string"},"providerId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["connected","missing","not_required","unconfigured","unknown"]},"requiresConnection":{"type":"boolean"},"connectionGroup":{"type":"string"},"setupUrl":{"type":"string"}},"required":["integrationId","providerId","name","status","requiresConnection"],"additionalProperties":false}},"readyToRun":{"type":"boolean"},"enabledTools":{"default":[],"type":"array","items":{"type":"string"}},"allowedConnectorProviders":{"default":[],"type":"array","items":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]}},"allowedConnectorOperations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"installation":{"type":"object","properties":{"id":{"type":"string"},"recipeId":{"type":"string"},"userId":{"type":"number"},"projectId":{"type":["string","null"]},"status":{"type":"string","enum":["active","paused"]},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"type":{"type":"string","enum":["manual","schedule","once"]},"enabled":{"default":true,"type":"boolean"},"cronExpression":{"type":"string"},"timezone":{"default":"UTC","type":"string","minLength":1,"maxLength":120},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"prompt":{"type":"string"},"notificationChannel":{"type":"string","enum":["sms","slack","telegram"]},"notificationTarget":{"type":"string"}},"required":["type","enabled"],"additionalProperties":false}},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},{"type":"null"}]}},"teammateContextId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"pausedReason":{"anyOf":[{"type":"string","enum":["person","budget"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","recipeId","userId","status","triggers","configuration","createdAt","updatedAt"],"additionalProperties":false}},"required":["recipe","conversationStarter","messageUrl","checklist","connections","readyToRun","enabledTools","allowedConnectorProviders"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Recipe not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"recipe_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"default":"web","type":"string","enum":["web","ios","sms","slack","telegram","email"]},"projectId":{"type":"string","minLength":1},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"type":{"type":"string","enum":["manual","schedule","once"]},"enabled":{"default":true,"type":"boolean"},"cronExpression":{"type":"string"},"timezone":{"default":"UTC","type":"string","minLength":1,"maxLength":120},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"prompt":{"type":"string"},"notificationChannel":{"type":"string","enum":["sms","slack","telegram"]},"notificationTarget":{"type":"string"}},"required":["type"]}},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},{"type":"null"}]}}}}}}}}},"/recipes/{recipe_id}/invoke":{"post":{"operationId":"postRecipesByRecipeIdInvoke","tags":["recipes"],"summary":"Run an installed recipe","description":"Runs now, or queues the run as a task when queue is true.","responses":{"200":{"description":"Recipe invocation","content":{"application/json":{"schema":{"type":"object","properties":{"recipeId":{"type":"string"},"recipeTitle":{"type":"string"},"installationId":{"type":"string"},"projectId":{"type":["string","null"]},"channel":{"default":"web","type":"string","enum":["web","ios","sms","slack","telegram","email","scheduled","event","tool"]},"status":{"type":"string","enum":["ready","queued","blocked","paused","not_installed"]},"conversationStarter":{"type":"string"},"messageUrl":{"type":"string"},"missingConnections":{"type":"array","items":{"type":"object","properties":{"integrationId":{"type":"string"},"providerId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["connected","missing","not_required","unconfigured","unknown"]},"requiresConnection":{"type":"boolean"},"connectionGroup":{"type":"string"},"setupUrl":{"type":"string"}},"required":["integrationId","providerId","name","status","requiresConnection"],"additionalProperties":false}},"enabledTools":{"default":[],"type":"array","items":{"type":"string"}},"allowedConnectorProviders":{"default":[],"type":"array","items":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]}},"allowedConnectorOperations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},{"type":"null"}]}},"readOnly":{"type":"boolean"},"dryRun":{"type":"boolean"},"taskId":{"type":"string"}},"required":["recipeId","channel","status","conversationStarter","messageUrl","missingConnections","enabledTools","allowedConnectorProviders","configuration"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Recipe not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"recipe_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"string"},"queue":{"type":"boolean"},"dryRun":{"description":"Test the routine without changing anything: tools that would write, send, spend or delete return a draft instead.","type":"boolean"},"projectId":{"type":"string","minLength":1},"channel":{"default":"web","type":"string","enum":["web","ios","sms","slack","telegram","email","scheduled","event","tool"]}}}}}}}},"/connectors":{"get":{"operationId":"getConnectors","tags":["connectors"],"summary":"List connectors","description":"Summaries without operations. Read a connector for its operations.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"status","schema":{"type":"string","enum":["connected","disconnected","unconfigured"]}}]}},"/connectors/composio_callback":{"get":{"operationId":"getConnectorsComposioCallback","tags":["connectors"],"summary":"Complete a Composio connection","description":"The browser lands here after Composio authorisation and is redirected back.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"session_uri","schema":{"type":"string","minLength":1,"maxLength":4096}},{"in":"query","name":"status","schema":{"type":"string","enum":["success","failed"]}},{"in":"query","name":"connected_account_id","schema":{"type":"string","minLength":1,"maxLength":256}}]}},"/connectors/{connector_id}":{"get":{"operationId":"getConnectorsByConnectorId","tags":["connectors"],"summary":"Get a connector","responses":{"200":{"description":"Connector","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"name":{"type":"string"},"description":{"type":"string"},"logoUrl":{"type":"string"},"appUrl":{"type":"string"},"categories":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"authType":{"type":"string","enum":["api_key","composio"]},"status":{"type":"string","enum":["connected","disconnected","unconfigured"]},"setupUrl":{"type":"string"},"authorizationUrl":{"type":"string"},"credentialFields":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"secret":{"type":"boolean"}},"required":["label","secret"],"additionalProperties":false}},"callbackUrl":{"type":"string","format":"uri"},"connectedAt":{"type":"string"},"updatedAt":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"toolCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"operations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"access":{"type":"string","enum":["read","write"]},"destructive":{"type":"boolean"}},"required":["id","access","destructive"],"additionalProperties":false}},"readToolCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"writeToolCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"operationAccess":{"type":"string","enum":["read","write","mixed"]},"authConfigs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"authScheme":{"type":"string"},"isManaged":{"type":"boolean"},"status":{"type":"string","enum":["connected","disconnected","unconfigured"]}},"required":["id","name","authScheme","isManaged","status"],"additionalProperties":false}}},"required":["id","name","description","categories","authType","status","scopes","toolCount","readToolCount","writeToolCount"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"connector_id","schema":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"required":true}]},"delete":{"operationId":"deleteConnectorsByConnectorId","tags":["connectors"],"summary":"Disconnect a connector","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"connector_id","schema":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"required":true}]}},"/connectors/{connector_id}/connect":{"post":{"operationId":"postConnectorsByConnectorIdConnect","tags":["connectors"],"summary":"Start connector authorisation","responses":{"200":{"description":"Authorisation URL","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"authorizationUrl":{"type":"string"}},"required":["provider","authorizationUrl"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"connector_id","schema":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"returnTo":{"type":"string"},"authConfigId":{"type":"string","minLength":1}}}}}}}},"/connectors/{connector_id}/api_key":{"post":{"operationId":"postConnectorsByConnectorIdApiKey","tags":["connectors"],"summary":"Store a connector API key","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"connector_id","schema":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credentials":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":4000}}},"required":["credentials"]}}}}}},"/connectors/{connector_id}/accounts":{"get":{"operationId":"getConnectorsByConnectorIdAccounts","tags":["connectors"],"summary":"List connected accounts","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"connector_id","schema":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"required":true}]}},"/connectors/{connector_id}/accounts/{account_id}":{"patch":{"operationId":"patchConnectorsByConnectorIdAccountsByAccountId","tags":["connectors"],"summary":"Label or select a connected account","responses":{"200":{"description":"The account","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"alias":{"type":["string","null"]},"status":{"type":"string"},"isDisabled":{"type":"boolean"},"isSelected":{"type":"boolean"},"authConfigId":{"type":"string"},"connectedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","providerId","alias","status","isDisabled","isSelected","connectedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"connector_id","schema":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"required":true},{"in":"path","name":"account_id","schema":{"type":"string","minLength":1,"maxLength":240},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alias":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"selected":{"type":"boolean"}}}}}}}},"/connections/github":{"get":{"operationId":"getConnectionsGithub","tags":["connections"],"summary":"List GitHub App connections","description":"The page also carries install_config: the GitHub App install link and whether installations of the default app can be connected without credentials.","responses":{"200":{"description":"Successful response"}},"hide":false},"post":{"operationId":"postConnectionsGithub","tags":["connections"],"summary":"Add or update a GitHub App connection","description":"Send appId and privateKey for your own GitHub App, or only installationId to connect an installation of the default app.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"appId":{"type":"string","minLength":1},"privateKey":{"type":"string","minLength":1},"webhookSecret":{"type":"string","minLength":1},"repositories":{"type":"array","items":{"type":"string","minLength":1}}},"required":["installationId","appId","privateKey"]},{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositories":{"type":"array","items":{"type":"string","minLength":1}}},"required":["installationId"]}]}}}}}},"/connections/github/pull_requests":{"post":{"operationId":"postConnectionsGithubPullRequests","tags":["connections"],"summary":"Open or update a pull request from a desktop conversation's branch","description":"Builds the branch's commit on GitHub from the files the desktop sends, using your GitHub App connection, then opens a pull request or updates the open one.","responses":{"200":{"description":"The pull request","content":{"application/json":{"schema":{"type":"object","properties":{"repository":{"type":"string","minLength":1},"branch":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"created":{"type":"boolean"}},"required":["repository","branch","number","url","created"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"changes":{"type":"object","properties":{"repository":{"type":"string","pattern":"^[\\w.-]+\\/[\\w.-]+$"},"branch":{"type":"string","pattern":"^polychat\\/[A-Za-z0-9-]{1,48}$"},"baseBranch":{"type":"string","minLength":1,"maxLength":200},"baseCommit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"headCommit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"files":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1000},"deleted":{"type":"boolean"},"executable":{"type":"boolean"},"contentBase64":{"type":["string","null"]}},"required":["path","deleted","executable","contentBase64"]}}},"required":["repository","branch","baseBranch","baseCommit","headCommit","files"]},"title":{"type":"string","minLength":1,"maxLength":200},"body":{"default":"","type":"string","maxLength":20000}},"required":["changes","title"]}}}}}},"/connections/github/{installation_id}":{"delete":{"operationId":"deleteConnectionsGithubByInstallationId","tags":["connections"],"summary":"Remove a GitHub App connection","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"required":true}]}},"/connections/github/{installation_id}/repositories":{"get":{"operationId":"getConnectionsGithubByInstallationIdRepositories","tags":["connections"],"summary":"List repositories available to an installation","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"required":true}]},"patch":{"operationId":"patchConnectionsGithubByInstallationIdRepositories","tags":["connections"],"summary":"Replace the repositories a connection may use","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"installation_id","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"string","minLength":1,"pattern":"^[\\w.-]+\\/[\\w.-]+$"}}},"required":["repositories"]}}}}}},"/desktop/downloads":{"get":{"operationId":"getDesktopDownloads","tags":["desktop"],"summary":"List the current desktop downloads","responses":{"200":{"description":"The published desktop bundles","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"released_at":{"type":"string"},"notes":{"type":"string"},"downloads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string","enum":["macos","linux","windows"]},"architecture":{"type":"string"},"label":{"type":"string"},"filename":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"url":{"type":"string"}},"required":["id","platform","architecture","label","filename","size","url"],"additionalProperties":false}}},"required":["version","released_at","notes","downloads"],"additionalProperties":false}}}},"404":{"description":"Nothing has been released yet","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/desktop/downloads/{download_id}":{"get":{"operationId":"getDesktopDownloadsByDownloadId","tags":["desktop"],"summary":"Download a desktop bundle","responses":{"200":{"description":"The bundle archive"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Unknown bundle","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"download_id","schema":{"type":"string","minLength":1},"required":true}]}},"/desktop/updates/{bundle}/{filename}":{"get":{"operationId":"getDesktopUpdatesByBundleByFilename","tags":["desktop"],"summary":"Download an update artefact","responses":{"200":{"description":"The update artefact"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Unknown artefact","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"bundle","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"filename","schema":{"type":"string","minLength":1},"required":true}]}},"/desktop/releases/{target}/{arch}/{current_version}":{"get":{"operationId":"getDesktopReleasesByTargetByArchByCurrentVersion","tags":["desktop"],"summary":"Check for a desktop update","responses":{"200":{"description":"An update is available","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"notes":{"type":"string"},"pub_date":{"type":"string"},"url":{"type":"string"},"signature":{"type":"string"}},"required":["version","notes","pub_date","url","signature"],"additionalProperties":false}}}},"204":{"description":"The installed version is current"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"target","schema":{"type":"string","enum":["darwin","linux","windows"]},"required":true},{"in":"path","name":"arch","schema":{"type":"string","enum":["x86_64","aarch64","i686","armv7"]},"required":true},{"in":"path","name":"current_version","schema":{"type":"string","minLength":1},"required":true}]}},"/environments":{"get":{"operationId":"getEnvironments","tags":["environments"],"summary":"List environments","description":"Lists the machines and other places work can run for the caller.","responses":{"200":{"description":"Environments","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"object":{"type":"string","const":"environment"},"id":{"type":"string"},"kind":{"type":"string","const":"sandbox"},"detail":{"type":"object","properties":{"run":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repo":{"type":"string","minLength":1,"pattern":"^[\\w.-]+\\/[\\w.-]+$"},"task":{"type":"string","minLength":1},"taskType":{"type":"string","enum":["feature-implementation","code-review","test-suite","bug-fix","refactoring","documentation","migration"]},"model":{"type":"string","minLength":1},"executionProvider":{"type":"string","enum":["polychat","openai"]},"trustLevel":{"type":"string","enum":["strict","balanced","trusted"]},"promptStrategy":{"type":"string","enum":["auto","feature-delivery","bug-fix","refactor","test-hardening"]},"deliveryPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode","destination"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"shouldCommit":{"type":"boolean"},"environmentSetup":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"polychat"},"definition":{"type":"object","properties":{"version":{"default":1,"type":"number","const":1},"setupCommands":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"resumeCommands":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"runtimes":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"setupTimeoutSeconds":{"default":600,"type":"integer","minimum":30,"maximum":1800},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"networkHosts":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","maxLength":253,"pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"default":".","type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"command":{"type":"string","minLength":1,"maxLength":500},"dependencies":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"}},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path","expectedStatus"],"additionalProperties":false}]},"startupTimeoutSeconds":{"default":60,"type":"integer","minimum":5,"maximum":300},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"restartPolicy":{"default":{"mode":"never","maxRestarts":0,"backoffSeconds":1},"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"never"},"maxRestarts":{"default":0,"type":"number","const":0},"backoffSeconds":{"default":1,"type":"integer","minimum":1,"maximum":30}},"required":["mode","maxRestarts","backoffSeconds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"on_failure"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode","maxRestarts","backoffSeconds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"always"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode","maxRestarts","backoffSeconds"],"additionalProperties":false}]}},"required":["name","workingDirectory","command","dependencies","startupTimeoutSeconds","environment","restartPolicy"],"additionalProperties":false}}},"required":["version","setupCommands","resumeCommands","runtimes","setupTimeoutSeconds","environment","networkHosts"],"additionalProperties":false}},"required":["source","definition"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"repository"}},"required":["source"],"additionalProperties":false}]},"environmentPreparationMode":{"type":"string","enum":["setup","resume"]},"environmentCacheGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["queued","running","paused","completed","failed","cancelled"]},"startedAt":{"type":"string","minLength":1},"updatedAt":{"type":"string","minLength":1},"completedAt":{"type":"string"},"error":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"runId":{"type":"string"},"repo":{"type":"string"},"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"message":{"type":"string"},"command":{"type":"string"},"commandIndex":{"type":"number"},"commandTotal":{"type":"number"},"exitCode":{"type":"number"},"branchName":{"type":"string"},"commitSha":{"type":"string"},"targetBranch":{"type":"string"},"deliveryAction":{"type":"string"},"pullRequestUrl":{"type":"string","format":"uri"},"configurationSource":{"type":"string","enum":["polychat","repository"]},"configurationRevision":{"type":"string"},"configurationPath":{"type":"string"},"preparationMode":{"type":"string","enum":["setup","resume"]},"preparationStatus":{"type":"string","enum":["completed","failed","skipped"]},"runtimeRequirements":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManagerRequirement":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"durationSeconds":{"type":"number","minimum":0},"cacheKey":{"type":"string"},"cacheStatus":{"type":"string","enum":["created","reused","miss","failed"]},"cacheCreatedAt":{"type":"string"},"cacheAgeSeconds":{"type":"number","minimum":0},"cacheInvalidationReason":{"type":"string"},"serviceName":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"serviceWorkingDirectory":{"type":"string","minLength":1},"serviceStatus":{"type":"string","enum":["starting","running","healthy","unhealthy","restarting","stopped","failed","timed_out"]},"servicePort":{"type":"integer","minimum":1024,"maximum":65535},"serviceAction":{"type":"string","enum":["start","restart","stop"]},"serviceRestartCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"serviceHealthPath":{"type":"string","minLength":1},"serviceHealthCheckType":{"type":"string","enum":["http","tcp"]},"plan":{"type":"string"},"error":{"type":"string"},"errorType":{"type":"string"},"path":{"type":"string"},"output":{"type":"string"},"stream":{"type":"string","enum":["stdout","stderr"]},"language":{"type":"string"},"changeType":{"type":"string"},"isDirectory":{"type":"boolean"},"agentStep":{"type":"number"},"action":{"type":"string"},"reasoning":{"type":"string"},"promptStrategy":{"type":"string","enum":["auto","feature-delivery","bug-fix","refactor","test-hardening"]},"retryable":{"type":"boolean"},"commandCount":{"type":"number"},"startLine":{"type":"number"},"endLine":{"type":"number"},"truncated":{"type":"boolean"},"timestamp":{"type":"string"},"timeoutSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"timeoutAt":{"type":"string"},"inspectionWindowSeconds":{"type":"integer","minimum":0,"maximum":300},"inspectionExpiresAt":{"type":"string"},"inspectionExtended":{"type":"boolean"},"result":{"type":"object","properties":{"success":{"type":"boolean"},"summary":{"type":"string"},"diff":{"type":"string"},"logs":{"type":"string"},"logsArtifactKey":{"type":"string"},"logsArtifactUrl":{"type":"string"},"error":{"type":"string"},"errorType":{"type":"string"},"retryable":{"type":"boolean"},"branchName":{"type":"string"},"pullRequestUrl":{"type":"string","format":"uri"},"proof":{"type":"object","properties":{"repository":{"type":"object","properties":{"baseRevision":{"type":"string","minLength":1},"headRevision":{"type":"string","minLength":1}},"additionalProperties":false},"changedFileCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedFiles":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"validation":{"type":"object","properties":{"qualityGate":{"type":"string","enum":["passed","failed","skipped"]},"checks":{"type":"array","items":{"type":"object","properties":{"command":{"type":"string","minLength":1},"status":{"type":"string","enum":["passed","failed"]},"exitCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output":{"type":"string","maxLength":12000}},"required":["command","status"],"additionalProperties":false}}},"required":["qualityGate","checks"],"additionalProperties":false},"environment":{"type":"object","properties":{"source":{"type":"string","enum":["polychat","repository"]},"configurationRevision":{"type":"string","minLength":1},"configurationPath":{"type":"string","minLength":1},"preparationMode":{"type":"string","enum":["setup","resume"]},"status":{"type":"string","enum":["completed","failed","skipped"]},"runtimes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"durationSeconds":{"type":"number","minimum":0},"commandCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache":{"type":"object","properties":{"status":{"type":"string","enum":["created","reused","miss","failed"]},"cacheKey":{"type":"string","minLength":1},"createdAt":{"type":"string","minLength":1},"ageSeconds":{"type":"number","minimum":0},"invalidationReason":{"type":"string","minLength":1}},"required":["status","cacheKey"],"additionalProperties":false}},"required":["source","configurationRevision","preparationMode","status","runtimes","durationSeconds","commandCount"],"additionalProperties":false},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"status":{"type":"string","enum":["starting","running","healthy","unhealthy","restarting","stopped","failed","timed_out"]},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path","expectedStatus"],"additionalProperties":false}]},"restartCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAt":{"type":"string","minLength":1},"healthyAt":{"type":"string","minLength":1},"stoppedAt":{"type":"string","minLength":1},"error":{"type":"string","minLength":1}},"required":["name","workingDirectory","status","restartCount"],"additionalProperties":false}},"delivery":{"type":"object","properties":{"policy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode","destination"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"branch":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1},"pullRequestUrl":{"type":"string","format":"uri"}},"additionalProperties":false},"residualRisks":{"type":"array","items":{"type":"string","minLength":1}},"incompleteWork":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false}},"additionalProperties":{}},"approvalId":{"type":"string"},"approvalStatus":{"type":"string","enum":["pending","escalated","timed_out","approved","rejected"]},"approvalExpiresAt":{"type":"string"},"approvalEscalatedAt":{"type":"string"},"approvalTimedOutAt":{"type":"string"},"instructionId":{"type":"string"},"instructionKind":{"type":"string","enum":["message","continue","run_command","approval_request","approval_response","service_action"]},"instructionContent":{"type":"string"},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repeatCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxSteps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"extendedBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":{}}},"result":{"type":"object","properties":{"success":{"type":"boolean"},"summary":{"type":"string"},"diff":{"type":"string"},"logs":{"type":"string"},"logsArtifactKey":{"type":"string"},"logsArtifactUrl":{"type":"string"},"error":{"type":"string"},"errorType":{"type":"string"},"retryable":{"type":"boolean"},"branchName":{"type":"string"},"pullRequestUrl":{"type":"string","format":"uri"},"proof":{"type":"object","properties":{"repository":{"type":"object","properties":{"baseRevision":{"type":"string","minLength":1},"headRevision":{"type":"string","minLength":1}},"additionalProperties":false},"changedFileCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedFiles":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"validation":{"type":"object","properties":{"qualityGate":{"type":"string","enum":["passed","failed","skipped"]},"checks":{"type":"array","items":{"type":"object","properties":{"command":{"type":"string","minLength":1},"status":{"type":"string","enum":["passed","failed"]},"exitCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output":{"type":"string","maxLength":12000}},"required":["command","status"],"additionalProperties":false}}},"required":["qualityGate","checks"],"additionalProperties":false},"environment":{"type":"object","properties":{"source":{"type":"string","enum":["polychat","repository"]},"configurationRevision":{"type":"string","minLength":1},"configurationPath":{"type":"string","minLength":1},"preparationMode":{"type":"string","enum":["setup","resume"]},"status":{"type":"string","enum":["completed","failed","skipped"]},"runtimes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"durationSeconds":{"type":"number","minimum":0},"commandCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache":{"type":"object","properties":{"status":{"type":"string","enum":["created","reused","miss","failed"]},"cacheKey":{"type":"string","minLength":1},"createdAt":{"type":"string","minLength":1},"ageSeconds":{"type":"number","minimum":0},"invalidationReason":{"type":"string","minLength":1}},"required":["status","cacheKey"],"additionalProperties":false}},"required":["source","configurationRevision","preparationMode","status","runtimes","durationSeconds","commandCount"],"additionalProperties":false},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"status":{"type":"string","enum":["starting","running","healthy","unhealthy","restarting","stopped","failed","timed_out"]},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path","expectedStatus"],"additionalProperties":false}]},"restartCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAt":{"type":"string","minLength":1},"healthyAt":{"type":"string","minLength":1},"stoppedAt":{"type":"string","minLength":1},"error":{"type":"string","minLength":1}},"required":["name","workingDirectory","status","restartCount"],"additionalProperties":false}},"delivery":{"type":"object","properties":{"policy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode","destination"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"branch":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1},"pullRequestUrl":{"type":"string","format":"uri"}},"additionalProperties":false},"residualRisks":{"type":"array","items":{"type":"string","minLength":1}},"incompleteWork":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false}},"additionalProperties":{}},"manifest":{"type":"object","properties":{"version":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"objective":{"type":"string","minLength":1},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"completed"},"success":{"type":"boolean","const":true},"summary":{"type":"string","minLength":1}},"required":["status","success"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"failed"},"success":{"type":"boolean","const":false},"summary":{"type":"string","minLength":1},"error":{"type":"string","minLength":1}},"required":["status","success","error"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"cancelled"},"success":{"type":"boolean","const":false},"summary":{"type":"string","minLength":1},"cancellationReason":{"type":"string","minLength":1}},"required":["status","success"],"additionalProperties":false}]},"timestamps":{"type":"object","properties":{"startedAt":{"type":"string","minLength":1},"updatedAt":{"type":"string","minLength":1},"completedAt":{"type":"string","minLength":1}},"required":["startedAt","updatedAt","completedAt"],"additionalProperties":false},"repository":{"type":"object","properties":{"name":{"type":"string","minLength":1,"pattern":"^[\\w.-]+\\/[\\w.-]+$"},"baseRevision":{"type":"string","minLength":1},"headRevision":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false},"changes":{"type":"object","properties":{"fileCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"files":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"filesTruncated":{"type":"boolean"},"summary":{"type":"string","minLength":1}},"required":["fileCount","files","filesTruncated"],"additionalProperties":false},"validation":{"type":"object","properties":{"qualityGate":{"type":"string","enum":["passed","failed","skipped","unavailable"]},"checks":{"type":"array","items":{"type":"object","properties":{"command":{"type":"string","minLength":1},"status":{"type":"string","enum":["passed","failed"]},"exitCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output":{"type":"string","maxLength":12000}},"required":["command","status"],"additionalProperties":false}}},"required":["qualityGate","checks"],"additionalProperties":false},"environment":{"type":"object","properties":{"source":{"type":"string","enum":["polychat","repository"]},"configurationRevision":{"type":"string","minLength":1},"configurationPath":{"type":"string","minLength":1},"preparationMode":{"type":"string","enum":["setup","resume"]},"status":{"type":"string","enum":["completed","failed","skipped"]},"runtimes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"durationSeconds":{"type":"number","minimum":0},"commandCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache":{"type":"object","properties":{"status":{"type":"string","enum":["created","reused","miss","failed"]},"cacheKey":{"type":"string","minLength":1},"createdAt":{"type":"string","minLength":1},"ageSeconds":{"type":"number","minimum":0},"invalidationReason":{"type":"string","minLength":1}},"required":["status","cacheKey"],"additionalProperties":false}},"required":["source","configurationRevision","preparationMode","status","runtimes","durationSeconds","commandCount"],"additionalProperties":false},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"status":{"type":"string","enum":["starting","running","healthy","unhealthy","restarting","stopped","failed","timed_out"]},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path","expectedStatus"],"additionalProperties":false}]},"restartCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAt":{"type":"string","minLength":1},"healthyAt":{"type":"string","minLength":1},"stoppedAt":{"type":"string","minLength":1},"error":{"type":"string","minLength":1}},"required":["name","workingDirectory","status","restartCount"],"additionalProperties":false}},"delivery":{"type":"object","properties":{"policy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode","destination"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"branch":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1},"pullRequestUrl":{"type":"string","format":"uri"}},"additionalProperties":false},"artifacts":{"type":"array","items":{"type":"object","properties":{"outputId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"contentType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"url":{"type":"string","minLength":1}},"required":["outputId","name","kind","contentType","sizeBytes","url"],"additionalProperties":false}},"usage":{"type":"object","properties":{"model":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"infrastructure":{"type":"object","properties":{"instanceType":{"type":"string","minLength":1},"durationSeconds":{"type":"number","minimum":0}},"required":["instanceType","durationSeconds"],"additionalProperties":false}},"required":["model"],"additionalProperties":false},"residualRisks":{"type":"array","items":{"type":"string","minLength":1}},"incompleteWork":{"type":"array","items":{"type":"string","minLength":1}}},"required":["version","runId","objective","outcome","timestamps","repository","changes","validation","delivery","artifacts","usage","residualRisks","incompleteWork"],"additionalProperties":false},"infrastructureUsage":{"type":"object","properties":{"instanceType":{"type":"string","minLength":1},"durationSeconds":{"type":"number","minimum":0}},"required":["instanceType","durationSeconds"],"additionalProperties":false},"cancelRequestedAt":{"type":"string"},"cancellationReason":{"type":"string"},"timeoutSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"timeoutAt":{"type":"string"},"inspectionWindowSeconds":{"type":"integer","minimum":0,"maximum":300},"inspectionExpiresAt":{"type":"string"},"inspectionExtended":{"type":"boolean"},"pausedAt":{"type":"string"},"resumedAt":{"type":"string"},"pauseReason":{"type":"string"},"resumeReason":{"type":"string"},"artifactKey":{"type":"string"},"artifactUrl":{"type":"string"},"workflowPhase":{"type":"string","enum":["queued","dispatching","executing","finalizing","completed","failed","cancelled"]},"queueDispatchedAt":{"type":"string"},"processingStartedAt":{"type":"string"}},"required":["runId","installationId","repo","task","model","status","startedAt","updatedAt"],"additionalProperties":false},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]}},"required":["run","createdByUserId","projectId","conversationId"],"additionalProperties":false}},"required":["object","id","kind","detail"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"environment"},"id":{"type":"string"},"kind":{"type":"string","const":"browser"},"detail":{"type":"object","properties":{"status":{"type":"string","enum":["starting","running","requires_action","completed","failed","cancelled"]},"turnId":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"approvals":{"type":"array","items":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":256},"turnId":{"type":"string","minLength":1,"maxLength":256},"request":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"browser_origin_access"},"origin":{"type":"string","maxLength":2048,"format":"uri"},"reason":{"type":["string","null"]}},"required":["type","origin","reason"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"browser_authentication"},"credential_origin":{"type":["string","null"]},"reason":{"type":["string","null"]},"fields":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string"},"type":{"type":"string"},"required":{"type":"boolean"}},"required":["id","label","type","required"],"additionalProperties":false}},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string"},"field_ids":{"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}}},"required":["id","label","field_ids"],"additionalProperties":false}}},"required":["type","credential_origin","reason","fields","options"],"additionalProperties":false}]}},"required":["requestId","turnId","request"],"additionalProperties":false}},"activity":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"title":{"type":["string","null"]},"status":{"type":"string","enum":["in_progress","completed","failed","incomplete"]},"screenshot":{"anyOf":[{"type":"string","maxLength":8388608,"pattern":"^data:image\\/(?:jpeg|png|webp);base64,[a-z0-9+/=]+$"},{"type":"null"}]}},"required":["id","title","status","screenshot"],"additionalProperties":false}},"outputText":{"type":"string"},"error":{"type":["string","null"]},"id":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","enum":["openai"]},"model":{"type":"string"}},"required":["status","turnId","approvals","activity","outputText","error","id","provider","model"],"additionalProperties":false}},"required":["object","id","kind","detail"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"environment"},"id":{"type":"string"},"kind":{"type":"string","const":"teammate_computer"},"detail":{"type":"object","properties":{"id":{"type":"string","minLength":1},"contextId":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"checkpointReference":{"type":["string","null"]},"status":{"type":"string","enum":["stopped","provisioning","ready","checkpointing","takeover","error","destroyed"]},"lease":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["agent","user"]},"ownerId":{"type":"string","minLength":1},"expiresAt":{"type":"string"},"fence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ownerId","expiresAt","fence"],"additionalProperties":false},{"type":"null"}]},"lastError":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","contextId","provider","checkpointReference","status","lease","lastError","createdAt","updatedAt"],"additionalProperties":false}},"required":["object","id","kind","detail"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"environment"},"id":{"type":"string"},"kind":{"type":"string","const":"machine"},"detail":{"type":"object","properties":{"machineId":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":120},"platform":{"type":"string","enum":["macos","windows","linux"]},"appVersion":{"type":"string","minLength":1,"maxLength":64},"runtimes":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"vendor":{"type":"string","enum":["ollama","lmstudio","llamacpp"]},"readiness":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"ready"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","version"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unreachable"},"checkedAt":{"type":"string"},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","detail"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unauthorised"},"checkedAt":{"type":"string"},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","detail"],"additionalProperties":false}]},"models":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"nativeId":{"type":"string","minLength":1,"maxLength":256},"displayName":{"type":"string","minLength":1,"maxLength":200},"contextTokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"parameterSizeBytes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"capabilities":{"type":"object","properties":{"tools":{"type":"boolean"},"vision":{"type":"boolean"},"thinking":{"type":"boolean"}},"required":["tools","vision","thinking"],"additionalProperties":false},"loaded":{"type":"boolean"}},"required":["nativeId","displayName","contextTokens","capabilities","loaded"],"additionalProperties":false}}},"required":["kind","vendor","readiness","models"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"vendor":{"type":"string","enum":["claude-code","codex","cursor","grok","opencode"]},"readiness":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"missing"},"checkedAt":{"type":"string"}},"required":["state","checkedAt"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"present"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]}},"required":["state","checkedAt","version"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"signed_out"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]}},"required":["state","checkedAt","version"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"ready"},"checkedAt":{"type":"string"},"version":{"type":"string"},"billing":{"default":"unknown","type":"string","enum":["subscription","api_key","unknown"]}},"required":["state","checkedAt","version","billing"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unsupported_version"},"checkedAt":{"type":"string"},"version":{"type":"string"},"minimum":{"type":"string"}},"required":["state","checkedAt","version","minimum"],"additionalProperties":false}]},"supportsSessions":{"type":"boolean"}},"required":["kind","vendor","readiness","supportsSessions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"local-tools"},"directories":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":120}},"required":["id","label"],"additionalProperties":false}}},"required":["kind","directories"],"additionalProperties":false}]}},"capabilities":{"maxItems":5,"type":"array","items":{"type":"string","enum":["model-run","agent-run","handoff","model-relay","local-tools"]}},"lastSeenAt":{"type":"string"},"online":{"type":"boolean"}},"required":["machineId","label","platform","appVersion","runtimes","capabilities","lastSeenAt","online"],"additionalProperties":false}},"required":["object","id","kind","detail"],"additionalProperties":false}]}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"kind","schema":{"type":"string","enum":["sandbox","browser","teammate_computer","machine"]}}]}},"/environments/availability":{"get":{"operationId":"getEnvironmentsAvailability","tags":["environments"],"summary":"Check browser and computer availability","responses":{"200":{"description":"Computer use availability","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["hosted","openai"]},"mode":{"type":"string","enum":["interactive","managed"]},"available":{"type":"boolean"},"credentialSource":{"anyOf":[{"type":"string","enum":["platform","user","workspace"]},{"type":"null"}]},"operations":{"type":"array","items":{"type":"string"}}},"required":["provider","mode","available","credentialSource","operations"],"additionalProperties":false}}},"required":["available","providers"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"workspace_id","schema":{"type":"string","minLength":1}}]}},"/environments/{environment_id}":{"get":{"operationId":"getEnvironmentsByEnvironmentId","tags":["environments"],"summary":"Get an environment","description":"Returns a sandbox run, browser session, teammate computer or machine. Pass kind to skip resolution.","responses":{"200":{"description":"The environment","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"object":{"type":"string","const":"environment"},"id":{"type":"string"},"kind":{"type":"string","const":"sandbox"},"detail":{"type":"object","properties":{"run":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repo":{"type":"string","minLength":1,"pattern":"^[\\w.-]+\\/[\\w.-]+$"},"task":{"type":"string","minLength":1},"taskType":{"type":"string","enum":["feature-implementation","code-review","test-suite","bug-fix","refactoring","documentation","migration"]},"model":{"type":"string","minLength":1},"executionProvider":{"type":"string","enum":["polychat","openai"]},"trustLevel":{"type":"string","enum":["strict","balanced","trusted"]},"promptStrategy":{"type":"string","enum":["auto","feature-delivery","bug-fix","refactor","test-hardening"]},"deliveryPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode","destination"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"shouldCommit":{"type":"boolean"},"environmentSetup":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"polychat"},"definition":{"type":"object","properties":{"version":{"default":1,"type":"number","const":1},"setupCommands":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"resumeCommands":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"runtimes":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"setupTimeoutSeconds":{"default":600,"type":"integer","minimum":30,"maximum":1800},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"networkHosts":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","maxLength":253,"pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"default":".","type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"command":{"type":"string","minLength":1,"maxLength":500},"dependencies":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"}},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path","expectedStatus"],"additionalProperties":false}]},"startupTimeoutSeconds":{"default":60,"type":"integer","minimum":5,"maximum":300},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"restartPolicy":{"default":{"mode":"never","maxRestarts":0,"backoffSeconds":1},"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"never"},"maxRestarts":{"default":0,"type":"number","const":0},"backoffSeconds":{"default":1,"type":"integer","minimum":1,"maximum":30}},"required":["mode","maxRestarts","backoffSeconds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"on_failure"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode","maxRestarts","backoffSeconds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"always"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode","maxRestarts","backoffSeconds"],"additionalProperties":false}]}},"required":["name","workingDirectory","command","dependencies","startupTimeoutSeconds","environment","restartPolicy"],"additionalProperties":false}}},"required":["version","setupCommands","resumeCommands","runtimes","setupTimeoutSeconds","environment","networkHosts"],"additionalProperties":false}},"required":["source","definition"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"repository"}},"required":["source"],"additionalProperties":false}]},"environmentPreparationMode":{"type":"string","enum":["setup","resume"]},"environmentCacheGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["queued","running","paused","completed","failed","cancelled"]},"startedAt":{"type":"string","minLength":1},"updatedAt":{"type":"string","minLength":1},"completedAt":{"type":"string"},"error":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"runId":{"type":"string"},"repo":{"type":"string"},"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"message":{"type":"string"},"command":{"type":"string"},"commandIndex":{"type":"number"},"commandTotal":{"type":"number"},"exitCode":{"type":"number"},"branchName":{"type":"string"},"commitSha":{"type":"string"},"targetBranch":{"type":"string"},"deliveryAction":{"type":"string"},"pullRequestUrl":{"type":"string","format":"uri"},"configurationSource":{"type":"string","enum":["polychat","repository"]},"configurationRevision":{"type":"string"},"configurationPath":{"type":"string"},"preparationMode":{"type":"string","enum":["setup","resume"]},"preparationStatus":{"type":"string","enum":["completed","failed","skipped"]},"runtimeRequirements":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManagerRequirement":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"durationSeconds":{"type":"number","minimum":0},"cacheKey":{"type":"string"},"cacheStatus":{"type":"string","enum":["created","reused","miss","failed"]},"cacheCreatedAt":{"type":"string"},"cacheAgeSeconds":{"type":"number","minimum":0},"cacheInvalidationReason":{"type":"string"},"serviceName":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"serviceWorkingDirectory":{"type":"string","minLength":1},"serviceStatus":{"type":"string","enum":["starting","running","healthy","unhealthy","restarting","stopped","failed","timed_out"]},"servicePort":{"type":"integer","minimum":1024,"maximum":65535},"serviceAction":{"type":"string","enum":["start","restart","stop"]},"serviceRestartCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"serviceHealthPath":{"type":"string","minLength":1},"serviceHealthCheckType":{"type":"string","enum":["http","tcp"]},"plan":{"type":"string"},"error":{"type":"string"},"errorType":{"type":"string"},"path":{"type":"string"},"output":{"type":"string"},"stream":{"type":"string","enum":["stdout","stderr"]},"language":{"type":"string"},"changeType":{"type":"string"},"isDirectory":{"type":"boolean"},"agentStep":{"type":"number"},"action":{"type":"string"},"reasoning":{"type":"string"},"promptStrategy":{"type":"string","enum":["auto","feature-delivery","bug-fix","refactor","test-hardening"]},"retryable":{"type":"boolean"},"commandCount":{"type":"number"},"startLine":{"type":"number"},"endLine":{"type":"number"},"truncated":{"type":"boolean"},"timestamp":{"type":"string"},"timeoutSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"timeoutAt":{"type":"string"},"inspectionWindowSeconds":{"type":"integer","minimum":0,"maximum":300},"inspectionExpiresAt":{"type":"string"},"inspectionExtended":{"type":"boolean"},"result":{"type":"object","properties":{"success":{"type":"boolean"},"summary":{"type":"string"},"diff":{"type":"string"},"logs":{"type":"string"},"logsArtifactKey":{"type":"string"},"logsArtifactUrl":{"type":"string"},"error":{"type":"string"},"errorType":{"type":"string"},"retryable":{"type":"boolean"},"branchName":{"type":"string"},"pullRequestUrl":{"type":"string","format":"uri"},"proof":{"type":"object","properties":{"repository":{"type":"object","properties":{"baseRevision":{"type":"string","minLength":1},"headRevision":{"type":"string","minLength":1}},"additionalProperties":false},"changedFileCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedFiles":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"validation":{"type":"object","properties":{"qualityGate":{"type":"string","enum":["passed","failed","skipped"]},"checks":{"type":"array","items":{"type":"object","properties":{"command":{"type":"string","minLength":1},"status":{"type":"string","enum":["passed","failed"]},"exitCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output":{"type":"string","maxLength":12000}},"required":["command","status"],"additionalProperties":false}}},"required":["qualityGate","checks"],"additionalProperties":false},"environment":{"type":"object","properties":{"source":{"type":"string","enum":["polychat","repository"]},"configurationRevision":{"type":"string","minLength":1},"configurationPath":{"type":"string","minLength":1},"preparationMode":{"type":"string","enum":["setup","resume"]},"status":{"type":"string","enum":["completed","failed","skipped"]},"runtimes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"durationSeconds":{"type":"number","minimum":0},"commandCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache":{"type":"object","properties":{"status":{"type":"string","enum":["created","reused","miss","failed"]},"cacheKey":{"type":"string","minLength":1},"createdAt":{"type":"string","minLength":1},"ageSeconds":{"type":"number","minimum":0},"invalidationReason":{"type":"string","minLength":1}},"required":["status","cacheKey"],"additionalProperties":false}},"required":["source","configurationRevision","preparationMode","status","runtimes","durationSeconds","commandCount"],"additionalProperties":false},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"status":{"type":"string","enum":["starting","running","healthy","unhealthy","restarting","stopped","failed","timed_out"]},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path","expectedStatus"],"additionalProperties":false}]},"restartCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAt":{"type":"string","minLength":1},"healthyAt":{"type":"string","minLength":1},"stoppedAt":{"type":"string","minLength":1},"error":{"type":"string","minLength":1}},"required":["name","workingDirectory","status","restartCount"],"additionalProperties":false}},"delivery":{"type":"object","properties":{"policy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode","destination"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"branch":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1},"pullRequestUrl":{"type":"string","format":"uri"}},"additionalProperties":false},"residualRisks":{"type":"array","items":{"type":"string","minLength":1}},"incompleteWork":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false}},"additionalProperties":{}},"approvalId":{"type":"string"},"approvalStatus":{"type":"string","enum":["pending","escalated","timed_out","approved","rejected"]},"approvalExpiresAt":{"type":"string"},"approvalEscalatedAt":{"type":"string"},"approvalTimedOutAt":{"type":"string"},"instructionId":{"type":"string"},"instructionKind":{"type":"string","enum":["message","continue","run_command","approval_request","approval_response","service_action"]},"instructionContent":{"type":"string"},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repeatCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxSteps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"extendedBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":{}}},"result":{"type":"object","properties":{"success":{"type":"boolean"},"summary":{"type":"string"},"diff":{"type":"string"},"logs":{"type":"string"},"logsArtifactKey":{"type":"string"},"logsArtifactUrl":{"type":"string"},"error":{"type":"string"},"errorType":{"type":"string"},"retryable":{"type":"boolean"},"branchName":{"type":"string"},"pullRequestUrl":{"type":"string","format":"uri"},"proof":{"type":"object","properties":{"repository":{"type":"object","properties":{"baseRevision":{"type":"string","minLength":1},"headRevision":{"type":"string","minLength":1}},"additionalProperties":false},"changedFileCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedFiles":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"validation":{"type":"object","properties":{"qualityGate":{"type":"string","enum":["passed","failed","skipped"]},"checks":{"type":"array","items":{"type":"object","properties":{"command":{"type":"string","minLength":1},"status":{"type":"string","enum":["passed","failed"]},"exitCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output":{"type":"string","maxLength":12000}},"required":["command","status"],"additionalProperties":false}}},"required":["qualityGate","checks"],"additionalProperties":false},"environment":{"type":"object","properties":{"source":{"type":"string","enum":["polychat","repository"]},"configurationRevision":{"type":"string","minLength":1},"configurationPath":{"type":"string","minLength":1},"preparationMode":{"type":"string","enum":["setup","resume"]},"status":{"type":"string","enum":["completed","failed","skipped"]},"runtimes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"durationSeconds":{"type":"number","minimum":0},"commandCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache":{"type":"object","properties":{"status":{"type":"string","enum":["created","reused","miss","failed"]},"cacheKey":{"type":"string","minLength":1},"createdAt":{"type":"string","minLength":1},"ageSeconds":{"type":"number","minimum":0},"invalidationReason":{"type":"string","minLength":1}},"required":["status","cacheKey"],"additionalProperties":false}},"required":["source","configurationRevision","preparationMode","status","runtimes","durationSeconds","commandCount"],"additionalProperties":false},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"status":{"type":"string","enum":["starting","running","healthy","unhealthy","restarting","stopped","failed","timed_out"]},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path","expectedStatus"],"additionalProperties":false}]},"restartCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAt":{"type":"string","minLength":1},"healthyAt":{"type":"string","minLength":1},"stoppedAt":{"type":"string","minLength":1},"error":{"type":"string","minLength":1}},"required":["name","workingDirectory","status","restartCount"],"additionalProperties":false}},"delivery":{"type":"object","properties":{"policy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode","destination"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"branch":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1},"pullRequestUrl":{"type":"string","format":"uri"}},"additionalProperties":false},"residualRisks":{"type":"array","items":{"type":"string","minLength":1}},"incompleteWork":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false}},"additionalProperties":{}},"manifest":{"type":"object","properties":{"version":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"objective":{"type":"string","minLength":1},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"completed"},"success":{"type":"boolean","const":true},"summary":{"type":"string","minLength":1}},"required":["status","success"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"failed"},"success":{"type":"boolean","const":false},"summary":{"type":"string","minLength":1},"error":{"type":"string","minLength":1}},"required":["status","success","error"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"cancelled"},"success":{"type":"boolean","const":false},"summary":{"type":"string","minLength":1},"cancellationReason":{"type":"string","minLength":1}},"required":["status","success"],"additionalProperties":false}]},"timestamps":{"type":"object","properties":{"startedAt":{"type":"string","minLength":1},"updatedAt":{"type":"string","minLength":1},"completedAt":{"type":"string","minLength":1}},"required":["startedAt","updatedAt","completedAt"],"additionalProperties":false},"repository":{"type":"object","properties":{"name":{"type":"string","minLength":1,"pattern":"^[\\w.-]+\\/[\\w.-]+$"},"baseRevision":{"type":"string","minLength":1},"headRevision":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false},"changes":{"type":"object","properties":{"fileCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"files":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"filesTruncated":{"type":"boolean"},"summary":{"type":"string","minLength":1}},"required":["fileCount","files","filesTruncated"],"additionalProperties":false},"validation":{"type":"object","properties":{"qualityGate":{"type":"string","enum":["passed","failed","skipped","unavailable"]},"checks":{"type":"array","items":{"type":"object","properties":{"command":{"type":"string","minLength":1},"status":{"type":"string","enum":["passed","failed"]},"exitCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output":{"type":"string","maxLength":12000}},"required":["command","status"],"additionalProperties":false}}},"required":["qualityGate","checks"],"additionalProperties":false},"environment":{"type":"object","properties":{"source":{"type":"string","enum":["polychat","repository"]},"configurationRevision":{"type":"string","minLength":1},"configurationPath":{"type":"string","minLength":1},"preparationMode":{"type":"string","enum":["setup","resume"]},"status":{"type":"string","enum":["completed","failed","skipped"]},"runtimes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"durationSeconds":{"type":"number","minimum":0},"commandCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache":{"type":"object","properties":{"status":{"type":"string","enum":["created","reused","miss","failed"]},"cacheKey":{"type":"string","minLength":1},"createdAt":{"type":"string","minLength":1},"ageSeconds":{"type":"number","minimum":0},"invalidationReason":{"type":"string","minLength":1}},"required":["status","cacheKey"],"additionalProperties":false}},"required":["source","configurationRevision","preparationMode","status","runtimes","durationSeconds","commandCount"],"additionalProperties":false},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"status":{"type":"string","enum":["starting","running","healthy","unhealthy","restarting","stopped","failed","timed_out"]},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path","expectedStatus"],"additionalProperties":false}]},"restartCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAt":{"type":"string","minLength":1},"healthyAt":{"type":"string","minLength":1},"stoppedAt":{"type":"string","minLength":1},"error":{"type":"string","minLength":1}},"required":["name","workingDirectory","status","restartCount"],"additionalProperties":false}},"delivery":{"type":"object","properties":{"policy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode","destination"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"branch":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1},"pullRequestUrl":{"type":"string","format":"uri"}},"additionalProperties":false},"artifacts":{"type":"array","items":{"type":"object","properties":{"outputId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"contentType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"url":{"type":"string","minLength":1}},"required":["outputId","name","kind","contentType","sizeBytes","url"],"additionalProperties":false}},"usage":{"type":"object","properties":{"model":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"infrastructure":{"type":"object","properties":{"instanceType":{"type":"string","minLength":1},"durationSeconds":{"type":"number","minimum":0}},"required":["instanceType","durationSeconds"],"additionalProperties":false}},"required":["model"],"additionalProperties":false},"residualRisks":{"type":"array","items":{"type":"string","minLength":1}},"incompleteWork":{"type":"array","items":{"type":"string","minLength":1}}},"required":["version","runId","objective","outcome","timestamps","repository","changes","validation","delivery","artifacts","usage","residualRisks","incompleteWork"],"additionalProperties":false},"infrastructureUsage":{"type":"object","properties":{"instanceType":{"type":"string","minLength":1},"durationSeconds":{"type":"number","minimum":0}},"required":["instanceType","durationSeconds"],"additionalProperties":false},"cancelRequestedAt":{"type":"string"},"cancellationReason":{"type":"string"},"timeoutSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"timeoutAt":{"type":"string"},"inspectionWindowSeconds":{"type":"integer","minimum":0,"maximum":300},"inspectionExpiresAt":{"type":"string"},"inspectionExtended":{"type":"boolean"},"pausedAt":{"type":"string"},"resumedAt":{"type":"string"},"pauseReason":{"type":"string"},"resumeReason":{"type":"string"},"artifactKey":{"type":"string"},"artifactUrl":{"type":"string"},"workflowPhase":{"type":"string","enum":["queued","dispatching","executing","finalizing","completed","failed","cancelled"]},"queueDispatchedAt":{"type":"string"},"processingStartedAt":{"type":"string"}},"required":["runId","installationId","repo","task","model","status","startedAt","updatedAt"],"additionalProperties":false},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]}},"required":["run","createdByUserId","projectId","conversationId"],"additionalProperties":false}},"required":["object","id","kind","detail"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"environment"},"id":{"type":"string"},"kind":{"type":"string","const":"browser"},"detail":{"type":"object","properties":{"status":{"type":"string","enum":["starting","running","requires_action","completed","failed","cancelled"]},"turnId":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"approvals":{"type":"array","items":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":256},"turnId":{"type":"string","minLength":1,"maxLength":256},"request":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"browser_origin_access"},"origin":{"type":"string","maxLength":2048,"format":"uri"},"reason":{"type":["string","null"]}},"required":["type","origin","reason"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"browser_authentication"},"credential_origin":{"type":["string","null"]},"reason":{"type":["string","null"]},"fields":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string"},"type":{"type":"string"},"required":{"type":"boolean"}},"required":["id","label","type","required"],"additionalProperties":false}},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string"},"field_ids":{"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}}},"required":["id","label","field_ids"],"additionalProperties":false}}},"required":["type","credential_origin","reason","fields","options"],"additionalProperties":false}]}},"required":["requestId","turnId","request"],"additionalProperties":false}},"activity":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"title":{"type":["string","null"]},"status":{"type":"string","enum":["in_progress","completed","failed","incomplete"]},"screenshot":{"anyOf":[{"type":"string","maxLength":8388608,"pattern":"^data:image\\/(?:jpeg|png|webp);base64,[a-z0-9+/=]+$"},{"type":"null"}]}},"required":["id","title","status","screenshot"],"additionalProperties":false}},"outputText":{"type":"string"},"error":{"type":["string","null"]},"id":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","enum":["openai"]},"model":{"type":"string"}},"required":["status","turnId","approvals","activity","outputText","error","id","provider","model"],"additionalProperties":false}},"required":["object","id","kind","detail"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"environment"},"id":{"type":"string"},"kind":{"type":"string","const":"teammate_computer"},"detail":{"type":"object","properties":{"id":{"type":"string","minLength":1},"contextId":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"checkpointReference":{"type":["string","null"]},"status":{"type":"string","enum":["stopped","provisioning","ready","checkpointing","takeover","error","destroyed"]},"lease":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["agent","user"]},"ownerId":{"type":"string","minLength":1},"expiresAt":{"type":"string"},"fence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ownerId","expiresAt","fence"],"additionalProperties":false},{"type":"null"}]},"lastError":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","contextId","provider","checkpointReference","status","lease","lastError","createdAt","updatedAt"],"additionalProperties":false}},"required":["object","id","kind","detail"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"environment"},"id":{"type":"string"},"kind":{"type":"string","const":"machine"},"detail":{"type":"object","properties":{"machineId":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":120},"platform":{"type":"string","enum":["macos","windows","linux"]},"appVersion":{"type":"string","minLength":1,"maxLength":64},"runtimes":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"vendor":{"type":"string","enum":["ollama","lmstudio","llamacpp"]},"readiness":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"ready"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","version"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unreachable"},"checkedAt":{"type":"string"},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","detail"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unauthorised"},"checkedAt":{"type":"string"},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","detail"],"additionalProperties":false}]},"models":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"nativeId":{"type":"string","minLength":1,"maxLength":256},"displayName":{"type":"string","minLength":1,"maxLength":200},"contextTokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"parameterSizeBytes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"capabilities":{"type":"object","properties":{"tools":{"type":"boolean"},"vision":{"type":"boolean"},"thinking":{"type":"boolean"}},"required":["tools","vision","thinking"],"additionalProperties":false},"loaded":{"type":"boolean"}},"required":["nativeId","displayName","contextTokens","capabilities","loaded"],"additionalProperties":false}}},"required":["kind","vendor","readiness","models"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"vendor":{"type":"string","enum":["claude-code","codex","cursor","grok","opencode"]},"readiness":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"missing"},"checkedAt":{"type":"string"}},"required":["state","checkedAt"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"present"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]}},"required":["state","checkedAt","version"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"signed_out"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]}},"required":["state","checkedAt","version"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"ready"},"checkedAt":{"type":"string"},"version":{"type":"string"},"billing":{"default":"unknown","type":"string","enum":["subscription","api_key","unknown"]}},"required":["state","checkedAt","version","billing"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unsupported_version"},"checkedAt":{"type":"string"},"version":{"type":"string"},"minimum":{"type":"string"}},"required":["state","checkedAt","version","minimum"],"additionalProperties":false}]},"supportsSessions":{"type":"boolean"}},"required":["kind","vendor","readiness","supportsSessions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"local-tools"},"directories":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":120}},"required":["id","label"],"additionalProperties":false}}},"required":["kind","directories"],"additionalProperties":false}]}},"capabilities":{"maxItems":5,"type":"array","items":{"type":"string","enum":["model-run","agent-run","handoff","model-relay","local-tools"]}},"lastSeenAt":{"type":"string"},"online":{"type":"boolean"}},"required":["machineId","label","platform","appVersion","runtimes","capabilities","lastSeenAt","online"],"additionalProperties":false}},"required":["object","id","kind","detail"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Environment not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"kind","schema":{"type":"string","enum":["sandbox","browser","teammate_computer","machine"]}}]},"delete":{"operationId":"deleteEnvironmentsByEnvironmentId","tags":["environments"],"summary":"Close or forget an environment","responses":{"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"Cannot be removed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"kind","schema":{"type":"string","enum":["sandbox","browser","teammate_computer","machine"]}}]}},"/environments/{environment_id}/actions":{"post":{"operationId":"postEnvironmentsByEnvironmentIdActions","tags":["environments"],"summary":"Act on an environment","description":"Takes over, views, releases, pauses, resumes, cancels, stops or answers an approval, depending on what the environment supports.","responses":{"200":{"description":"The action result"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"The environment does not support the action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"kind","schema":{"type":"string","enum":["sandbox","browser","teammate_computer","machine"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"pause"},"reason":{"type":"string","minLength":1,"maxLength":500},"expected_updated_at":{"type":"string","minLength":1}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"resume"},"reason":{"type":"string","minLength":1,"maxLength":500},"expected_updated_at":{"type":"string","minLength":1}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"cancel"},"reason":{"type":"string","minLength":1,"maxLength":500},"expected_updated_at":{"type":"string","minLength":1}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"extend_inspection"},"extension_seconds":{"type":"integer","minimum":1,"maximum":300},"expected_updated_at":{"type":"string","minLength":1}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"stop"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"approve"},"request_id":{"type":"string","minLength":1},"response":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"browser_origin_access"},"decision":{"type":"string","enum":["approve","deny","cancel"]}},"required":["type","decision"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"browser_authentication"},"action":{"type":"string","const":"cancel"}},"required":["type","action"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"browser_authentication"},"action":{"type":"string","const":"submit"},"selected_option":{"type":"string","minLength":1,"maxLength":256},"fields":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"field_id":{"type":"string","minLength":1,"maxLength":256},"value":{"type":"string","maxLength":16384}},"required":["field_id","value"],"additionalProperties":false}}},"required":["type","action","fields"],"additionalProperties":false}]}},"required":["action","request_id","response"]},{"type":"object","properties":{"action":{"type":"string","const":"provision"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"observe"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"checkpoint"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"restore"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"destroy"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"takeover"},"record_teaching":{"default":false,"type":"boolean"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"view"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"release"},"fence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["action","fence"]}]}}}}}},"/environments/{environment_id}/control":{"get":{"operationId":"getEnvironmentsByEnvironmentIdControl","tags":["environments"],"summary":"Get sandbox control state","description":"Returns pause, cancellation and inspection state for worker coordination.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true}]}},"/environments/{environment_id}/previews":{"post":{"operationId":"postEnvironmentsByEnvironmentIdPreviews","tags":["environments"],"summary":"Preview a sandbox service","description":"Creates short-lived access to a healthy declared sandbox service.","responses":{"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"Run or service is not previewable"}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"serviceName":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"}},"required":["serviceName"],"additionalProperties":false}}}}}},"/environments/{environment_id}/previews/{preview_id}":{"get":{"operationId":"getEnvironmentsByEnvironmentIdPreviewsByPreviewId","tags":["environments"],"summary":"Get a sandbox preview","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"preview_id","schema":{"type":"string","minLength":1},"required":true}]},"delete":{"operationId":"deleteEnvironmentsByEnvironmentIdPreviewsByPreviewId","tags":["environments"],"summary":"Revoke a sandbox preview","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"preview_id","schema":{"type":"string","minLength":1},"required":true}]}},"/environments/{environment_id}/instructions":{"get":{"operationId":"getEnvironmentsByEnvironmentIdInstructions","tags":["environments"],"summary":"List sandbox instructions","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"after","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}}]},"post":{"operationId":"postEnvironmentsByEnvironmentIdInstructions","tags":["environments"],"summary":"Send an instruction to a running sandbox","responses":{"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"Instruction conflicts with terminal or approval state"}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"default":"message","type":"string","enum":["message","continue","run_command","approval_request","approval_response","service_action"]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":100},"content":{"type":"string","maxLength":2000},"command":{"type":"string","minLength":1,"maxLength":1000},"requestId":{"type":"string","minLength":1},"approvalStatus":{"type":"string","enum":["approved","rejected"]},"serviceName":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"serviceAction":{"type":"string","enum":["start","restart","stop"]},"timeoutSeconds":{"type":"integer","minimum":5,"maximum":1800},"escalateAfterSeconds":{"type":"integer","minimum":1,"maximum":900}}}}}}}},"/environments/{environment_id}/events":{"get":{"operationId":"getEnvironmentsByEnvironmentIdEvents","tags":["environments"],"summary":"List sandbox events","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"after","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}}]}},"/environments/{environment_id}/goal/iterate":{"post":{"operationId":"postEnvironmentsByEnvironmentIdGoalIterate","tags":["environments"],"summary":"Record one unit of work against the sandbox goal","description":"Records progress and says whether the run should keep going.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string","maxLength":4000},"producedEvidence":{"type":"boolean"},"calledTool":{"type":"boolean"},"evidence":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"next":{"type":"string","maxLength":2000}},"required":["summary","producedEvidence","calledTool"]}}}}}},"/environments/{environment_id}/usage_reports":{"post":{"operationId":"postEnvironmentsByEnvironmentIdUsageReports","tags":["environments"],"summary":"Record measured sandbox usage","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"environment_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"instanceType":{"type":"string","minLength":1},"startedAt":{"type":"string","minLength":1},"endedAt":{"type":"string","minLength":1},"durationSeconds":{"type":"number","minimum":0}},"required":["runId","userId","instanceType","startedAt","endedAt","durationSeconds"]}}}}}},"/machines/heartbeat":{"post":{"operationId":"postMachinesHeartbeat","tags":["machines"],"summary":"Advertise a desktop machine","description":"Publishes account-scoped runtime metadata for a signed-in desktop.","responses":{"200":{"description":"Machine heartbeat accepted","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"machineId":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":120},"platform":{"type":"string","enum":["macos","windows","linux"]},"appVersion":{"type":"string","minLength":1,"maxLength":64},"runtimes":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"vendor":{"type":"string","enum":["ollama","lmstudio","llamacpp"]},"readiness":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"ready"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","version"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unreachable"},"checkedAt":{"type":"string"},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","detail"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unauthorised"},"checkedAt":{"type":"string"},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","detail"],"additionalProperties":false}]},"models":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"nativeId":{"type":"string","minLength":1,"maxLength":256},"displayName":{"type":"string","minLength":1,"maxLength":200},"contextTokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"parameterSizeBytes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"capabilities":{"type":"object","properties":{"tools":{"type":"boolean"},"vision":{"type":"boolean"},"thinking":{"type":"boolean"}},"required":["tools","vision","thinking"],"additionalProperties":false},"loaded":{"type":"boolean"}},"required":["nativeId","displayName","contextTokens","capabilities","loaded"],"additionalProperties":false}}},"required":["kind","vendor","readiness","models"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"vendor":{"type":"string","enum":["claude-code","codex","cursor","grok","opencode"]},"readiness":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"missing"},"checkedAt":{"type":"string"}},"required":["state","checkedAt"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"present"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]}},"required":["state","checkedAt","version"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"signed_out"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]}},"required":["state","checkedAt","version"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"ready"},"checkedAt":{"type":"string"},"version":{"type":"string"},"billing":{"default":"unknown","type":"string","enum":["subscription","api_key","unknown"]}},"required":["state","checkedAt","version","billing"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unsupported_version"},"checkedAt":{"type":"string"},"version":{"type":"string"},"minimum":{"type":"string"}},"required":["state","checkedAt","version","minimum"],"additionalProperties":false}]},"supportsSessions":{"type":"boolean"}},"required":["kind","vendor","readiness","supportsSessions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"local-tools"},"directories":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":120}},"required":["id","label"],"additionalProperties":false}}},"required":["kind","directories"],"additionalProperties":false}]}},"capabilities":{"maxItems":5,"type":"array","items":{"type":"string","enum":["model-run","agent-run","handoff","model-relay","local-tools"]}},"lastSeenAt":{"type":"string"},"online":{"type":"boolean"}},"required":["machineId","label","platform","appVersion","runtimes","capabilities","lastSeenAt","online"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid machine heartbeat","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"machineId":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":120},"platform":{"type":"string","enum":["macos","windows","linux"]},"appVersion":{"type":"string","minLength":1,"maxLength":64},"runtimes":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"vendor":{"type":"string","enum":["ollama","lmstudio","llamacpp"]},"readiness":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"ready"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","version"]},{"type":"object","properties":{"status":{"type":"string","const":"unreachable"},"checkedAt":{"type":"string"},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","detail"]},{"type":"object","properties":{"status":{"type":"string","const":"unauthorised"},"checkedAt":{"type":"string"},"detail":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["status","checkedAt","detail"]}]},"models":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"nativeId":{"type":"string","minLength":1,"maxLength":256},"displayName":{"type":"string","minLength":1,"maxLength":200},"contextTokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"parameterSizeBytes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"capabilities":{"type":"object","properties":{"tools":{"type":"boolean"},"vision":{"type":"boolean"},"thinking":{"type":"boolean"}},"required":["tools","vision","thinking"]},"loaded":{"type":"boolean"}},"required":["nativeId","displayName","contextTokens","capabilities","loaded"],"additionalProperties":false}}},"required":["kind","vendor","readiness","models"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"vendor":{"type":"string","enum":["claude-code","codex","cursor","grok","opencode"]},"readiness":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"missing"},"checkedAt":{"type":"string"}},"required":["state","checkedAt"]},{"type":"object","properties":{"state":{"type":"string","const":"present"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]}},"required":["state","checkedAt","version"]},{"type":"object","properties":{"state":{"type":"string","const":"signed_out"},"checkedAt":{"type":"string"},"version":{"type":["string","null"]}},"required":["state","checkedAt","version"]},{"type":"object","properties":{"state":{"type":"string","const":"ready"},"checkedAt":{"type":"string"},"version":{"type":"string"},"billing":{"default":"unknown","type":"string","enum":["subscription","api_key","unknown"]}},"required":["state","checkedAt","version"]},{"type":"object","properties":{"state":{"type":"string","const":"unsupported_version"},"checkedAt":{"type":"string"},"version":{"type":"string"},"minimum":{"type":"string"}},"required":["state","checkedAt","version","minimum"]}]},"supportsSessions":{"type":"boolean"}},"required":["kind","vendor","readiness","supportsSessions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"local-tools"},"directories":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":120}},"required":["id","label"],"additionalProperties":false}}},"required":["kind","directories"],"additionalProperties":false}]}},"capabilities":{"maxItems":5,"type":"array","items":{"type":"string","enum":["model-run","agent-run","handoff","model-relay","local-tools"]}}},"required":["machineId","label","platform","appVersion","runtimes","capabilities"],"additionalProperties":false}}}}}},"/machines/{machine_id}/activity":{"patch":{"operationId":"patchMachinesByMachineIdActivity","tags":["machines"],"summary":"Replace this machine's shared activity","description":"Stores the activity digests a desktop chose to share as Discover documents. Sources left out are removed.","responses":{"200":{"description":"Activity recorded","content":{"application/json":{"schema":{"type":"object","properties":{"recorded":{"type":"array","items":{"type":"string","enum":["browsing","agents","apps","music","games"]}},"excluded":{"type":"array","items":{"type":"string","enum":["browsing","agents","apps","music","games"]}}},"required":["recorded","excluded"],"additionalProperties":false}}}},"400":{"description":"Invalid activity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"machine_id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"periodStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"periodEnd":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sources":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["browsing","agents","apps","music","games"]},"lines":{"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":280}},"items":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"detail":{"anyOf":[{"type":"string","minLength":1,"maxLength":1500},{"type":"null"}]}},"required":["title"],"additionalProperties":false}}},"required":["source","lines"],"additionalProperties":false}}},"required":["label","periodStart","periodEnd","sources"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteMachinesByMachineIdActivity","tags":["machines"],"summary":"Forget this machine's shared activity","responses":{"200":{"description":"Activity forgotten","content":{"application/json":{"schema":{"type":"object","properties":{"forgotten":{"type":"boolean"}},"required":["forgotten"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"machine_id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]}},"/machines/{machine_id}/runs/claim":{"post":{"operationId":"postMachinesByMachineIdRunsClaim","tags":["machines"],"summary":"Claim the next run for this machine","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"machine_id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]}},"/machines/{machine_id}/runs/update":{"post":{"operationId":"postMachinesByMachineIdRunsUpdate","tags":["machines"],"summary":"Report progress for a claimed run","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"machine_id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sequence":{"type":"integer","minimum":0,"maximum":9007199254740991},"text":{"type":"string","maxLength":32000},"events":{"default":[],"maxItems":500,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text-delta"},"partId":{"type":"string"},"delta":{"type":"string"}},"required":["type","partId","delta"]},{"type":"object","properties":{"type":{"type":"string","const":"reasoning-delta"},"partId":{"type":"string"},"delta":{"type":"string"}},"required":["type","partId","delta"]},{"type":"object","properties":{"type":{"type":"string","const":"tool-started"},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"input":{}},"required":["type","toolCallId","toolName"]},{"type":"object","properties":{"type":{"type":"string","const":"tool-finished"},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"output":{"type":"string"},"error":{"type":"string"}},"required":["type","toolCallId","toolName"]},{"type":"object","properties":{"type":{"type":"string","const":"approval-requested"},"approvalId":{"type":"string"},"toolName":{"type":"string"},"description":{"type":"string"},"input":{}},"required":["type","approvalId","toolName","description"]},{"type":"object","properties":{"type":{"type":"string","const":"usage"},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","inputTokens","outputTokens"]},{"type":"object","properties":{"type":{"type":"string","const":"operation-settled"},"operationId":{"type":"string"},"status":{"type":"string","enum":["done","unanswered"]},"text":{"type":"string"},"reason":{"type":"string"}},"required":["type","operationId","status"]},{"type":"object","properties":{"type":{"type":"string","const":"diagnostic"},"message":{"type":"string"}},"required":["type","message"]},{"type":"object","properties":{"type":{"type":"string","const":"changes"},"changes":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"files":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"status":{"type":"string","enum":["added","modified","deleted","renamed","copied"]},"previousPath":{"type":["string","null"]},"additions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deletions":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["path","status","previousPath","additions","deletions"]}},"patch":{"type":"string","maxLength":300000},"truncated":{"type":"boolean"}},"required":["from","to","files","patch","truncated"]}},"required":["type","changes"]}]}},"state":{"type":"string","enum":["running","completed","failed"]},"error":{"type":"string","maxLength":1000}},"required":["id","token","sequence","text","state"],"additionalProperties":false}}}}}},"/models/choices":{"get":{"operationId":"getModelsChoices","tags":["models"],"summary":"Get model choices","description":"The models you, or a workspace, chose for each background job, with fallbacks, the platform defaults and whether each choice still runs.","responses":{"200":{"description":"Model choices","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["user","workspace"]},"editable":{"type":"boolean"},"models":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"avatarUrl":{"type":"string"}},"required":["id","name","provider"],"additionalProperties":false}},"roles":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["titling","compaction","housekeeping","retrieval","writing","routines","vision","guardrails","decision","extraction","reranking","transcription","ocr","image","repaint","video","music","speech","fim","nextEdit","applyEdit"]},"choices":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"id":{"type":["string","null"]},"status":{"type":"string","enum":["ready","unavailable","retired"]}},"required":["model","provider","id","status"],"additionalProperties":false}},"defaults":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"id":{"type":["string","null"]},"status":{"type":"string","enum":["ready","unavailable","retired"]}},"required":["model","provider","id","status"],"additionalProperties":false}},"options":{"type":"array","items":{"type":"string"}},"active":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","enum":["workspace","user","platform"]}},"required":["id","source"],"additionalProperties":false},{"type":"null"}]}},"required":["role","choices","defaults","options","active"],"additionalProperties":false}}},"required":["scope","editable","models","roles"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"workspace_id","schema":{"type":"string","minLength":1}}]},"patch":{"operationId":"patchModelsChoices","tags":["models"],"summary":"Update model choices","description":"Replace the ordered choices for one job. The first model runs; the rest are fallbacks. An empty list returns the job to the platform defaults.","responses":{"200":{"description":"Model choices","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["user","workspace"]},"editable":{"type":"boolean"},"models":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"avatarUrl":{"type":"string"}},"required":["id","name","provider"],"additionalProperties":false}},"roles":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["titling","compaction","housekeeping","retrieval","writing","routines","vision","guardrails","decision","extraction","reranking","transcription","ocr","image","repaint","video","music","speech","fim","nextEdit","applyEdit"]},"choices":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"id":{"type":["string","null"]},"status":{"type":"string","enum":["ready","unavailable","retired"]}},"required":["model","provider","id","status"],"additionalProperties":false}},"defaults":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"id":{"type":["string","null"]},"status":{"type":"string","enum":["ready","unavailable","retired"]}},"required":["model","provider","id","status"],"additionalProperties":false}},"options":{"type":"array","items":{"type":"string"}},"active":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","enum":["workspace","user","platform"]}},"required":["id","source"],"additionalProperties":false},{"type":"null"}]}},"required":["role","choices","defaults","options","active"],"additionalProperties":false}}},"required":["scope","editable","models","roles"],"additionalProperties":false}}}},"400":{"description":"A model cannot be used for this job","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1},"choices":{"type":"object","propertyNames":{"type":"string","enum":["titling","compaction","housekeeping","retrieval","writing","routines","vision","guardrails","decision","extraction","reranking","transcription","ocr","image","repaint","video","music","speech","fim","nextEdit","applyEdit"]},"additionalProperties":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1}},"required":["model","provider"]}}}},"required":["choices"]}}}}}},"/models/choices/suggestions":{"post":{"operationId":"postModelsChoicesSuggestions","tags":["models"],"summary":"Suggest model choices","description":"Rank the models you can run for every background job by the benchmark that fits the job, optionally keeping to one provider. Nothing is saved until you update the choices.","responses":{"200":{"description":"Suggested choices","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string"}},"suggestions":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["titling","compaction","housekeeping","retrieval","writing","routines","vision","guardrails","decision","extraction","reranking","transcription","ocr","image","repaint","video","music","speech","fim","nextEdit","applyEdit"]},"choices":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1}},"required":["model","provider"],"additionalProperties":false}}},"required":["role","choices"],"additionalProperties":false}}},"required":["providers","suggestions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"priority":{"default":"value","type":"string","enum":["quality","value"]}}}}}}}},"/models":{"get":{"operationId":"getModels","tags":["models"],"summary":"List models","description":"Models the caller can use, with capabilities and pricing. Filter by capability, input modality or output modality. The page also lists every capability and modality you can filter by.","responses":{"400":{"description":"Unknown capability","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"capability","schema":{"type":"string","minLength":1}},{"in":"query","name":"modality","schema":{"type":"string","enum":["text","image","audio","video","pdf","document","embedding","moderation","speech","voice-activity-detection","guardrails","reranking","search","creative","instruction","summarization","multilingual","general_knowledge","coding","reasoning","vision","chat","math","analysis","tool_use","academic","research","agents","ocr","transcription","decision","extraction"]}},{"in":"query","name":"output","schema":{"type":"string","enum":["text","image","audio","video","pdf","document","embedding","moderation","speech","voice-activity-detection","guardrails","reranking","search","creative","instruction","summarization","multilingual","general_knowledge","coding","reasoning","vision","chat","math","analysis","tool_use","academic","research","agents","ocr","transcription","decision","extraction"]}}]}},"/models/catalogue":{"get":{"operationId":"getModelsCatalogue","tags":["models"],"summary":"List the model catalogue","description":"Every model the platform knows about, without filtering by the caller's access. Intended for public catalogue surfaces.","responses":{"200":{"description":"Successful response"}},"hide":false}},"/models/artificial_analysis":{"get":{"operationId":"getModelsArtificialAnalysis","tags":["models"],"summary":"List cached Artificial Analysis model data","description":"Cached Artificial Analysis benchmark, arena, pricing and performance data with source attribution.","responses":{"200":{"description":"Model data","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]},"creator_id":{"type":["string","null"]},"creator_name":{"type":["string","null"]},"creator_slug":{"type":["string","null"]},"evaluations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"pricing":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"intelligence_index":{"type":["number","null"]},"coding_index":{"type":["number","null"]},"agentic_index":{"type":["number","null"]},"intelligence_index_version":{"type":["number","null"]},"price_1m_blended_3_to_1":{"type":["number","null"]},"price_1m_input_tokens":{"type":["number","null"]},"price_1m_output_tokens":{"type":["number","null"]},"median_output_tokens_per_second":{"type":["number","null"]},"median_time_to_first_token_seconds":{"type":["number","null"]},"median_time_to_first_answer_token_seconds":{"type":["number","null"]},"median_end_to_end_response_time_seconds":{"type":["number","null"]},"derived_strengths":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"derived_scores":{"anyOf":[{"type":"object","properties":{"intelligence":{"type":"number"},"coding":{"type":"number"},"agentic":{"type":"number"},"price":{"type":"number"},"outputSpeed":{"type":"number"},"firstTokenLatency":{"type":"number"},"arenaQuality":{"type":"number"},"audioQuality":{"type":"number"},"transcriptionQuality":{"type":"number"}},"additionalProperties":false},{"type":"null"}]},"source":{"type":"string","const":"artificial_analysis"},"source_url":{"type":"string","const":"https://artificialanalysis.ai/"},"ingested_at":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]}},"required":["id","name","evaluations","pricing","source","source_url","ingested_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"attribution":{"type":"object","properties":{"label":{"type":"string","const":"Artificial Analysis"},"url":{"type":"string","const":"https://artificialanalysis.ai/"}},"required":["label","url"],"additionalProperties":false}},"required":["object","data","has_more","last_id","attribution"],"additionalProperties":false}}}}},"hide":false}},"/models/tiers":{"get":{"operationId":"getModelsTiers","tags":["models"],"summary":"Resolve model tiers","description":"The model selected by each tier and role for the caller across each runtime.","responses":{"200":{"description":"Tier lineup","content":{"application/json":{"schema":{"type":"object","properties":{"runtimes":{"type":"object","propertyNames":{"type":"string","enum":["hosted","browser","device","machine"]},"additionalProperties":{"type":"object","properties":{"low":{"type":"object","properties":{"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}},"required":["id","name","provider"],"additionalProperties":false},{"type":"null"}]},"coding":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}},"required":["id","name","provider"],"additionalProperties":false},{"type":"null"}]}},"required":["agent","coding"],"additionalProperties":false},"medium":{"type":"object","properties":{"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}},"required":["id","name","provider"],"additionalProperties":false},{"type":"null"}]},"coding":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}},"required":["id","name","provider"],"additionalProperties":false},{"type":"null"}]}},"required":["agent","coding"],"additionalProperties":false},"high":{"type":"object","properties":{"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}},"required":["id","name","provider"],"additionalProperties":false},{"type":"null"}]},"coding":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}},"required":["id","name","provider"],"additionalProperties":false},{"type":"null"}]}},"required":["agent","coding"],"additionalProperties":false},"ultra":{"type":"object","properties":{"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}},"required":["id","name","provider"],"additionalProperties":false},{"type":"null"}]},"coding":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"effort":{"type":"string","enum":["none","simulated-thinking","thinking","default","minimal","low","medium","high","xhigh","max","ultra"]}},"required":["id","name","provider"],"additionalProperties":false},{"type":"null"}]}},"required":["agent","coding"],"additionalProperties":false}},"required":["low","medium","high","ultra"],"additionalProperties":false},"required":["hosted","browser","device","machine"]},"default":{"type":"string","enum":["low","medium","high","ultra"]},"inheritedFrom":{"type":"object","properties":{"kind":{"type":"string","const":"project"},"id":{"type":"string"},"tier":{"type":"string","enum":["low","medium","high","ultra"]}},"required":["kind","id","tier"],"additionalProperties":false}},"required":["runtimes","default"],"additionalProperties":false}}}}},"hide":false}},"/models/{model_id}":{"get":{"operationId":"getModelsByModelId","tags":["models"],"summary":"Get a model","responses":{"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"model_id","schema":{"type":"string"},"required":true}]}},"/notifications/settings":{"get":{"operationId":"getNotificationsSettings","tags":["notifications"],"summary":"Get notification settings","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"preferences":{"type":"object","properties":{"enabled":{"type":"boolean"},"decisions":{"type":"boolean"},"failures":{"type":"boolean"},"completions":{"type":"boolean"},"assignments":{"type":"boolean"}},"required":["enabled","decisions","failures","completions","assignments"],"additionalProperties":false},"registrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"installationId":{"type":"string","minLength":1},"platform":{"type":"string","const":"web"},"state":{"type":"string","enum":["registered","failed","disabled"]},"failureCode":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["id","installationId","platform","state","failureCode","updatedAt"],"additionalProperties":false}},"webPushPublicKey":{"type":["string","null"]}},"required":["protocolVersion","preferences","registrations","webPushPublicKey"],"additionalProperties":false}}}}},"hide":false},"patch":{"operationId":"patchNotificationsSettings","tags":["notifications"],"summary":"Update notification preferences","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"preferences":{"type":"object","properties":{"enabled":{"type":"boolean"},"decisions":{"type":"boolean"},"failures":{"type":"boolean"},"completions":{"type":"boolean"},"assignments":{"type":"boolean"}},"required":["enabled","decisions","failures","completions","assignments"],"additionalProperties":false},"registrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"installationId":{"type":"string","minLength":1},"platform":{"type":"string","const":"web"},"state":{"type":"string","enum":["registered","failed","disabled"]},"failureCode":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["id","installationId","platform","state","failureCode","updatedAt"],"additionalProperties":false}},"webPushPublicKey":{"type":["string","null"]}},"required":["protocolVersion","preferences","registrations","webPushPublicKey"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"decisions":{"type":"boolean"},"failures":{"type":"boolean"},"completions":{"type":"boolean"},"assignments":{"type":"boolean"}}}}}}}},"/notifications":{"get":{"operationId":"getNotifications","tags":["notifications"],"summary":"List the task inbox","description":"Current task attention, unread first. The unread count covers the whole inbox.","responses":{"200":{"description":"Task inbox","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["input","approval","review","blocked","assigned","completion"]},"taskId":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"projectName":{"type":"string"},"objective":{"type":"string"},"detail":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"since":{"type":"string"},"requiresAction":{"type":"boolean"},"isRead":{"type":"boolean"},"readAt":{"type":["string","null"]},"deepLink":{"type":"string","minLength":1}},"required":["id","kind","taskId","projectId","workspaceId","projectName","objective","detail","conversationId","since","requiresAction","isRead","readAt","deepLink"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"unread":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["object","data","has_more","last_id","unread"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}]}},"/notifications/read":{"post":{"operationId":"postNotificationsRead","tags":["notifications"],"summary":"Mark inbox items read","responses":{"200":{"description":"Receipts","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["updated"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}}},"required":["itemIds"]}}}}}},"/notifications/dismiss":{"post":{"operationId":"postNotificationsDismiss","tags":["notifications"],"summary":"Dismiss inbox items","responses":{"200":{"description":"Receipts","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["updated"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}}},"required":["itemIds"]}}}}}},"/notifications/registrations":{"post":{"operationId":"postNotificationsRegistrations","tags":["notifications"],"summary":"Register a notification installation","responses":{"200":{"description":"Registration","content":{"application/json":{"schema":{"type":"object","properties":{"registration":{"type":"object","properties":{"id":{"type":"string","minLength":1},"installationId":{"type":"string","minLength":1},"platform":{"type":"string","const":"web"},"state":{"type":"string","enum":["registered","failed","disabled"]},"failureCode":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["id","installationId","platform","state","failureCode","updatedAt"],"additionalProperties":false}},"required":["registration"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"string","minLength":1,"maxLength":128},"platform":{"type":"string","const":"web"},"subscription":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":2048,"format":"uri"},"expirationTime":{"default":null,"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"keys":{"type":"object","properties":{"p256dh":{"type":"string","minLength":1,"maxLength":1024},"auth":{"type":"string","minLength":1,"maxLength":1024}},"required":["p256dh","auth"]}},"required":["endpoint","keys"]}},"required":["installationId","platform","subscription"]}}}}}},"/notifications/registrations/{registration_id}":{"delete":{"operationId":"deleteNotificationsRegistrationsByRegistrationId","tags":["notifications"],"summary":"Remove a notification installation","description":"The registration id is the installation id it registered with.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"registration_id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]}},"/notifications/{notification_id}":{"get":{"operationId":"getNotificationsByNotificationId","tags":["notifications"],"summary":"Resolve a notification's current link","responses":{"200":{"description":"Current deep-link state","content":{"application/json":{"schema":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"itemId":{"type":"string","minLength":1},"current":{"type":"boolean"},"deepLink":{"type":["string","null"]}},"required":["protocolVersion","itemId","current","deepLink"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notification_id","schema":{"type":"string","minLength":1,"maxLength":256},"required":true}]}},"/outputs":{"get":{"operationId":"getOutputs","tags":["outputs"],"summary":"List outputs","description":"Personal outputs, or a project's when project_id is set.","responses":{"200":{"description":"Outputs","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"capability_id","schema":{"type":"string","minLength":1,"maxLength":160}},{"in":"query","name":"kind","schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"}}]},"post":{"operationId":"postOutputs","tags":["outputs"],"summary":"Create an output","responses":{"200":{"description":"The output","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"provenance":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"capturedAt":{"type":"string","maxLength":64},"completeness":{"type":"string","enum":["complete","partial"]},"origin":{"type":"string","enum":["generated","user","imported","unknown"]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","attempt"],"additionalProperties":false},{"type":"null"}]},"model":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","minLength":1,"maxLength":128}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"skills":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string","minLength":1,"maxLength":512},"revisionId":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name"],"additionalProperties":false}},"sources":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"state":{"type":"string","enum":["referenced","unavailable"]}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["id","type","status","toolName"],"additionalProperties":false}}},"required":["protocolVersion","capturedAt","completeness","origin","run","model","skills","sources","approvals"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","content","file","revision","provenance","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"parentOutputId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"default":"ready","type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"content":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["capabilityId","kind","title"],"additionalProperties":false}}}}}},"/outputs/shared/{token}":{"get":{"operationId":"getOutputsSharedByToken","tags":["outputs"],"summary":"Read a shared output","responses":{"200":{"description":"Shared output","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","capabilityId","kind","title","status","content","file","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"token","schema":{"type":"string","minLength":32},"required":true}]}},"/outputs/shared/{token}/content":{"get":{"operationId":"getOutputsSharedByTokenContent","tags":["outputs"],"summary":"Download a shared output's file","responses":{"200":{"description":"Shared output file"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"token","schema":{"type":"string","minLength":32},"required":true}]}},"/outputs/{output_id}":{"get":{"operationId":"getOutputsByOutputId","tags":["outputs"],"summary":"Read an output","responses":{"200":{"description":"The output","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"provenance":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"capturedAt":{"type":"string","maxLength":64},"completeness":{"type":"string","enum":["complete","partial"]},"origin":{"type":"string","enum":["generated","user","imported","unknown"]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","attempt"],"additionalProperties":false},{"type":"null"}]},"model":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","minLength":1,"maxLength":128}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"skills":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string","minLength":1,"maxLength":512},"revisionId":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name"],"additionalProperties":false}},"sources":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"state":{"type":"string","enum":["referenced","unavailable"]}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["id","type","status","toolName"],"additionalProperties":false}}},"required":["protocolVersion","capturedAt","completeness","origin","run","model","skills","sources","approvals"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","content","file","revision","provenance","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchOutputsByOutputId","tags":["outputs"],"summary":"Save an output revision","description":"Send fields to change, or edit with a proposal from POST /outputs/{output_id}/edits to apply it to the document.","responses":{"200":{"description":"The output","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"provenance":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"capturedAt":{"type":"string","maxLength":64},"completeness":{"type":"string","enum":["complete","partial"]},"origin":{"type":"string","enum":["generated","user","imported","unknown"]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","attempt"],"additionalProperties":false},{"type":"null"}]},"model":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","minLength":1,"maxLength":128}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"skills":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string","minLength":1,"maxLength":512},"revisionId":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name"],"additionalProperties":false}},"sources":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"state":{"type":"string","enum":["referenced","unavailable"]}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["id","type","status","toolName"],"additionalProperties":false}}},"required":["protocolVersion","capturedAt","completeness","origin","run","model","skills","sources","approvals"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","content","file","revision","provenance","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["expectedRevision"],"additionalProperties":false},{"type":"object","properties":{"edit":{"type":"object","properties":{"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"anchor":{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},"replacement":{"type":"string","maxLength":204800}},"required":["sourceRevision","anchor","replacement"],"additionalProperties":false}},"required":["edit"],"additionalProperties":false}]}}}}},"delete":{"operationId":"deleteOutputsByOutputId","tags":["outputs"],"summary":"Delete an output","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}]}},"/outputs/{output_id}/format":{"post":{"operationId":"postOutputsByOutputIdFormat","tags":["outputs","documents"],"summary":"Rewrite a document without changing what it says","responses":{"200":{"description":"Rewritten document","content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"The rewritten document, in Markdown."},"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["body","sourceRevision"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"description":"Extra instructions for the rewrite, such as a tone or an audience.","type":"string","maxLength":2000}}}}}}}},"/outputs/{output_id}/describe":{"post":{"operationId":"postOutputsByOutputIdDescribe","tags":["outputs","documents"],"summary":"Describe a document and keep the description on it","responses":{"200":{"description":"Description","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"summary":{"type":"string"},"editorial":{"type":"object","properties":{"overall":{"type":"number","minimum":0,"maximum":1},"grade":{"type":"string","enum":["A","B","C","D","E"]},"dimensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1},"provider":{"type":"string"},"model":{"type":"string"}},"required":["overall","grade","dimensions","confidence","provider","model"],"additionalProperties":false},"tags":{"type":"array","items":{"type":"string"}},"keyTopics":{"type":"array","items":{"type":"string"}},"wordCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"readingTime":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentType":{"type":"string","enum":["text","list","outline","mixed"]},"sentiment":{"type":"string","enum":["positive","neutral","negative"]},"sourceType":{"type":"string","enum":["manual","assistant","transcription","media","capture"]},"capturedFrom":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"timestamp":{"type":"string"}},"additionalProperties":false},"themeMode":{"type":"string"},"fontFamily":{"type":"string"},"fontSize":{"type":"number"}},"additionalProperties":{}}},"required":["metadata"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["expectedRevision"]}}}}}},"/outputs/{output_id}/content":{"get":{"operationId":"getOutputsByOutputIdContent","tags":["outputs","documents"],"summary":"Download an output's content","description":"Returns the stored file, or a document output as Markdown.","responses":{"200":{"description":"Output file or Markdown document"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}]}},"/outputs/{output_id}/revisions":{"get":{"operationId":"getOutputsByOutputIdRevisions","tags":["outputs"],"summary":"List an output's revisions","responses":{"200":{"description":"Revisions","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"outputId":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"parentRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"title":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"operation":{"type":"string","enum":["created","updated","restored"]},"restoredFromRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"provenance":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"capturedAt":{"type":"string","maxLength":64},"completeness":{"type":"string","enum":["complete","partial"]},"origin":{"type":"string","enum":["generated","user","imported","unknown"]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","attempt"],"additionalProperties":false},{"type":"null"}]},"model":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","minLength":1,"maxLength":128}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"skills":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string","minLength":1,"maxLength":512},"revisionId":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name"],"additionalProperties":false}},"sources":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"state":{"type":"string","enum":["referenced","unavailable"]}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["id","type","status","toolName"],"additionalProperties":false}}},"required":["protocolVersion","capturedAt","completeness","origin","run","model","skills","sources","approvals"],"additionalProperties":false}},"required":["outputId","revision","parentRevision","title","status","sensitivity","content","createdByUserId","createdAt","operation","restoredFromRevision","provenance"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"current":{"type":"object","properties":{"outputId":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"parentRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"title":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"operation":{"type":"string","enum":["created","updated","restored"]},"restoredFromRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"provenance":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"capturedAt":{"type":"string","maxLength":64},"completeness":{"type":"string","enum":["complete","partial"]},"origin":{"type":"string","enum":["generated","user","imported","unknown"]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","attempt"],"additionalProperties":false},{"type":"null"}]},"model":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","minLength":1,"maxLength":128}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"skills":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string","minLength":1,"maxLength":512},"revisionId":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name"],"additionalProperties":false}},"sources":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"state":{"type":"string","enum":["referenced","unavailable"]}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["id","type","status","toolName"],"additionalProperties":false}}},"required":["protocolVersion","capturedAt","completeness","origin","run","model","skills","sources","approvals"],"additionalProperties":false}},"required":["outputId","revision","parentRevision","title","status","sensitivity","content","createdByUserId","createdAt","operation","restoredFromRevision","provenance"],"additionalProperties":false},"restore":{"type":"object","properties":{"supported":{"type":"boolean"},"reason":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"fields":{"maxItems":2,"type":"array","items":{"type":"string","enum":["title","content"]}}},"required":["supported","reason","fields"],"additionalProperties":false}},"required":["object","data","has_more","last_id","current","restore"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}]}},"/outputs/{output_id}/revisions/{revision_id}/restore":{"post":{"operationId":"postOutputsByOutputIdRevisionsByRevisionIdRestore","tags":["outputs"],"summary":"Restore an earlier revision","responses":{"200":{"description":"The output","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"provenance":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"capturedAt":{"type":"string","maxLength":64},"completeness":{"type":"string","enum":["complete","partial"]},"origin":{"type":"string","enum":["generated","user","imported","unknown"]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","attempt"],"additionalProperties":false},{"type":"null"}]},"model":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","minLength":1,"maxLength":128}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"skills":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string","minLength":1,"maxLength":512},"revisionId":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name"],"additionalProperties":false}},"sources":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"state":{"type":"string","enum":["referenced","unavailable"]}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["id","type","status","toolName"],"additionalProperties":false}}},"required":["protocolVersion","capturedAt","completeness","origin","run","model","skills","sources","approvals"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","content","file","revision","provenance","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"revision_id","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/outputs/{output_id}/reviews":{"get":{"operationId":"getOutputsByOutputIdReviews","tags":["outputs"],"summary":"List council reviews of an output","responses":{"200":{"description":"Reviews","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"outputId":{"type":"string","minLength":1},"outputRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"verdict":{"type":"string","enum":["ship","revise","hold"]},"brief":{"type":"string"},"dissent":{"type":"array","items":{"type":"string"}},"seats":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string","enum":["chair","sceptic","architect","operator","researcher","ethicist","strategist","critic","synthesiser","security","customer","contrarian","joker","wildcard"]},"critique":{"type":"string"},"rebuttal":{"type":"string"},"vote":{"type":"string","enum":["ship","revise","hold"]}},"required":["memberId","critique","rebuttal","vote"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","outputId","outputRevision","verdict","brief","dissent","seats","createdAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postOutputsByOutputIdReviews","tags":["outputs"],"summary":"Ask the council to review an output","description":"Four seats critique the current revision, read each other's critiques and vote; an adjudicator returns ship, revise or hold with a revision brief.","responses":{"200":{"description":"The review","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"outputId":{"type":"string","minLength":1},"outputRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"verdict":{"type":"string","enum":["ship","revise","hold"]},"brief":{"type":"string"},"dissent":{"type":"array","items":{"type":"string"}},"seats":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string","enum":["chair","sceptic","architect","operator","researcher","ethicist","strategist","critic","synthesiser","security","customer","contrarian","joker","wildcard"]},"critique":{"type":"string"},"rebuttal":{"type":"string"},"vote":{"type":"string","enum":["ship","revise","hold"]}},"required":["memberId","critique","rebuttal","vote"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","outputId","outputRevision","verdict","brief","dissent","seats","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}]}},"/outputs/{output_id}/shares":{"get":{"operationId":"getOutputsByOutputIdShares","tags":["outputs"],"summary":"List an output's active share links","responses":{"200":{"description":"Shares","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"outputId":{"type":"string","minLength":1},"permission":{"type":"string","const":"view"},"expiresAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","outputId","permission","expiresAt","revokedAt","createdAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postOutputsByOutputIdShares","tags":["outputs"],"summary":"Create a share link","responses":{"200":{"description":"The share","content":{"application/json":{"schema":{"type":"object","properties":{"share":{"type":"object","properties":{"id":{"type":"string","minLength":1},"outputId":{"type":"string","minLength":1},"permission":{"type":"string","const":"view"},"expiresAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","outputId","permission","expiresAt","revokedAt","createdAt"],"additionalProperties":false},"token":{"type":"string","minLength":32}},"required":["share","token"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"additionalProperties":false}}}}}},"/outputs/{output_id}/shares/{share_id}":{"delete":{"operationId":"deleteOutputsByOutputIdSharesByShareId","tags":["outputs"],"summary":"Revoke a share link","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"share_id","schema":{"type":"string","minLength":1},"required":true}]}},"/outputs/{output_id}/comments":{"get":{"operationId":"getOutputsByOutputIdComments","tags":["documents"],"summary":"List a document's discussion","responses":{"200":{"description":"Discussion","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"outputId":{"type":["string","null"]},"sourceId":{"type":["string","null"]},"parentId":{"type":["string","null"]},"anchor":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},{"type":"null"}]},"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"body":{"type":"string"},"authorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolved":{"type":"boolean"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mentionedTeammateId":{"type":["string","null"]},"taskId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","outputId","sourceId","parentId","anchor","sourceRevision","body","authorUserId","resolved","revision","mentionedTeammateId","taskId","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"permissions":{"type":"object","properties":{"actorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"canEditDocument":{"type":"boolean"},"canResolveAllThreads":{"type":"boolean"}},"required":["actorUserId","canEditDocument","canResolveAllThreads"],"additionalProperties":false}},"required":["object","data","has_more","last_id","permissions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"after","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postOutputsByOutputIdComments","tags":["documents"],"summary":"Comment on a document","responses":{"200":{"description":"The comment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"outputId":{"type":["string","null"]},"sourceId":{"type":["string","null"]},"parentId":{"type":["string","null"]},"anchor":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},{"type":"null"}]},"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"body":{"type":"string"},"authorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolved":{"type":"boolean"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mentionedTeammateId":{"type":["string","null"]},"taskId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","outputId","sourceId","parentId","anchor","sourceRevision","body","authorUserId","resolved","revision","mentionedTeammateId","taskId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"parentId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"anchor":{"default":null,"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},{"type":"null"}]},"body":{"type":"string","minLength":1,"maxLength":10000},"mentionedTeammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["requestId","expectedRevision","body"],"additionalProperties":false}}}}}},"/outputs/{output_id}/comments/{comment_id}":{"patch":{"operationId":"patchOutputsByOutputIdCommentsByCommentId","tags":["documents"],"summary":"Resolve or reopen a thread","responses":{"200":{"description":"The thread","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"outputId":{"type":["string","null"]},"sourceId":{"type":["string","null"]},"parentId":{"type":["string","null"]},"anchor":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},{"type":"null"}]},"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"body":{"type":"string"},"authorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolved":{"type":"boolean"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mentionedTeammateId":{"type":["string","null"]},"taskId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","outputId","sourceId","parentId","anchor","sourceRevision","body","authorUserId","resolved","revision","mentionedTeammateId","taskId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"comment_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolved":{"type":"boolean"}},"required":["expectedRevision","resolved"],"additionalProperties":false}}}}}},"/outputs/{output_id}/edits":{"post":{"operationId":"postOutputsByOutputIdEdits","tags":["documents"],"summary":"Propose an edit to a selection","responses":{"200":{"description":"Proposed edit","content":{"application/json":{"schema":{"type":"object","properties":{"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"anchor":{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},"replacement":{"type":"string","maxLength":204800}},"required":["sourceRevision","anchor","replacement"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"anchor":{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["expectedRevision","anchor","instructions"],"additionalProperties":false}}}}}},"/tasks":{"get":{"operationId":"getTasks","tags":["tasks"],"summary":"List the caller's background tasks","responses":{"200":{"description":"Tasks","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"task_type":{"type":"string","enum":["memory_synthesis","memory_reflection","memory_consolidation","memory_import","research_polling","async_message_polling","training_quality_scoring","recipe_execution","inbound_message","artificial_analysis_ingest","artificial_analysis_scoring","sandbox_run_dispatch","project_task_run","project_review_intake","delegation_run","delegation_wake","delegation_message","delegation_expiry","ocr_batch_polling","usage_rollup","realtime_reconciliation","infra_reconciliation","stripe_usage_sync","task_notification_delivery","teammate_run_reconciliation","teammate_context_cleanup","conversation_title","queued_chat_message","source_knowledge_index","source_knowledge_sync","source_knowledge_enrich","source_generation_polling","source_media_transcription","source_podcast_generation","source_listen","model_registry_inspect","model_registry_eval","model_dataset_process","model_training_sync","model_deployment_sync","model_upload_finalise","model_platform_reconcile","benchmark_run","webhook_delivery","work_teammate_wake","notebook_job","discover_job"]},"status":{"type":"string","enum":["pending","queued","running","suspended","completed","failed","cancelled"]},"priority":{"type":"number","minimum":1,"maximum":10},"user_id":{"type":"number"},"task_data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"schedule_type":{"type":"string","enum":["immediate","scheduled","recurring","event_triggered"]},"scheduled_at":{"type":"string"},"cron_expression":{"type":"string"},"created_by":{"type":"string","enum":["system","user"]},"attempts":{"type":"number"},"max_attempts":{"type":"number"},"last_attempted_at":{"type":"string"},"completed_at":{"type":"string"},"error_message":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_type","created_by","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false}},"/tasks/{task_id}":{"get":{"operationId":"getTasksByTaskId","tags":["tasks"],"summary":"Read a background task and its executions","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]}},"/tasks/{task_id}/cancel":{"post":{"operationId":"postTasksByTaskIdCancel","tags":["tasks"],"summary":"Cancel a background task","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]}},"/templates":{"get":{"operationId":"getTemplates","tags":["templates"],"summary":"List templates","description":"Personal templates, or a workspace's when workspace_id is set.","responses":{"200":{"description":"Templates","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"workspaceId":{"type":["string","null"]},"kind":{"type":"string","enum":["project","recipe","capability","team"]},"capabilityId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"type":"string","enum":["active","paused","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","workspaceId","kind","capabilityId","name","description","configuration","status","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"workspace_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"kind","schema":{"type":"string","enum":["project","recipe","capability","team"]}}]},"post":{"operationId":"postTemplates","tags":["templates"],"summary":"Create a template","responses":{"200":{"description":"The template","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"workspaceId":{"type":["string","null"]},"kind":{"type":"string","enum":["project","recipe","capability","team"]},"capabilityId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"type":"string","enum":["active","paused","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","workspaceId","kind","capabilityId","name","description","configuration","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"kind":{"type":"string","enum":["project","recipe","capability","team"]},"capabilityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":500},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"default":"active","type":"string","enum":["active","paused","archived"]}},"required":["kind","name"]}}}}}},"/templates/starters":{"get":{"operationId":"getTemplatesStarters","tags":["templates"],"summary":"List project starters","description":"Built-in starters. Create a project from one with POST /projects and starter_id.","responses":{"200":{"description":"Starters","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"when":{"type":"string"},"teammates":{"type":"array","items":{"type":"object","properties":{"roleSlug":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"}},"required":["roleSlug","name","title"],"additionalProperties":false}},"apps":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"}}},"required":["slug","name","description","when","teammates","apps","tools"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false}},"/templates/{template_id}":{"get":{"operationId":"getTemplatesByTemplateId","tags":["templates"],"summary":"Read a template","responses":{"200":{"description":"The template","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"workspaceId":{"type":["string","null"]},"kind":{"type":"string","enum":["project","recipe","capability","team"]},"capabilityId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"type":"string","enum":["active","paused","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","workspaceId","kind","capabilityId","name","description","configuration","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"template_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchTemplatesByTemplateId","tags":["templates"],"summary":"Update a template","responses":{"200":{"description":"The template","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"workspaceId":{"type":["string","null"]},"kind":{"type":"string","enum":["project","recipe","capability","team"]},"capabilityId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"type":"string","enum":["active","paused","archived"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","workspaceId","kind","capabilityId","name","description","configuration","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"template_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"type":"string","enum":["active","paused","archived"]}}}}}}},"delete":{"operationId":"deleteTemplatesByTemplateId","tags":["templates"],"summary":"Delete a template","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"template_id","schema":{"type":"string","minLength":1},"required":true}]}},"/tools":{"get":{"operationId":"getTools","tags":["tools"],"summary":"List tools","description":"The tools available in the caller's scope, or a project's or workspace's.","responses":{"200":{"description":"Tools","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["Research","Creative","Code","Productivity","Automation","Collaboration","Other"]},"isDefault":{"type":"boolean"},"type":{"type":"string","enum":["normal","premium","byok"]}},"required":["id","name","description","category"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"query","name":"workspace_id","schema":{"type":"string","minLength":1,"maxLength":256}}]}},"/tools/mcp_calls":{"post":{"operationId":"postToolsMcpCalls","tags":["tools"],"summary":"Run a read-only MCP tool from an app view","description":"Lets an MCP app rendered in a conversation refresh its data. Only tools the integration marks read-only run here; anything that changes something has to go through the conversation so it can ask first.","responses":{"200":{"description":"The tool result","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"default":[],"type":"array","items":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}},"structuredContent":{},"isError":{"type":"boolean"}},"required":["content"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integration":{"type":"string","minLength":1,"maxLength":80},"tool":{"type":"string","minLength":1,"maxLength":200},"arguments":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["integration","tool"]}}}}}},"/tools/configurations":{"get":{"operationId":"getToolsConfigurations","tags":["tools"],"summary":"List tool configurations","description":"Saved model-tool configuration for the caller.","responses":{"200":{"description":"Configurations","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"toolId":{"type":"string","enum":["code_execution","file_search","search_grounding","image_generation","mcp","web_fetch","tool_search","hosted_shell"]},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["toolId","configuration","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false}},"/tools/mcp_connections":{"get":{"operationId":"getToolsMcpConnections","tags":["tools"],"summary":"List MCP connections","responses":{"200":{"description":"Connections","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"credentialRecipient":{"type":"string","enum":["openai","polychat"],"description":"Who receives the credential: OpenAI's hosted MCP tool, or Polychat's own MCP gateway, which works with any model."},"authMethod":{"default":"token","type":"string","enum":["token","oauth"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"allowedTools":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:/-]+$"}},"createdAt":{"type":"string"}},"required":["credentialRecipient","authMethod","id","label","url","allowedTools","createdAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false},"post":{"operationId":"postToolsMcpConnections","tags":["tools"],"summary":"Connect an MCP server","responses":{"200":{"description":"The connection","content":{"application/json":{"schema":{"type":"object","properties":{"credentialRecipient":{"type":"string","enum":["openai","polychat"],"description":"Who receives the credential: OpenAI's hosted MCP tool, or Polychat's own MCP gateway, which works with any model."},"authMethod":{"default":"token","type":"string","enum":["token","oauth"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"allowedTools":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:/-]+$"}},"createdAt":{"type":"string"}},"required":["credentialRecipient","authMethod","id","label","url","allowedTools","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credentialRecipient":{"type":"string","enum":["openai","polychat"],"description":"Who receives the credential: OpenAI's hosted MCP tool, or Polychat's own MCP gateway, which works with any model."},"label":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048},"token":{"type":"string","minLength":1,"maxLength":8192,"pattern":"^[A-Za-z0-9._~+/-]+=*$"},"allowedTools":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:/-]+$"}}},"required":["credentialRecipient","label","url","token","allowedTools"],"additionalProperties":false}}}}}},"/tools/mcp_connections/authorise":{"post":{"operationId":"postToolsMcpConnectionsAuthorise","tags":["tools"],"summary":"Start signing in to an MCP server","responses":{"200":{"description":"Where to send the browser","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"}},"required":["authorizationUrl"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048},"allowedTools":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:/-]+$"}}},"required":["label","url","allowedTools"],"additionalProperties":false}}}}}},"/tools/mcp_connections/callback":{"get":{"operationId":"getToolsMcpConnectionsCallback","tags":["tools"],"summary":"Finish signing in to an MCP server","description":"The OAuth redirect target. Sends the browser back to Polychat.","responses":{"302":{"description":"Back to Polychat"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"state","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"code","schema":{"type":"string","minLength":1,"maxLength":4096}},{"in":"query","name":"error","schema":{"type":"string","maxLength":200}}]}},"/tools/mcp_connections/{connection_id}":{"delete":{"operationId":"deleteToolsMcpConnectionsByConnectionId","tags":["tools"],"summary":"Remove an MCP connection","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"connection_id","schema":{"type":"string","minLength":1},"required":true}]}},"/tools/{tool_id}":{"get":{"operationId":"getToolsByToolId","tags":["tools"],"summary":"Get a runnable tool","description":"Returns a tool with a form derived from its input schema, so it can be run from the interface instead of by a model.","responses":{"200":{"description":"Runnable tool","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["Research","Creative","Code","Productivity","Automation","Collaboration","Other"]},"isDefault":{"type":"boolean"},"type":{"type":"string","enum":["normal","premium","byok"]},"icon":{"type":"string"},"theme":{"type":"string","enum":["violet","indigo","pink","rose","cyan","emerald","amber","sky","slate","blue"]},"formSchema":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["text","number","select","multiselect","checkbox","file","date","textarea"]},"label":{"type":"string"},"description":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{},"valueFormat":{"type":"string","enum":["json","json-or-text"]},"validation":{"type":"object","properties":{"pattern":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"},"minLength":{"type":"number"},"maxLength":{"type":"number"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","type","label","required"],"additionalProperties":false}}},"required":["id","title","fields"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"responseSchema":{"type":"object","properties":{"type":{"type":"string","enum":["table","json","text","custom","hidden"]}},"additionalProperties":false}},"required":["id","name","description","category","formSchema","responseSchema"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"tool_id","schema":{"type":"string","minLength":1},"required":true}]}},"/tools/{tool_id}/execute":{"post":{"operationId":"postToolsByToolIdExecute","tags":["tools"],"summary":"Run a tool","description":"Runs a tool with the submitted form values and stores the result as an output.","responses":{"200":{"description":"Tool result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"output_id":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"result":{}},"required":["message","timestamp","input","result"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"tool_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}},"/tools/{tool_id}/configuration":{"patch":{"operationId":"patchToolsByToolIdConfiguration","tags":["tools"],"summary":"Save a tool's configuration","description":"Validates and saves model-tool configuration for the caller.","responses":{"200":{"description":"The configuration","content":{"application/json":{"schema":{"type":"object","properties":{"toolId":{"type":"string","enum":["code_execution","file_search","search_grounding","image_generation","mcp","web_fetch","tool_search","hosted_shell"]},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["toolId","configuration","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"tool_id","schema":{"type":"string","enum":["code_execution","file_search","search_grounding","image_generation","mcp","web_fetch","tool_search","hosted_shell"]},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["configuration"]}}}}}},"/audio/transcribe":{"post":{"operationId":"postAudioTranscribe","tags":["audio"],"summary":"Create transcription","description":"Transcribes audio into the input language.","responses":{"200":{"description":"Transcription result with extracted text","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"status":{"type":"string","const":"success"},"content":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"start":{"type":"number","minimum":0},"end":{"type":"number","minimum":0},"text":{"type":"string"},"speaker":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"words":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string"},"start":{"type":"number","minimum":0},"end":{"type":"number","minimum":0},"speaker":{"type":"string"}},"required":["word","start","end"],"additionalProperties":false}}},"required":["status","content"],"additionalProperties":false}},"required":["response"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"provider","schema":{"type":"string","enum":["workers","mistral","replicate","greenpt"]}},{"in":"query","name":"timestamps","schema":{"type":"string","enum":["true","false"]}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"audio":{}},"required":["audio"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{}},"required":["audio"]}}}}}},"/audio/speech":{"post":{"operationId":"postAudioSpeech","tags":["audio"],"summary":"Create speech","description":"Generates audio from the input text.","responses":{"200":{"description":"Speech generation result with audio URL","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"status":{"type":"string","enum":["success","error"]},"name":{"type":"string"},"content":{"type":["string","null"]},"data":{}},"required":["status"],"additionalProperties":false}},"required":["response"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"string","description":"The text to generate audio for. Long text may be truncated to the selected provider limit."},"provider":{"description":"The speech provider. Leave it out to use the best voice your account can reach.","type":"string","enum":["elevenlabs","cartesia","mistral","polly","workers-ai"]},"model":{"description":"A speech model ID from the model catalogue, such as eleven_v4.","type":"string"},"lang":{"type":"string"},"voice_id":{"description":"A preset or saved voice for the selected provider.","type":"string"},"ref_audio":{"description":"Base64-encoded reference audio for providers that support one-off voice cloning.","type":"string"},"response_format":{"type":"string","enum":["mp3","wav","pcm","flac","opus"]},"expressiveness":{"description":"How strongly the voice performs the text, from 1 to 5, for providers that support it. Higher values trade voice similarity for delivery.","type":"number","minimum":1,"maximum":5},"store":{"description":"Whether to store the generated audio artifact.","type":"boolean"}},"required":["input"]}}}}}},"/audio/speech/models":{"get":{"operationId":"getAudioSpeechModels","tags":["audio"],"summary":"List speech models","description":"Lists the speech models you can use, best first by text-to-speech arena score. The first one is what Polychat picks when you leave speech on automatic.","responses":{"200":{"description":"Ranked speech models","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"provider":{"type":"string","enum":["elevenlabs","cartesia","mistral","polly","workers-ai"]},"arenaScore":{"type":["number","null"]}},"required":["id","name","provider","arenaScore"],"additionalProperties":false}}},"required":["models"],"additionalProperties":false}}}}},"hide":false}},"/audio/voices":{"get":{"operationId":"getAudioVoices","tags":["audio"],"summary":"List saved voices","description":"Lists the speech voices you saved from your own recordings.","responses":{"200":{"description":"Saved voices","content":{"application/json":{"schema":{"type":"object","properties":{"voices":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"provider":{"type":"string","const":"mistral"},"name":{"type":"string","minLength":1,"maxLength":80},"created_at":{"type":"string"}},"required":["id","provider","name","created_at"],"additionalProperties":false}}},"required":["voices"],"additionalProperties":false}}}}},"hide":false},"post":{"operationId":"postAudioVoices","tags":["audio"],"summary":"Save a voice","description":"Clones a voice from an MP3 or WAV recording and saves it for speech. Confirm the voice is yours or you have permission to use it.","responses":{"200":{"description":"Saved voice","content":{"application/json":{"schema":{"type":"object","properties":{"voice":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"provider":{"type":"string","const":"mistral"},"name":{"type":"string","minLength":1,"maxLength":80},"created_at":{"type":"string"}},"required":["id","provider","name","created_at"],"additionalProperties":false}},"required":["voice"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"sample":{},"consent":{"type":"string","const":"true"}},"required":["name","sample","consent"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"sample":{},"consent":{"type":"string","const":"true"}},"required":["name","sample","consent"]}}}}}},"/audio/voices/{voice_id}":{"delete":{"operationId":"deleteAudioVoicesByVoiceId","tags":["audio"],"summary":"Delete a saved voice","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Voice not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"voice_id","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}]}},"/capabilities":{"get":{"operationId":"getCapabilities","tags":["capabilities"],"summary":"List capability catalogue","description":"Returns the teammates, rich experiences, model tools and skills a project or person can enable. Function tools are published by /tools.","responses":{"200":{"description":"Capability catalogue","content":{"application/json":{"schema":{"type":"object","properties":{"teammates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["colleague","bot"]},"description":{"type":"string"},"avatarUrl":{"type":["string","null"]},"characterId":{"type":["string","null"]},"model":{"type":["string","null"]},"modelAvailable":{"type":"boolean"},"mode":{"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"ownerScopeType":{"type":"string","enum":["user","workspace","platform"]},"skillIds":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"toolIds":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},"unavailableSkillIds":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"unavailableToolIds":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},"scorecard":{"type":"object","properties":{"good":{"type":"integer","minimum":0,"maximum":9007199254740991},"bad":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["good","bad"],"additionalProperties":false}},"required":["id","name","kind","description","avatarUrl","characterId","model","modelAvailable","mode","ownerScopeType","skillIds","toolIds","unavailableSkillIds","unavailableToolIds","scorecard"],"additionalProperties":false}},"experiences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runtime":{"type":"string","enum":["benchmarks","charades","photo-sorter","sites","strudel","twenty-questions","verbatim"]},"name":{"type":"string"},"description":{"type":"string"},"when":{"type":"string","description":"When someone should reach for this app."},"uses":{"type":"string","description":"What it works from."},"produces":{"type":"string","description":"What it leaves behind."},"ios":{"type":"string","enum":["native","results-only","web-only"],"description":"How this app behaves on iPhone."},"scope":{"type":"string","enum":["any","personal"],"description":"Whether this app can be enabled in a project."},"scopeReason":{"description":"Why a personal-only app cannot be enabled in a project.","type":["string","null"]},"icon":{"type":"string"},"category":{"type":"string"},"theme":{"type":"string","enum":["violet","indigo","pink","rose","cyan","emerald","amber","sky","slate","blue"]},"tags":{"type":"array","items":{"type":"string"}},"type":{"type":"string","enum":["normal","premium","byok"]},"requirement":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"capability"},"capabilityKind":{"type":"string","enum":["app","recipe"]},"capabilityId":{"type":"string"}},"required":["kind","capabilityKind","capabilityId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"capability_kind"},"capabilityKind":{"type":"string","enum":["app","recipe"]}},"required":["kind","capabilityKind"],"additionalProperties":false}]}},"required":["id","runtime","name","description","when","uses","produces","ios","scope","scopeReason","requirement"],"additionalProperties":false}},"modelTools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["code_execution","file_search","search_grounding","image_generation","mcp","web_fetch","tool_search","hosted_shell"]},"capability":{"type":"string","enum":["supportsCodeExecution","supportsFileSearch","supportsSearchGrounding","supportsMcp","supportsImageGenerationTool","supportsWebFetch","supportsToolSearch","supportsHostedShell"]},"category":{"type":"string"},"command":{"type":"string"},"description":{"type":"string"},"label":{"type":"string"},"requiresConfiguration":{"type":"boolean"},"configurationKind":{"type":"string","enum":["file_search","mcp"]}},"required":["id","capability","category","command","description","label"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":1024},"category":{"type":"string","enum":["Output","Automation","Research","Reasoning","Development","Communication","Data","Guide","Other"]},"tags":{"default":[],"type":"array","items":{"type":"string"}},"alwaysOn":{"default":false,"type":"boolean"},"activation":{"type":"string","enum":["on-demand","per-message"]},"requirement":{"type":"object","properties":{"modelCapabilities":{"default":[],"type":"array","items":{"type":"string"}},"tools":{"default":[],"type":"array","items":{"type":"string"}},"suggestedTools":{"default":[],"type":"array","items":{"type":"string"}}},"required":["modelCapabilities","tools","suggestedTools"],"additionalProperties":false},"source":{"type":"string","enum":["built-in","user-authored"]}},"required":["id","name","description","category","tags","alwaysOn","requirement"],"additionalProperties":false}}},"required":["teammates","experiences","modelTools","skills"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/capabilities/catalogue":{"get":{"operationId":"getCapabilitiesCatalogue","tags":["capabilities"],"summary":"List the public capability catalogue","description":"Returns every built-in experience, model tool, function tool and recipe template without filtering by the caller's plan or access. Agents, skills and installed recipes are curated per person or workspace and are not included.","responses":{"200":{"description":"Public capability catalogue","content":{"application/json":{"schema":{"type":"object","properties":{"experiences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runtime":{"type":"string","enum":["benchmarks","charades","photo-sorter","sites","strudel","twenty-questions","verbatim"]},"name":{"type":"string"},"description":{"type":"string"},"when":{"type":"string","description":"When someone should reach for this app."},"uses":{"type":"string","description":"What it works from."},"produces":{"type":"string","description":"What it leaves behind."},"ios":{"type":"string","enum":["native","results-only","web-only"],"description":"How this app behaves on iPhone."},"scope":{"type":"string","enum":["any","personal"],"description":"Whether this app can be enabled in a project."},"scopeReason":{"description":"Why a personal-only app cannot be enabled in a project.","type":["string","null"]},"icon":{"type":"string"},"category":{"type":"string"},"theme":{"type":"string","enum":["violet","indigo","pink","rose","cyan","emerald","amber","sky","slate","blue"]},"tags":{"type":"array","items":{"type":"string"}},"type":{"type":"string","enum":["normal","premium","byok"]},"requirement":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"capability"},"capabilityKind":{"type":"string","enum":["app","recipe"]},"capabilityId":{"type":"string"}},"required":["kind","capabilityKind","capabilityId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"capability_kind"},"capabilityKind":{"type":"string","enum":["app","recipe"]}},"required":["kind","capabilityKind"],"additionalProperties":false}]}},"required":["id","runtime","name","description","when","uses","produces","ios","scope","scopeReason","requirement"],"additionalProperties":false}},"modelTools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["code_execution","file_search","search_grounding","image_generation","mcp","web_fetch","tool_search","hosted_shell"]},"capability":{"type":"string","enum":["supportsCodeExecution","supportsFileSearch","supportsSearchGrounding","supportsMcp","supportsImageGenerationTool","supportsWebFetch","supportsToolSearch","supportsHostedShell"]},"category":{"type":"string"},"command":{"type":"string"},"description":{"type":"string"},"label":{"type":"string"},"requiresConfiguration":{"type":"boolean"},"configurationKind":{"type":"string","enum":["file_search","mcp"]}},"required":["id","capability","category","command","description","label"],"additionalProperties":false}},"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["Research","Creative","Code","Productivity","Automation","Collaboration","Other"]},"isDefault":{"type":"boolean"},"type":{"type":"string","enum":["normal","premium","byok"]}},"required":["id","name","description","category"],"additionalProperties":false}},"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"kind":{"type":"string","enum":["automate","integrate"]},"category":{"type":"string","enum":["Calendar","Community","Developer","Email","Finance","Health","Home","Productivity","Scheduling","Shopping","Students","To-dos","Travel"]},"featured":{"type":"boolean"},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"name":{"type":"string"}},"required":["id","providerId","name"],"additionalProperties":false}}},"required":["id","title","summary","kind","category","featured","integrations"],"additionalProperties":false}}},"required":["experiences","modelTools","tools","recipes"],"additionalProperties":false}}}}},"hide":false}},"/uploads":{"post":{"operationId":"postUploads","tags":["uploads"],"summary":"Upload file","description":"Upload an image, audio, code, or document to the server","responses":{"200":{"description":"File upload successful, returns the URL","content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string"},"key":{"type":"string"},"url":{"type":"string"},"type":{"type":"string","enum":["image","document","audio","video","code","markdown_document"]},"name":{"type":"string"},"markdown":{"type":"string"}},"required":["sourceId","key","url","type"],"additionalProperties":false}}}},"400":{"description":"Bad request or invalid file","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"500":{"description":"Server error or storage failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/account":{"patch":{"operationId":"patchAccount","tags":["account"],"summary":"Update account settings","responses":{"200":{"description":"Settings updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"nickname":{"type":["string","null"]},"job_role":{"type":["string","null"]},"location":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"traits":{"type":["string","null"]},"preferences":{"type":["string","null"]},"response_style":{"type":"object","properties":{"tone":{"default":"default","type":"string","enum":["default","professional","friendly","candid","quirky","efficient","nerdy","cynical"]},"warmth":{"default":"default","type":"string","enum":["default","more","less"]},"enthusiasm":{"default":"default","type":"string","enum":["default","more","less"]},"emoji":{"default":"default","type":"string","enum":["default","more","less"]},"formatting":{"default":"default","type":"string","enum":["default","more","less"]}}},"tracking_enabled":{"type":"boolean"},"advertise_machines":{"type":"boolean"},"share_machines_with_work":{"type":"boolean"},"guardrails_enabled":{"type":"boolean"},"guardrails_provider":{"type":"string","enum":["model","bedrock","shieldstral"]},"bedrock_guardrail_id":{"type":"string"},"bedrock_guardrail_version":{"type":"string"},"embedding_provider":{"type":"string","enum":["vectorize","s3vectors","dynamodb-vectors"]},"bedrock_knowledge_base_id":{"type":"string"},"bedrock_knowledge_base_custom_data_source_id":{"type":"string"},"bedrock_agent_runtime_arn":{"type":"string"},"bedrock_agent_role_arn":{"type":"string"},"s3vectors_bucket_name":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$"},"s3vectors_index_name":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$"},"s3vectors_region":{"type":"string","maxLength":64,"pattern":"^[a-z]{2}(?:-[a-z0-9]+)+-\\d$"},"dynamodb_vectors_table_name":{"type":"string","minLength":3,"maxLength":255,"pattern":"^[a-zA-Z0-9_.-]+$"},"dynamodb_vectors_index_name":{"type":"string","minLength":3,"maxLength":255,"pattern":"^[a-zA-Z0-9_.-]+$"},"dynamodb_vectors_region":{"type":"string","maxLength":64,"pattern":"^[a-z]{2}(?:-[a-z0-9]+)+-\\d$"},"memories_save_enabled":{"type":"boolean"},"memories_chat_history_enabled":{"type":"boolean"},"temporary_chats_default":{"type":"boolean"},"web_search_enabled":{"type":"boolean"},"source_search_enabled":{"type":"boolean"},"memory_provider":{"type":"string","enum":["documents","hindsight","honcho"]},"transcription_vocabulary":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"speech_voice":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"speech_expressiveness":{"anyOf":[{"type":"number","minimum":1,"maximum":5},{"type":"null"}]},"search_provider":{"anyOf":[{"type":"string","enum":["serper","tavily","parallel","duckduckgo","perplexity","exa","greenpt","cloudflare","cloudflare-ai-search"]},{"type":"string","const":""}]},"sandbox_model":{"type":"string"},"default_model_tier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"default_model_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"default_compute_site":{"anyOf":[{"type":"string","enum":["hosted","browser","device","machine"]},{"type":"null"}]},"last_model_selection":{"anyOf":[{"type":"object","properties":{"modelId":{"type":"string","minLength":1,"maxLength":512},"name":{"type":"string","minLength":1,"maxLength":512},"provider":{"type":"string","maxLength":128},"computeSite":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1,"maxLength":256},"locationLabel":{"type":"string","minLength":1,"maxLength":512},"originInstallationId":{"type":"string","maxLength":128}},"required":["modelId","name","computeSite","locationLabel"]},{"type":"null"}]},"pet_source":{"type":"string","enum":["preset","custom"]},"pet_id":{"type":"string","minLength":1,"maxLength":60},"pet_travel_enabled":{"type":"boolean"},"pet_animation_enabled":{"type":"boolean"},"pet_model_overrides":{"type":"object","properties":{"states":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"object","properties":{"pet_source":{"type":"string","enum":["preset","custom"]},"pet_id":{"type":"string","minLength":1,"maxLength":60}},"required":["pet_source","pet_id"]}},"families":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"object","properties":{"pet_source":{"type":"string","enum":["preset","custom"]},"pet_id":{"type":"string","minLength":1,"maxLength":60}},"required":["pet_source","pet_id"]}},"providers":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"object","properties":{"pet_source":{"type":"string","enum":["preset","custom"]},"pet_id":{"type":"string","minLength":1,"maxLength":60}},"required":["pet_source","pet_id"]}},"makers":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"object","properties":{"pet_source":{"type":"string","enum":["preset","custom"]},"pet_id":{"type":"string","minLength":1,"maxLength":60}},"required":["pet_source","pet_id"]}}}},"tool_rules":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"toolName":{"type":"string","minLength":1,"maxLength":200},"level":{"type":"string","enum":["act","act_if_asked","ask","hand_off"],"description":"act runs without asking; act_if_asked runs without asking only on turns the owner started; ask always asks first; hand_off never runs and leaves the step to the owner. Workspace-required approvals and sends, spending, deletes, credentials and exports still ask."}},"required":["toolName","level"]}},"onboarding_seen":{"type":"array","items":{"type":"string"}}}}}}}}},"/account/export":{"get":{"operationId":"getAccountExport","tags":["account"],"summary":"Export chat history","description":"Returns a JSON file containing the user's chat history.","responses":{"200":{"description":"JSON file with chat history"}},"hide":false}},"/api_keys":{"get":{"operationId":"getApiKeys","tags":["account"],"summary":"List API keys","responses":{"200":{"description":"Successful response"}},"hide":false},"post":{"operationId":"postApiKeys","tags":["account"],"summary":"Create an API key","description":"Returns the plaintext key once. Only its metadata is kept.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}}}}}}}},"/api_keys/{api_key_id}":{"delete":{"operationId":"deleteApiKeysByApiKeyId","tags":["account"],"summary":"Delete an API key","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"api_key_id","schema":{"type":"string","minLength":1},"required":true}]}},"/providers":{"get":{"operationId":"getProviders","tags":["account"],"summary":"List the providers the user can configure","description":"The page also carries sync_status: whether the user's catalogue is missing configurable providers.","responses":{"200":{"description":"Successful response"}},"hide":false}},"/providers/sync":{"post":{"operationId":"postProvidersSync","tags":["account"],"summary":"Sync providers","description":"Adds any configurable provider the user does not have yet.","responses":{"200":{"description":"Successful response"}},"hide":false}},"/providers/{provider_id}":{"patch":{"operationId":"patchProvidersByProviderId","tags":["account"],"summary":"Store a provider's credentials","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"provider_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string"},"secretKey":{"type":["string","null"]},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["apiKey"]}}}}},"delete":{"operationId":"deleteProvidersByProviderId","tags":["account"],"summary":"Delete a provider's credentials","description":"Deletes the stored key and disables the provider for the user.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"provider_id","schema":{"type":"string","minLength":1},"required":true}]}},"/devices":{"post":{"operationId":"postDevices","tags":["devices"],"summary":"Register an iOS push device","description":"Registering the same token again refreshes it.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^[a-fA-F0-9]{32,256}$"},"environment":{"type":"string","enum":["sandbox","production"]},"appBundleId":{"type":"string","minLength":3,"maxLength":200}},"required":["token","environment","appBundleId"]}}}}}},"/devices/{device_id}":{"delete":{"operationId":"deleteDevicesByDeviceId","tags":["devices"],"summary":"Unregister an iOS push device","description":"The device id is the push token it registered with.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"device_id","schema":{"type":"string","pattern":"^[a-fA-F0-9]{32,256}$"},"required":true}]}},"/usage/balance":{"get":{"operationId":"getUsageBalance","tags":["usage"],"summary":"Get the current credit balance","description":"Included, used, reserved and overage credits for the period.","responses":{"200":{"description":"Credit balance","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"resets_at":{"type":"string"},"plan_id":{"type":["string","null"]},"credits":{"type":"object","properties":{"included":{"type":"number"},"used":{"type":"number"},"reserved":{"type":"number"},"grace":{"type":"number"},"overrun":{"type":"number"},"overage":{"type":"number"},"overage_enabled":{"type":"boolean"},"state":{"type":"string","enum":["ok","reserve","overage","exhausted"]}},"required":["included","used","reserved","grace","overrun","overage","overage_enabled","state"],"additionalProperties":false},"credit_micros":{"type":"object","properties":{"included":{"type":"number"},"spent":{"type":"number"},"reserved":{"type":"number"},"grace":{"type":"number"},"overrun":{"type":"number"},"overage":{"type":"number"}},"required":["included","spent","reserved","grace","overrun","overage"],"additionalProperties":false},"last_event_at":{"type":["string","null"]}},"required":["period","resets_at","plan_id","credits","credit_micros","last_event_at"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"period","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}]}},"/usage/summary":{"get":{"operationId":"getUsageSummary","tags":["usage"],"summary":"Summarise usage for a period","description":"Spend for a billing period grouped by source and vendor. Pass workspace_id for a workspace's spend, also grouped by project; owners and administrators only.","responses":{"200":{"description":"Usage summary","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"totals":{"type":"object","properties":{"cost_micros":{"type":"number"},"credit_micros":{"type":"number"},"credits":{"type":"number"},"event_count":{"type":"number"}},"required":["cost_micros","credit_micros","credits","event_count"],"additionalProperties":false},"by_source":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"cost_micros":{"type":"number"},"credit_micros":{"type":"number"},"credits":{"type":"number"},"event_count":{"type":"number"}},"required":["key","cost_micros","credit_micros","credits","event_count"],"additionalProperties":false}},"by_vendor":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"cost_micros":{"type":"number"},"credit_micros":{"type":"number"},"credits":{"type":"number"},"event_count":{"type":"number"}},"required":["key","cost_micros","credit_micros","credits","event_count"],"additionalProperties":false}},"by_project":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"cost_micros":{"type":"number"},"credit_micros":{"type":"number"},"credits":{"type":"number"},"event_count":{"type":"number"}},"required":["key","cost_micros","credit_micros","credits","event_count"],"additionalProperties":false}}},"required":["period","totals","by_source","by_vendor","by_project"],"additionalProperties":false},{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"totals":{"type":"object","properties":{"cost_micros":{"type":"number"},"credit_micros":{"type":"number"},"credits":{"type":"number"},"event_count":{"type":"number"}},"required":["cost_micros","credit_micros","credits","event_count"],"additionalProperties":false},"by_source":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"cost_micros":{"type":"number"},"credit_micros":{"type":"number"},"credits":{"type":"number"},"event_count":{"type":"number"}},"required":["key","cost_micros","credit_micros","credits","event_count"],"additionalProperties":false}},"by_vendor":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"cost_micros":{"type":"number"},"credit_micros":{"type":"number"},"credits":{"type":"number"},"event_count":{"type":"number"}},"required":["key","cost_micros","credit_micros","credits","event_count"],"additionalProperties":false}}},"required":["period","totals","by_source","by_vendor"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"period","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"in":"query","name":"workspace_id","schema":{"type":"string","minLength":1}}]}},"/usage/events":{"get":{"operationId":"getUsageEvents","tags":["usage"],"summary":"List usage ledger events","responses":{"200":{"description":"Usage events","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"occurred_at":{"type":"string"},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"vendor":{"type":"string"},"resource":{"type":"string"},"unit":{"type":"string","enum":["input_tokens","output_tokens","cached_input_tokens","cache_write_tokens","cache_write_5m_tokens","cache_write_1h_tokens","reasoning_tokens","audio_input_tokens","audio_output_tokens","image_input_tokens","video_input_tokens","tool_use_prompt_tokens","long_context_input_tokens","long_context_output_tokens","long_context_cached_input_tokens","long_context_cache_write_tokens","web_search_requests","web_fetch_requests","code_execution_seconds","file_search_requests","computer_use_requests","image_generation_calls","search_sources","search_queries","grounded_requests","search_units","images","video_seconds","audio_seconds","characters","pages","embedding_tokens","transcription_seconds","speech_characters","requests","container_vcpu_seconds","container_gib_seconds","container_disk_gb_seconds","container_egress_gb","do_requests","do_gb_seconds","do_rows_read","do_rows_written","d1_rows_read","d1_rows_written","r2_class_a_ops","r2_class_b_ops","r2_gb_month","vectorize_queried_dimensions","vectorize_stored_dimensions","queue_operations","worker_requests","worker_cpu_ms","ai_neurons","analytics_data_points","usd_micros"]},"quantity":{"type":"number"},"cost_micros":{"type":"number"},"credit_micros":{"type":"number"},"credits":{"type":"number"},"billable":{"type":"boolean"},"byok":{"type":"boolean"},"estimated":{"type":"boolean"},"vendor_units":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"reason":{"anyOf":[{"type":"string","enum":["ran_off_platform"]},{"type":"null"}]},"site":{"anyOf":[{"type":"string","enum":["hosted","browser","device","machine"]},{"type":"null"}]},"conversation_id":{"type":["string","null"]},"project_id":{"type":["string","null"]},"workspace_id":{"type":["string","null"]}},"required":["id","occurred_at","period","source","vendor","resource","unit","quantity","cost_micros","credit_micros","credits","billable","byok","estimated","vendor_units","reason","site","conversation_id","project_id","workspace_id"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["object","data","has_more","last_id","period"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}},{"in":"query","name":"period","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"in":"query","name":"source","schema":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]}}]},"post":{"operationId":"postUsageEvents","tags":["usage"],"summary":"Record an off-platform model run","description":"Records a zero-cost ledger event for a model that ran outside the hosted service.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"completion_id":{"type":"string","minLength":1},"message_id":{"type":"string","minLength":1},"provenance":{"type":"object","properties":{"site":{"type":"string","enum":["hosted","browser","device","machine"]},"machineId":{"type":"string","minLength":1},"vendor":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1}},"required":["site","model"]}},"required":["completion_id","message_id","provenance"]}}}}}},"/pets":{"get":{"operationId":"getPets","tags":["pets"],"summary":"List pets","description":"The pets the user has uploaded or generated, newest first.","responses":{"200":{"description":"Pets","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"origin":{"type":"string","enum":["upload","generated"]},"sheet_url":{"type":"string","minLength":1},"layout_id":{"type":"string","minLength":1},"prompt":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","name","description","origin","sheet_url","layout_id","prompt","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":8,"type":"integer","minimum":1,"maximum":50}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postPets","tags":["pets"],"summary":"Create a pet","description":"Stores an uploaded or generated sprite sheet as a pet. Send multipart form data.","responses":{"201":{"description":"The pet","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"origin":{"type":"string","enum":["upload","generated"]},"sheet_url":{"type":"string","minLength":1},"layout_id":{"type":"string","minLength":1},"prompt":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","name","description","origin","sheet_url","layout_id","prompt","created_at"],"additionalProperties":false}}}}},"hide":false}},"/pets/generate":{"post":{"operationId":"postPetsGenerate","tags":["pets"],"summary":"Generate a pet image","description":"Generates a mascot image from a description, ready to compose into a sheet.","responses":{"200":{"description":"The generated image and its seed","content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["image","seed"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","maxLength":500},"prompt":{"type":"string","minLength":1,"maxLength":500}},"required":["name","prompt"]}}}}}},"/pets/import":{"post":{"operationId":"postPetsImport","tags":["pets"],"summary":"Import a pet from a pet.json address","description":"Fetches a Codex or Polychat pet.json manifest and the sprite sheet beside it from a public address and keeps them as your pet.","responses":{"201":{"description":"The pet","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"origin":{"type":"string","enum":["upload","generated"]},"sheet_url":{"type":"string","minLength":1},"layout_id":{"type":"string","minLength":1},"prompt":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","name","description","origin","sheet_url","layout_id","prompt","created_at"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"Address of a Codex or Polychat pet.json manifest"}},"required":["url"]}}}}}},"/pets/poses":{"post":{"operationId":"postPetsPoses","tags":["pets"],"summary":"Draw a generated pet in each pose","description":"Redraws a generated pet in the greet, think, work, speak, cheer, fret and doze poses with the same seed, so each row of its sheet shows a real expression. Poses that fail are left out.","responses":{"200":{"description":"Pose images by clip","content":{"application/json":{"schema":{"type":"object","properties":{"poses":{"type":"object","propertyNames":{"type":"string","enum":["greet","think","work","speak","cheer","fret","doze"]},"additionalProperties":{"type":"string"}}},"required":["poses"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":500},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["prompt","seed"]}}}}}},"/pets/{pet_id}":{"get":{"operationId":"getPetsByPetId","tags":["pets"],"summary":"Read a pet","responses":{"200":{"description":"The pet","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"origin":{"type":"string","enum":["upload","generated"]},"sheet_url":{"type":"string","minLength":1},"layout_id":{"type":"string","minLength":1},"prompt":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","name","description","origin","sheet_url","layout_id","prompt","created_at"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"pet_id","schema":{"type":"string","minLength":1},"required":true}]},"delete":{"operationId":"deletePetsByPetId","tags":["pets"],"summary":"Delete a pet","description":"Deletes the pet and its sprite sheet.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"pet_id","schema":{"type":"string","minLength":1},"required":true}]}},"/pets/{pet_id}/sheet":{"get":{"operationId":"getPetsByPetIdSheet","tags":["pets"],"summary":"Read a pet's sprite sheet","responses":{"200":{"description":"The sprite sheet image"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"pet_id","schema":{"type":"string","minLength":1},"required":true}]}},"/plans":{"get":{"operationId":"getPlans","tags":["plans"],"summary":"List subscription plans","responses":{"200":{"description":"Plans","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"number"},"stripe_price_id":{"type":"string"},"included_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"grace_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"overage_available":{"type":"boolean"}},"required":["id","name","description","price","stripe_price_id","included_credits","grace_credits","overage_available"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false}},"/plans/{plan_id}":{"get":{"operationId":"getPlansByPlanId","tags":["plans"],"summary":"Get a subscription plan","responses":{"200":{"description":"The plan","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"number"},"stripe_price_id":{"type":"string"},"included_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"grace_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"overage_available":{"type":"boolean"}},"required":["id","name","description","price","stripe_price_id","included_credits","grace_credits","overage_available"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"plan_id","schema":{"type":"string","minLength":1},"required":true}]}},"/plans/{plan_id}/credits":{"patch":{"operationId":"patchPlansByPlanIdCredits","tags":["plans","admin"],"summary":"Set plan credits and Stripe metering configuration","description":"Set included credits, grace credits, the Stripe meter event name and the overage price for a plan. Admins only.","responses":{"200":{"description":"Plan updated","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"status":{"type":"string","enum":["success","error"]},"name":{"type":"string"},"content":{"type":["string","null"]},"data":{}},"required":["status"],"additionalProperties":false}},"required":["response"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"plan_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"included_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"grace_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"stripe_meter_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"overage_price_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}}}},"/flags/bootstrap":{"get":{"operationId":"getFlagsBootstrap","tags":["flags"],"summary":"Evaluate every registered flag and experiment for the caller","description":"Returns the caller's assignments so clients can seed their OpenFeature provider with the same bucketing the API uses.","responses":{"200":{"description":"Flag evaluations for the caller","content":{"application/json":{"schema":{"type":"object","properties":{"targetingKey":{"type":"string"},"evaluations":{"type":"array","items":{"type":"object","properties":{"flagKey":{"type":"string"},"value":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"variant":{"type":"string"},"reason":{"type":"string"}},"required":["flagKey","value","reason"],"additionalProperties":false}}},"required":["evaluations"],"additionalProperties":false}}}}},"hide":false}},"/billing/subscription":{"get":{"operationId":"getBillingSubscription","tags":["billing"],"summary":"Get the caller's subscription","responses":{"200":{"description":"Subscription details"}},"hide":false},"patch":{"operationId":"patchBillingSubscription","tags":["billing"],"summary":"Update the subscription","description":"Turns metered overage billing on or off, or schedules (cancel_at_period_end: true) or withdraws (false) cancellation at period end.","responses":{"200":{"description":"Subscription updated","content":{"application/json":{"schema":{"type":"object","properties":{"overage_enabled":{"type":"boolean"},"status":{"type":"string"},"cancel_at_period_end":{"type":"boolean"},"days_until_due":{"type":"number"}},"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overage_enabled":{"type":"boolean"},"cancel_at_period_end":{"type":"boolean"}}}}}}}},"/billing/checkout_sessions":{"post":{"operationId":"postBillingCheckoutSessions","tags":["billing"],"summary":"Start a Stripe Checkout session for a subscription","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan_id":{"type":"string"},"success_url":{"type":"string","format":"uri"},"cancel_url":{"type":"string","format":"uri"}},"required":["plan_id","success_url","cancel_url"]}}}}}},"/billing/portal_sessions":{"post":{"operationId":"postBillingPortalSessions","tags":["billing"],"summary":"Open a Stripe billing portal session","responses":{"200":{"description":"Billing portal session","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"return_url":{"type":"string","format":"uri"}},"required":["return_url"]}}}}}},"/skills":{"get":{"operationId":"getSkills","tags":["skills"],"summary":"List skills available to your own conversations","description":"Every skill with whether it is ready for this user's own conversations. Project skills are managed through project capabilities.","responses":{"200":{"description":"Successful response"}},"hide":false}},"/skills/guides":{"get":{"operationId":"getSkillsGuides","tags":["skills"],"summary":"List place guides","description":"The built-in guide skill for each place, with the opening shown as its first message and its starter prompts.","responses":{"200":{"description":"Place guides","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"place":{"type":"string","enum":["conversations","discover","sites","attention","files","teammates","plugins","scheduled","you"]},"skillId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"opening":{"type":"string","minLength":1},"starters":{"maxItems":6,"type":"array","items":{"type":"string","minLength":1}}},"required":["place","skillId","name","opening","starters"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false}},"/skills/documents":{"get":{"operationId":"getSkillsDocuments","tags":["skills"],"summary":"List authored skills","description":"Personal authored skills, or a project's skills when project_id is set.","responses":{"200":{"description":"Authored skills","content":{"application/json":{"schema":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"scope":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"personal"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["type","projectId"],"additionalProperties":false}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","name","description","scope","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["skills"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postSkillsDocuments","tags":["skills"],"summary":"Create an authored skill","description":"Send content to write a skill, source to import an authorised revision from another scope, or recordingId to draft a disabled personal skill from a supervised teaching session.","responses":{"200":{"description":"The skill","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"scope":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"personal"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["type","projectId"],"additionalProperties":false}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"content":{"type":"string","minLength":1},"resources":{"default":[],"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512,"pattern":"^(references|scripts|assets)\\/[^/]+(?:\\/[^/]+)*$"},"content":{"type":"string","minLength":1,"maxLength":131072}},"required":["path","content"],"additionalProperties":false}}},"required":["id","name","description","scope","createdByUserId","createdAt","updatedAt","content","resources"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"scope":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"personal"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["type","projectId"],"additionalProperties":false}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"content":{"type":"string","minLength":1},"resources":{"default":[],"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512,"pattern":"^(references|scripts|assets)\\/[^/]+(?:\\/[^/]+)*$"},"content":{"type":"string","minLength":1,"maxLength":131072}},"required":["path","content"],"additionalProperties":false}},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1},"skillId":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size":{"type":"integer","minimum":0,"maximum":4194304},"description":{"type":"string","minLength":1,"maxLength":1024},"changeNote":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"sourceSkillId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","skillId","revision","digest","size","description","changeNote","sourceSkillId","sourceRevisionId","createdByUserId","createdAt"],"additionalProperties":false},"state":{"type":"object","properties":{"draftRevisionId":{"type":"string","minLength":1},"stableRevisionId":{"type":"string","minLength":1},"stateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["draftRevisionId","stableRevisionId","stateVersion"],"additionalProperties":false}},"required":["id","name","description","scope","createdByUserId","createdAt","updatedAt","content","resources","revision","state"],"additionalProperties":false}]}}}},"400":{"description":"Teaching drafts are personal","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":131072},"resources":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512,"pattern":"^(references|scripts|assets)\\/[^/]+(?:\\/[^/]+)*$"},"content":{"type":"string","minLength":1,"maxLength":131072}},"required":["path","content"]}}},"required":["content"]},{"type":"object","properties":{"source":{"type":"object","properties":{"scope":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"personal"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["type","projectId"]}]},"skillId":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"revisionId":{"type":"string","minLength":1}},"required":["scope","skillId","revisionId"]}},"required":["source"]},{"type":"object","properties":{"teammateContextId":{"type":"string","minLength":1},"recordingId":{"type":"string","pattern":"^teaching_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"computerFence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"steps":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":2000}}},"required":["teammateContextId","recordingId","computerFence","name","description"]}]}}}}}},"/skills/documents/{document_id}":{"get":{"operationId":"getSkillsDocumentsByDocumentId","tags":["skills"],"summary":"Get an authored skill","responses":{"200":{"description":"The skill","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"scope":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"personal"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["type","projectId"],"additionalProperties":false}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"content":{"type":"string","minLength":1},"resources":{"default":[],"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512,"pattern":"^(references|scripts|assets)\\/[^/]+(?:\\/[^/]+)*$"},"content":{"type":"string","minLength":1,"maxLength":131072}},"required":["path","content"],"additionalProperties":false}}},"required":["id","name","description","scope","createdByUserId","createdAt","updatedAt","content","resources"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"patch":{"operationId":"patchSkillsDocumentsByDocumentId","tags":["skills"],"summary":"Update an authored skill","responses":{"200":{"description":"The skill","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"scope":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"personal"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["type","projectId"],"additionalProperties":false}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"content":{"type":"string","minLength":1},"resources":{"default":[],"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512,"pattern":"^(references|scripts|assets)\\/[^/]+(?:\\/[^/]+)*$"},"content":{"type":"string","minLength":1,"maxLength":131072}},"required":["path","content"],"additionalProperties":false}}},"required":["id","name","description","scope","createdByUserId","createdAt","updatedAt","content","resources"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":131072},"resources":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512,"pattern":"^(references|scripts|assets)\\/[^/]+(?:\\/[^/]+)*$"},"content":{"type":"string","minLength":1,"maxLength":131072}},"required":["path","content"]}}},"required":["content"]}}}}},"delete":{"operationId":"deleteSkillsDocumentsByDocumentId","tags":["skills"],"summary":"Delete an authored skill","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/skills/documents/{document_id}/revisions":{"get":{"operationId":"getSkillsDocumentsByDocumentIdRevisions","tags":["skills"],"summary":"List a skill's revisions","responses":{"200":{"description":"Revision history","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"scope":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"personal"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["type","projectId"],"additionalProperties":false}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","name","description","scope","createdByUserId","createdAt","updatedAt"],"additionalProperties":false},"state":{"type":"object","properties":{"draftRevisionId":{"type":"string","minLength":1},"stableRevisionId":{"type":"string","minLength":1},"stateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["draftRevisionId","stableRevisionId","stateVersion"],"additionalProperties":false},"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"skillId":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size":{"type":"integer","minimum":0,"maximum":4194304},"description":{"type":"string","minLength":1,"maxLength":1024},"changeNote":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"sourceSkillId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","skillId","revision","digest","size","description","changeNote","sourceSkillId","sourceRevisionId","createdByUserId","createdAt"],"additionalProperties":false}}},"required":["skill","state","revisions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/skills/documents/{document_id}/revisions/{revision_id}":{"get":{"operationId":"getSkillsDocumentsByDocumentIdRevisionsByRevisionId","tags":["skills"],"summary":"Get one skill revision","responses":{"200":{"description":"The revision","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"scope":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"personal"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["type","projectId"],"additionalProperties":false}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"content":{"type":"string","minLength":1},"resources":{"default":[],"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512,"pattern":"^(references|scripts|assets)\\/[^/]+(?:\\/[^/]+)*$"},"content":{"type":"string","minLength":1,"maxLength":131072}},"required":["path","content"],"additionalProperties":false}},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1},"skillId":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size":{"type":"integer","minimum":0,"maximum":4194304},"description":{"type":"string","minLength":1,"maxLength":1024},"changeNote":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"sourceSkillId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","skillId","revision","digest","size","description","changeNote","sourceSkillId","sourceRevisionId","createdByUserId","createdAt"],"additionalProperties":false},"state":{"type":"object","properties":{"draftRevisionId":{"type":"string","minLength":1},"stableRevisionId":{"type":"string","minLength":1},"stateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["draftRevisionId","stableRevisionId","stateVersion"],"additionalProperties":false}},"required":["id","name","description","scope","createdByUserId","createdAt","updatedAt","content","resources","revision","state"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"path","name":"revision_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/skills/documents/{document_id}/draft":{"patch":{"operationId":"patchSkillsDocumentsByDocumentIdDraft","tags":["skills"],"summary":"Save a draft without activating it","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":131072},"resources":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512,"pattern":"^(references|scripts|assets)\\/[^/]+(?:\\/[^/]+)*$"},"content":{"type":"string","minLength":1,"maxLength":131072}},"required":["path","content"]}},"expectedStateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"changeNote":{"type":"string","minLength":1,"maxLength":1024}},"required":["content","expectedStateVersion"]}}}}}},"/skills/documents/{document_id}/promote":{"post":{"operationId":"postSkillsDocumentsByDocumentIdPromote","tags":["skills"],"summary":"Promote the current draft","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedStateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revisionId","expectedStateVersion"]}}}}}},"/skills/documents/{document_id}/rollback":{"post":{"operationId":"postSkillsDocumentsByDocumentIdRollback","tags":["skills"],"summary":"Roll back through a new immutable revision","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedStateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"changeNote":{"type":"string","minLength":1,"maxLength":1024}},"required":["revisionId","expectedStateVersion"]}}}}}},"/skills/{skill_id}":{"patch":{"operationId":"patchSkillsBySkillId","tags":["skills"],"summary":"Turn a skill on or off","description":"Always-on skills cannot be changed.","responses":{"200":{"description":"The skill","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":1024},"category":{"type":"string","enum":["Output","Automation","Research","Reasoning","Development","Communication","Data","Guide","Other"]},"tags":{"default":[],"type":"array","items":{"type":"string"}},"alwaysOn":{"default":false,"type":"boolean"},"activation":{"type":"string","enum":["on-demand","per-message"]},"requirement":{"type":"object","properties":{"modelCapabilities":{"default":[],"type":"array","items":{"type":"string"}},"tools":{"default":[],"type":"array","items":{"type":"string"}},"suggestedTools":{"default":[],"type":"array","items":{"type":"string"}}},"required":["modelCapabilities","tools","suggestedTools"],"additionalProperties":false},"source":{"type":"string","enum":["built-in","user-authored"]},"state":{"type":"string","enum":["ready","disabled","unavailable"]},"reason":{"type":"string","minLength":1}},"required":["id","name","description","category","tags","alwaysOn","requirement","state","reason"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"skill_id","schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}}}},"/sources/project_context":{"patch":{"operationId":"patchSourcesProjectContext","tags":["sources"],"summary":"Set a project's context sources","responses":{"200":{"description":"Context sources","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1},"sourceIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["project_id","sourceIds"],"additionalProperties":false}}}}}},"/sources/knowledge_settings":{"get":{"operationId":"getSourcesKnowledgeSettings","tags":["sources"],"summary":"Read knowledge settings","description":"Which enrichers run on new documents in your library or a project, and which connected knowledge bases are searched alongside it.","responses":{"200":{"description":"Knowledge settings","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":["string","null"]},"enrichers":{"type":"object","properties":{"summary":{"default":true,"type":"boolean"},"classify":{"default":true,"type":"boolean"},"relate":{"default":true,"type":"boolean"}},"required":["summary","classify","relate"],"additionalProperties":false},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"connected":{"type":"boolean"},"attached":{"type":"boolean"}},"required":["provider","name","connected","attached"],"additionalProperties":false}},"canManage":{"type":"boolean"}},"required":["projectId","enrichers","providers","canManage"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"patch":{"operationId":"patchSourcesKnowledgeSettings","tags":["sources"],"summary":"Change knowledge settings","responses":{"200":{"description":"Knowledge settings","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":["string","null"]},"enrichers":{"type":"object","properties":{"summary":{"default":true,"type":"boolean"},"classify":{"default":true,"type":"boolean"},"relate":{"default":true,"type":"boolean"}},"required":["summary","classify","relate"],"additionalProperties":false},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"connected":{"type":"boolean"},"attached":{"type":"boolean"}},"required":["provider","name","connected","attached"],"additionalProperties":false}},"canManage":{"type":"boolean"}},"required":["projectId","enrichers","providers","canManage"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1},"enrichers":{"type":"object","properties":{"summary":{"default":true,"type":"boolean"},"classify":{"default":true,"type":"boolean"},"relate":{"default":true,"type":"boolean"}},"additionalProperties":false},"providers":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"attached":{"type":"boolean"}},"required":["provider","attached"],"additionalProperties":false}}},"additionalProperties":false}}}}}},"/sources":{"get":{"operationId":"getSources","tags":["sources"],"summary":"List sources","description":"Personal sources, or a project's when project_id is set. scope=context lists the project's context collection; scope=conversation lists the available context sources in full, as conversations read them.","responses":{"200":{"description":"Sources","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"kind","schema":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]}},{"in":"query","name":"generation","schema":{"type":"string","enum":["podcast","studio","model","drawing"]}},{"in":"query","name":"scope","schema":{"default":"all","type":"string","enum":["all","context","conversation"]}}]},"post":{"operationId":"postSources","tags":["sources"],"summary":"Create a source","responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"kind":{"type":"string","enum":["file","text","url","connector","repository"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"default":"available","type":"string","enum":["processing","available","failed","archived"]},"content":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"provider":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"metadata":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","title"],"additionalProperties":false}}}}}},"/sources/search":{"get":{"operationId":"getSourcesSearch","tags":["sources"],"summary":"Search project knowledge","responses":{"200":{"description":"Passages","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"chunkId":{"type":"string"},"chunkIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"resultType":{"type":"string","enum":["source","output","memory","external"]},"title":{"type":"string"},"content":{"type":"string"},"type":{"type":"string"},"origin":{"anyOf":[{"type":"string","enum":["upload","manual","note","page","feed","topic","connector","device","generated","evidence","site","research","repository"]},{"type":"null"}]},"provider":{"type":["string","null"]},"score":{"type":"number"},"rankingMethod":{"type":"string"},"provenance":{"type":"object","properties":{"projectId":{"type":["string","null"]},"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"externalUri":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"upstreamRevision":{"anyOf":[{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","minLength":1,"maxLength":200}]},{"type":"null"}]},"lastSyncedAt":{"type":["string","null"]}},"required":["projectId","sourceRevision","externalUri","updatedAt","upstreamRevision","lastSyncedAt"],"additionalProperties":false}},"required":["id","sourceId","chunkId","chunkIndex","resultType","title","content","type","origin","provider","score","rankingMethod","provenance"],"additionalProperties":false}},"external":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"error":{"type":["string","null"]}},"required":["provider","error"],"additionalProperties":false}}},"required":["status","data"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":1000},"required":true},{"in":"query","name":"top_k","schema":{"type":"integer","minimum":1,"maximum":30}},{"in":"query","name":"kinds","schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},{"in":"query","name":"resource_types","schema":{"type":"array","items":{"type":"string","enum":["source","output"]}}},{"in":"query","name":"origins","schema":{"type":"array","items":{"type":"string","enum":["upload","manual","note","page","feed","topic","connector","device","generated","evidence","site","research","repository"]}}},{"in":"query","name":"providers","schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},{"in":"query","name":"collection_ids","schema":{"type":"array","items":{"type":"string","minLength":1}}},{"in":"query","name":"sync_ids","schema":{"type":"array","items":{"type":"string","minLength":1}}},{"in":"query","name":"since","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"in":"query","name":"until","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"in":"query","name":"include_external","schema":{"type":"string","enum":["true","false"]}}]}},"/sources/knowledge_descriptors":{"get":{"operationId":"getSourcesKnowledgeDescriptors","tags":["sources"],"summary":"List document types connector syncs can follow","responses":{"200":{"description":"Document types","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":300},"required":{"type":"boolean"}},"required":["name","label","required"],"additionalProperties":false}},"incremental":{"type":"boolean"}},"required":["id","provider","title","description","parameters","incremental"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"provider","schema":{"type":"string","minLength":1}}]}},"/sources/media_notes":{"post":{"operationId":"postSourcesMediaNotes","tags":["sources"],"summary":"Draft notes from a recording link","description":"Transcribes an audio or video URL and writes the chosen notes as Markdown, ready to drop into a note.","responses":{"200":{"description":"Drafted notes","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Generated notes content in Markdown."}},"required":["content"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The audio/video URL to transcribe and analyze."},"outputs":{"minItems":1,"type":"array","items":{"type":"string","enum":["concise_summary","detailed_outline","key_takeaways","action_items","meeting_minutes","qa_extraction","smart_timestamps"]},"description":"Which outputs to generate. Can select multiple."},"noteType":{"default":"general","description":"Adjusts prompt style for the content type.","type":"string","enum":["general","meeting","training","lecture","interview","recording","webinar","tutorial","video_content","educational_video","documentary","other"]},"extraPrompt":{"description":"Additional instructions.","type":"string"},"timestamps":{"description":"Whether to enable timestamped transcription.","type":"boolean"}},"required":["url","outputs"]}}}}}},"/sources/podcasts":{"post":{"operationId":"postSourcesPodcasts","tags":["sources"],"summary":"Generate a podcast episode from sources","description":"Creates a podcast source that stays processing while two hosts' conversation is written and voiced.","responses":{"200":{"description":"The episode","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"material":{"type":"string","minLength":1,"maxLength":100000},"title":{"type":"string","minLength":1,"maxLength":200},"focus":{"type":"string","maxLength":2000},"format":{"default":"deep_dive","type":"string","enum":["deep_dive","brief","debate","critique"]},"length":{"default":"default","type":"string","enum":["short","default","long"]},"language":{"default":"en","type":"string","minLength":2,"maxLength":10},"showId":{"type":"string","minLength":1}},"additionalProperties":false}}}}}},"/sources/generations":{"post":{"operationId":"postSourcesGenerations","tags":["sources"],"summary":"Generate images, video or model output into Sources","description":"type=studio runs one prompt across several image or video models; type=model runs one model with its own inputs. Each run is a source that stays processing until its media arrives.","responses":{"200":{"description":"Started generations","content":{"application/json":{"schema":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"rejected":{"type":"array","items":{"type":"object","properties":{"error":{"type":"string"},"modelId":{"type":"string"},"modelName":{"type":"string"}},"required":["error"],"additionalProperties":false}}},"required":["sources","rejected"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["image","video"]},"prompt":{"type":"string","minLength":1},"modelIds":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1}},"referenceImages":{"maxItems":8,"type":"array","items":{"type":"string"}},"negativePrompt":{"type":"string"},"aspectRatio":{"type":"string"},"resolution":{"type":"string"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":20},"generateAudio":{"type":"boolean"},"modelOptions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"type":{"type":"string","const":"studio"},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["mode","prompt","modelIds","type"]},{"type":"object","properties":{"modelId":{"type":"string","minLength":1},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"type":"string","const":"model"},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["modelId","input","type"]}]}}}}}},"/sources/generations/models":{"get":{"operationId":"getSourcesGenerationsModels","tags":["sources"],"summary":"List image and video generation models","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"mode","schema":{"default":"image","type":"string","enum":["image","video"]}}]}},"/sources/generations/replicate_models":{"get":{"operationId":"getSourcesGenerationsReplicateModels","tags":["sources"],"summary":"List Replicate models","responses":{"200":{"description":"Successful response"}},"hide":false}},"/sources/drawings":{"post":{"operationId":"postSourcesDrawings","tags":["sources"],"summary":"Paint a sketch into an image source","description":"Keeps the sketch and the painting as image sources.","responses":{"200":{"description":"The painting","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"drawing":{}},"required":["drawing"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"drawing":{}},"required":["drawing"]}}}}}},"/sources/drawings/guess":{"post":{"operationId":"postSourcesDrawingsGuess","tags":["sources"],"summary":"Guess what a sketch shows","responses":{"200":{"description":"The guess","content":{"application/json":{"schema":{"type":"object","properties":{"guess":{"type":"string"}},"required":["guess"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"drawing":{}},"required":["drawing"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"drawing":{}},"required":["drawing"]}}}}}},"/sources/collections":{"get":{"operationId":"getSourcesCollections","tags":["sources"],"summary":"List source collections","responses":{"200":{"description":"Collections","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"kind":{"type":"string","enum":["general","memory","context","podcast","topic","entity"]},"sourceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasFeed":{"type":"boolean"},"readAs":{"anyOf":[{"type":"string","enum":["receipt","invoice","claim"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","title","description","kind","sourceCount","outputCount","hasFeed","readAs","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postSourcesCollections","tags":["sources"],"summary":"Create a source collection","responses":{"200":{"description":"The collection","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"kind":{"type":"string","enum":["general","memory","context","podcast","topic","entity"]},"sourceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasFeed":{"type":"boolean"},"readAs":{"anyOf":[{"type":"string","enum":["receipt","invoice","claim"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","title","description","kind","sourceCount","outputCount","hasFeed","readAs","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"kind":{"default":"general","type":"string","enum":["general","memory","podcast"]}},"required":["title"],"additionalProperties":false}}}}}},"/sources/collections/shared/{token}":{"get":{"operationId":"getSourcesCollectionsSharedByToken","tags":["sources"],"summary":"Read a podcast show's RSS feed","responses":{"200":{"description":"RSS feed"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"token","schema":{"type":"string","minLength":32},"required":true}]}},"/sources/collections/shared/{token}/{source_id}":{"get":{"operationId":"getSourcesCollectionsSharedByTokenBySourceId","tags":["sources"],"summary":"Download a podcast episode from its feed","responses":{"200":{"description":"Episode audio"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"token","schema":{"type":"string","minLength":32},"required":true},{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/collections/shared/{token}/{source_id}/cover":{"get":{"operationId":"getSourcesCollectionsSharedByTokenBySourceIdCover","tags":["sources"],"summary":"Download a podcast episode's cover art from its feed","responses":{"200":{"description":"Cover image"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"token","schema":{"type":"string","minLength":32},"required":true},{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/collections/{collection_id}":{"patch":{"operationId":"patchSourcesCollectionsByCollectionId","tags":["sources"],"summary":"Change a source collection","description":"Rename a folder, or set readAs so every file added to it is read as a receipt, invoice or damage claim.","responses":{"200":{"description":"The collection","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"kind":{"type":"string","enum":["general","memory","context","podcast","topic","entity"]},"sourceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasFeed":{"type":"boolean"},"readAs":{"anyOf":[{"type":"string","enum":["receipt","invoice","claim"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","title","description","kind","sourceCount","outputCount","hasFeed","readAs","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"collection_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"readAs":{"anyOf":[{"type":"string","enum":["receipt","invoice","claim"]},{"type":"null"}]}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteSourcesCollectionsByCollectionId","tags":["sources"],"summary":"Delete a source collection","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"collection_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/collections/{collection_id}/studio":{"post":{"operationId":"postSourcesCollectionsByCollectionIdStudio","tags":["sources"],"summary":"Make a report from a folder","description":"Writes a report from the folder's files. It lands in Made and in the folder.","responses":{"200":{"description":"The pending report","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"output"},"output":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"required":["type","output"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"source"},"source":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"required":["type","source"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"collection_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","const":"report"},"template":{"default":"briefing","type":"string","enum":["briefing","study_guide","faq","blog_post","custom"]},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false}}}}}},"/sources/collections/{collection_id}/feed":{"post":{"operationId":"postSourcesCollectionsByCollectionIdFeed","tags":["sources"],"summary":"Create a private RSS feed link for a podcast show","description":"Returns a new feed URL for podcast apps. Any earlier link for the show stops working.","responses":{"200":{"description":"The feed link","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"collection_id","schema":{"type":"string","minLength":1},"required":true}]},"delete":{"operationId":"deleteSourcesCollectionsByCollectionIdFeed","tags":["sources"],"summary":"Turn off a podcast show's RSS feed","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"collection_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/collections/{collection_id}/sources":{"get":{"operationId":"getSourcesCollectionsByCollectionIdSources","tags":["sources"],"summary":"List a collection's sources","responses":{"200":{"description":"Sources","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"collection_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postSourcesCollectionsByCollectionIdSources","tags":["sources"],"summary":"Add sources to a collection","responses":{"200":{"description":"Sources added","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["added"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"collection_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["sourceIds"],"additionalProperties":false}}}}}},"/sources/collections/{collection_id}/outputs":{"get":{"operationId":"getSourcesCollectionsByCollectionIdOutputs","tags":["sources"],"summary":"List a folder's made items","responses":{"200":{"description":"Made items","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"collection_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postSourcesCollectionsByCollectionIdOutputs","tags":["sources"],"summary":"Add made items to a folder","responses":{"200":{"description":"Made items added","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["added"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"collection_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outputIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["outputIds"],"additionalProperties":false}}}}}},"/sources/knowledge_syncs":{"get":{"operationId":"getSourcesKnowledgeSyncs","tags":["sources"],"summary":"List a project's or a notebook's knowledge syncs","responses":{"200":{"description":"Knowledge syncs","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"notebookId":{"type":["string","null"]},"title":{"type":"string"},"kind":{"type":"string","enum":["connector","rss","news","web"]},"feed":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"rss"},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"news"},"query":{"type":"string","minLength":2,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2}},"required":["kind","query"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"web"},"query":{"type":"string","minLength":2,"maxLength":200}},"required":["kind","query"],"additionalProperties":false}]},{"type":"null"}]},"status":{"type":"string","enum":["active","paused"]},"resourceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cursor":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastSuccessfulAt":{"type":["string","null"]},"lastError":{"type":["string","null"]},"nextSyncAt":{"type":"string"},"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"canManage":{"type":"boolean"}},"required":["id","projectId","notebookId","title","kind","feed","status","resourceCount","cursor","lastSuccessfulAt","lastError","nextSyncAt","intervalMinutes","canManage"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"notebook_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postSourcesKnowledgeSyncs","tags":["sources"],"summary":"Start a knowledge sync","responses":{"200":{"description":"The sync","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"notebookId":{"type":["string","null"]},"title":{"type":"string"},"kind":{"type":"string","enum":["connector","rss","news","web"]},"feed":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"rss"},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"news"},"query":{"type":"string","minLength":2,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2}},"required":["kind","query"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"web"},"query":{"type":"string","minLength":2,"maxLength":200}},"required":["kind","query"],"additionalProperties":false}]},{"type":"null"}]},"status":{"type":"string","enum":["active","paused"]},"resourceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cursor":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastSuccessfulAt":{"type":["string","null"]},"lastError":{"type":["string","null"]},"nextSyncAt":{"type":"string"},"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"canManage":{"type":"boolean"}},"required":["id","projectId","notebookId","title","kind","feed","status","resourceCount","cursor","lastSuccessfulAt","lastError","nextSyncAt","intervalMinutes","canManage"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"notebookId":{"type":"string","minLength":1},"recipeId":{"type":"string","minLength":1,"maxLength":200},"integrationId":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":200},"connectionId":{"type":"string","minLength":1,"maxLength":200},"resources":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"resourceId":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":200},"operation":{"type":"string","minLength":1,"maxLength":200},"documentMapping":{"type":"object","properties":{"id":{"minItems":1,"maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"title":{"minItems":1,"maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"content":{"type":"object","properties":{"path":{"minItems":1,"maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"format":{"default":"text","type":"string","enum":["text","html","base64","json"]}},"additionalProperties":false},"revision":{"minItems":1,"maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"url":{"minItems":1,"maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"urlBase":{"minItems":1,"maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"state":{"type":"object","properties":{"path":{"minItems":1,"maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"archivedValues":{"maxItems":20,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"boolean"},{"type":"number"}]}},"availableValues":{"minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"boolean"},{"type":"number"}]}}},"required":["path","archivedValues"],"additionalProperties":false}},"required":["content"],"additionalProperties":false},"readParameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["resourceId","operation","documentMapping","readParameters"],"additionalProperties":false},{"type":"object","properties":{"resourceId":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":200},"descriptor":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":2000}}},"required":["id","parameters"],"additionalProperties":false}},"required":["resourceId","descriptor"],"additionalProperties":false}]}},"intervalMinutes":{"default":60,"type":"integer","minimum":5,"maximum":1440}},"required":["recipeId","integrationId","title","connectionId","resources"],"additionalProperties":false},{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"notebookId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"feed":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"rss"},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"news"},"query":{"type":"string","minLength":2,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2}},"required":["kind","query"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"web"},"query":{"type":"string","minLength":2,"maxLength":200}},"required":["kind","query"],"additionalProperties":false}]},"intervalMinutes":{"default":360,"type":"integer","minimum":60,"maximum":1440}},"required":["title","feed"],"additionalProperties":false},{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"notebookId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"descriptor":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":2000}}},"required":["id","parameters"],"additionalProperties":false},"intervalMinutes":{"default":180,"type":"integer","minimum":15,"maximum":1440}},"required":["title","descriptor"],"additionalProperties":false}]}}}}}},"/sources/knowledge_syncs/{sync_id}":{"patch":{"operationId":"patchSourcesKnowledgeSyncsBySyncId","tags":["sources"],"summary":"Pause, resume or refresh a knowledge sync","responses":{"200":{"description":"The sync","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"notebookId":{"type":["string","null"]},"title":{"type":"string"},"kind":{"type":"string","enum":["connector","rss","news","web"]},"feed":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"rss"},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"news"},"query":{"type":"string","minLength":2,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2}},"required":["kind","query"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"web"},"query":{"type":"string","minLength":2,"maxLength":200}},"required":["kind","query"],"additionalProperties":false}]},{"type":"null"}]},"status":{"type":"string","enum":["active","paused"]},"resourceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"cursor":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastSuccessfulAt":{"type":["string","null"]},"lastError":{"type":["string","null"]},"nextSyncAt":{"type":"string"},"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"canManage":{"type":"boolean"}},"required":["id","projectId","notebookId","title","kind","feed","status","resourceCount","cursor","lastSuccessfulAt","lastError","nextSyncAt","intervalMinutes","canManage"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"sync_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["pause","resume","refresh"]}},"required":["action"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteSourcesKnowledgeSyncsBySyncId","tags":["sources"],"summary":"Remove a knowledge sync","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"sync_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/{source_id}":{"get":{"operationId":"getSourcesBySourceId","tags":["sources"],"summary":"Read a source","responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchSourcesBySourceId","tags":["sources"],"summary":"Update a source","responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"document":{"type":"object","properties":{"summary":{"type":"string"},"editorial":{"type":"object","properties":{"overall":{"type":"number","minimum":0,"maximum":1},"grade":{"type":"string","enum":["A","B","C","D","E"]},"dimensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1},"provider":{"type":"string"},"model":{"type":"string"}},"required":["overall","grade","dimensions","confidence","provider","model"]},"tags":{"type":"array","items":{"type":"string"}},"keyTopics":{"type":"array","items":{"type":"string"}},"contentType":{"type":"string","enum":["text","list","outline","mixed"]},"sentiment":{"type":"string","enum":["positive","neutral","negative"]},"sourceType":{"type":"string","enum":["manual","assistant","transcription","media","capture"]},"capturedFrom":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"timestamp":{"type":"string"}}}}},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"editSession":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteSourcesBySourceId","tags":["sources"],"summary":"Delete a source","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/{source_id}/knowledge":{"get":{"operationId":"getSourcesBySourceIdKnowledge","tags":["sources"],"summary":"Read a document's knowledge state","description":"Where the document came from, how it is stored and indexed, each enrichment's status, its topics and entities, related documents and its controls.","responses":{"200":{"description":"Knowledge state","content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1},"origin":{"anyOf":[{"type":"string","enum":["upload","manual","note","page","feed","topic","connector","device","generated","evidence","site","research","repository"]},{"type":"null"}]},"upstream":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","minLength":1,"maxLength":100},"externalId":{"type":"string","minLength":1,"maxLength":500},"revision":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"}]},"url":{"type":"string","maxLength":2048},"updatedAt":{"type":"string","maxLength":64},"syncedAt":{"type":"string","maxLength":64}},"required":["provider","externalId"],"additionalProperties":false},{"type":"null"}]},"retrieval":{"type":"string","enum":["included","excluded"]},"expiresAt":{"type":["string","null"]},"sensitivity":{"anyOf":[{"type":"string","enum":["public","personal","internal","confidential"]},{"type":"null"}]},"stored":{"type":"string","enum":["inline","body"]},"characters":{"type":"integer","minimum":0,"maximum":9007199254740991},"indexed":{"type":"string","enum":["pending","lexical","active"]},"enrichments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","done","failed","skipped"]},"at":{"type":["string","null"]},"error":{"type":["string","null"]}},"required":["name","label","status","at","error"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string"},"kind":{"type":"string"}},"required":["id","title","kind"],"additionalProperties":false}},"relations":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1},"relatedSourceId":{"type":"string","minLength":1},"relation":{"type":"string","enum":["cites","duplicates","updates","mentions","derived_from"]},"title":{"type":"string"}},"required":["sourceId","relatedSourceId","relation","title"],"additionalProperties":false}}},"required":["sourceId","origin","upstream","retrieval","expiresAt","sensitivity","stored","characters","indexed","enrichments","collections","relations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchSourcesBySourceIdKnowledge","tags":["sources"],"summary":"Change a document's knowledge controls","description":"Keep a document out of answers, set when it expires or mark how sensitive it is. Confidential documents are never given to teammates.","responses":{"200":{"description":"Knowledge state","content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1},"origin":{"anyOf":[{"type":"string","enum":["upload","manual","note","page","feed","topic","connector","device","generated","evidence","site","research","repository"]},{"type":"null"}]},"upstream":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","minLength":1,"maxLength":100},"externalId":{"type":"string","minLength":1,"maxLength":500},"revision":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"}]},"url":{"type":"string","maxLength":2048},"updatedAt":{"type":"string","maxLength":64},"syncedAt":{"type":"string","maxLength":64}},"required":["provider","externalId"],"additionalProperties":false},{"type":"null"}]},"retrieval":{"type":"string","enum":["included","excluded"]},"expiresAt":{"type":["string","null"]},"sensitivity":{"anyOf":[{"type":"string","enum":["public","personal","internal","confidential"]},{"type":"null"}]},"stored":{"type":"string","enum":["inline","body"]},"characters":{"type":"integer","minimum":0,"maximum":9007199254740991},"indexed":{"type":"string","enum":["pending","lexical","active"]},"enrichments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","done","failed","skipped"]},"at":{"type":["string","null"]},"error":{"type":["string","null"]}},"required":["name","label","status","at","error"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string"},"kind":{"type":"string"}},"required":["id","title","kind"],"additionalProperties":false}},"relations":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1},"relatedSourceId":{"type":"string","minLength":1},"relation":{"type":"string","enum":["cites","duplicates","updates","mentions","derived_from"]},"title":{"type":"string"}},"required":["sourceId","relatedSourceId","relation","title"],"additionalProperties":false}}},"required":["sourceId","origin","upstream","retrieval","expiresAt","sensitivity","stored","characters","indexed","enrichments","collections","relations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"retrieval":{"type":"string","enum":["included","excluded"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"sensitivity":{"anyOf":[{"type":"string","enum":["public","personal","internal","confidential"]},{"type":"null"}]}},"additionalProperties":false}}}}}},"/sources/{source_id}/knowledge/enrich":{"post":{"operationId":"postSourcesBySourceIdKnowledgeEnrich","tags":["sources"],"summary":"Read a document a particular way","description":"Runs one on-request enricher, such as framing for an article or reading for a receipt, invoice or claim. readAs picks the form a reading fills in.","responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enricher":{"type":"string","minLength":1,"maxLength":40},"readAs":{"type":"string","enum":["receipt","invoice","claim"]}},"required":["enricher"],"additionalProperties":false}}}}}},"/sources/{source_id}/knowledge/reprocess":{"post":{"operationId":"postSourcesBySourceIdKnowledgeReprocess","tags":["sources"],"summary":"Process a document again","description":"Runs its enrichers and indexing again where anything is out of date or failed.","responses":{"200":{"description":"Knowledge state","content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1},"origin":{"anyOf":[{"type":"string","enum":["upload","manual","note","page","feed","topic","connector","device","generated","evidence","site","research","repository"]},{"type":"null"}]},"upstream":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","minLength":1,"maxLength":100},"externalId":{"type":"string","minLength":1,"maxLength":500},"revision":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"}]},"url":{"type":"string","maxLength":2048},"updatedAt":{"type":"string","maxLength":64},"syncedAt":{"type":"string","maxLength":64}},"required":["provider","externalId"],"additionalProperties":false},{"type":"null"}]},"retrieval":{"type":"string","enum":["included","excluded"]},"expiresAt":{"type":["string","null"]},"sensitivity":{"anyOf":[{"type":"string","enum":["public","personal","internal","confidential"]},{"type":"null"}]},"stored":{"type":"string","enum":["inline","body"]},"characters":{"type":"integer","minimum":0,"maximum":9007199254740991},"indexed":{"type":"string","enum":["pending","lexical","active"]},"enrichments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","done","failed","skipped"]},"at":{"type":["string","null"]},"error":{"type":["string","null"]}},"required":["name","label","status","at","error"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string"},"kind":{"type":"string"}},"required":["id","title","kind"],"additionalProperties":false}},"relations":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1},"relatedSourceId":{"type":"string","minLength":1},"relation":{"type":"string","enum":["cites","duplicates","updates","mentions","derived_from"]},"title":{"type":"string"}},"required":["sourceId","relatedSourceId","relation","title"],"additionalProperties":false}}},"required":["sourceId","origin","upstream","retrieval","expiresAt","sensitivity","stored","characters","indexed","enrichments","collections","relations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/{source_id}/revisions":{"get":{"operationId":"getSourcesBySourceIdRevisions","tags":["sources"],"summary":"List a note's earlier versions","description":"One entry per editing session, newest first. Only notes and other text keep versions.","responses":{"200":{"description":"Versions","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"},"content":{"type":"string"},"operation":{"type":"string","enum":["created","updated","restored"]},"restoredFromRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","revision","title","content","operation","restoredFromRevision","createdByUserId","createdAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/{source_id}/comments":{"get":{"operationId":"getSourcesBySourceIdComments","tags":["sources"],"summary":"List a note's discussion","responses":{"200":{"description":"Discussion","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"outputId":{"type":["string","null"]},"sourceId":{"type":["string","null"]},"parentId":{"type":["string","null"]},"anchor":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},{"type":"null"}]},"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"body":{"type":"string"},"authorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolved":{"type":"boolean"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mentionedTeammateId":{"type":["string","null"]},"taskId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","outputId","sourceId","parentId","anchor","sourceRevision","body","authorUserId","resolved","revision","mentionedTeammateId","taskId","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"permissions":{"type":"object","properties":{"actorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"canEditDocument":{"type":"boolean"},"canResolveAllThreads":{"type":"boolean"}},"required":["actorUserId","canEditDocument","canResolveAllThreads"],"additionalProperties":false}},"required":["object","data","has_more","last_id","permissions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"after","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postSourcesBySourceIdComments","tags":["sources"],"summary":"Comment on a note","responses":{"200":{"description":"The comment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"outputId":{"type":["string","null"]},"sourceId":{"type":["string","null"]},"parentId":{"type":["string","null"]},"anchor":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},{"type":"null"}]},"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"body":{"type":"string"},"authorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolved":{"type":"boolean"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mentionedTeammateId":{"type":["string","null"]},"taskId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","outputId","sourceId","parentId","anchor","sourceRevision","body","authorUserId","resolved","revision","mentionedTeammateId","taskId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"parentId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"anchor":{"default":null,"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},{"type":"null"}]},"body":{"type":"string","minLength":1,"maxLength":10000},"mentionedTeammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["requestId","expectedRevision","body"],"additionalProperties":false}}}}}},"/sources/{source_id}/comments/{comment_id}":{"patch":{"operationId":"patchSourcesBySourceIdCommentsByCommentId","tags":["sources"],"summary":"Resolve or reopen a thread on a note","responses":{"200":{"description":"The thread","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"outputId":{"type":["string","null"]},"sourceId":{"type":["string","null"]},"parentId":{"type":["string","null"]},"anchor":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":20000},"prefix":{"type":"string","maxLength":64},"suffix":{"type":"string","maxLength":64}},"required":["quote","prefix","suffix"],"additionalProperties":false},{"type":"null"}]},"sourceRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"body":{"type":"string"},"authorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolved":{"type":"boolean"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mentionedTeammateId":{"type":["string","null"]},"taskId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","outputId","sourceId","parentId","anchor","sourceRevision","body","authorUserId","resolved","revision","mentionedTeammateId","taskId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"comment_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolved":{"type":"boolean"}},"required":["expectedRevision","resolved"],"additionalProperties":false}}}}}},"/sources/{source_id}/restore":{"post":{"operationId":"postSourcesBySourceIdRestore","tags":["sources"],"summary":"Bring back an earlier version of a note","description":"Saves the earlier version as the newest one, so nothing in between is lost.","responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revision","expectedRevision"],"additionalProperties":false}}}}}},"/sources/{source_id}/format":{"post":{"operationId":"postSourcesBySourceIdFormat","tags":["sources"],"summary":"Rework a document's text","description":"Tidies the text, or reworks it to the prompt. Returns the new text without saving it.","responses":{"200":{"description":"Reworked text","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"The reworked text. Nothing is saved until you save it."}},"required":["content"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":2000}},"additionalProperties":false}}}}}},"/sources/{source_id}/transcribe":{"post":{"operationId":"postSourcesBySourceIdTranscribe","tags":["sources"],"summary":"Transcribe an audio or video source","description":"Queues a transcript. The source's media metadata reports progress, and the transcript becomes its searchable content.","responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/{source_id}/notes":{"post":{"operationId":"postSourcesBySourceIdNotes","tags":["sources"],"summary":"Write notes for a transcribed source","description":"Summarises the transcript into a summary, decisions and action items.","responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"speakers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":80}}},"additionalProperties":false}}}}}},"/sources/{source_id}/listen":{"post":{"operationId":"postSourcesBySourceIdListen","tags":["sources"],"summary":"Read a source aloud","description":"Narrates the source's text passage by passage. Its listen metadata reports which passages are ready, so playback can start with the first.","responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/{source_id}/cover":{"post":{"operationId":"postSourcesBySourceIdCover","tags":["sources"],"summary":"Generate cover art for a source","responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":1000}},"additionalProperties":false}}}}},"get":{"operationId":"getSourcesBySourceIdCover","tags":["sources"],"summary":"Download a source's cover art","responses":{"200":{"description":"Cover image"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sources/{source_id}/listen/{passage}":{"get":{"operationId":"getSourcesBySourceIdListenByPassage","tags":["sources"],"summary":"Stream one read-aloud passage of a source","responses":{"200":{"description":"Passage audio"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"passage","schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":true}]}},"/sources/{source_id}/content":{"get":{"operationId":"getSourcesBySourceIdContent","tags":["sources"],"summary":"Download a source's file","responses":{"200":{"description":"Source file"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/discover":{"get":{"operationId":"getDiscover","tags":["discover"],"summary":"Read Discover","description":"Your Discover settings and your latest edition, with your feedback on each card.","responses":{"200":{"description":"Discover","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":["string","null"]},"curate":{"type":"string","maxLength":500},"location":{"type":["string","null"]},"listen":{"type":"boolean"},"evening":{"type":"boolean"},"episode":{"type":"string","enum":["off","short","standard","long"]},"style":{"type":"string","enum":["classic","whiteboard","watercolour","retro_print","heritage","papercraft","kawaii","anime"]},"notify":{"type":"boolean"},"sources":{"type":"array","items":{"type":"object","properties":{"providerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string"},"connected":{"type":"boolean"},"used":{"type":"boolean"},"lastReadAt":{"type":["string","null"]},"lastError":{"type":["string","null"]}},"required":["providerId","name","description","connected","used","lastReadAt","lastError"],"additionalProperties":false}},"installationId":{"type":["string","null"]},"episodeCosts":{"anyOf":[{"type":"object","properties":{"short":{"type":"integer","minimum":0,"maximum":9007199254740991},"standard":{"type":"integer","minimum":0,"maximum":9007199254740991},"long":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["short","standard","long"],"additionalProperties":false},{"type":"null"}]}},"required":["enabled","timezone","curate","location","listen","evening","episode","style","notify","sources","installationId","episodeCosts"],"additionalProperties":false},"edition":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"timezone":{"type":"string","minLength":1},"greeting":{"type":"string","minLength":1},"interests":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"}},"required":["topic","reason","sensitive"],"additionalProperties":false}},"brief":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"kind":{"default":"note","description":"What sort of line this is, which sets its icon.","type":"string","enum":["waiting","calendar","topic","weather","on_this_day","note"]},"label":{"type":"string","minLength":1,"description":"A short label such as Waiting on you, Formula 1 or On this day."},"text":{"type":"string","minLength":1,"description":"One line, under twenty words."},"href":{"description":"Where the line leads, if anywhere.","type":"string"}},"required":["kind","label","text"],"additionalProperties":false}},"cards":{"maxItems":160,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"topic"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1,"description":"A headline for today's angle on the topic."},"angle":{"type":"string","minLength":1,"description":"Two sentences on what is new or worth exploring today."},"prompt":{"type":"string","minLength":1,"description":"The first message of a chat that explores this angle."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80},"coverId":{"type":"string","pattern":"^[a-z0-9-]{1,120}$"},"coverageSourceId":{"description":"The comparison of how outlets covered this topic, once one was asked for.","type":"string","minLength":1}},"required":["kind","topic","title","angle","prompt","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"read"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1},"url":{"type":"string","description":"The page, exactly as web search returned it."},"source":{"type":"string","minLength":1,"description":"The publication or site name."},"summary":{"type":"string","minLength":1,"description":"What the page says, in one or two sentences."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80},"sourceId":{"description":"The filed copy of the page in the Discover notebook, when it was read.","type":"string","minLength":1}},"required":["kind","topic","title","url","source","summary","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"watch"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1},"url":{"type":"string","description":"The video, exactly as the context gave it."},"source":{"type":"string","minLength":1,"description":"The channel or service it is on."},"summary":{"type":"string","minLength":1,"description":"What it is and why now, in one or two sentences."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","topic","title","url","source","summary","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"listen"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1},"url":{"type":"string","description":"The episode or album, exactly as the context gave it."},"source":{"type":"string","minLength":1,"description":"The show, artist or service."},"summary":{"type":"string","minLength":1,"description":"What it is and why now, in one or two sentences."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","topic","title","url","source","summary","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"event"},"title":{"type":"string","minLength":1,"description":"What is happening: an episode airing, a release, a gig, a meeting."},"when":{"type":"string","minLength":1,"description":"When, as a readable day and time."},"where":{"description":"Where, when it has a place or a service.","type":"string","minLength":1},"detail":{"type":"string","minLength":1,"description":"One or two sentences on what to expect."},"url":{"description":"A link, only when the context gave one.","type":"string"},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","title","when","detail","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inbox"},"title":{"type":"string","minLength":1,"description":"The subject, tidied."},"source":{"type":"string","minLength":1,"description":"Who sent it."},"summary":{"type":"string","minLength":1,"description":"The one thing worth knowing from it."},"url":{"description":"A link from the message, when there is one.","type":"string"},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","title","source","summary","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"action"},"title":{"type":"string","minLength":1,"description":"The thing worth doing, as a short imperative."},"detail":{"type":"string","minLength":1,"description":"What prompted it and what would happen."},"when":{"description":"For a repeat, when it would run, such as Sundays 09:00.","type":"string","minLength":1},"prompt":{"type":"string","minLength":1,"description":"The message that starts the work in a chat. Ask for confirmation before installing, sending or spending anything."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","title","detail","prompt","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"check_in"},"question":{"type":"string","minLength":1,"description":"A friendly follow-up question about something they mentioned."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","question","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"resurface"},"title":{"type":"string","minLength":1,"description":"What to look at again, from the list worth resurfacing."},"detail":{"type":"string","minLength":1,"description":"One line on why it is worth a second look today."},"href":{"description":"The link from the list worth resurfacing, exactly as given.","type":"string"},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","title","detail","href","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wind_down"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1,"description":"Tonight's slow story, as a gentle title."},"premise":{"type":"string","minLength":1,"description":"Two sentences on where the story wanders: unhurried, low stakes, nothing alarming."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","topic","title","premise","reason","sensitive","id"],"additionalProperties":false}]}},"listenSourceId":{"type":"string","minLength":1},"listenRequestedAt":{"description":"When The Perch was queued behind today's research, until it starts recording.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"episodeId":{"type":"string","minLength":1},"episodeOverBudget":{"type":"boolean"},"runId":{"type":"string","minLength":1},"episodeFailed":{"type":"boolean"},"weekSourceId":{"type":"string","minLength":1},"signals":{"type":"object","properties":{"read":{"type":"array","items":{"type":"string","minLength":1}},"stale":{"type":"array","items":{"type":"string","minLength":1}}},"required":["read","stale"],"additionalProperties":false},"edition":{"type":"string","enum":["morning","evening"]},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"id":{"type":"string","minLength":1},"feedback":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string","enum":["more","less","hide","saved","opened"]}}}},"required":["version","date","timezone","greeting","interests","brief","cards","generatedAt","id","feedback"],"additionalProperties":false},{"type":"null"}]},"editions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"edition":{"type":"string","enum":["morning","evening"]}},"required":["id","date","edition"],"additionalProperties":false}},"follows":{"type":"array","items":{"type":"object","properties":{"notebookId":{"type":"string","minLength":1},"topic":{"type":"string","minLength":1}},"required":["notebookId","topic"],"additionalProperties":false}},"windDownId":{"type":["string","null"]}},"required":["settings","edition","editions","follows","windDownId"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/discover/editions/{date}":{"get":{"operationId":"getDiscoverEditionsByDate","tags":["discover"],"summary":"Read a day's Discover edition","responses":{"200":{"description":"The edition","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","const":1},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"timezone":{"type":"string","minLength":1},"greeting":{"type":"string","minLength":1},"interests":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"}},"required":["topic","reason","sensitive"],"additionalProperties":false}},"brief":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"kind":{"default":"note","description":"What sort of line this is, which sets its icon.","type":"string","enum":["waiting","calendar","topic","weather","on_this_day","note"]},"label":{"type":"string","minLength":1,"description":"A short label such as Waiting on you, Formula 1 or On this day."},"text":{"type":"string","minLength":1,"description":"One line, under twenty words."},"href":{"description":"Where the line leads, if anywhere.","type":"string"}},"required":["kind","label","text"],"additionalProperties":false}},"cards":{"maxItems":160,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"topic"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1,"description":"A headline for today's angle on the topic."},"angle":{"type":"string","minLength":1,"description":"Two sentences on what is new or worth exploring today."},"prompt":{"type":"string","minLength":1,"description":"The first message of a chat that explores this angle."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80},"coverId":{"type":"string","pattern":"^[a-z0-9-]{1,120}$"},"coverageSourceId":{"description":"The comparison of how outlets covered this topic, once one was asked for.","type":"string","minLength":1}},"required":["kind","topic","title","angle","prompt","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"read"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1},"url":{"type":"string","description":"The page, exactly as web search returned it."},"source":{"type":"string","minLength":1,"description":"The publication or site name."},"summary":{"type":"string","minLength":1,"description":"What the page says, in one or two sentences."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80},"sourceId":{"description":"The filed copy of the page in the Discover notebook, when it was read.","type":"string","minLength":1}},"required":["kind","topic","title","url","source","summary","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"watch"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1},"url":{"type":"string","description":"The video, exactly as the context gave it."},"source":{"type":"string","minLength":1,"description":"The channel or service it is on."},"summary":{"type":"string","minLength":1,"description":"What it is and why now, in one or two sentences."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","topic","title","url","source","summary","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"listen"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1},"url":{"type":"string","description":"The episode or album, exactly as the context gave it."},"source":{"type":"string","minLength":1,"description":"The show, artist or service."},"summary":{"type":"string","minLength":1,"description":"What it is and why now, in one or two sentences."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","topic","title","url","source","summary","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"event"},"title":{"type":"string","minLength":1,"description":"What is happening: an episode airing, a release, a gig, a meeting."},"when":{"type":"string","minLength":1,"description":"When, as a readable day and time."},"where":{"description":"Where, when it has a place or a service.","type":"string","minLength":1},"detail":{"type":"string","minLength":1,"description":"One or two sentences on what to expect."},"url":{"description":"A link, only when the context gave one.","type":"string"},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","title","when","detail","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inbox"},"title":{"type":"string","minLength":1,"description":"The subject, tidied."},"source":{"type":"string","minLength":1,"description":"Who sent it."},"summary":{"type":"string","minLength":1,"description":"The one thing worth knowing from it."},"url":{"description":"A link from the message, when there is one.","type":"string"},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","title","source","summary","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"action"},"title":{"type":"string","minLength":1,"description":"The thing worth doing, as a short imperative."},"detail":{"type":"string","minLength":1,"description":"What prompted it and what would happen."},"when":{"description":"For a repeat, when it would run, such as Sundays 09:00.","type":"string","minLength":1},"prompt":{"type":"string","minLength":1,"description":"The message that starts the work in a chat. Ask for confirmation before installing, sending or spending anything."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","title","detail","prompt","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"check_in"},"question":{"type":"string","minLength":1,"description":"A friendly follow-up question about something they mentioned."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","question","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"resurface"},"title":{"type":"string","minLength":1,"description":"What to look at again, from the list worth resurfacing."},"detail":{"type":"string","minLength":1,"description":"One line on why it is worth a second look today."},"href":{"description":"The link from the list worth resurfacing, exactly as given.","type":"string"},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","title","detail","href","reason","sensitive","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wind_down"},"topic":{"type":"string","minLength":1,"description":"The interest this belongs to, in two or three words."},"title":{"type":"string","minLength":1,"description":"Tonight's slow story, as a gentle title."},"premise":{"type":"string","minLength":1,"description":"Two sentences on where the story wanders: unhurried, low stakes, nothing alarming."},"reason":{"type":"string","minLength":1,"description":"Why this person would care, naming the signal: a chat, a followed topic, feedback or their request."},"sensitive":{"default":false,"description":"True when it touches health, sexuality, religion, politics or money.","type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","topic","title","premise","reason","sensitive","id"],"additionalProperties":false}]}},"listenSourceId":{"type":"string","minLength":1},"listenRequestedAt":{"description":"When The Perch was queued behind today's research, until it starts recording.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"episodeId":{"type":"string","minLength":1},"episodeOverBudget":{"type":"boolean"},"runId":{"type":"string","minLength":1},"episodeFailed":{"type":"boolean"},"weekSourceId":{"type":"string","minLength":1},"signals":{"type":"object","properties":{"read":{"type":"array","items":{"type":"string","minLength":1}},"stale":{"type":"array","items":{"type":"string","minLength":1}}},"required":["read","stale"],"additionalProperties":false},"edition":{"type":"string","enum":["morning","evening"]},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"id":{"type":"string","minLength":1},"feedback":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string","enum":["more","less","hide","saved","opened"]}}}},"required":["version","date","timezone","greeting","interests","brief","cards","generatedAt","id","feedback"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"No edition that day","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"date","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"required":true},{"in":"query","name":"edition","schema":{"default":"morning","type":"string","enum":["morning","evening"]}}]}},"/discover/covers/{cover_id}":{"get":{"operationId":"getDiscoverCoversByCoverId","tags":["discover"],"summary":"Download a topic cover","responses":{"200":{"description":"Cover image"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"cover_id","schema":{"type":"string","pattern":"^[a-z0-9-]{1,120}$"},"required":true}]}},"/discover/settings":{"patch":{"operationId":"patchDiscoverSettings","tags":["discover"],"summary":"Turn Discover on or off","description":"Installs or removes Poly's morning pass that writes your Discover edition, and saves what you'd like it to cover.","responses":{"200":{"description":"Discover settings","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":["string","null"]},"curate":{"type":"string","maxLength":500},"location":{"type":["string","null"]},"listen":{"type":"boolean"},"evening":{"type":"boolean"},"episode":{"type":"string","enum":["off","short","standard","long"]},"style":{"type":"string","enum":["classic","whiteboard","watercolour","retro_print","heritage","papercraft","kawaii","anime"]},"notify":{"type":"boolean"},"sources":{"type":"array","items":{"type":"object","properties":{"providerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string"},"connected":{"type":"boolean"},"used":{"type":"boolean"},"lastReadAt":{"type":["string","null"]},"lastError":{"type":["string","null"]}},"required":["providerId","name","description","connected","used","lastReadAt","lastError"],"additionalProperties":false}},"installationId":{"type":["string","null"]},"episodeCosts":{"anyOf":[{"type":"object","properties":{"short":{"type":"integer","minimum":0,"maximum":9007199254740991},"standard":{"type":"integer","minimum":0,"maximum":9007199254740991},"long":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["short","standard","long"],"additionalProperties":false},{"type":"null"}]}},"required":["enabled","timezone","curate","location","listen","evening","episode","style","notify","sources","installationId","episodeCosts"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1,"maxLength":120},"curate":{"type":"string","maxLength":500},"listen":{"type":"boolean"},"evening":{"type":"boolean"},"episode":{"type":"string","enum":["off","short","standard","long"]},"style":{"type":"string","enum":["classic","whiteboard","watercolour","retro_print","heritage","papercraft","kawaii","anime"]},"notify":{"type":"boolean"},"source":{"type":"object","properties":{"providerId":{"type":"string","minLength":1},"used":{"type":"boolean"}},"required":["providerId","used"],"additionalProperties":false}},"required":["enabled"],"additionalProperties":false}}}}}},"/discover/refresh":{"post":{"operationId":"postDiscoverRefresh","tags":["discover"],"summary":"Write today's edition now","description":"Queues Poly's Discover pass straight away instead of waiting for the morning.","responses":{"200":{"description":"Whether the pass was queued","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["queued","blocked","paused","not_enabled"]},"taskId":{"type":["string","null"]}},"required":["status","taskId"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/discover/feedback":{"post":{"operationId":"postDiscoverFeedback","tags":["discover"],"summary":"Tell Discover what you think of a card","description":"More, less and hide shape later editions. Saved and opened are kept for you.","responses":{"200":{"description":"The card's signals","content":{"application/json":{"schema":{"type":"object","properties":{"cardId":{"type":"string","minLength":1},"signals":{"type":"array","items":{"type":"string","enum":["more","less","hide","saved","opened"]}}},"required":["cardId","signals"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your cards","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"editionId":{"type":"string","minLength":1,"maxLength":80},"cardId":{"type":"string","minLength":1,"maxLength":80},"signal":{"type":"string","enum":["more","less","hide","saved","opened"]}},"required":["editionId","cardId","signal"],"additionalProperties":false}}}}}},"/discover/editions/{edition_id}/cards/{card_id}/framing":{"post":{"operationId":"postDiscoverEditionsByEditionIdCardsByCardIdFraming","tags":["discover"],"summary":"Check how a read card's article is framed","description":"Reads the filed copy of the article for its slant, tone, sourcing, loaded wording and missing perspectives. The result is kept on the source and reused.","responses":{"200":{"description":"The article's source, with its framing","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"402":{"description":"This month's Discover budget is spent","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"404":{"description":"Not one of your read cards","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"409":{"description":"The article was not kept","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"edition_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"card_id","schema":{"type":"string","minLength":1,"maxLength":80},"required":true}]}},"/discover/editions/{edition_id}/cards/{card_id}/coverage":{"post":{"operationId":"postDiscoverEditionsByEditionIdCardsByCardIdCoverage","tags":["discover"],"summary":"Compare how outlets covered a topic","description":"Compares the topic's articles in the edition: what they agree on, each outlet's angle, where they differ and what they leave out. Filed in the Discover notebook and reused.","responses":{"200":{"description":"The comparison","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"402":{"description":"This month's Discover budget is spent","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"404":{"description":"Not one of your topic cards","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"409":{"description":"Fewer than two articles on the topic","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"edition_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"card_id","schema":{"type":"string","minLength":1,"maxLength":80},"required":true}]}},"/discover/editions/{edition_id}/cards/{card_id}/story":{"post":{"operationId":"postDiscoverEditionsByEditionIdCardsByCardIdStory","tags":["discover"],"summary":"Play tonight's story from a card","description":"Makes the slow story a wind-down card offers, once. Later calls return the same session, and a failed one is made again.","responses":{"200":{"description":"The card's story session","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","const":"wind_down"},"kind":{"type":"string","enum":["breathing","body_scan","unwind","story","read_back","park","sound"]},"minutes":{"anyOf":[{"type":"number","const":5},{"type":"number","const":10},{"type":"number","const":20},{"type":"number","const":30}]},"title":{"type":"string","minLength":1},"steps":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1},"pauseSeconds":{"type":"integer","minimum":0,"maximum":60},"audio":{"type":"boolean"}},"required":["text","pauseSeconds","audio"],"additionalProperties":false}},"status":{"type":"string","enum":["pending","speaking","ready","failed"]},"bed":{"default":"night","type":"string","enum":["night","rain","sea","embers","aurora"]},"ambient":{"default":false,"type":"boolean"},"summary":{"type":"string","minLength":1},"topic":{"type":"string","minLength":1},"part":{"type":"integer","minimum":1,"maximum":9007199254740991},"parked":{"type":"array","items":{"type":"string","minLength":1}},"id":{"type":"string","minLength":1}},"required":["format","kind","minutes","title","steps","status","bed","ambient","id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your story cards","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"edition_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"card_id","schema":{"type":"string","minLength":1,"maxLength":80},"required":true}]}},"/discover/editions/{edition_id}/listen":{"post":{"operationId":"postDiscoverEditionsByEditionIdListen","tags":["discover"],"summary":"Record the edition's listen","description":"Queues The Perch, a two-host conversation on the edition's topics, in your podcast show of the same name. It researches the topics first, so the recording starts a few minutes later.","responses":{"200":{"description":"The episode being recorded, or null while the topics are researched","content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"The recording, or null while today's topics are still being researched."}},"required":["sourceId"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your editions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"edition_id","schema":{"type":"string","minLength":1},"required":true}]}},"/discover/health":{"put":{"operationId":"putDiscoverHealth","tags":["discover"],"summary":"Share yesterday's Apple Health summary","description":"Sleep, mindful and exercise minutes from the iPhone, used for one line in the brief and never to infer interests.","responses":{"200":{"description":"The saved summary","content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"sleepMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":1440},{"type":"null"}]},"mindfulMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":1440},{"type":"null"}]},"exerciseMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":1440},{"type":"null"}]}},"required":["date","sleepMinutes","mindfulMinutes","exerciseMinutes"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"sleepMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":1440},{"type":"null"}]},"mindfulMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":1440},{"type":"null"}]},"exerciseMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":1440},{"type":"null"}]}},"required":["date","sleepMinutes","mindfulMinutes","exerciseMinutes"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteDiscoverHealth","tags":["discover"],"summary":"Stop sharing Apple Health","responses":{"204":{"description":"The summary is cleared"}},"hide":false}},"/discover/editions/{edition_id}/week":{"post":{"operationId":"postDiscoverEditionsByEditionIdWeek","tags":["discover"],"summary":"Record your week","description":"Queues a short private recap of what you made, learned and finished this week.","responses":{"200":{"description":"The recap is queued","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean","const":true}},"required":["queued"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your editions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"edition_id","schema":{"type":"string","minLength":1},"required":true}]}},"/discover/editions/{edition_id}/recordings/{recording}":{"get":{"operationId":"getDiscoverEditionsByEditionIdRecordingsByRecording","tags":["discover"],"summary":"Read the edition's Perch or week recording","description":"The source behind the edition's listen or weekly recap, so a Discover-only device can play it.","responses":{"200":{"description":"The recording","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"content":{"type":["string","null"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","content","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your editions, or nothing recorded yet","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"edition_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"recording","schema":{"type":"string","enum":["listen","week"]},"required":true}]}},"/discover/editions/{edition_id}/recordings/{recording}/audio":{"get":{"operationId":"getDiscoverEditionsByEditionIdRecordingsByRecordingAudio","tags":["discover"],"summary":"Stream the edition's Perch or week recording","responses":{"200":{"description":"Recording audio"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"edition_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"recording","schema":{"type":"string","enum":["listen","week"]},"required":true}]}},"/discover/editions/{edition_id}/episode":{"post":{"operationId":"postDiscoverEditionsByEditionIdEpisode","tags":["discover"],"summary":"Make the edition's episode","description":"Queues today's part of the season on your top topic. It is scripted, then illustrated and narrated chapter by chapter.","responses":{"200":{"description":"The episode is queued","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean","const":true}},"required":["queued"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your editions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"edition_id","schema":{"type":"string","minLength":1},"required":true}]}},"/discover/episodes/{episode_id}":{"get":{"operationId":"getDiscoverEpisodesByEpisodeId","tags":["discover"],"summary":"Read an episode","responses":{"200":{"description":"The episode","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","const":"episode"},"seasonId":{"type":"string","minLength":1},"editionId":{"type":"string","minLength":1},"notebookId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"minutes":{"type":"integer","minimum":1,"maximum":30},"topic":{"type":"string","minLength":1},"part":{"type":"integer","minimum":1,"maximum":5},"parts":{"type":"integer","minimum":1,"maximum":5},"style":{"type":"string","enum":["classic","whiteboard","watercolour","retro_print","heritage","papercraft","kawaii","anime"]},"title":{"type":"string","minLength":1},"recap":{"type":"string"},"chapters":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"beats":{"default":[],"maxItems":5,"type":"array","items":{"type":"string"}},"scenes":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"caption":{"default":"","type":"string"},"narration":{"type":"string","minLength":1,"description":"What the narrator says over this scene, written to be spoken."},"shots":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"visual":{"type":"string","minLength":1,"description":"The illustration as a concrete picture with no words in it."},"motion":{"type":"string","enum":["push_in","pull_back","pan_left","pan_right","hold"]},"plate":{"type":"string","pattern":"^[a-z0-9-]{1,40}$","description":"A short lowercase-dashed name for a recurring person, creature or place."},"image":{"default":false,"type":"boolean"}},"required":["visual","motion","image"],"additionalProperties":false}}},"required":["title","caption","narration","shots"],"additionalProperties":false}},"status":{"type":"string","enum":["pending","scripting","rendering","ready","failed"]},"timings":{"default":[],"type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"}},"required":["start","end"],"additionalProperties":false}}},"required":["title","beats","scenes","status","timings"],"additionalProperties":false}},"voice":{"type":"object","properties":{"model":{"type":"string","minLength":1},"voice":{"type":"string","minLength":1}},"required":["model","voice"],"additionalProperties":false},"id":{"type":"string","minLength":1},"createdAt":{"type":"string"},"progress":{"type":"object","properties":{"furthest":{"default":0,"type":"number","minimum":0,"maximum":1},"resume":{"default":null,"anyOf":[{"type":"object","properties":{"chapter":{"type":"integer","minimum":0,"maximum":3},"seconds":{"type":"number","minimum":0}},"required":["chapter","seconds"],"additionalProperties":false},{"type":"null"}]}},"required":["furthest","resume"],"additionalProperties":false}},"required":["format","seasonId","editionId","notebookId","minutes","topic","part","parts","style","title","recap","chapters","id","createdAt","progress"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your episodes","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"episode_id","schema":{"type":"string","minLength":1},"required":true}]}},"/discover/episodes/{episode_id}/progress":{"post":{"operationId":"postDiscoverEpisodesByEpisodeIdProgress","tags":["discover"],"summary":"Record how far you have watched","description":"Keeps your furthest point in the episode, so tomorrow's part is only made ahead when you watch.","responses":{"200":{"description":"Your furthest point","content":{"application/json":{"schema":{"type":"object","properties":{"furthest":{"default":0,"type":"number","minimum":0,"maximum":1},"resume":{"default":null,"anyOf":[{"type":"object","properties":{"chapter":{"type":"integer","minimum":0,"maximum":3},"seconds":{"type":"number","minimum":0}},"required":["chapter","seconds"],"additionalProperties":false},{"type":"null"}]}},"required":["furthest","resume"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your episodes","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"episode_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fraction":{"type":"number","minimum":0,"maximum":1},"resume":{"type":"object","properties":{"chapter":{"type":"integer","minimum":0,"maximum":3},"seconds":{"type":"number","minimum":0}},"required":["chapter","seconds"]}},"required":["fraction"],"additionalProperties":false}}}}}},"/discover/episodes/{episode_id}/chapters/{chapter}/audio":{"get":{"operationId":"getDiscoverEpisodesByEpisodeIdChaptersByChapterAudio","tags":["discover"],"summary":"Stream a chapter's narration","responses":{"200":{"description":"Narration audio"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"episode_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"chapter","schema":{"type":"integer","minimum":0,"maximum":3},"required":true}]}},"/discover/episodes/{episode_id}/chapters/{chapter}/retry":{"post":{"operationId":"postDiscoverEpisodesByEpisodeIdChaptersByChapterRetry","tags":["discover"],"summary":"Try a failed chapter again","responses":{"200":{"description":"The chapter is queued","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean","const":true}},"required":["queued"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"The chapter has not failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"episode_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"chapter","schema":{"type":"integer","minimum":0,"maximum":3},"required":true}]}},"/discover/episodes/{episode_id}/chapters/{chapter}/scenes/{scene}/shots/{shot}":{"get":{"operationId":"getDiscoverEpisodesByEpisodeIdChaptersByChapterScenesBySceneShotsByShot","tags":["discover"],"summary":"Download a shot's illustration","responses":{"200":{"description":"Shot image"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"episode_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"chapter","schema":{"type":"integer","minimum":0,"maximum":3},"required":true},{"in":"path","name":"scene","schema":{"type":"integer","minimum":0,"maximum":5},"required":true},{"in":"path","name":"shot","schema":{"type":"integer","minimum":0,"maximum":3},"required":true}]}},"/discover/seasons/{season_id}/listen":{"post":{"operationId":"postDiscoverSeasonsBySeasonIdListen","tags":["discover"],"summary":"Save a season as one long listen","description":"Joins every finished chapter of the season into one episode of The Perch, so it plays in your podcast app.","responses":{"200":{"description":"The long listen is queued","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean","const":true}},"required":["queued"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your seasons","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"season_id","schema":{"type":"string","minLength":1},"required":true}]}},"/discover/wind-down":{"post":{"operationId":"postDiscoverWindDown","tags":["discover"],"summary":"Make a wind-down session","description":"A narrated session with quiet pauses over a sound bed: breathing, body scan, unwind, a slow story, your highlights read back, parking tomorrow, or just the sound.","responses":{"200":{"description":"The session being made","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","const":"wind_down"},"kind":{"type":"string","enum":["breathing","body_scan","unwind","story","read_back","park","sound"]},"minutes":{"anyOf":[{"type":"number","const":5},{"type":"number","const":10},{"type":"number","const":20},{"type":"number","const":30}]},"title":{"type":"string","minLength":1},"steps":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1},"pauseSeconds":{"type":"integer","minimum":0,"maximum":60},"audio":{"type":"boolean"}},"required":["text","pauseSeconds","audio"],"additionalProperties":false}},"status":{"type":"string","enum":["pending","speaking","ready","failed"]},"bed":{"default":"night","type":"string","enum":["night","rain","sea","embers","aurora"]},"ambient":{"default":false,"type":"boolean"},"summary":{"type":"string","minLength":1},"topic":{"type":"string","minLength":1},"part":{"type":"integer","minimum":1,"maximum":9007199254740991},"parked":{"type":"array","items":{"type":"string","minLength":1}},"id":{"type":"string","minLength":1}},"required":["format","kind","minutes","title","steps","status","bed","ambient","id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"409":{"description":"Nothing to read back yet","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["breathing","body_scan","unwind","story","read_back","park","sound"]},"minutes":{"anyOf":[{"type":"number","const":5},{"type":"number","const":10},{"type":"number","const":20},{"type":"number","const":30}]},"bed":{"description":"The sound and scene underneath. Leave it out to let Poly choose.","type":"string","enum":["night","rain","sea","embers","aurora"]},"aboutToday":{"description":"False keeps their day out of the session, for a shared room or screen.","type":"boolean"},"topic":{"description":"For a story, what it wanders through.","type":"string","minLength":1,"maxLength":60},"premise":{"description":"For a story, where tonight's part goes.","type":"string","minLength":1,"maxLength":400},"notes":{"description":"For park, what is on their mind, in their words.","type":"string","minLength":1,"maxLength":4000}},"required":["kind","minutes"],"additionalProperties":false}}}}}},"/discover/wind-down/tonight":{"get":{"operationId":"getDiscoverWindDownTonight","tags":["discover"],"summary":"Suggest tonight's wind down","description":"One session picked from your day, your sleep and what you played recently.","responses":{"200":{"description":"Tonight's pick","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["breathing","body_scan","unwind","story","read_back","park","sound"]},"minutes":{"anyOf":[{"type":"number","const":5},{"type":"number","const":10},{"type":"number","const":20},{"type":"number","const":30}]},"bed":{"type":"string","enum":["night","rain","sea","embers","aurora"]},"topic":{"type":["string","null"]},"reason":{"type":"string","minLength":1},"readBack":{"type":"boolean"}},"required":["kind","minutes","bed","topic","reason","readBack"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/discover/wind-down/beds/{bed}":{"get":{"operationId":"getDiscoverWindDownBedsByBed","tags":["discover"],"summary":"Stream a wind-down sound bed","responses":{"200":{"description":"The sound bed"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not made yet","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"bed","schema":{"type":"string","enum":["night","rain","sea","embers","aurora"]},"required":true}]}},"/discover/wind-down/{wind_down_id}":{"get":{"operationId":"getDiscoverWindDownByWindDownId","tags":["discover"],"summary":"Read a wind-down session","responses":{"200":{"description":"The session","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","const":"wind_down"},"kind":{"type":"string","enum":["breathing","body_scan","unwind","story","read_back","park","sound"]},"minutes":{"anyOf":[{"type":"number","const":5},{"type":"number","const":10},{"type":"number","const":20},{"type":"number","const":30}]},"title":{"type":"string","minLength":1},"steps":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1},"pauseSeconds":{"type":"integer","minimum":0,"maximum":60},"audio":{"type":"boolean"}},"required":["text","pauseSeconds","audio"],"additionalProperties":false}},"status":{"type":"string","enum":["pending","speaking","ready","failed"]},"bed":{"default":"night","type":"string","enum":["night","rain","sea","embers","aurora"]},"ambient":{"default":false,"type":"boolean"},"summary":{"type":"string","minLength":1},"topic":{"type":"string","minLength":1},"part":{"type":"integer","minimum":1,"maximum":9007199254740991},"parked":{"type":"array","items":{"type":"string","minLength":1}},"id":{"type":"string","minLength":1}},"required":["format","kind","minutes","title","steps","status","bed","ambient","id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not one of your sessions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"wind_down_id","schema":{"type":"string","minLength":1},"required":true}]}},"/discover/wind-down/{wind_down_id}/steps/{step}/audio":{"get":{"operationId":"getDiscoverWindDownByWindDownIdStepsByStepAudio","tags":["discover"],"summary":"Stream one step of a wind-down session","responses":{"200":{"description":"Step audio"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"wind_down_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"step","schema":{"type":"integer","minimum":0,"maximum":59},"required":true}]}},"/discover/follows":{"post":{"operationId":"postDiscoverFollows","tags":["discover"],"summary":"Follow a topic","description":"Keeps a notebook for the topic. Each edition files its best links on the topic there as sources.","responses":{"200":{"description":"The followed topic","content":{"application/json":{"schema":{"type":"object","properties":{"notebookId":{"type":"string","minLength":1},"topic":{"type":"string","minLength":1}},"required":["notebookId","topic"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"maxLength":60}},"required":["topic"],"additionalProperties":false}}}}}},"/discover/follows/{notebook_id}":{"delete":{"operationId":"deleteDiscoverFollowsByNotebookId","tags":["discover"],"summary":"Stop following a topic","description":"The notebook and everything in it stays.","responses":{"200":{"description":"The notebook that stopped following","content":{"application/json":{"schema":{"type":"object","properties":{"notebookId":{"type":"string","minLength":1}},"required":["notebookId"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not your notebook","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true}]}},"/notebooks":{"get":{"operationId":"getNotebooks","tags":["notebooks"],"summary":"List notebooks","description":"Personal notebooks, or a project's when project_id is set.","responses":{"200":{"description":"Notebooks","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]},"instructions":{"type":"string","maxLength":10000},"settings":{"type":"object","properties":{"style":{"default":"default","type":"string","enum":["default","learning_guide","custom"]},"persona":{"default":"","type":"string","maxLength":2000},"responseLength":{"default":"default","type":"string","enum":["default","longer","shorter"]},"sourcesOnly":{"default":true,"type":"boolean"},"followTopic":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"discover":{"default":false,"type":"boolean"}},"required":["style","persona","responseLength","sourcesOnly","followTopic","discover"],"additionalProperties":false},"guide":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string","minLength":1,"description":"One paragraph on what the sources cover together. Bold the four to six most important terms with **double asterisks**."},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1},"description":"Three questions a reader would want answered next, each answerable from the sources."},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"generatedAt":{"type":"string"}},"required":["summary","questions","sourceIds","generatedAt"],"additionalProperties":false},{"type":"null"}]},"canManage":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","name","scope","instructions","settings","guide","canManage","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postNotebooks","tags":["notebooks"],"summary":"Create a notebook","description":"A notebook groups conversations with the sources, notes and studio outputs they share.","responses":{"200":{"description":"The notebook","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]},"instructions":{"type":"string","maxLength":10000},"settings":{"type":"object","properties":{"style":{"default":"default","type":"string","enum":["default","learning_guide","custom"]},"persona":{"default":"","type":"string","maxLength":2000},"responseLength":{"default":"default","type":"string","enum":["default","longer","shorter"]},"sourcesOnly":{"default":true,"type":"boolean"},"followTopic":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"discover":{"default":false,"type":"boolean"}},"required":["style","persona","responseLength","sourcesOnly","followTopic","discover"],"additionalProperties":false},"guide":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string","minLength":1,"description":"One paragraph on what the sources cover together. Bold the four to six most important terms with **double asterisks**."},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1},"description":"Three questions a reader would want answered next, each answerable from the sources."},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"generatedAt":{"type":"string"}},"required":["summary","questions","sourceIds","generatedAt"],"additionalProperties":false},{"type":"null"}]},"canManage":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","name","scope","instructions","settings","guide","canManage","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"A notebook with the same name already exists"}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"]}]}},"required":["name","scope"],"additionalProperties":false}}}}}},"/notebooks/{notebook_id}":{"get":{"operationId":"getNotebooksByNotebookId","tags":["notebooks"],"summary":"Read a notebook","responses":{"200":{"description":"The notebook","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]},"instructions":{"type":"string","maxLength":10000},"settings":{"type":"object","properties":{"style":{"default":"default","type":"string","enum":["default","learning_guide","custom"]},"persona":{"default":"","type":"string","maxLength":2000},"responseLength":{"default":"default","type":"string","enum":["default","longer","shorter"]},"sourcesOnly":{"default":true,"type":"boolean"},"followTopic":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"discover":{"default":false,"type":"boolean"}},"required":["style","persona","responseLength","sourcesOnly","followTopic","discover"],"additionalProperties":false},"guide":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string","minLength":1,"description":"One paragraph on what the sources cover together. Bold the four to six most important terms with **double asterisks**."},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1},"description":"Three questions a reader would want answered next, each answerable from the sources."},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"generatedAt":{"type":"string"}},"required":["summary","questions","sourceIds","generatedAt"],"additionalProperties":false},{"type":"null"}]},"canManage":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"guideStatus":{"type":"string","enum":["current","writing","unavailable"]},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","title","updatedAt"],"additionalProperties":false}}},"required":["id","name","scope","instructions","settings","guide","canManage","createdAt","updatedAt","guideStatus","sources","notes","media","outputs","conversations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchNotebooksByNotebookId","tags":["notebooks"],"summary":"Update a notebook","description":"Renames the notebook or changes its instructions and chat settings.","responses":{"200":{"description":"The notebook","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]},"instructions":{"type":"string","maxLength":10000},"settings":{"type":"object","properties":{"style":{"default":"default","type":"string","enum":["default","learning_guide","custom"]},"persona":{"default":"","type":"string","maxLength":2000},"responseLength":{"default":"default","type":"string","enum":["default","longer","shorter"]},"sourcesOnly":{"default":true,"type":"boolean"},"followTopic":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"discover":{"default":false,"type":"boolean"}},"required":["style","persona","responseLength","sourcesOnly","followTopic","discover"],"additionalProperties":false},"guide":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string","minLength":1,"description":"One paragraph on what the sources cover together. Bold the four to six most important terms with **double asterisks**."},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1},"description":"Three questions a reader would want answered next, each answerable from the sources."},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"generatedAt":{"type":"string"}},"required":["summary","questions","sourceIds","generatedAt"],"additionalProperties":false},{"type":"null"}]},"canManage":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","name","scope","instructions","settings","guide","canManage","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"A notebook with the same name already exists"}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"instructions":{"type":"string","maxLength":10000},"settings":{"type":"object","properties":{"style":{"default":"default","type":"string","enum":["default","learning_guide","custom"]},"persona":{"default":"","type":"string","maxLength":2000},"responseLength":{"default":"default","type":"string","enum":["default","longer","shorter"]},"sourcesOnly":{"default":true,"type":"boolean"},"followTopic":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"discover":{"default":false,"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteNotebooksByNotebookId","tags":["notebooks"],"summary":"Delete a notebook","description":"Removes the notebook. Its conversations, sources and outputs stay where they are.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true}]}},"/notebooks/{notebook_id}/research":{"post":{"operationId":"postNotebooksByNotebookIdResearch","tags":["notebooks"],"summary":"Research the web for a notebook","description":"depth=fast returns pages to import. depth=deep adds a report source that stays processing while the research runs, then imports the pages it cites.","responses":{"200":{"description":"Research","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"depth":{"type":"string","const":"fast"},"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","maxLength":2048,"format":"uri"},"snippet":{"type":"string","maxLength":1000}},"required":["title","url","snippet"],"additionalProperties":false}}},"required":["depth","results"],"additionalProperties":false},{"type":"object","properties":{"depth":{"type":"string","const":"deep"},"report":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"required":["depth","report"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":1000},"depth":{"default":"fast","type":"string","enum":["fast","deep"]}},"required":["query"],"additionalProperties":false}}}}}},"/notebooks/{notebook_id}/studio":{"post":{"operationId":"postNotebooksByNotebookIdStudio","tags":["notebooks"],"summary":"Make something from a notebook's sources","description":"Audio overviews and infographics become sources; every other kind becomes an output that stays pending until it is written.","responses":{"200":{"description":"The started item","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"output"},"output":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"required":["type","output"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"source"},"source":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"required":["type","source"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"audio"},"format":{"default":"deep_dive","type":"string","enum":["deep_dive","brief","debate","critique"]},"length":{"default":"default","type":"string","enum":["short","default","long"]},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"deck"},"style":{"default":"detailed","type":"string","enum":["detailed","presenter"]},"length":{"default":"default","type":"string","enum":["short","default","long"]},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"sheet"},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"report"},"template":{"default":"briefing","type":"string","enum":["briefing","study_guide","faq","blog_post","custom"]},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"infographic"},"orientation":{"default":"landscape","type":"string","enum":["landscape","portrait","square"]},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"mind_map"},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"flashcards"},"count":{"default":"standard","type":"string","enum":["fewer","standard","more"]},"difficulty":{"default":"medium","type":"string","enum":["easy","medium","hard"]},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"quiz"},"count":{"default":"standard","type":"string","enum":["fewer","standard","more"]},"difficulty":{"default":"medium","type":"string","enum":["easy","medium","hard"]},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"video"},"format":{"default":"explainer","type":"string","enum":["explainer","brief"]},"style":{"default":"classic","type":"string","enum":["classic","whiteboard","watercolour","retro_print","heritage","papercraft","kawaii","anime"]},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"focus":{"type":"string","maxLength":2000},"language":{"default":"en","type":"string","minLength":2,"maxLength":10}},"required":["kind"],"additionalProperties":false}]}}}}}},"/notebooks/{notebook_id}/sources":{"post":{"operationId":"postNotebooksByNotebookIdSources","tags":["notebooks"],"summary":"Add sources to a notebook","description":"Links existing sources by id, or reads web pages into new sources.","responses":{"200":{"description":"The notebook","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]},"instructions":{"type":"string","maxLength":10000},"settings":{"type":"object","properties":{"style":{"default":"default","type":"string","enum":["default","learning_guide","custom"]},"persona":{"default":"","type":"string","maxLength":2000},"responseLength":{"default":"default","type":"string","enum":["default","longer","shorter"]},"sourcesOnly":{"default":true,"type":"boolean"},"followTopic":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"discover":{"default":false,"type":"boolean"}},"required":["style","persona","responseLength","sourcesOnly","followTopic","discover"],"additionalProperties":false},"guide":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string","minLength":1,"description":"One paragraph on what the sources cover together. Bold the four to six most important terms with **double asterisks**."},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1},"description":"Three questions a reader would want answered next, each answerable from the sources."},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"generatedAt":{"type":"string"}},"required":["summary","questions","sourceIds","generatedAt"],"additionalProperties":false},{"type":"null"}]},"canManage":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"guideStatus":{"type":"string","enum":["current","writing","unavailable"]},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","title","updatedAt"],"additionalProperties":false}}},"required":["id","name","scope","instructions","settings","guide","canManage","createdAt","updatedAt","guideStatus","sources","notes","media","outputs","conversations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"sourceIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["sourceIds"],"additionalProperties":false},{"type":"object","properties":{"results":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["title","url"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}]}}}}}},"/notebooks/{notebook_id}/sources/{source_id}":{"delete":{"operationId":"deleteNotebooksByNotebookIdSourcesBySourceId","tags":["notebooks"],"summary":"Remove a source from a notebook","description":"Unlinks the source. The source itself stays in Files.","responses":{"200":{"description":"The notebook","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]},"instructions":{"type":"string","maxLength":10000},"settings":{"type":"object","properties":{"style":{"default":"default","type":"string","enum":["default","learning_guide","custom"]},"persona":{"default":"","type":"string","maxLength":2000},"responseLength":{"default":"default","type":"string","enum":["default","longer","shorter"]},"sourcesOnly":{"default":true,"type":"boolean"},"followTopic":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"discover":{"default":false,"type":"boolean"}},"required":["style","persona","responseLength","sourcesOnly","followTopic","discover"],"additionalProperties":false},"guide":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string","minLength":1,"description":"One paragraph on what the sources cover together. Bold the four to six most important terms with **double asterisks**."},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1},"description":"Three questions a reader would want answered next, each answerable from the sources."},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"generatedAt":{"type":"string"}},"required":["summary","questions","sourceIds","generatedAt"],"additionalProperties":false},{"type":"null"}]},"canManage":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"guideStatus":{"type":"string","enum":["current","writing","unavailable"]},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","title","updatedAt"],"additionalProperties":false}}},"required":["id","name","scope","instructions","settings","guide","canManage","createdAt","updatedAt","guideStatus","sources","notes","media","outputs","conversations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"source_id","schema":{"type":"string","minLength":1},"required":true}]}},"/notebooks/{notebook_id}/notes":{"post":{"operationId":"postNotebooksByNotebookIdNotes","tags":["notebooks"],"summary":"Add a note to a notebook","responses":{"200":{"description":"The note","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","minLength":1,"maxLength":100000}},"required":["title","content"],"additionalProperties":false}}}}}},"/notebooks/{notebook_id}/notes/{note_id}/promote":{"post":{"operationId":"postNotebooksByNotebookIdNotesByNoteIdPromote","tags":["notebooks"],"summary":"Turn a note into a source","responses":{"200":{"description":"The notebook","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]},"instructions":{"type":"string","maxLength":10000},"settings":{"type":"object","properties":{"style":{"default":"default","type":"string","enum":["default","learning_guide","custom"]},"persona":{"default":"","type":"string","maxLength":2000},"responseLength":{"default":"default","type":"string","enum":["default","longer","shorter"]},"sourcesOnly":{"default":true,"type":"boolean"},"followTopic":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"discover":{"default":false,"type":"boolean"}},"required":["style","persona","responseLength","sourcesOnly","followTopic","discover"],"additionalProperties":false},"guide":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string","minLength":1,"description":"One paragraph on what the sources cover together. Bold the four to six most important terms with **double asterisks**."},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1},"description":"Three questions a reader would want answered next, each answerable from the sources."},"sourceIds":{"maxItems":300,"type":"array","items":{"type":"string","minLength":1}},"generatedAt":{"type":"string"}},"required":["summary","questions","sourceIds","generatedAt"],"additionalProperties":false},{"type":"null"}]},"canManage":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"guideStatus":{"type":"string","enum":["current","writing","unavailable"]},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"kind":{"type":"string","enum":["file","memory","text","url","connector","repository","podcast"]},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["processing","available","failed","archived"]},"provider":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"externalUri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"vectorId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","connectionId","kind","title","status","provider","externalUri","vectorId","metadata","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":["string","null"]},"conversationId":{"type":["string","null"]},"parentOutputId":{"type":["string","null"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"groupId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"collectionId":{"type":["string","null"]},"kind":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z][a-z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["pending","ready","failed","archived"]},"sensitivity":{"type":"string","enum":["personal","internal","confidential"]},"file":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"mimeType":{"type":"string","minLength":1,"maxLength":255},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","mimeType","filename","byteSize"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","createdByUserId","projectId","conversationId","parentOutputId","capabilityId","groupId","collectionId","kind","title","status","sensitivity","file","revision","createdAt","updatedAt"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","title","updatedAt"],"additionalProperties":false}}},"required":["id","name","scope","instructions","settings","guide","canManage","createdAt","updatedAt","guideStatus","sources","notes","media","outputs","conversations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"note_id","schema":{"type":"string","minLength":1},"required":true}]}},"/notebooks/{notebook_id}/outputs/{output_id}/scenes/{scene_index}":{"get":{"operationId":"getNotebooksByNotebookIdOutputsByOutputIdScenesBySceneIndex","tags":["notebooks"],"summary":"Download a video overview scene's illustration","responses":{"200":{"description":"Scene image"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"scene_index","schema":{"type":"integer","minimum":0,"maximum":15},"required":true}]}},"/notebooks/{notebook_id}/outputs/{output_id}/progress":{"get":{"operationId":"getNotebooksByNotebookIdOutputsByOutputIdProgress","tags":["notebooks"],"summary":"Read your study progress on a notebook output","responses":{"200":{"description":"Study progress","content":{"application/json":{"schema":{"type":"object","properties":{"known":{"default":[],"maxItems":60,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"missed":{"default":[],"maxItems":60,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"answers":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":4}}},"required":["known","missed","answers"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchNotebooksByNotebookIdOutputsByOutputIdProgress","tags":["notebooks"],"summary":"Save your study progress on a notebook output","responses":{"200":{"description":"Study progress","content":{"application/json":{"schema":{"type":"object","properties":{"known":{"default":[],"maxItems":60,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"missed":{"default":[],"maxItems":60,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"answers":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":4}}},"required":["known","missed","answers"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"notebook_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"output_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"known":{"default":[],"maxItems":60,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"missed":{"default":[],"maxItems":60,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"answers":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":4}}},"additionalProperties":false}}}}}},"/realtime/providers":{"get":{"operationId":"getRealtimeProviders","tags":["realtime"],"summary":"List realtime live providers","responses":{"200":{"description":"Realtime providers","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["openai","google-ai-studio","mistral","mistral-voice","elevenlabs","cartesia","greenpt","workers-ai"]},"label":{"type":"string"},"shortLabel":{"type":"string"},"liveMode":{"type":"string","enum":["native","composed"]},"transport":{"type":"string","enum":["webrtc","websocket","livekit"]},"sessionType":{"type":"string","enum":["realtime","transcription"]},"defaultDelay":{"type":"string","enum":["minimal","low","medium","high","xhigh"]},"inputModalities":{"type":"array","items":{"type":"string","enum":["text","audio","image","video"]}},"outputModalities":{"type":"array","items":{"type":"string","enum":["text","audio"]}},"description":{"type":"string"},"defaultModelId":{"type":"string"},"composeWith":{"type":"object","properties":{"reasoning":{"type":"boolean"},"speech":{"type":"boolean"}},"required":["reasoning","speech"],"additionalProperties":false},"supportsVideoInput":{"type":"boolean"},"supportsTranscriptionSession":{"type":"boolean"},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"available":{"type":"boolean"},"readiness":{"type":"string","enum":["ready","setup_required","unavailable"]},"availabilityReason":{"type":"string"}},"required":["id","label","shortLabel","liveMode","transport","sessionType","inputModalities","outputModalities","description","defaultModelId","order","available","readiness","availabilityReason"],"additionalProperties":false}}},"required":["providers"],"additionalProperties":false}}}}},"hide":false}},"/realtime/sessions":{"post":{"operationId":"postRealtimeSessions","tags":["realtime"],"summary":"Create a realtime session","description":"Creates a realtime, translation or transcription session from the query, or a composed pipeline session from the body when type is pipeline.","responses":{"200":{"description":"Realtime session","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"type":{"type":"string"},"max_session_seconds":{"type":"number"},"provider":{"type":"string"},"transport":{"type":"string","enum":["webrtc","websocket","livekit"]},"protocol":{"type":"string"},"url":{"type":"string","format":"uri"},"model":{"type":"string"},"audio":{"type":"object","properties":{"input":{"type":"object","properties":{"format":{"type":"object","properties":{"type":{"type":"string"},"rate":{"type":"number"}},"required":["type"],"additionalProperties":false},"transcription":{"type":"object","properties":{"model":{"type":"string"},"language":{"type":"string"},"delay":{"type":"string","enum":["minimal","low","medium","high","xhigh"]}},"required":["model"],"additionalProperties":false},"turn_detection":{"anyOf":[{},{"type":"null"}]}},"additionalProperties":false},"output":{"type":"object","properties":{"format":{"type":"object","properties":{"type":{"type":"string"},"rate":{"type":"number"}},"required":["type"],"additionalProperties":false},"voice":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"modalities":{"type":"array","items":{"type":"string"}},"input_modalities":{"type":"array","items":{"type":"string","enum":["text","audio","image","video"]}},"output_modalities":{"type":"array","items":{"type":"string","enum":["text","audio"]}},"turn_detection":{"type":"object","properties":{"type":{"type":"string"},"threshold":{"type":"number"},"prefix_padding_ms":{"type":"number"},"silence_duration_ms":{"type":"number"}},"required":["type","threshold","prefix_padding_ms","silence_duration_ms"],"additionalProperties":false},"input_audio_format":{"type":"string"},"audio_format":{"type":"object","properties":{"encoding":{"type":"string"},"sample_rate":{"type":"number"}},"required":["encoding","sample_rate"],"additionalProperties":false},"input_audio_transcription":{"type":"object","properties":{"model":{"type":"string"},"language":{"type":"string"},"language_code":{"type":"string"}},"required":["model"],"additionalProperties":false},"target_streaming_delay_ms":{"type":"number"},"proxy_grant_expires_at":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"client_secret":{"type":"object","properties":{"expires_at":{"type":"number"},"value":{"type":"string"}},"required":["value"],"additionalProperties":false},"setup":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","object"],"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"403":{"description":"Model access denied","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"query","name":"type","schema":{"type":"string","enum":["realtime","translation","transcription","pipeline"]},"required":true},{"in":"query","name":"provider","schema":{"type":"string","minLength":1}},{"in":"query","name":"model","schema":{"type":"string","minLength":1}},{"in":"query","name":"language","schema":{"type":"string","minLength":1}},{"in":"query","name":"target_language","schema":{"type":"string","minLength":1}},{"in":"query","name":"voice","schema":{"type":"string","minLength":1}},{"in":"query","name":"instructions","schema":{"type":"string","minLength":1}},{"in":"query","name":"delay","schema":{"type":"string","minLength":1}},{"in":"query","name":"speakers","schema":{"type":"string","const":"true"}},{"in":"query","name":"transport","schema":{"type":"string","minLength":1}},{"in":"query","name":"input_modalities","schema":{"type":"string","minLength":1}},{"in":"query","name":"output_modalities","schema":{"type":"string","minLength":1}}]}},"/realtime/transcription":{"get":{"operationId":"getRealtimeTranscription","tags":["realtime"],"summary":"Connect to realtime transcription","description":"Upgrades to a transcription websocket for the provider named in the session grant.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"grant","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"session_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"model","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"delay","schema":{"type":"string","enum":["minimal","low","medium","high","xhigh"]}},{"in":"query","name":"language","schema":{"type":"string","minLength":1}},{"in":"query","name":"instructions","schema":{"type":"string","minLength":1,"maxLength":4000}},{"in":"query","name":"voice","schema":{"type":"string","minLength":1,"maxLength":64}},{"in":"query","name":"speakers","schema":{"type":"string","const":"true"}},{"in":"query","name":"provider","schema":{"type":"string","enum":["mistral","elevenlabs","cartesia","greenpt","workers-ai"]},"required":true}]}},"/realtime/openai/live/calls":{"post":{"operationId":"postRealtimeOpenaiLiveCalls","tags":["realtime"],"summary":"Exchange a WebRTC offer for a GPT-Live session answer","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"grant","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"session_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"model","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"delay","schema":{"type":"string","enum":["minimal","low","medium","high","xhigh"]}},{"in":"query","name":"language","schema":{"type":"string","minLength":1}},{"in":"query","name":"instructions","schema":{"type":"string","minLength":1,"maxLength":4000}},{"in":"query","name":"voice","schema":{"type":"string","minLength":1,"maxLength":64}},{"in":"query","name":"speakers","schema":{"type":"string","const":"true"}}]}},"/sync/grant":{"post":{"operationId":"postSyncGrant","tags":["sync"],"summary":"Mint a short-lived device sync socket grant","responses":{"200":{"description":"A device sync grant","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1},"expiresAt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"socketUrl":{"type":"string","minLength":1}},"required":["token","expiresAt","socketUrl"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceId":{"type":"string","minLength":1,"maxLength":200}},"required":["deviceId"]}}}}}},"/search":{"get":{"operationId":"getSearch","tags":["search"],"summary":"Search across Polychat","description":"Returns the signed-in user's accessible conversations, workspaces, and projects. Capability catalogue results are merged by the web client.","responses":{"200":{"description":"Global search results","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"isPinned":{"type":"boolean"},"isUnread":{"type":"boolean"},"snooze":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"until"},"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["kind","until"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"next_response"}},"required":["kind"],"additionalProperties":false}]},{"type":"null"}]},"group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false},{"type":"null"}]},"project":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspaceName":{"type":"string"}},"required":["id","name","workspaceId","workspaceName"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","updatedAt","isPinned","isUnread","snooze","group","project"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"snippet":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","title","kind","snippet","updatedAt"],"additionalProperties":false}},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","name","description","updatedAt"],"additionalProperties":false}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"workspaceName":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","workspaceId","workspaceName","name","description","updatedAt"],"additionalProperties":false}},"tasks":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":["string","null"]},"objective":{"type":"string"},"status":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"workspaceId":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","key","objective","status","projectId","projectName","workspaceId","updatedAt"],"additionalProperties":false}}},"required":["query","conversations","documents","workspaces","projects","tasks"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"query","schema":{"default":"","type":"string","maxLength":200}},{"in":"query","name":"limit","schema":{"default":8,"type":"integer","minimum":1,"maximum":20}}]}},"/decisions":{"post":{"operationId":"postDecisions","tags":["decisions"],"summary":"Make a decision","description":"Evaluates a state against one or more typed questions with a System One decision model and returns calibrated answers. Ask every question that might matter in one call: questions are independent and evaluated in parallel. Attach images, audio or video as base64 data URLs to have Clef Omni judge them alongside the state.","responses":{"200":{"description":"Typed answers with probabilities","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["input_tokens","output_tokens"],"additionalProperties":false}},"required":["provider","model","answers","usage"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"anyOf":[{"type":"string","minLength":1},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/__schema0"}}]},"questions":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,128}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["type","instructions","criteria"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"minItems":2,"maxItems":10,"type":"array","items":{"$ref":"#/components/schemas/__schema0"}}},"required":["type","instructions","criteria"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"type":"object","properties":{"true":{"$ref":"#/components/schemas/__schema0"},"false":{"$ref":"#/components/schemas/__schema0"}},"required":["true","false"],"additionalProperties":false}},"required":["type","instructions"],"additionalProperties":false}]}},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"images":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","maxLength":5592472}},"audio":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","maxLength":11184876}},"videos":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","maxLength":22369688}}},"required":["state","questions"],"additionalProperties":false}}}}}},"/extractions":{"post":{"operationId":"postExtractions","tags":["extractions"],"summary":"Extract typed values","description":"Reads a state of text, plus up to four images, and returns one typed value per named field from a System One extraction model: spans, numbers, dates, times, durations, lists, estimates and forecasts, each with a confidence or an 80% interval. Ask for every field in one call: fields are answered in parallel, so thirty cost about the same as three.","responses":{"200":{"description":"Typed values with confidence","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"value":{"type":["string","null"]},"guess":{"type":["string","null"]},"p_null":{"type":["number","null"]},"confidence":{"type":["number","null"]},"span":{"anyOf":[{"type":"array","prefixItems":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}],"items":false,"minItems":2,"maxItems":2},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"value":{"type":["number","null"]},"guess":{"type":["number","null"]},"p_null":{"type":["number","null"]},"confidence":{"type":["number","null"]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"date"},"value":{"type":["string","null"]},"guess":{"type":["string","null"]},"p_null":{"type":["number","null"]},"confidence":{"type":["number","null"]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"time"},"value":{"type":["string","null"]},"guess":{"type":["string","null"]},"p_null":{"type":["number","null"]},"confidence":{"type":["number","null"]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"datetime"},"value":{"type":["string","null"]},"guess":{"type":["string","null"]},"p_null":{"type":["number","null"]},"confidence":{"type":["number","null"]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"duration"},"value":{"type":["number","null"]},"guess":{"type":["number","null"]},"p_null":{"type":["number","null"]},"confidence":{"type":["number","null"]},"unit":{"type":["string","null"]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"list"},"value":{"anyOf":[{"type":"array","items":{"type":["string","number"]}},{"type":"null"}]},"spans":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"array","prefixItems":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}],"items":false,"minItems":2,"maxItems":2},{"type":"null"}]}},{"type":"null"}]},"confidence":{"type":["number","null"]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"estimate"},"value":{"type":["number","string","null"]},"mean":{"type":["number","string","null"]},"median":{"type":["number","string","null"]},"p10":{"type":["number","string","null"]},"p90":{"type":["number","string","null"]},"p_below":{"type":["number","null"]},"p_above":{"type":["number","null"]},"quantiles":{"anyOf":[{"type":"array","items":{"type":["number","string"]}},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"forecast"},"value":{"anyOf":[{"type":"array","items":{"type":["number","null"]}},{"type":"null"}]},"median":{"anyOf":[{"type":"array","items":{"type":["number","null"]}},{"type":"null"}]},"p10":{"anyOf":[{"type":"array","items":{"type":["number","null"]}},{"type":"null"}]},"p90":{"anyOf":[{"type":"array","items":{"type":["number","null"]}},{"type":"null"}]},"steps":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"value":{"type":["number","string","null"]},"mean":{"type":["number","string","null"]},"median":{"type":["number","string","null"]},"p10":{"type":["number","string","null"]},"p90":{"type":["number","string","null"]},"p_below":{"type":["number","null"]},"p_above":{"type":["number","null"]},"quantiles":{"anyOf":[{"type":"array","items":{"type":["number","string"]}},{"type":"null"}]}},"additionalProperties":false}},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}]}},"truncated":{"type":"boolean"},"state_text":{"type":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["input_tokens","output_tokens"],"additionalProperties":false}},"required":["provider","model","answers","truncated","usage"],"additionalProperties":false}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","maxLength":200000},"fields":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"instructions":{"type":"string","minLength":1,"maxLength":2000},"null_threshold":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number"},"instructions":{"type":"string","minLength":1,"maxLength":2000},"unit":{"type":"string","minLength":1,"maxLength":32},"integer":{"type":"boolean"},"decimals":{"type":"integer","minimum":0,"maximum":6},"null_threshold":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["date","time","datetime"]},"instructions":{"type":"string","minLength":1,"maxLength":2000},"null_threshold":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"duration"},"instructions":{"type":"string","minLength":1,"maxLength":2000},"unit":{"type":"string","enum":["seconds","minutes","hours","days","weeks","months","years"]},"integer":{"type":"boolean"},"decimals":{"type":"integer","minimum":0,"maximum":6},"null_threshold":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"list"},"items":{"type":"string","enum":["text","number","date"]},"instructions":{"type":"string","minLength":1,"maxLength":2000},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["type","items"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"estimate"},"min":{"anyOf":[{"type":"number"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]},"max":{"anyOf":[{"type":"number"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]},"step":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"string","enum":["month","year"]}]},"scale":{"type":"string","enum":["linear","log"]},"unit":{"type":"string","minLength":1,"maxLength":32},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","min","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"forecast"},"min":{"type":"number"},"max":{"type":"number"},"horizon":{"type":"integer","minimum":1,"maximum":64},"interval":{"type":"string","enum":["step","minute","hour","day","week","month","quarter","year"]},"scale":{"type":"string","enum":["linear","log"]},"unit":{"type":"string","minLength":1,"maxLength":32},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","min","max"],"additionalProperties":false}]}},"images":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","maxLength":5592472}},"reference_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"options":{"type":"object","properties":{"include_quantiles":{"type":"boolean"},"return_state_text":{"type":"boolean"}},"additionalProperties":false},"model":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1}},"required":["fields"],"additionalProperties":false}}}}}},"/benchmarks":{"get":{"operationId":"getBenchmarks","tags":["benchmarks"],"summary":"List benchmark boards","description":"Returns every benchmark with its official standings, the people's baseline and a medal table. Artificial Analysis indexes come from the model catalogue with attribution on the page.","responses":{"200":{"description":"Benchmark boards","content":{"application/json":{"schema":{"type":"object","properties":{"boards":{"type":"array","items":{"type":"object","properties":{"benchmark":{"type":"object","properties":{"id":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"method":{"type":"string"},"category":{"type":"string","enum":["Vision","Creative","Reasoning","Calibration","Alignment"]},"scoring":{"type":"string","enum":["auto","votes"]},"input":{"type":"string","enum":["text","image"]},"artefact":{"anyOf":[{"type":"string","enum":["html","strudel"]},{"type":"null"}]},"playable":{"type":"boolean"},"decisionModels":{"type":"boolean"},"itemCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"itemsPerPlay":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scoreScale":{"type":"number","exclusiveMinimum":0},"scoreUnit":{"type":"string"},"metrics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"format":{"type":"string","enum":["number","percent","km","decades"]},"lowerIsBetter":{"type":"boolean"}},"required":["key","label","format"],"additionalProperties":false}},"credit":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","name","tagline","description","method","category","scoring","input","artefact","playable","decisionModels","itemCount","itemsPerPlay","scoreScale","scoreUnit","metrics","credit"],"additionalProperties":false},"standings":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tied":{"type":"boolean"},"runId":{"type":"string"},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"costPerItemUsd":{"type":["number","null"]},"latencyP50Ms":{"type":["number","null"]},"artificialAnalysis":{"anyOf":[{"type":"object","properties":{"intelligenceIndex":{"type":["number","null"]},"codingIndex":{"type":["number","null"]},"agenticIndex":{"type":["number","null"]}},"required":["intelligenceIndex","codingIndex","agenticIndex"],"additionalProperties":false},{"type":"null"}]}},"required":["rank","tied","runId","entrant","score","rating","metrics","costPerItemUsd","latencyP50Ms","artificialAnalysis"],"additionalProperties":false}},"human":{"anyOf":[{"type":"object","properties":{"rank":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tied":{"type":"boolean"},"runId":{"type":"string"},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"costPerItemUsd":{"type":["number","null"]},"latencyP50Ms":{"type":["number","null"]},"artificialAnalysis":{"anyOf":[{"type":"object","properties":{"intelligenceIndex":{"type":["number","null"]},"codingIndex":{"type":["number","null"]},"agenticIndex":{"type":["number","null"]}},"required":["intelligenceIndex","codingIndex","agenticIndex"],"additionalProperties":false},{"type":"null"}]}},"required":["rank","tied","runId","entrant","score","rating","metrics","costPerItemUsd","latencyP50Ms","artificialAnalysis"],"additionalProperties":false},{"type":"null"}]}},"required":["benchmark","standings","human"],"additionalProperties":false}},"medals":{"type":"array","items":{"type":"object","properties":{"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"gold":{"type":"integer","minimum":0,"maximum":9007199254740991},"silver":{"type":"integer","minimum":0,"maximum":9007199254740991},"bronze":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entrant","gold","silver","bronze"],"additionalProperties":false}}},"required":["boards","medals"],"additionalProperties":false}}}}},"hide":false}},"/benchmarks/runs":{"get":{"operationId":"getBenchmarksRuns","tags":["benchmarks"],"summary":"List benchmark runs","description":"The caller's runs, or a workspace's when workspace_id is set.","responses":{"200":{"description":"Runs","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"workspace_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postBenchmarksRuns","tags":["benchmarks"],"summary":"Start benchmark runs","description":"Runs a benchmark against up to five models you can use, including models on your own keys, or against active workspace routes when workspace_id is set. Personal runs stay private until you share them; workspace results also land as evidence on each model version. Pass dry_run=true on a personal run to check eligibility and estimate the cost without starting anything.","responses":{"200":{"description":"Started runs, or estimates for a dry run","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false}}},"required":["runs"],"additionalProperties":false},{"type":"object","properties":{"estimates":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string"},"name":{"type":"string"},"eligible":{"type":"boolean"},"reason":{"type":["string","null"]},"estimatedCostUsd":{"type":["number","null"]},"byok":{"type":"boolean"}},"required":["modelId","name","eligible","reason","estimatedCostUsd","byok"],"additionalProperties":false}}},"required":["estimates"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"dry_run","schema":{"type":"string","enum":["true","false"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"routeIds":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":1}},"workspace_id":{"type":"string","minLength":1}},"required":["benchmarkId","routeIds","workspace_id"]},{"type":"object","properties":{"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"modelIds":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":1}}},"required":["benchmarkId","modelIds"]}]}}}}}},"/benchmarks/runs/official":{"get":{"operationId":"getBenchmarksRunsOfficial","tags":["benchmarks"],"summary":"See which models have official runs","description":"Every benchmark against every candidate model: not run yet, queued, running, finished or failed, and whether it would run on the platform key or your own. Admins only.","responses":{"200":{"description":"Official run overview","content":{"application/json":{"schema":{"type":"object","properties":{"budget":{"type":"object","properties":{"monthlyUsd":{"type":"number","minimum":0},"spentThisMonthUsd":{"type":"number","minimum":0}},"required":["monthlyUsd","spentThisMonthUsd"],"additionalProperties":false},"boards":{"type":"array","items":{"type":"object","properties":{"benchmark":{"type":"object","properties":{"id":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"method":{"type":"string"},"category":{"type":"string","enum":["Vision","Creative","Reasoning","Calibration","Alignment"]},"scoring":{"type":"string","enum":["auto","votes"]},"input":{"type":"string","enum":["text","image"]},"artefact":{"anyOf":[{"type":"string","enum":["html","strudel"]},{"type":"null"}]},"playable":{"type":"boolean"},"decisionModels":{"type":"boolean"},"itemCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"itemsPerPlay":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scoreScale":{"type":"number","exclusiveMinimum":0},"scoreUnit":{"type":"string"},"metrics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"format":{"type":"string","enum":["number","percent","km","decades"]},"lowerIsBetter":{"type":"boolean"}},"required":["key","label","format"],"additionalProperties":false}},"credit":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","name","tagline","description","method","category","scoring","input","artefact","playable","decisionModels","itemCount","itemsPerPlay","scoreScale","scoreUnit","metrics","credit"],"additionalProperties":false},"entrants":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string","enum":["missing","unavailable","ineligible","queued","running","completed","failed","cancelled"]},"reason":{"type":["string","null"]},"credential":{"anyOf":[{"type":"string","enum":["platform","byok","mirror"]},{"type":"null"}]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["modelId","name","provider","status","reason","credential","run"],"additionalProperties":false}}},"required":["benchmark","entrants"],"additionalProperties":false}}},"required":["budget","boards"],"additionalProperties":false}}}}},"hide":false}},"/benchmarks/runs/queue":{"post":{"operationId":"postBenchmarksRunsQueue","tags":["benchmarks"],"summary":"Queue official runs for models without one","description":"Queues official runs for lineup and decision models from approved labs that have not run the current version, within the monthly budget. Runs you queue use your own keys where the platform has none. Admins only; the daily schedule calls the same queue on platform keys.","responses":{"200":{"description":"Queued runs","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false}},"skippedForBudget":{"type":"boolean"},"spentThisMonthUsd":{"type":"number"},"remaining":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["queued","skippedForBudget","spentThisMonthUsd","remaining"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"benchmarkIds":{"type":"array","items":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]}},"modelIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"retryFailed":{"type":"boolean"}}}}}}}},"/benchmarks/runs/shared/{token}":{"get":{"operationId":"getBenchmarksRunsSharedByToken","tags":["benchmarks"],"summary":"Read a shared benchmark run","responses":{"200":{"description":"Shared run","content":{"application/json":{"schema":{"type":"object","properties":{"benchmark":{"type":"object","properties":{"id":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"method":{"type":"string"},"category":{"type":"string","enum":["Vision","Creative","Reasoning","Calibration","Alignment"]},"scoring":{"type":"string","enum":["auto","votes"]},"input":{"type":"string","enum":["text","image"]},"artefact":{"anyOf":[{"type":"string","enum":["html","strudel"]},{"type":"null"}]},"playable":{"type":"boolean"},"decisionModels":{"type":"boolean"},"itemCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"itemsPerPlay":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scoreScale":{"type":"number","exclusiveMinimum":0},"scoreUnit":{"type":"string"},"metrics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"format":{"type":"string","enum":["number","percent","km","decades"]},"lowerIsBetter":{"type":"boolean"}},"required":["key","label","format"],"additionalProperties":false}},"credit":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","name","tagline","description","method","category","scoring","input","artefact","playable","decisionModels","itemCount","itemsPerPlay","scoreScale","scoreUnit","metrics","credit"],"additionalProperties":false},"run":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"imagePath":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","prompt","imagePath","data"],"additionalProperties":false},"reveal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"result":{"anyOf":[{"type":"object","properties":{"itemId":{"type":"string"},"score":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"answer":{},"output":{"type":"string"},"artefact":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["html","strudel"]},"content":{"type":"string"}},"required":["kind","content"],"additionalProperties":false},{"type":"null"}]},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"error":{"type":["string","null"]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"latencyMs":{"type":"number","minimum":0},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["itemId","score","answer","output","artefact","detail","error","latencyMs","inputTokens","outputTokens","costUsd"],"additionalProperties":false},{"type":"null"}]}},"required":["item","reveal","result"],"additionalProperties":false}},"officialRank":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"officialCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["benchmark","run","items","officialRank","officialCount"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"token","schema":{"type":"string","minLength":1},"required":true}]}},"/benchmarks/runs/{run_id}":{"get":{"operationId":"getBenchmarksRunsByRunId","tags":["benchmarks"],"summary":"Read a benchmark run","responses":{"200":{"description":"Run detail","content":{"application/json":{"schema":{"type":"object","properties":{"benchmark":{"type":"object","properties":{"id":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"method":{"type":"string"},"category":{"type":"string","enum":["Vision","Creative","Reasoning","Calibration","Alignment"]},"scoring":{"type":"string","enum":["auto","votes"]},"input":{"type":"string","enum":["text","image"]},"artefact":{"anyOf":[{"type":"string","enum":["html","strudel"]},{"type":"null"}]},"playable":{"type":"boolean"},"decisionModels":{"type":"boolean"},"itemCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"itemsPerPlay":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scoreScale":{"type":"number","exclusiveMinimum":0},"scoreUnit":{"type":"string"},"metrics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"format":{"type":"string","enum":["number","percent","km","decades"]},"lowerIsBetter":{"type":"boolean"}},"required":["key","label","format"],"additionalProperties":false}},"credit":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","name","tagline","description","method","category","scoring","input","artefact","playable","decisionModels","itemCount","itemsPerPlay","scoreScale","scoreUnit","metrics","credit"],"additionalProperties":false},"run":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"imagePath":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","prompt","imagePath","data"],"additionalProperties":false},"reveal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"result":{"anyOf":[{"type":"object","properties":{"itemId":{"type":"string"},"score":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"answer":{},"output":{"type":"string"},"artefact":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["html","strudel"]},"content":{"type":"string"}},"required":["kind","content"],"additionalProperties":false},{"type":"null"}]},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"error":{"type":["string","null"]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"latencyMs":{"type":"number","minimum":0},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["itemId","score","answer","output","artefact","detail","error","latencyMs","inputTokens","outputTokens","costUsd"],"additionalProperties":false},{"type":"null"}]}},"required":["item","reveal","result"],"additionalProperties":false}},"officialRank":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"officialCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["benchmark","run","items","officialRank","officialCount"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"run_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchBenchmarksRunsByRunId","tags":["benchmarks"],"summary":"Share, unshare, withdraw or restore a benchmark run","description":"Owners manage their runs; admins also manage official runs.","responses":{"200":{"description":"The run","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"run_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","link","public"]}},"required":["visibility"]}}}}},"delete":{"operationId":"deleteBenchmarksRunsByRunId","tags":["benchmarks"],"summary":"Delete a benchmark run","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"run_id","schema":{"type":"string","minLength":1},"required":true}]}},"/benchmarks/runs/{run_id}/cancel":{"post":{"operationId":"postBenchmarksRunsByRunIdCancel","tags":["benchmarks"],"summary":"Cancel a queued or running benchmark run","responses":{"200":{"description":"The cancelled run","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"run_id","schema":{"type":"string","minLength":1},"required":true}]}},"/benchmarks/runs/{run_id}/retry":{"post":{"operationId":"postBenchmarksRunsByRunIdRetry","tags":["benchmarks"],"summary":"Retry a benchmark run","description":"Keeps the answers it already has and asks again only for the items that got none. Pass failedChecks=true on a finished creative run to also ask again for items whose artefact failed the checks. Admins retrying an official run take it over, so their keys apply.","responses":{"200":{"description":"The requeued run","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"run_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"failedChecks":{"type":"boolean"}}}}}}}},"/benchmarks/votes":{"post":{"operationId":"postBenchmarksVotes","tags":["benchmarks"],"summary":"Vote on a blind arena pair","responses":{"200":{"description":"Revealed pair","content":{"application/json":{"schema":{"type":"object","properties":{"left":{"type":"string"},"right":{"type":"string"},"winner":{"type":"string","enum":["left","right","tie"]}},"required":["left","right","winner"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1},"winner":{"type":"string","enum":["left","right","tie"]}},"required":["token","winner"]}}}}}},"/benchmarks/{benchmark_id}":{"get":{"operationId":"getBenchmarksByBenchmarkId","tags":["benchmarks"],"summary":"Read one benchmark board","responses":{"200":{"description":"Benchmark board","content":{"application/json":{"schema":{"type":"object","properties":{"benchmark":{"type":"object","properties":{"id":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"method":{"type":"string"},"category":{"type":"string","enum":["Vision","Creative","Reasoning","Calibration","Alignment"]},"scoring":{"type":"string","enum":["auto","votes"]},"input":{"type":"string","enum":["text","image"]},"artefact":{"anyOf":[{"type":"string","enum":["html","strudel"]},{"type":"null"}]},"playable":{"type":"boolean"},"decisionModels":{"type":"boolean"},"itemCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"itemsPerPlay":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scoreScale":{"type":"number","exclusiveMinimum":0},"scoreUnit":{"type":"string"},"metrics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"format":{"type":"string","enum":["number","percent","km","decades"]},"lowerIsBetter":{"type":"boolean"}},"required":["key","label","format"],"additionalProperties":false}},"credit":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","name","tagline","description","method","category","scoring","input","artefact","playable","decisionModels","itemCount","itemsPerPlay","scoreScale","scoreUnit","metrics","credit"],"additionalProperties":false},"standings":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tied":{"type":"boolean"},"runId":{"type":"string"},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"costPerItemUsd":{"type":["number","null"]},"latencyP50Ms":{"type":["number","null"]},"artificialAnalysis":{"anyOf":[{"type":"object","properties":{"intelligenceIndex":{"type":["number","null"]},"codingIndex":{"type":["number","null"]},"agenticIndex":{"type":["number","null"]}},"required":["intelligenceIndex","codingIndex","agenticIndex"],"additionalProperties":false},{"type":"null"}]}},"required":["rank","tied","runId","entrant","score","rating","metrics","costPerItemUsd","latencyP50Ms","artificialAnalysis"],"additionalProperties":false}},"human":{"anyOf":[{"type":"object","properties":{"rank":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tied":{"type":"boolean"},"runId":{"type":"string"},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"costPerItemUsd":{"type":["number","null"]},"latencyP50Ms":{"type":["number","null"]},"artificialAnalysis":{"anyOf":[{"type":"object","properties":{"intelligenceIndex":{"type":["number","null"]},"codingIndex":{"type":["number","null"]},"agenticIndex":{"type":["number","null"]}},"required":["intelligenceIndex","codingIndex","agenticIndex"],"additionalProperties":false},{"type":"null"}]}},"required":["rank","tied","runId","entrant","score","rating","metrics","costPerItemUsd","latencyP50Ms","artificialAnalysis"],"additionalProperties":false},{"type":"null"}]}},"required":["benchmark","standings","human"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"benchmark_id","schema":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"required":true}]}},"/benchmarks/{benchmark_id}/plays":{"post":{"operationId":"postBenchmarksByBenchmarkIdPlays","tags":["benchmarks"],"summary":"Play against the board","description":"Send an empty body to deal a game. Send the game's token with your answers to score it.","responses":{"200":{"description":"A new game, or your result","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"benchmark":{"type":"object","properties":{"id":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"method":{"type":"string"},"category":{"type":"string","enum":["Vision","Creative","Reasoning","Calibration","Alignment"]},"scoring":{"type":"string","enum":["auto","votes"]},"input":{"type":"string","enum":["text","image"]},"artefact":{"anyOf":[{"type":"string","enum":["html","strudel"]},{"type":"null"}]},"playable":{"type":"boolean"},"decisionModels":{"type":"boolean"},"itemCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"itemsPerPlay":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scoreScale":{"type":"number","exclusiveMinimum":0},"scoreUnit":{"type":"string"},"metrics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"format":{"type":"string","enum":["number","percent","km","decades"]},"lowerIsBetter":{"type":"boolean"}},"required":["key","label","format"],"additionalProperties":false}},"credit":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","name","tagline","description","method","category","scoring","input","artefact","playable","decisionModels","itemCount","itemsPerPlay","scoreScale","scoreUnit","metrics","credit"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"imagePath":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","prompt","imagePath","data"],"additionalProperties":false}}},"required":["token","benchmark","items"],"additionalProperties":false},{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"imagePath":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","prompt","imagePath","data"],"additionalProperties":false},"reveal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"result":{"anyOf":[{"type":"object","properties":{"itemId":{"type":"string"},"score":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"answer":{},"output":{"type":"string"},"artefact":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["html","strudel"]},"content":{"type":"string"}},"required":["kind","content"],"additionalProperties":false},{"type":"null"}]},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"error":{"type":["string","null"]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"latencyMs":{"type":"number","minimum":0},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["itemId","score","answer","output","artefact","detail","error","latencyMs","inputTokens","outputTokens","costUsd"],"additionalProperties":false},{"type":"null"}]}},"required":["item","reveal","result"],"additionalProperties":false}},"officialRank":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"officialCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["run","items","officialRank","officialCount"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"benchmark_id","schema":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"token":{"type":"string","minLength":1},"answers":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"answer":{}},"required":["itemId","answer"]}}},"required":["token","answers"]},{"type":"object","properties":{},"additionalProperties":false}]}}}}}},"/benchmarks/{benchmark_id}/arena":{"get":{"operationId":"getBenchmarksByBenchmarkIdArena","tags":["benchmarks"],"summary":"Draw a blind pair to vote on","responses":{"200":{"description":"Arena pair","content":{"application/json":{"schema":{"type":"object","properties":{"pair":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"prompt":{"type":"string"},"left":{"type":"object","properties":{"kind":{"type":"string","enum":["html","strudel"]},"content":{"type":"string"}},"required":["kind","content"],"additionalProperties":false},"right":{"type":"object","properties":{"kind":{"type":"string","enum":["html","strudel"]},"content":{"type":"string"}},"required":["kind","content"],"additionalProperties":false}},"required":["token","benchmarkId","prompt","left","right"],"additionalProperties":false},{"type":"null"}]}},"required":["pair"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"benchmark_id","schema":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"required":true}]}},"/benchmarks/{benchmark_id}/models/{model_id}":{"get":{"operationId":"getBenchmarksByBenchmarkIdModelsByModelId","tags":["benchmarks"],"summary":"Read a model's official run on one benchmark","responses":{"200":{"description":"Entrant detail","content":{"application/json":{"schema":{"type":"object","properties":{"benchmark":{"type":"object","properties":{"id":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"method":{"type":"string"},"category":{"type":"string","enum":["Vision","Creative","Reasoning","Calibration","Alignment"]},"scoring":{"type":"string","enum":["auto","votes"]},"input":{"type":"string","enum":["text","image"]},"artefact":{"anyOf":[{"type":"string","enum":["html","strudel"]},{"type":"null"}]},"playable":{"type":"boolean"},"decisionModels":{"type":"boolean"},"itemCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"itemsPerPlay":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scoreScale":{"type":"number","exclusiveMinimum":0},"scoreUnit":{"type":"string"},"metrics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"format":{"type":"string","enum":["number","percent","km","decades"]},"lowerIsBetter":{"type":"boolean"}},"required":["key","label","format"],"additionalProperties":false}},"credit":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","name","tagline","description","method","category","scoring","input","artefact","playable","decisionModels","itemCount","itemsPerPlay","scoreScale","scoreUnit","metrics","credit"],"additionalProperties":false},"run":{"type":"object","properties":{"id":{"type":"string"},"benchmarkId":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entrant":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"modelId":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"via":{"type":"object","properties":{"modelId":{"type":"string"},"provider":{"type":"string"}},"required":["modelId","provider"],"additionalProperties":false}},"required":["kind","modelId","provider","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"route"},"workspaceId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"}},"required":["kind","workspaceId","routeId","versionId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"human"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},"scope":{"type":"string","enum":["official","personal","workspace","human"]},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"visibility":{"type":"string","enum":["private","link","public"]},"itemsTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"itemsCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"score":{"anyOf":[{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"rating":{"anyOf":[{"type":"object","properties":{"rating":{"type":"number"},"wins":{"type":"integer","minimum":0,"maximum":9007199254740991},"losses":{"type":"integer","minimum":0,"maximum":9007199254740991},"ties":{"type":"integer","minimum":0,"maximum":9007199254740991},"winRate":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"required":["rating","wins","losses","ties","winRate"],"additionalProperties":false},{"type":"null"}]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"latencyP50Ms":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["inputTokens","outputTokens","costUsd","latencyP50Ms"],"additionalProperties":false},"shareToken":{"type":["string","null"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","benchmarkId","version","entrant","scope","status","visibility","itemsTotal","itemsCompleted","score","metrics","rating","usage","shareToken","failureReason","createdAt","completedAt"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"imagePath":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","prompt","imagePath","data"],"additionalProperties":false},"reveal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"result":{"anyOf":[{"type":"object","properties":{"itemId":{"type":"string"},"score":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"answer":{},"output":{"type":"string"},"artefact":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["html","strudel"]},"content":{"type":"string"}},"required":["kind","content"],"additionalProperties":false},{"type":"null"}]},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"error":{"type":["string","null"]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"latencyMs":{"type":"number","minimum":0},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["itemId","score","answer","output","artefact","detail","error","latencyMs","inputTokens","outputTokens","costUsd"],"additionalProperties":false},{"type":"null"}]}},"required":["item","reveal","result"],"additionalProperties":false}},"officialRank":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"officialCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["benchmark","run","items","officialRank","officialCount"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"benchmark_id","schema":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"required":true},{"in":"path","name":"model_id","schema":{"type":"string","minLength":1},"required":true}]}},"/benchmarks/{benchmark_id}/photos/{photo_id}":{"get":{"operationId":"getBenchmarksByBenchmarkIdPhotosByPhotoId","tags":["benchmarks"],"summary":"Read a benchmark photo","description":"Serves a cached copy of the photo with its metadata stripped.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"benchmark_id","schema":{"type":"string","enum":["geoguess","hamster-wheel","countdown","fermi-bets","long-odds","strudel-groove","smuggled-note","keep-a-secret","yes-man"]},"required":true},{"in":"path","name":"photo_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sites":{"get":{"operationId":"getSites","tags":["sites"],"summary":"List sites","responses":{"200":{"description":"Sites","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"brief":{"type":"string","maxLength":4000},"projectId":{"type":["string","null"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"kind":{"type":"string","enum":["landing","marketing","portfolio","dashboard","app","form","docs","component","commerce","booking","event","publication","community","education","ai-tool","game"]},"scope":{"type":"string","enum":["component","page","site"]},"pageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false}},"required":["id","title","brief","projectId","revision","createdAt","updatedAt","kind","scope","pageCount","theme"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","exclusiveMinimum":0,"maximum":100}}]},"post":{"operationId":"postSites","tags":["sites"],"summary":"Generate or refine a site","description":"Classifies the brief with Jev, then streams site changes as JSON patch events. High-confidence single visual edits to a selected element are applied directly by Jev; broader or uncertain work uses a tiered coding model. Pass siteId to refine an existing site instead of starting fresh. Ends with the saved record.","responses":{"200":{"description":"Server-sent site events"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"sourceIds":{"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"projectId":{"type":"string","minLength":1},"siteId":{"type":"string","minLength":1},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"target":{"type":"object","properties":{"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},"elementKey":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"required":["pageId","elementKey"],"additionalProperties":false},"model":{"type":"string","minLength":1},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"additionalProperties":false},"referenceUrl":{"type":"string","maxLength":2048}},"required":["prompt"],"additionalProperties":false}}}}}},"/sites/shared/{token}/images/{image_id}":{"get":{"operationId":"getSitesSharedByTokenImagesByImageId","tags":["sites"],"summary":"Serve an image referenced by a publicly shared site","responses":{"200":{"description":"Image file"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"token","schema":{"type":"string","minLength":32},"required":true},{"in":"path","name":"image_id","schema":{"type":"string","minLength":1},"required":true}]}},"/sites/{site_id}":{"get":{"operationId":"getSitesBySiteId","tags":["sites"],"summary":"Get a site","responses":{"200":{"description":"The site","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"brief":{"type":"string","maxLength":4000},"projectId":{"type":["string","null"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"plan":{"type":"object","properties":{"kind":{"type":"string","enum":["landing","marketing","portfolio","dashboard","app","form","docs","component","commerce","booking","event","publication","community","education","ai-tool","game"]},"scope":{"type":"string","enum":["component","page","site"]},"tier":{"type":"string","enum":["low","medium","high","ultra"]},"tone":{"type":"string","enum":["plain","friendly","bold","editorial","technical"]},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false},"interactive":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"string","enum":["content","navigation","forms","search","filtering","visualisation","crud","authentication","commerce","booking","files","ai","realtime","payments"]}},"confidence":{"type":"number","minimum":0,"maximum":1},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"provider":{"type":"string"},"model":{"type":"string"}},"required":["kind","scope","tier","tone","theme","interactive","capabilities","confidence"],"additionalProperties":false},"project":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":400},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false},"capabilities":{"type":"array","items":{"type":"string","enum":["content","navigation","forms","search","filtering","visualisation","crud","authentication","commerce","booking","files","ai","realtime","payments"]}},"pages":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},"additionalProperties":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":80,"pattern":"^\\/[a-z0-9\\-/]*$"},"title":{"type":"string","minLength":1,"maxLength":80},"root":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"elements":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"props":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"children":{"default":[],"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"visible":{"$ref":"#/components/schemas/__schema1"},"repeat":{"type":"object","properties":{"statePath":{"type":"string","pattern":"^\\/[A-Za-z0-9_\\-/]*$"},"key":{"type":"string","minLength":1}},"required":["statePath"],"additionalProperties":false},"on":{"type":"object","propertyNames":{"type":"string","enum":["press","change","submit"]},"additionalProperties":{"type":"object","properties":{"action":{"type":"string","enum":["setState","toggleState","pushState","removeState","navigate"]},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["action"],"additionalProperties":false}},"style":{"type":"object","properties":{"width":{"type":"string","enum":["narrow","content","wide","full"]},"spacing":{"type":"string","enum":["none","compact","normal","generous","dramatic"]},"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"tone":{"type":"string","enum":["inherit","muted","primary"]},"surface":{"type":"string","enum":["transparent","canvas","muted","card","primary","inverted","glass"]},"align":{"type":"string","enum":["start","center","end"]},"border":{"type":"string","enum":["none","subtle","strong"]},"shadow":{"type":"string","enum":["none","sm","md","xl"]},"radius":{"type":"string","enum":["none","sm","md","lg","xl","full"]},"motion":{"type":"string","enum":["none","fade","rise","scale","slide"]},"bleed":{"type":"boolean"},"sticky":{"type":"boolean"}},"additionalProperties":false}},"required":["type","props","children"],"additionalProperties":false}},"state":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["path","title","root","elements"],"additionalProperties":false}},"collections":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"fields":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,63}$"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean"]},"required":{"default":false,"type":"boolean"}},"required":["type","required"],"additionalProperties":false}},"maxRecords":{"default":1000,"type":"integer","minimum":1,"maximum":1000}},"required":["label","fields","maxRecords"],"additionalProperties":false}},"dataBindings":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"source"},"sourceId":{"type":"string","minLength":1,"maxLength":200},"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"statePath":{"type":"string","maxLength":128,"pattern":"^\\/[a-zA-Z][a-zA-Z0-9_-]*(?:\\/[a-zA-Z0-9_-]+)*$"}},"required":["kind","sourceId","pageId","statePath"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection"},"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"statePath":{"type":"string","maxLength":128,"pattern":"^\\/[a-zA-Z][a-zA-Z0-9_-]*(?:\\/[a-zA-Z0-9_-]+)*$"},"collectionId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"required":["kind","pageId","statePath","collectionId"],"additionalProperties":false}]}}},"required":["title","theme","capabilities","pages"],"additionalProperties":false},"issues":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning"]},"pageId":{"type":"string"},"elementKey":{"type":"string"},"message":{"type":"string"}},"required":["severity","message"],"additionalProperties":false}},"quality":{"anyOf":[{"type":"object","properties":{"coverage":{"type":"number","minimum":0,"maximum":1},"placeholders":{"type":"number","minimum":0,"maximum":1},"coherent":{"type":"number","minimum":0,"maximum":1},"readable":{"type":"number","minimum":0,"maximum":1},"repairs":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsRepair":{"type":"boolean"},"confidence":{"type":"number","minimum":0,"maximum":1},"repairConfidence":{"type":"number","minimum":0,"maximum":1}},"required":["coverage","placeholders","coherent","repairs","needsRepair","confidence"],"additionalProperties":false},{"type":"null"}]},"turns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant","edit"]},"prompt":{"type":"string","maxLength":4000},"createdAt":{"type":"string"},"plan":{"type":"object","properties":{"kind":{"type":"string","enum":["landing","marketing","portfolio","dashboard","app","form","docs","component","commerce","booking","event","publication","community","education","ai-tool","game"]},"scope":{"type":"string","enum":["component","page","site"]},"tier":{"type":"string","enum":["low","medium","high","ultra"]},"tone":{"type":"string","enum":["plain","friendly","bold","editorial","technical"]},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false},"interactive":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"string","enum":["content","navigation","forms","search","filtering","visualisation","crud","authentication","commerce","booking","files","ai","realtime","payments"]}},"confidence":{"type":"number","minimum":0,"maximum":1},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"provider":{"type":"string"},"model":{"type":"string"}},"required":["kind","scope","tier","tone","theme","interactive","capabilities","confidence"],"additionalProperties":false},"intent":{"type":"string","enum":["tweak","restructure","page","theme"]},"target":{"type":"object","properties":{"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},"elementKey":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"required":["pageId","elementKey"],"additionalProperties":false},"provider":{"type":"string"},"model":{"type":"string"},"trace":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"decision"},"version":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":160},"stage":{"type":"string","enum":["plan","refinement","quality"]},"source":{"type":"string","enum":["decision","heuristic","unavailable"]},"summary":{"type":"string","minLength":1,"maxLength":300},"effects":{"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":240}},"questions":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"question":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["type","instructions","criteria"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"minItems":2,"maxItems":10,"type":"array","items":{"$ref":"#/components/schemas/__schema0"}}},"required":["type","instructions","criteria"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"type":"object","properties":{"true":{"$ref":"#/components/schemas/__schema0"},"false":{"$ref":"#/components/schemas/__schema0"}},"required":["true","false"],"additionalProperties":false}},"required":["type","instructions"],"additionalProperties":false}]},"answer":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"required":["id","question"],"additionalProperties":false}},"provider":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["kind","version","id","stage","source","summary","effects","questions","createdAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generation"},"version":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":160},"stage":{"type":"string","enum":["build","repair"]},"outcome":{"type":"string","enum":["applied","discarded"]},"summary":{"type":"string","minLength":1,"maxLength":300},"provider":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"patchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejectedPatchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"skippedLineCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["kind","version","id","stage","outcome","summary","provider","model","patchCount","rejectedPatchCount","durationMs","createdAt"],"additionalProperties":false}]}}},"required":["id","role","prompt","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","title","brief","projectId","revision","plan","project","issues","quality","turns","createdAt","updatedAt"],"additionalProperties":false}},"required":["site"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"patch":{"operationId":"patchSitesBySiteId","tags":["sites"],"summary":"Edit a site without a model","description":"Applies JSON patches from the studio inspector (prop edits, moves, removals, duplicates) to the saved site, validates the result and stores a new revision.","responses":{"200":{"description":"The site","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"brief":{"type":"string","maxLength":4000},"projectId":{"type":["string","null"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"plan":{"type":"object","properties":{"kind":{"type":"string","enum":["landing","marketing","portfolio","dashboard","app","form","docs","component","commerce","booking","event","publication","community","education","ai-tool","game"]},"scope":{"type":"string","enum":["component","page","site"]},"tier":{"type":"string","enum":["low","medium","high","ultra"]},"tone":{"type":"string","enum":["plain","friendly","bold","editorial","technical"]},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false},"interactive":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"string","enum":["content","navigation","forms","search","filtering","visualisation","crud","authentication","commerce","booking","files","ai","realtime","payments"]}},"confidence":{"type":"number","minimum":0,"maximum":1},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"provider":{"type":"string"},"model":{"type":"string"}},"required":["kind","scope","tier","tone","theme","interactive","capabilities","confidence"],"additionalProperties":false},"project":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":400},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false},"capabilities":{"type":"array","items":{"type":"string","enum":["content","navigation","forms","search","filtering","visualisation","crud","authentication","commerce","booking","files","ai","realtime","payments"]}},"pages":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},"additionalProperties":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":80,"pattern":"^\\/[a-z0-9\\-/]*$"},"title":{"type":"string","minLength":1,"maxLength":80},"root":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"elements":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"props":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"children":{"default":[],"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"visible":{"$ref":"#/components/schemas/__schema1"},"repeat":{"type":"object","properties":{"statePath":{"type":"string","pattern":"^\\/[A-Za-z0-9_\\-/]*$"},"key":{"type":"string","minLength":1}},"required":["statePath"],"additionalProperties":false},"on":{"type":"object","propertyNames":{"type":"string","enum":["press","change","submit"]},"additionalProperties":{"type":"object","properties":{"action":{"type":"string","enum":["setState","toggleState","pushState","removeState","navigate"]},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["action"],"additionalProperties":false}},"style":{"type":"object","properties":{"width":{"type":"string","enum":["narrow","content","wide","full"]},"spacing":{"type":"string","enum":["none","compact","normal","generous","dramatic"]},"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"tone":{"type":"string","enum":["inherit","muted","primary"]},"surface":{"type":"string","enum":["transparent","canvas","muted","card","primary","inverted","glass"]},"align":{"type":"string","enum":["start","center","end"]},"border":{"type":"string","enum":["none","subtle","strong"]},"shadow":{"type":"string","enum":["none","sm","md","xl"]},"radius":{"type":"string","enum":["none","sm","md","lg","xl","full"]},"motion":{"type":"string","enum":["none","fade","rise","scale","slide"]},"bleed":{"type":"boolean"},"sticky":{"type":"boolean"}},"additionalProperties":false}},"required":["type","props","children"],"additionalProperties":false}},"state":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["path","title","root","elements"],"additionalProperties":false}},"collections":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"fields":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,63}$"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean"]},"required":{"default":false,"type":"boolean"}},"required":["type","required"],"additionalProperties":false}},"maxRecords":{"default":1000,"type":"integer","minimum":1,"maximum":1000}},"required":["label","fields","maxRecords"],"additionalProperties":false}},"dataBindings":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"source"},"sourceId":{"type":"string","minLength":1,"maxLength":200},"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"statePath":{"type":"string","maxLength":128,"pattern":"^\\/[a-zA-Z][a-zA-Z0-9_-]*(?:\\/[a-zA-Z0-9_-]+)*$"}},"required":["kind","sourceId","pageId","statePath"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection"},"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"statePath":{"type":"string","maxLength":128,"pattern":"^\\/[a-zA-Z][a-zA-Z0-9_-]*(?:\\/[a-zA-Z0-9_-]+)*$"},"collectionId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"required":["kind","pageId","statePath","collectionId"],"additionalProperties":false}]}}},"required":["title","theme","capabilities","pages"],"additionalProperties":false},"issues":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning"]},"pageId":{"type":"string"},"elementKey":{"type":"string"},"message":{"type":"string"}},"required":["severity","message"],"additionalProperties":false}},"quality":{"anyOf":[{"type":"object","properties":{"coverage":{"type":"number","minimum":0,"maximum":1},"placeholders":{"type":"number","minimum":0,"maximum":1},"coherent":{"type":"number","minimum":0,"maximum":1},"readable":{"type":"number","minimum":0,"maximum":1},"repairs":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsRepair":{"type":"boolean"},"confidence":{"type":"number","minimum":0,"maximum":1},"repairConfidence":{"type":"number","minimum":0,"maximum":1}},"required":["coverage","placeholders","coherent","repairs","needsRepair","confidence"],"additionalProperties":false},{"type":"null"}]},"turns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant","edit"]},"prompt":{"type":"string","maxLength":4000},"createdAt":{"type":"string"},"plan":{"type":"object","properties":{"kind":{"type":"string","enum":["landing","marketing","portfolio","dashboard","app","form","docs","component","commerce","booking","event","publication","community","education","ai-tool","game"]},"scope":{"type":"string","enum":["component","page","site"]},"tier":{"type":"string","enum":["low","medium","high","ultra"]},"tone":{"type":"string","enum":["plain","friendly","bold","editorial","technical"]},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false},"interactive":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"string","enum":["content","navigation","forms","search","filtering","visualisation","crud","authentication","commerce","booking","files","ai","realtime","payments"]}},"confidence":{"type":"number","minimum":0,"maximum":1},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"provider":{"type":"string"},"model":{"type":"string"}},"required":["kind","scope","tier","tone","theme","interactive","capabilities","confidence"],"additionalProperties":false},"intent":{"type":"string","enum":["tweak","restructure","page","theme"]},"target":{"type":"object","properties":{"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},"elementKey":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"required":["pageId","elementKey"],"additionalProperties":false},"provider":{"type":"string"},"model":{"type":"string"},"trace":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"decision"},"version":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":160},"stage":{"type":"string","enum":["plan","refinement","quality"]},"source":{"type":"string","enum":["decision","heuristic","unavailable"]},"summary":{"type":"string","minLength":1,"maxLength":300},"effects":{"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":240}},"questions":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"question":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["type","instructions","criteria"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"minItems":2,"maxItems":10,"type":"array","items":{"$ref":"#/components/schemas/__schema0"}}},"required":["type","instructions","criteria"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"type":"object","properties":{"true":{"$ref":"#/components/schemas/__schema0"},"false":{"$ref":"#/components/schemas/__schema0"}},"required":["true","false"],"additionalProperties":false}},"required":["type","instructions"],"additionalProperties":false}]},"answer":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"required":["id","question"],"additionalProperties":false}},"provider":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["kind","version","id","stage","source","summary","effects","questions","createdAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generation"},"version":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":160},"stage":{"type":"string","enum":["build","repair"]},"outcome":{"type":"string","enum":["applied","discarded"]},"summary":{"type":"string","minLength":1,"maxLength":300},"provider":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"patchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejectedPatchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"skippedLineCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["kind","version","id","stage","outcome","summary","provider","model","patchCount","rejectedPatchCount","durationMs","createdAt"],"additionalProperties":false}]}}},"required":["id","role","prompt","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","title","brief","projectId","revision","plan","project","issues","quality","turns","createdAt","updatedAt"],"additionalProperties":false}},"required":["site"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":"string","minLength":1},"patches":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["add","replace","remove"]},"path":{"type":"string","minLength":1,"maxLength":512},"value":{}},"required":["op","path"],"additionalProperties":false}},"summary":{"type":"string","minLength":1,"maxLength":200}},"required":["patches","summary"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteSitesBySiteId","tags":["sites"],"summary":"Delete a site","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/sites/{site_id}/verify":{"post":{"operationId":"postSitesBySiteIdVerify","tags":["sites"],"summary":"Verify a site revision in desktop and mobile browsers","responses":{"200":{"description":"Browser evidence","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"siteId":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["passed","failed","unavailable"]},"checkedAt":{"type":"string"},"checks":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"viewport":{"type":"string","enum":["desktop","mobile"]},"status":{"type":"string","enum":["passed","failed","unavailable"]},"diagnostics":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["console","page_error","request_failure","assertion"]},"message":{"type":"string","maxLength":2000}},"required":["kind","message"],"additionalProperties":false}}},"required":["pageId","viewport","status","diagnostics"],"additionalProperties":false}},"repairedFromRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","siteId","revision","status","checkedAt","checks"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"repair":{"default":false,"type":"boolean"}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/sites/{site_id}/build":{"post":{"operationId":"postSitesBySiteIdBuild","tags":["sites"],"summary":"Build a site in the project sandbox","description":"Hands the generated project files to the sandbox worker as a feature-implementation run against the project coding environment.","responses":{"200":{"description":"Queued sandbox run","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"repo":{"type":"string","minLength":1}},"required":["runId","repo"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"instructions":{"type":"string","maxLength":2000},"target":{"default":"react-router","type":"string","enum":["react-router","next","tanstack-router"]}},"required":["projectId"],"additionalProperties":false}}}}}},"/sites/{site_id}/images":{"post":{"operationId":"postSitesBySiteIdImages","tags":["sites"],"summary":"Generate images for the placeholders of a site","description":"Generates an image for each empty image slot (split heroes, Image elements, galleries, team portraits) from its alt text, stores them as outputs and patches the site.","responses":{"200":{"description":"Server-sent image progress and the site with generated images"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":12}},"additionalProperties":false}}}}}},"/sites/{site_id}/pull_request":{"post":{"operationId":"postSitesBySiteIdPullRequest","tags":["sites"],"summary":"Open a pull request with the generated site","description":"Commits the deterministic project files to a new branch of the connected repository and opens a pull request. No model or sandbox run is involved.","responses":{"200":{"description":"Pull request","content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","minLength":1},"branch":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"fileCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["repo","branch","number","url","fileCount"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"directory":{"type":"string","maxLength":120,"pattern":"^(?!\\.)[A-Za-z0-9._\\-/]*$"},"title":{"type":"string","minLength":1,"maxLength":120},"target":{"default":"react-router","type":"string","enum":["react-router","next","tanstack-router"]}},"required":["projectId"],"additionalProperties":false}}}}}},"/sites/{site_id}/files":{"get":{"operationId":"getSitesBySiteIdFiles","tags":["sites"],"summary":"Export a site as project files","description":"Deterministically generates a runnable React Router, Next.js or TanStack Router project from the saved site.","responses":{"200":{"description":"Generated files","content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","enum":["react-router","next","tanstack-router"]},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":256},"content":{"type":"string"}},"required":["path","content"],"additionalProperties":false}}},"required":["target","files"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"target","schema":{"default":"react-router","type":"string","enum":["react-router","next","tanstack-router"]}}]}},"/sites/{site_id}/data":{"get":{"operationId":"getSitesBySiteIdData","tags":["sites"],"summary":"Read scoped site data","description":"Reads against the revision the caller names, so stale editors see a conflict.","responses":{"200":{"description":"Site data","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bindings":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{}},"runtime":{"type":"object","properties":{"enabled":{"type":"boolean"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["enabled","revision"],"additionalProperties":false}},"required":["revision","bindings","runtime"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"expected_revision","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"required":true}]},"patch":{"operationId":"patchSitesBySiteIdData","tags":["sites"],"summary":"Update saved site records","responses":{"200":{"description":"Site data","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bindings":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{}},"runtime":{"type":"object","properties":{"enabled":{"type":"boolean"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["enabled","revision"],"additionalProperties":false}},"required":["revision","bindings","runtime"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"operation":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"refreshData"}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"createRecord"},"collectionId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"values":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"}]}}},"required":["action","collectionId","values"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"updateRecord"},"collectionId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"recordId":{"type":"string","minLength":1,"maxLength":100},"expectedRecordRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"values":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"}]}}},"required":["action","collectionId","recordId","expectedRecordRevision","values"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"deleteRecord"},"collectionId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"recordId":{"type":"string","minLength":1,"maxLength":100},"expectedRecordRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["action","collectionId","recordId","expectedRecordRevision"],"additionalProperties":false}]}},"required":["expectedRevision","operation"],"additionalProperties":false}}}}}},"/sites/{site_id}/bindings/{binding_id}":{"patch":{"operationId":"patchSitesBySiteIdBindingsByBindingId","tags":["sites"],"summary":"Sync a data binding from a connector","description":"With a source, reads data from that connector account into the binding and saves the source. Without one, refreshes the binding from its saved source.","responses":{"200":{"description":"The site","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"brief":{"type":"string","maxLength":4000},"projectId":{"type":["string","null"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"plan":{"type":"object","properties":{"kind":{"type":"string","enum":["landing","marketing","portfolio","dashboard","app","form","docs","component","commerce","booking","event","publication","community","education","ai-tool","game"]},"scope":{"type":"string","enum":["component","page","site"]},"tier":{"type":"string","enum":["low","medium","high","ultra"]},"tone":{"type":"string","enum":["plain","friendly","bold","editorial","technical"]},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false},"interactive":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"string","enum":["content","navigation","forms","search","filtering","visualisation","crud","authentication","commerce","booking","files","ai","realtime","payments"]}},"confidence":{"type":"number","minimum":0,"maximum":1},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"provider":{"type":"string"},"model":{"type":"string"}},"required":["kind","scope","tier","tone","theme","interactive","capabilities","confidence"],"additionalProperties":false},"project":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":400},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false},"capabilities":{"type":"array","items":{"type":"string","enum":["content","navigation","forms","search","filtering","visualisation","crud","authentication","commerce","booking","files","ai","realtime","payments"]}},"pages":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},"additionalProperties":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":80,"pattern":"^\\/[a-z0-9\\-/]*$"},"title":{"type":"string","minLength":1,"maxLength":80},"root":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"elements":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"props":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"children":{"default":[],"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"visible":{"$ref":"#/components/schemas/__schema1"},"repeat":{"type":"object","properties":{"statePath":{"type":"string","pattern":"^\\/[A-Za-z0-9_\\-/]*$"},"key":{"type":"string","minLength":1}},"required":["statePath"],"additionalProperties":false},"on":{"type":"object","propertyNames":{"type":"string","enum":["press","change","submit"]},"additionalProperties":{"type":"object","properties":{"action":{"type":"string","enum":["setState","toggleState","pushState","removeState","navigate"]},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["action"],"additionalProperties":false}},"style":{"type":"object","properties":{"width":{"type":"string","enum":["narrow","content","wide","full"]},"spacing":{"type":"string","enum":["none","compact","normal","generous","dramatic"]},"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"tone":{"type":"string","enum":["inherit","muted","primary"]},"surface":{"type":"string","enum":["transparent","canvas","muted","card","primary","inverted","glass"]},"align":{"type":"string","enum":["start","center","end"]},"border":{"type":"string","enum":["none","subtle","strong"]},"shadow":{"type":"string","enum":["none","sm","md","xl"]},"radius":{"type":"string","enum":["none","sm","md","lg","xl","full"]},"motion":{"type":"string","enum":["none","fade","rise","scale","slide"]},"bleed":{"type":"boolean"},"sticky":{"type":"boolean"}},"additionalProperties":false}},"required":["type","props","children"],"additionalProperties":false}},"state":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["path","title","root","elements"],"additionalProperties":false}},"collections":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"fields":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,63}$"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean"]},"required":{"default":false,"type":"boolean"}},"required":["type","required"],"additionalProperties":false}},"maxRecords":{"default":1000,"type":"integer","minimum":1,"maximum":1000}},"required":["label","fields","maxRecords"],"additionalProperties":false}},"dataBindings":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"source"},"sourceId":{"type":"string","minLength":1,"maxLength":200},"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"statePath":{"type":"string","maxLength":128,"pattern":"^\\/[a-zA-Z][a-zA-Z0-9_-]*(?:\\/[a-zA-Z0-9_-]+)*$"}},"required":["kind","sourceId","pageId","statePath"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection"},"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"statePath":{"type":"string","maxLength":128,"pattern":"^\\/[a-zA-Z][a-zA-Z0-9_-]*(?:\\/[a-zA-Z0-9_-]+)*$"},"collectionId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"required":["kind","pageId","statePath","collectionId"],"additionalProperties":false}]}}},"required":["title","theme","capabilities","pages"],"additionalProperties":false},"issues":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning"]},"pageId":{"type":"string"},"elementKey":{"type":"string"},"message":{"type":"string"}},"required":["severity","message"],"additionalProperties":false}},"quality":{"anyOf":[{"type":"object","properties":{"coverage":{"type":"number","minimum":0,"maximum":1},"placeholders":{"type":"number","minimum":0,"maximum":1},"coherent":{"type":"number","minimum":0,"maximum":1},"readable":{"type":"number","minimum":0,"maximum":1},"repairs":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsRepair":{"type":"boolean"},"confidence":{"type":"number","minimum":0,"maximum":1},"repairConfidence":{"type":"number","minimum":0,"maximum":1}},"required":["coverage","placeholders","coherent","repairs","needsRepair","confidence"],"additionalProperties":false},{"type":"null"}]},"turns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant","edit"]},"prompt":{"type":"string","maxLength":4000},"createdAt":{"type":"string"},"plan":{"type":"object","properties":{"kind":{"type":"string","enum":["landing","marketing","portfolio","dashboard","app","form","docs","component","commerce","booking","event","publication","community","education","ai-tool","game"]},"scope":{"type":"string","enum":["component","page","site"]},"tier":{"type":"string","enum":["low","medium","high","ultra"]},"tone":{"type":"string","enum":["plain","friendly","bold","editorial","technical"]},"theme":{"type":"object","properties":{"palette":{"type":"string","enum":["neutral","slate","ocean","forest","sunset","berry","sand","midnight"]},"font":{"type":"string","enum":["sans","serif","mono","display"]},"radius":{"type":"string","enum":["none","sm","md","lg","full"]},"mode":{"type":"string","enum":["light","dark"]},"direction":{"type":"string","enum":["minimal","editorial","utilitarian","brutalist","playful","luxury","organic","retro","futuristic","maximalist"]},"density":{"type":"string","enum":["compact","comfortable","spacious"]},"texture":{"type":"string","enum":["clean","grain","grid","gradient","glow"]},"motion":{"type":"string","enum":["none","restrained","expressive"]},"customPalette":{"type":"object","properties":{"hue":{"type":"number","minimum":0,"maximum":360},"chroma":{"type":"number","minimum":0,"maximum":0.37},"neutralHue":{"type":"number","minimum":0,"maximum":360},"neutralChroma":{"type":"number","minimum":0,"maximum":0.04}},"required":["hue","chroma","neutralHue","neutralChroma"],"additionalProperties":false},"customFonts":{"type":"object","properties":{"heading":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"},"body":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,59}$"}},"additionalProperties":false}},"required":["palette","font","radius","mode","direction","density","texture","motion"],"additionalProperties":false},"interactive":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"string","enum":["content","navigation","forms","search","filtering","visualisation","crud","authentication","commerce","booking","files","ai","realtime","payments"]}},"confidence":{"type":"number","minimum":0,"maximum":1},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"provider":{"type":"string"},"model":{"type":"string"}},"required":["kind","scope","tier","tone","theme","interactive","capabilities","confidence"],"additionalProperties":false},"intent":{"type":"string","enum":["tweak","restructure","page","theme"]},"target":{"type":"object","properties":{"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},"elementKey":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"}},"required":["pageId","elementKey"],"additionalProperties":false},"provider":{"type":"string"},"model":{"type":"string"},"trace":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"decision"},"version":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":160},"stage":{"type":"string","enum":["plan","refinement","quality"]},"source":{"type":"string","enum":["decision","heuristic","unavailable"]},"summary":{"type":"string","minLength":1,"maxLength":300},"effects":{"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":240}},"questions":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"question":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["type","instructions","criteria"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"minItems":2,"maxItems":10,"type":"array","items":{"$ref":"#/components/schemas/__schema0"}}},"required":["type","instructions","criteria"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"instructions":{"$ref":"#/components/schemas/__schema0"},"criteria":{"type":"object","properties":{"true":{"$ref":"#/components/schemas/__schema0"},"false":{"$ref":"#/components/schemas/__schema0"}},"required":["true","false"],"additionalProperties":false}},"required":["type","instructions"],"additionalProperties":false}]},"answer":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"choice"},"choice":{"type":"string"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","choice","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"score":{"type":"number","minimum":0},"legend":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["type","score","legend","probabilities","confidence"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"noul"},"noul":{"type":"number","minimum":0,"maximum":1}},"required":["type","noul"],"additionalProperties":false}]}},"required":["id","question"],"additionalProperties":false}},"provider":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["kind","version","id","stage","source","summary","effects","questions","createdAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generation"},"version":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":160},"stage":{"type":"string","enum":["build","repair"]},"outcome":{"type":"string","enum":["applied","discarded"]},"summary":{"type":"string","minLength":1,"maxLength":300},"provider":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"patchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejectedPatchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"skippedLineCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["kind","version","id","stage","outcome","summary","provider","model","patchCount","rejectedPatchCount","durationMs","createdAt"],"additionalProperties":false}]}}},"required":["id","role","prompt","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","title","brief","projectId","revision","plan","project","issues","quality","turns","createdAt","updatedAt"],"additionalProperties":false}},"required":["site"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"binding_id","schema":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"source":{"type":"object","properties":{"pageId":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"statePath":{"type":"string","maxLength":128,"pattern":"^\\/[a-zA-Z][a-zA-Z0-9_-]*(?:\\/[a-zA-Z0-9_-]+)*$"},"provider":{"type":"string","minLength":1,"maxLength":100},"operation":{"type":"string","minLength":1,"maxLength":200},"connectedAccountId":{"type":"string","minLength":1,"maxLength":200},"params":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"resultPath":{"default":"/","type":"string","pattern":"^\\/[a-zA-Z0-9_\\-/]{0,200}$"},"fields":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,63}$"},"additionalProperties":{"type":"string","pattern":"^\\/[a-zA-Z0-9_\\-/]{0,200}$"}}},"required":["pageId","statePath","provider","operation","connectedAccountId"],"additionalProperties":false}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/sites/{site_id}/runtime":{"post":{"operationId":"postSitesBySiteIdRuntime","tags":["sites"],"summary":"Enable saved records for this revision","responses":{"200":{"description":"Storage status","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["enabled","revision"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["expectedRevision"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteSitesBySiteIdRuntime","tags":["sites"],"summary":"Disable saved records","responses":{"200":{"description":"Storage status","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["enabled","revision"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"site_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/memory/documents":{"get":{"operationId":"getMemoryDocuments","tags":["memory"],"summary":"List memory documents","description":"Personal or project memory, or one teammate context's private memory when teammate_context_id is set.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"teammate_context_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postMemoryDocuments","tags":["memory"],"summary":"Create a memory document","responses":{"200":{"description":"The document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["user","feedback","project","reference"],"description":"user: who the person is and how they like things. feedback: guidance on how to work with them, both corrections and approaches they confirmed. project: ongoing work, goals, decisions and constraints. reference: pointers to people, places, accounts or resources."},{"type":"null"}]},"content":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scopeType":{"type":"string","enum":["personal","project"]},"scopeId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","content","revision","scopeType","scopeId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["user","feedback","project","reference"],"description":"user: who the person is and how they like things. feedback: guidance on how to work with them, both corrections and approaches they confirmed. project: ongoing work, goals, decisions and constraints. reference: pointers to people, places, accounts or resources."},{"type":"null"}]},"content":{"default":"","type":"string","maxLength":65536},"projectId":{"type":"string","minLength":1}},"required":["name"]}}}}}},"/memory/documents/{document_id}":{"get":{"operationId":"getMemoryDocumentsByDocumentId","tags":["memory"],"summary":"Read a memory document","responses":{"200":{"description":"The document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["user","feedback","project","reference"],"description":"user: who the person is and how they like things. feedback: guidance on how to work with them, both corrections and approaches they confirmed. project: ongoing work, goals, decisions and constraints. reference: pointers to people, places, accounts or resources."},{"type":"null"}]},"content":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scopeType":{"type":"string","enum":["personal","project"]},"scopeId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","content","revision","scopeType","scopeId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"teammate_context_id","schema":{"type":"string","minLength":1}}]},"patch":{"operationId":"patchMemoryDocumentsByDocumentId","tags":["memory"],"summary":"Save a memory document revision","responses":{"200":{"description":"The document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["user","feedback","project","reference"],"description":"user: who the person is and how they like things. feedback: guidance on how to work with them, both corrections and approaches they confirmed. project: ongoing work, goals, decisions and constraints. reference: pointers to people, places, accounts or resources."},{"type":"null"}]},"content":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scopeType":{"type":"string","enum":["personal","project"]},"scopeId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","content","revision","scopeType","scopeId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"teammate_context_id","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","maxLength":65536},"description":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["user","feedback","project","reference"],"description":"user: who the person is and how they like things. feedback: guidance on how to work with them, both corrections and approaches they confirmed. project: ongoing work, goals, decisions and constraints. reference: pointers to people, places, accounts or resources."},{"type":"null"}]},"changeNote":{"type":"string","minLength":1,"maxLength":500},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":"string","minLength":1}},"required":["content","expectedRevision"]}}}}},"delete":{"operationId":"deleteMemoryDocumentsByDocumentId","tags":["memory"],"summary":"Delete a memory document","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"teammate_context_id","schema":{"type":"string","minLength":1}}]}},"/memory/documents/{document_id}/revisions":{"get":{"operationId":"getMemoryDocumentsByDocumentIdRevisions","tags":["memory"],"summary":"List a memory document's revisions","responses":{"200":{"description":"Revisions","content":{"application/json":{"schema":{"type":"object","properties":{"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"content":{"type":"string"},"changeNote":{"type":["string","null"]},"evidence":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"origin":{"type":"string","const":"conversation"},"conversationId":{"type":"string","minLength":1},"messageId":{"type":"string","minLength":1},"quote":{"type":"string","minLength":1}},"required":["origin","conversationId","quote"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","const":"import"},"source":{"type":"string","enum":["chatgpt","claude","summary"]},"conversationTitle":{"type":"string"},"occurredAt":{"type":"string"},"quote":{"type":"string","minLength":1}},"required":["origin","source","quote"],"additionalProperties":false}]}},"createdAt":{"type":"string"}},"required":["id","revision","content","changeNote","evidence","createdAt"],"additionalProperties":false}}},"required":["revisions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"teammate_context_id","schema":{"type":"string","minLength":1}}]}},"/memory/imports":{"post":{"operationId":"postMemoryImports","tags":["memory"],"summary":"Import memory from another assistant","description":"Takes your messages from a ChatGPT or Claude export, or a summary another assistant wrote about you, and files lasting memories with the quotes they came from in the background.","responses":{"200":{"description":"The queued import","content":{"application/json":{"schema":{"type":"object","properties":{"importId":{"type":"string"},"taskId":{"type":"string"},"conversations":{"type":"integer","minimum":0,"maximum":9007199254740991},"messages":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["importId","taskId","conversations","messages"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"summary"},"text":{"type":"string","minLength":1}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"type":"string","const":"conversations"},"source":{"type":"string","enum":["chatgpt","claude"]},"conversations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"createdAt":{"type":"string"},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1},"createdAt":{"type":"string"}},"required":["text"]}}},"required":["title","messages"]}}},"required":["kind","source","conversations"]}]}}}}}},"/memory/corrections":{"get":{"operationId":"getMemoryCorrections","tags":["memory"],"summary":"List the rules learned from your corrections","description":"The rules teammates have recorded after you corrected them, most recently repeated first.","responses":{"200":{"description":"Learned rules","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"pattern":{"type":"string"},"quote":{"type":"string"},"placement":{"type":"string","enum":["skill","memory","policy"]},"placementRef":{"type":["string","null"]},"recurrences":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["active","dismissed"]},"createdAt":{"type":"string"},"lastRecurredAt":{"type":["string","null"]}},"required":["id","pattern","quote","placement","placementRef","recurrences","status","createdAt","lastRecurredAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false}},"/memory/corrections/{correction_id}":{"delete":{"operationId":"deleteMemoryCorrectionsByCorrectionId","tags":["memory"],"summary":"Forget a learned rule","description":"Remove a rule from your list. The memory or skill text it changed stays until you edit it.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"correction_id","schema":{"type":"string","minLength":1},"required":true}]}},"/memory/syntheses":{"get":{"operationId":"getMemorySyntheses","tags":["memory"],"summary":"List memory syntheses","description":"Pass active=true for the synthesis currently in use.","responses":{"200":{"description":"Syntheses","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"number"},"synthesis_text":{"type":"string"},"synthesis_version":{"type":"number"},"memory_ids":{"type":"array","items":{"type":"string"}},"memory_count":{"type":"number"},"tokens_used":{"type":"number"},"namespace":{"type":"string"},"is_active":{"type":"boolean"},"superseded_by":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","user_id","synthesis_text","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"active","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"limit","schema":{"default":10,"type":"integer","minimum":1,"maximum":50}}]},"post":{"operationId":"postMemorySyntheses","tags":["memory"],"summary":"Queue a memory synthesis","responses":{"200":{"description":"Queued task","content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"string"},"status":{"type":"string","enum":["pending","queued","running","suspended","completed","failed","cancelled"]},"message":{"type":"string"}},"required":["task_id","status"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/channels/bindings":{"get":{"operationId":"getChannelsBindings","tags":["channels"],"summary":"List the channels connected to Polychat","responses":{"200":{"description":"Bindings","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["sms","slack","telegram","email"]},"scopeType":{"type":"string","enum":["personal","project"]},"scopeId":{"type":"string"},"externalId":{"type":"string"},"label":{"type":["string","null"]},"teammateId":{"type":["string","null"]},"interactionMode":{"type":"string","enum":["direct","automated","cases"]},"reactionLevel":{"type":"string","enum":["off","ack","full"],"description":"How the teammate reacts in the channel: off, ack shows 👀 while it works and ⚠️ if it fails, full also marks finished requests ✅."},"enabled":{"type":"boolean"},"createdAt":{"type":"string"},"canManage":{"type":"boolean"},"contactAddress":{"type":["string","null"]}},"required":["id","channel","scopeType","scopeId","externalId","label","teammateId","interactionMode","reactionLevel","enabled","createdAt","canManage","contactAddress"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false},"post":{"operationId":"postChannelsBindings","tags":["channels"],"summary":"Connect a channel","description":"Bind a Slack channel or Telegram chat to a person or a project. Slack may bind to either; Telegram is personal only.","responses":{"200":{"description":"The binding","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["sms","slack","telegram","email"]},"scopeType":{"type":"string","enum":["personal","project"]},"scopeId":{"type":"string"},"externalId":{"type":"string"},"label":{"type":["string","null"]},"teammateId":{"type":["string","null"]},"interactionMode":{"type":"string","enum":["direct","automated","cases"]},"reactionLevel":{"type":"string","enum":["off","ack","full"],"description":"How the teammate reacts in the channel: off, ack shows 👀 while it works and ⚠️ if it fails, full also marks finished requests ✅."},"enabled":{"type":"boolean"},"createdAt":{"type":"string"},"canManage":{"type":"boolean"},"contactAddress":{"type":["string","null"]}},"required":["id","channel","scopeType","scopeId","externalId","label","teammateId","interactionMode","reactionLevel","enabled","createdAt","canManage","contactAddress"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["sms","slack","telegram","email"]},"externalId":{"type":"string","minLength":1,"maxLength":200,"description":"Slack workspace and channel IDs joined by a colon, a Telegram private chat ID, or the email address you send from."},"projectId":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":120},"teammateId":{"type":"string","minLength":1},"interactionMode":{"default":"automated","type":"string","enum":["direct","automated","cases"]},"reactionLevel":{"default":"ack","type":"string","enum":["off","ack","full"],"description":"How the teammate reacts in the channel: off, ack shows 👀 while it works and ⚠️ if it fails, full also marks finished requests ✅."}},"required":["channel","externalId"]}}}}}},"/channels/bindings/{binding_id}":{"delete":{"operationId":"deleteChannelsBindingsByBindingId","tags":["channels"],"summary":"Disconnect a channel","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"binding_id","schema":{"type":"string","minLength":1},"required":true}]}},"/channels/bindings/{binding_id}/pairing_challenges":{"post":{"operationId":"postChannelsBindingsByBindingIdPairingChallenges","tags":["channels"],"summary":"Link your own channel identity","responses":{"200":{"description":"One-time linking command","content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string"},"expiresAt":{"type":"string"}},"required":["command","expiresAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"binding_id","schema":{"type":"string","minLength":1},"required":true}]}},"/channels/bindings/{binding_id}/senders":{"get":{"operationId":"getChannelsBindingsByBindingIdSenders","tags":["channels"],"summary":"List verified channel senders","responses":{"200":{"description":"Senders","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"senderId":{"type":"string"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"revokedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"canRevoke":{"type":"boolean"}},"required":["id","senderId","userId","revision","revokedAt","createdAt","canRevoke"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"binding_id","schema":{"type":"string","minLength":1},"required":true}]}},"/channels/bindings/{binding_id}/senders/{sender_id}":{"delete":{"operationId":"deleteChannelsBindingsByBindingIdSendersBySenderId","tags":["channels"],"summary":"Revoke a linked sender","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"binding_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"sender_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"expected_revision","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"required":true}]}},"/teammates/marketplace/{listing_id}/installation":{"post":{"operationId":"postTeammatesMarketplaceByListingIdInstallation","tags":["teammates"],"summary":"Install a shared teammate","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"listing_id","schema":{"type":"string","minLength":1},"required":true}]},"delete":{"operationId":"deleteTeammatesMarketplaceByListingIdInstallation","tags":["teammates"],"summary":"Uninstall a shared teammate","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"listing_id","schema":{"type":"string","minLength":1},"required":true}]}},"/teammates/marketplace":{"get":{"operationId":"getTeammatesMarketplace","tags":["teammates"],"summary":"List shared teammates","description":"Published teammates, newest first. Filter by category, tags, search, featured or the source teammate. Categories and popular tags come back with the page. Admins pass review=true for every listing, public or not.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"category","schema":{"type":"string"},"description":"Filter by category"},{"in":"query","name":"tags","schema":{"type":"array","items":{"type":"string"}},"description":"Filter by tags"},{"in":"query","name":"search","schema":{"type":"string"},"description":"Search query"},{"in":"query","name":"featured","schema":{"type":"boolean"},"description":"Show only featured teammates"},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","exclusiveMinimum":0,"maximum":100},"description":"Number of results to return"},{"in":"query","name":"offset","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"description":"Number of results to skip"},{"in":"query","name":"sort_by","schema":{"default":"recent","type":"string","enum":["recent","popular","rating"]},"description":"Sort order"},{"in":"query","name":"teammate_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"review","schema":{"type":"string","enum":["true","false"]}}]},"post":{"operationId":"postTeammatesMarketplace","tags":["teammates"],"summary":"Share a teammate","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the teammate to share"},"name":{"type":"string","description":"Public name for the shared teammate"},"description":{"description":"Public description for the shared teammate","type":"string"},"avatar_url":{"description":"Avatar URL for the shared teammate","type":"string","format":"uri"},"category":{"description":"Category for the shared teammate","type":"string"},"tags":{"description":"Tags for the shared teammate","type":"array","items":{"type":"string"}}},"required":["agent_id","name"]}}}}}},"/teammates/marketplace/{listing_id}":{"get":{"operationId":"getTeammatesMarketplaceByListingId","tags":["teammates"],"summary":"Get a shared teammate","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"listing_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchTeammatesMarketplaceByListingId","tags":["teammates"],"summary":"Update a shared teammate","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"listing_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Updated name for the shared teammate","type":"string"},"description":{"description":"Updated description for the shared teammate","type":"string"},"avatar_url":{"description":"Updated avatar URL for the shared teammate","type":"string","format":"uri"},"category":{"description":"Updated category for the shared teammate","type":"string"},"tags":{"description":"Updated tags for the shared teammate","type":"array","items":{"type":"string"}}}}}}}},"delete":{"operationId":"deleteTeammatesMarketplaceByListingId","tags":["teammates"],"summary":"Stop sharing a teammate","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"listing_id","schema":{"type":"string","minLength":1},"required":true}]}},"/teammates/marketplace/{listing_id}/rate":{"post":{"operationId":"postTeammatesMarketplaceByListingIdRate","tags":["teammates"],"summary":"Rate a shared teammate","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"listing_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rating":{"type":"integer","minimum":1,"maximum":5,"description":"Rating from 1 to 5 stars"},"review":{"description":"Optional review text","type":"string"}},"required":["rating"]}}}}}},"/teammates/marketplace/{listing_id}/feature":{"post":{"operationId":"postTeammatesMarketplaceByListingIdFeature","tags":["teammates"],"summary":"Feature or unfeature a listing","description":"Admins only.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"listing_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"featured":{"type":"boolean","description":"Whether to feature the teammate"}},"required":["featured"]}}}}}},"/teammates/marketplace/{listing_id}/moderate":{"post":{"operationId":"postTeammatesMarketplaceByListingIdModerate","tags":["teammates"],"summary":"Approve or reject a listing","description":"Admins only.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"listing_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"is_public":{"type":"boolean","description":"Whether the teammate should be public"},"reason":{"description":"Reason for moderation action","type":"string"}},"required":["is_public"]}}}}}},"/teammates/marketplace/{listing_id}/ratings":{"get":{"operationId":"getTeammatesMarketplaceByListingIdRatings","tags":["teammates"],"summary":"List a listing's ratings","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"listing_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"limit","schema":{"default":10,"type":"number","minimum":1,"maximum":50},"description":"Number of ratings to return"}]}},"/teammates/roster":{"get":{"operationId":"getTeammatesRoster","tags":["teammates"],"summary":"List the teammates and groups you are talking to","description":"Personal teammate conversations that have messages and the groups you started, most recent activity first.","responses":{"200":{"description":"Roster entries","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"teammate"},"teammateId":{"type":"string"},"conversationId":{"type":"string"},"lastActivityAt":{"type":"string"},"unread":{"type":"boolean"}},"required":["kind","teammateId","conversationId","lastActivityAt","unread"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"group"},"conversationId":{"type":"string"},"name":{"type":"string"},"teammateIds":{"type":"array","items":{"type":"string"}},"lastActivityAt":{"type":"string"},"unread":{"type":"boolean"}},"required":["kind","conversationId","name","teammateIds","lastActivityAt","unread"],"additionalProperties":false}]}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false}},"/teammates/groups":{"get":{"operationId":"getTeammatesGroups","tags":["teammates"],"summary":"List teammate groups","description":"Group conversations you started, newest activity first, with their members.","responses":{"200":{"description":"Successful response"}},"hide":false},"post":{"operationId":"postTeammatesGroups","tags":["teammates"],"summary":"Start a group with two to six teammates","responses":{"200":{"description":"The group","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string"},"name":{"type":"string"},"teammateIds":{"type":"array","items":{"type":"string"}},"projectId":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["conversationId","name","teammateIds","projectId","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"teammateIds":{"minItems":2,"maxItems":6,"type":"array","items":{"type":"string","minLength":1}},"projectId":{"type":"string","minLength":1}},"required":["name","teammateIds"]}}}}}},"/teammates":{"get":{"operationId":"getTeammates","tags":["teammates"],"summary":"List teammates","responses":{"200":{"description":"Successful response"}},"hide":false},"post":{"operationId":"postTeammates","tags":["teammates"],"summary":"Create a teammate","responses":{"200":{"description":"The teammate","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"owner_scope_type":{"type":"string","enum":["user","workspace","platform"]},"owner_scope_id":{"type":"string"},"derived_from_teammate_id":{"type":["string","null"]},"kind":{"type":"string","enum":["colleague","bot"]},"workspace_default":{"type":"boolean"},"name":{"type":"string"},"description":{"type":"string"},"avatar_url":{"type":["string","null"]},"character_id":{"default":null,"type":["string","null"]},"servers":{"type":"array","items":{"type":"object","properties":{"credentialConnectionId":{"type":"string","minLength":1,"maxLength":100},"allowedTools":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:/-]+$"}},"label":{"description":"Stable label for the MCP server","type":"string","minLength":1,"maxLength":80},"url":{"type":"string","format":"uri","description":"The endpoint URL of the MCP server"},"type":{"description":"Transport type for MCP connection","type":"string","enum":["sse","stdio"]},"command":{"description":"Optional command for stdio transports","type":"string"},"args":{"description":"Arguments for stdio transports","type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false}},"model":{"type":["string","null"]},"temperature":{"type":["number","null"]},"max_steps":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"system_prompt":{"type":["string","null"]},"few_shot_examples":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"input":{"type":"string","description":"Example input"},"output":{"type":"string","description":"Example output"}},"required":["input","output"],"additionalProperties":false}},{"type":"null"}]},"enabled_tools":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},{"type":"null"}]},"skill_ids":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"mode":{"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]}},"required":["id","user_id","owner_scope_type","owner_scope_id","derived_from_teammate_id","kind","workspace_default","name","description","avatar_url","character_id","servers","model","temperature","max_steps","system_prompt","few_shot_examples","enabled_tools","skill_ids","mode","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the teammate"},"kind":{"description":"Whether this teammate works as a colleague or as a bot","type":"string","enum":["colleague","bot"]},"workspace_default":{"description":"Whether every project in the owning workspace gets this teammate without being asked","type":"boolean"},"description":{"description":"Optional teammate description","type":"string"},"avatar_url":{"description":"Optional avatar image URL","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"character_id":{"anyOf":[{"type":"string","description":"A built-in character that shows this teammate's state as it works"},{"type":"null"}]},"servers":{"description":"List of MCP server configurations","maxItems":10,"type":"array","items":{"type":"object","properties":{"credentialConnectionId":{"type":"string","minLength":1,"maxLength":100},"allowedTools":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:/-]+$"}},"label":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048},"type":{"type":"string","const":"sse"}},"required":["url"]}},"model":{"description":"Model ID to use with this teammate","type":"string"},"temperature":{"description":"Temperature override; null uses automatic sampling","anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"max_steps":{"description":"Maximum number of steps for the teammate","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"system_prompt":{"description":"System prompt for the teammate","type":"string"},"few_shot_examples":{"description":"Few-shot examples for the teammate","type":"array","items":{"type":"object","properties":{"input":{"type":"string","description":"Example input"},"output":{"type":"string","description":"Example output"}},"required":["input","output"]}},"enabled_tools":{"description":"Tools enabled by default for this teammate","type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},"skill_ids":{"description":"Skills this teammate loads, named as the skill catalogue names them","type":"array","items":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"mode":{"description":"Teammate mode this teammate runs in; null lets the caller's mode win","anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"workspace_id":{"description":"Workspace that will own the teammate; omit to create it in the caller's personal scope","type":"string","minLength":1}},"required":["name"]}}}}}},"/teammates/hire":{"post":{"operationId":"postTeammatesHire","tags":["teammates"],"summary":"Hire a teammate","description":"Creates a teammate from a built-in role, a job description, or both. The role supplies the brief, suggested tools and kind.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role_slug":{"description":"Slug of a built-in teammate role to hire","type":"string","minLength":1},"job_description":{"description":"Plain description of the job, used when no built-in role is chosen","type":"string","minLength":1,"maxLength":2000},"name":{"description":"Name for the teammate; defaults to the role title","type":"string","minLength":1,"maxLength":120},"kind":{"description":"Whether this teammate is a colleague or a bot; defaults to the role's kind","type":"string","enum":["colleague","bot"]},"workspace_id":{"description":"Workspace that will own the teammate; omit to hire into your personal scope","type":"string","minLength":1}}}}}}}},"/teammates/contexts/{context_id}":{"patch":{"operationId":"patchTeammatesContextsByContextId","tags":["teammates"],"summary":"Change a context's lifecycle, autonomy, pause or budget","description":"Sets the context status, how much it may do without asking, when its background work resumes, or how many credits it may spend a month.","responses":{"200":{"description":"The context","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"actorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"type":{"type":"string","enum":["personal","project","workspace"]},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},"homeConversationId":{"type":"string","minLength":1},"memoryDocumentId":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","paused","archived"]},"autonomyLevel":{"anyOf":[{"type":"string","enum":["observer","assistant","partner"],"description":"How much the teammate may do without asking. observer only reads and drafts; assistant asks before writes; partner writes within its grants. Sends, spending, deletes, credentials and exports always ask."},{"type":"null"}]},"standingApprovals":{"type":"array","items":{"type":"object","properties":{"toolName":{"type":"string","minLength":1},"destination":{"type":"string","minLength":1},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["toolName","destination","grantedAt","expiresAt"],"additionalProperties":false}},"approvalStreaks":{"type":"array","items":{"type":"object","properties":{"toolName":{"type":"string","minLength":1},"destination":{"type":"string","minLength":1},"approvals":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lastInteractionId":{"type":"string","minLength":1},"lastApprovedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["toolName","destination","approvals","lastInteractionId","lastApprovedAt"],"additionalProperties":false}},"pausedUntil":{"type":["string","null"]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"ownerSeenAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","teammateId","actorUserId","scope","homeConversationId","memoryDocumentId","status","autonomyLevel","standingApprovals","approvalStreaks","pausedUntil","monthlyCreditCapMicros","ownerSeenAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"context_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused","archived"]},"autonomyLevel":{"type":"string","enum":["observer","assistant","partner"],"description":"How much the teammate may do without asking. observer only reads and drafts; assistant asks before writes; partner writes within its grants. Sends, spending, deletes, credentials and exports always ask."},"pausedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the pause ends, at most a week ahead, or null to resume now"},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Credits this context may spend per calendar month, in micros, or null for no cap"}}}}}}}},"/teammates/contexts/{context_id}/spend":{"get":{"operationId":"getTeammatesContextsByContextIdSpend","tags":["teammates"],"summary":"Read what a context has spent this month","description":"Credits used by runs under this context in the current period, against its cap.","responses":{"200":{"description":"Spend this period","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"runCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"capCreditMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"state":{"type":"string","enum":["uncapped","ok","near","reached"]},"resetsAt":{"type":"string"}},"required":["period","creditMicros","costMicros","runCount","capCreditMicros","state","resetsAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"context_id","schema":{"type":"string","minLength":1},"required":true}]}},"/teammates/contexts/{context_id}/connections":{"get":{"operationId":"getTeammatesContextsByContextIdConnections","tags":["teammates"],"summary":"List a context's connection grants","responses":{"200":{"description":"Grants","content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"contextId":{"type":"string","minLength":1},"connectionId":{"type":"string","minLength":1},"allowedOperations":{"type":"array","items":{"type":"string","minLength":1}},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","contextId","connectionId","allowedOperations","revision","createdAt","updatedAt"],"additionalProperties":false}},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"providerName":{"type":"string","minLength":1},"accountId":{"type":["string","null"]},"operations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"access":{"type":"string","enum":["read","write"]},"destructive":{"type":"boolean"},"important":{"type":"boolean"}},"required":["id","access","destructive","important"],"additionalProperties":false}}},"required":["id","provider","providerName","accountId","operations"],"additionalProperties":false}}},"required":["grants","connections"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"context_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchTeammatesContextsByContextIdConnections","tags":["teammates"],"summary":"Grant exact connection operations to a context","responses":{"200":{"description":"The grant","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"contextId":{"type":"string","minLength":1},"connectionId":{"type":"string","minLength":1},"allowedOperations":{"type":"array","items":{"type":"string","minLength":1}},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","contextId","connectionId","allowedOperations","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"context_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"allowedOperations":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["connectionId","allowedOperations"]}}}}}},"/teammates/{teammate_id}":{"get":{"operationId":"getTeammatesByTeammateId","tags":["teammates"],"summary":"Get a teammate","responses":{"200":{"description":"The teammate","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"owner_scope_type":{"type":"string","enum":["user","workspace","platform"]},"owner_scope_id":{"type":"string"},"derived_from_teammate_id":{"type":["string","null"]},"kind":{"type":"string","enum":["colleague","bot"]},"workspace_default":{"type":"boolean"},"name":{"type":"string"},"description":{"type":"string"},"avatar_url":{"type":["string","null"]},"character_id":{"default":null,"type":["string","null"]},"servers":{"type":"array","items":{"type":"object","properties":{"credentialConnectionId":{"type":"string","minLength":1,"maxLength":100},"allowedTools":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:/-]+$"}},"label":{"description":"Stable label for the MCP server","type":"string","minLength":1,"maxLength":80},"url":{"type":"string","format":"uri","description":"The endpoint URL of the MCP server"},"type":{"description":"Transport type for MCP connection","type":"string","enum":["sse","stdio"]},"command":{"description":"Optional command for stdio transports","type":"string"},"args":{"description":"Arguments for stdio transports","type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false}},"model":{"type":["string","null"]},"temperature":{"type":["number","null"]},"max_steps":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"system_prompt":{"type":["string","null"]},"few_shot_examples":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"input":{"type":"string","description":"Example input"},"output":{"type":"string","description":"Example output"}},"required":["input","output"],"additionalProperties":false}},{"type":"null"}]},"enabled_tools":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},{"type":"null"}]},"skill_ids":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"mode":{"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]}},"required":["id","user_id","owner_scope_type","owner_scope_id","derived_from_teammate_id","kind","workspace_default","name","description","avatar_url","character_id","servers","model","temperature","max_steps","system_prompt","few_shot_examples","enabled_tools","skill_ids","mode","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchTeammatesByTeammateId","tags":["teammates"],"summary":"Update a teammate","responses":{"200":{"description":"The teammate","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"owner_scope_type":{"type":"string","enum":["user","workspace","platform"]},"owner_scope_id":{"type":"string"},"derived_from_teammate_id":{"type":["string","null"]},"kind":{"type":"string","enum":["colleague","bot"]},"workspace_default":{"type":"boolean"},"name":{"type":"string"},"description":{"type":"string"},"avatar_url":{"type":["string","null"]},"character_id":{"default":null,"type":["string","null"]},"servers":{"type":"array","items":{"type":"object","properties":{"credentialConnectionId":{"type":"string","minLength":1,"maxLength":100},"allowedTools":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:/-]+$"}},"label":{"description":"Stable label for the MCP server","type":"string","minLength":1,"maxLength":80},"url":{"type":"string","format":"uri","description":"The endpoint URL of the MCP server"},"type":{"description":"Transport type for MCP connection","type":"string","enum":["sse","stdio"]},"command":{"description":"Optional command for stdio transports","type":"string"},"args":{"description":"Arguments for stdio transports","type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false}},"model":{"type":["string","null"]},"temperature":{"type":["number","null"]},"max_steps":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"system_prompt":{"type":["string","null"]},"few_shot_examples":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"input":{"type":"string","description":"Example input"},"output":{"type":"string","description":"Example output"}},"required":["input","output"],"additionalProperties":false}},{"type":"null"}]},"enabled_tools":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},{"type":"null"}]},"skill_ids":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"mode":{"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]}},"required":["id","user_id","owner_scope_type","owner_scope_id","derived_from_teammate_id","kind","workspace_default","name","description","avatar_url","character_id","servers","model","temperature","max_steps","system_prompt","few_shot_examples","enabled_tools","skill_ids","mode","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New teammate name","type":"string"},"description":{"description":"New teammate description","type":"string"},"avatar_url":{"description":"New avatar URL, or null to remove the existing one","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"character_id":{"anyOf":[{"type":"string","description":"A built-in character that shows this teammate's state as it works"},{"type":"null"}]},"servers":{"description":"Updated MCP servers list","maxItems":10,"type":"array","items":{"type":"object","properties":{"credentialConnectionId":{"type":"string","minLength":1,"maxLength":100},"allowedTools":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:/-]+$"}},"label":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048},"type":{"type":"string","const":"sse"}},"required":["url"]}},"model":{"description":"Model ID to use with this teammate","type":"string"},"temperature":{"description":"Temperature override; null restores automatic sampling","anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"max_steps":{"description":"Maximum number of steps for the teammate","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"system_prompt":{"description":"System prompt for the teammate","type":"string"},"few_shot_examples":{"description":"Few-shot examples for the teammate","type":"array","items":{"type":"object","properties":{"input":{"type":"string","description":"Example input"},"output":{"type":"string","description":"Example output"}},"required":["input","output"]}},"enabled_tools":{"description":"Tools enabled by default for this teammate","type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9_:-]+$"}},"skill_ids":{"description":"Updated skills this teammate loads","type":"array","items":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"mode":{"description":"Updated teammate mode; null lets the caller's mode win","anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"kind":{"description":"Updated teammate kind","type":"string","enum":["colleague","bot"]},"workspace_default":{"description":"Whether every project in the owning workspace gets this teammate","type":"boolean"}}}}}}},"delete":{"operationId":"deleteTeammatesByTeammateId","tags":["teammates"],"summary":"Delete a teammate","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true}]}},"/teammates/{teammate_id}/feedback":{"post":{"operationId":"postTeammatesByTeammateIdFeedback","tags":["teammates"],"summary":"Say whether a teammate got it right","description":"One verdict per person per conversation builds the teammate's scorecard. Saying it again replaces the earlier verdict.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["good","bad"]},"conversationId":{"type":"string","minLength":1},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["verdict"]}}}}}},"/teammates/{teammate_id}/publish":{"post":{"operationId":"postTeammatesByTeammateIdPublish","tags":["teammates"],"summary":"Publish a teammate to a workspace","description":"Copies a personal teammate into a workspace so the workspace owns it, keeping a link back to the source.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"description":"Workspace that will own the published copy of the teammate"}},"required":["workspace_id"]}}}}}},"/teammates/{teammate_id}/projects/{project_id}":{"patch":{"operationId":"patchTeammatesByTeammateIdProjectsByProjectId","tags":["teammates"],"summary":"Remove or restore a workspace teammate in one project","description":"Workspace defaults reach every project. Setting removed records that one project does not want this teammate, without removing it from the workspace.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"}},"required":["removed"]}}}}}},"/teammates/{teammate_id}/contexts":{"get":{"operationId":"getTeammatesByTeammateIdContexts","tags":["teammates"],"summary":"List a teammate's scoped contexts","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postTeammatesByTeammateIdContexts","tags":["teammates"],"summary":"Create or find a scoped context","responses":{"200":{"description":"The context","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"actorUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"type":{"type":"string","enum":["personal","project","workspace"]},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},"homeConversationId":{"type":"string","minLength":1},"memoryDocumentId":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","paused","archived"]},"autonomyLevel":{"anyOf":[{"type":"string","enum":["observer","assistant","partner"],"description":"How much the teammate may do without asking. observer only reads and drafts; assistant asks before writes; partner writes within its grants. Sends, spending, deletes, credentials and exports always ask."},{"type":"null"}]},"standingApprovals":{"type":"array","items":{"type":"object","properties":{"toolName":{"type":"string","minLength":1},"destination":{"type":"string","minLength":1},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["toolName","destination","grantedAt","expiresAt"],"additionalProperties":false}},"approvalStreaks":{"type":"array","items":{"type":"object","properties":{"toolName":{"type":"string","minLength":1},"destination":{"type":"string","minLength":1},"approvals":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lastInteractionId":{"type":"string","minLength":1},"lastApprovedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["toolName","destination","approvals","lastInteractionId","lastApprovedAt"],"additionalProperties":false}},"pausedUntil":{"type":["string","null"]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"ownerSeenAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","teammateId","actorUserId","scope","homeConversationId","memoryDocumentId","status","autonomyLevel","standingApprovals","approvalStreaks","pausedUntil","monthlyCreditCapMicros","ownerSeenAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"object","properties":{"type":{"type":"string","enum":["personal","project","workspace"]},"id":{"type":"string","minLength":1}},"required":["type","id"]}},"required":["scope"]}}}}}},"/poly/agenda":{"get":{"operationId":"getPolyAgenda","tags":["poly"],"summary":"Read Poly's agenda","description":"The signed-in user's Poly: its thread, autonomy and standing approvals, what needs the user, what Poly is working on and what it finished in the last week. Creates the user's Poly the first time.","responses":{"200":{"description":"Poly's agenda","content":{"application/json":{"schema":{"type":"object","properties":{"needs_you":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["delegation","goal","approval","question","routine"]},"id":{"type":"string","minLength":1},"title":{"type":"string"},"status":{"type":"string"},"conversation_id":{"type":"string","minLength":1},"updated_at":{"type":["string","null"]},"teammate_id":{"type":["string","null"]},"judgement":{"anyOf":[{"type":"object","properties":{"chosen":{"type":"string","minLength":1},"confidence":{"type":"number","minimum":0,"maximum":1},"alternatives":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string","minLength":1},"probability":{"type":"number","minimum":0,"maximum":1}},"required":["option","probability"],"additionalProperties":false}}},"required":["chosen","confidence","alternatives"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","id","title","status","conversation_id","updated_at"],"additionalProperties":false}},"working_on":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["delegation","goal","approval","question","routine"]},"id":{"type":"string","minLength":1},"title":{"type":"string"},"status":{"type":"string"},"conversation_id":{"type":"string","minLength":1},"updated_at":{"type":["string","null"]},"teammate_id":{"type":["string","null"]},"judgement":{"anyOf":[{"type":"object","properties":{"chosen":{"type":"string","minLength":1},"confidence":{"type":"number","minimum":0,"maximum":1},"alternatives":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string","minLength":1},"probability":{"type":"number","minimum":0,"maximum":1}},"required":["option","probability"],"additionalProperties":false}}},"required":["chosen","confidence","alternatives"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","id","title","status","conversation_id","updated_at"],"additionalProperties":false}},"done":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["delegation","goal","approval","question","routine"]},"id":{"type":"string","minLength":1},"title":{"type":"string"},"status":{"type":"string"},"conversation_id":{"type":"string","minLength":1},"updated_at":{"type":["string","null"]},"teammate_id":{"type":["string","null"]},"judgement":{"anyOf":[{"type":"object","properties":{"chosen":{"type":"string","minLength":1},"confidence":{"type":"number","minimum":0,"maximum":1},"alternatives":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string","minLength":1},"probability":{"type":"number","minimum":0,"maximum":1}},"required":["option","probability"],"additionalProperties":false}}},"required":["chosen","confidence","alternatives"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","id","title","status","conversation_id","updated_at"],"additionalProperties":false}},"noted":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["delegation","goal","approval","question","routine"]},"id":{"type":"string","minLength":1},"title":{"type":"string"},"status":{"type":"string"},"conversation_id":{"type":"string","minLength":1},"updated_at":{"type":["string","null"]},"teammate_id":{"type":["string","null"]},"judgement":{"anyOf":[{"type":"object","properties":{"chosen":{"type":"string","minLength":1},"confidence":{"type":"number","minimum":0,"maximum":1},"alternatives":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string","minLength":1},"probability":{"type":"number","minimum":0,"maximum":1}},"required":["option","probability"],"additionalProperties":false}}},"required":["chosen","confidence","alternatives"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","id","title","status","conversation_id","updated_at"],"additionalProperties":false}},"teammate_id":{"type":"string","minLength":1},"context_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","minLength":1},"autonomy_level":{"type":"string","enum":["observer","assistant","partner"],"description":"How much the teammate may do without asking. observer only reads and drafts; assistant asks before writes; partner writes within its grants. Sends, spending, deletes, credentials and exports always ask."},"standing_approvals":{"type":"array","items":{"type":"object","properties":{"toolName":{"type":"string","minLength":1},"destination":{"type":"string","minLength":1},"grantedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["toolName","destination","grantedAt","expiresAt"],"additionalProperties":false}},"paused_until":{"type":["string","null"]},"look_around":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":["string","null"]}},"required":["enabled","timezone"],"additionalProperties":false}},"required":["needs_you","working_on","done","noted","teammate_id","context_id","conversation_id","autonomy_level","standing_approvals","paused_until","look_around"],"additionalProperties":false}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false}},"/poly/handoffs/{handoff_id}/disagree":{"post":{"operationId":"postPolyHandoffsByHandoffIdDisagree","tags":["poly"],"summary":"Tell Poly it should not have kept a result quiet","description":"Record a rule that results from the same routine always reach you, and return where the result is.","responses":{"200":{"description":"The rule and the result","content":{"application/json":{"schema":{"type":"object","properties":{"correction_id":{"type":"string","minLength":1},"result_conversation_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["correction_id","result_conversation_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Not in your Poly thread","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}},"409":{"description":"Poly already told you","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"parameters":[{"in":"path","name":"handoff_id","schema":{"type":"string","minLength":1},"required":true}]}},"/poly/look-around":{"patch":{"operationId":"patchPolyLookAround","tags":["poly"],"summary":"Turn Poly's daily look around on or off","description":"Installs or removes Poly's read-only daily pass over your connected sources. It only reads and drafts, whatever Poly's autonomy is set to.","responses":{"200":{"description":"Whether Poly looks around","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":["string","null"]}},"required":["enabled","timezone"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"type":{"type":"string"},"statusCode":{"type":"number"}},"required":["error","type"],"additionalProperties":false}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1,"maxLength":120}},"required":["enabled"]}}}}}},"/admin/model_analysis/ingestions":{"post":{"operationId":"postAdminModelAnalysisIngestions","tags":["admin"],"summary":"Queue Artificial Analysis model ingestion after model sync","description":"Queues the system task that refreshes cached Artificial Analysis model data.","responses":{"200":{"description":"Task queued","content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"string"},"status":{"type":"string","enum":["pending","queued","running","suspended","completed","failed","cancelled"]},"message":{"type":"string"}},"required":["task_id","status"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","const":"models.dev"},"completedAt":{"type":"string"},"write":{"type":"boolean"},"stats":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["source","completedAt","write","stats"]}}}}}},"/admin/tasks":{"get":{"operationId":"getAdminTasks","tags":["admin"],"summary":"See background tasks across every account","description":"Counts open and failed tasks by type, and lists the most recently updated tasks for the chosen view.","responses":{"200":{"description":"Background tasks","content":{"application/json":{"schema":{"type":"object","properties":{"counts":{"type":"array","items":{"type":"object","properties":{"task_type":{"type":"string"},"status":{"type":"string","enum":["pending","queued","running","suspended","completed","failed","cancelled"]},"count":{"type":"number"},"oldest":{"type":"string"}},"required":["task_type","status","count","oldest"],"additionalProperties":false}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"task_type":{"type":"string"},"status":{"type":"string","enum":["pending","queued","running","suspended","completed","failed","cancelled"]},"user_id":{"type":["number","null"]},"priority":{"type":"number"},"attempts":{"type":"number"},"recovery_count":{"type":"number"},"scheduled_at":{"type":["string","null"]},"last_attempted_at":{"type":["string","null"]},"lease_expires_at":{"type":["string","null"]},"error_message":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]}},"required":["id","task_type","status","user_id","priority","attempts","recovery_count","scheduled_at","last_attempted_at","lease_expires_at","error_message","created_at","updated_at"],"additionalProperties":false}}},"required":["counts","tasks"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"view","schema":{"default":"active","type":"string","enum":["active","failed","all"]}}]}},"/webhooks/github":{"post":{"operationId":"postWebhooksGithub","tags":["webhooks"],"responses":{"200":{"description":"Successful response"}},"hide":false}},"/webhook_endpoints":{"get":{"operationId":"getWebhookEndpoints","tags":["webhooks"],"summary":"List webhook endpoints","responses":{"200":{"description":"Endpoints","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"webhook_endpoint"},"id":{"type":"string","minLength":1},"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["response.completed","response.failed","response.cancelled","response.incomplete","response.waiting","knowledge.document.filed","knowledge.document.updated","knowledge.document.removed","knowledge.document.enriched"]}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["object","id","url","description","events","enabled","created_at","updated_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postWebhookEndpoints","tags":["webhooks"],"summary":"Register a webhook endpoint","description":"Polychat POSTs signed platform events to the URL. The signing secret is returned once.","responses":{"200":{"description":"The endpoint and its secret","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"webhook_endpoint"},"id":{"type":"string","minLength":1},"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["response.completed","response.failed","response.cancelled","response.incomplete","response.waiting","knowledge.document.filed","knowledge.document.updated","knowledge.document.removed","knowledge.document.enriched"]}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"secret":{"type":"string","minLength":1}},"required":["object","id","url","description","events","enabled","created_at","updated_at","secret"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"default":"","type":"string","maxLength":200},"events":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["response.completed","response.failed","response.cancelled","response.incomplete","response.waiting","knowledge.document.filed","knowledge.document.updated","knowledge.document.removed","knowledge.document.enriched"]}}},"required":["url","events"]}}}}}},"/webhook_endpoints/{webhook_endpoint_id}":{"get":{"operationId":"getWebhookEndpointsByWebhookEndpointId","tags":["webhooks"],"summary":"Read a webhook endpoint","responses":{"200":{"description":"The endpoint","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"webhook_endpoint"},"id":{"type":"string","minLength":1},"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["response.completed","response.failed","response.cancelled","response.incomplete","response.waiting","knowledge.document.filed","knowledge.document.updated","knowledge.document.removed","knowledge.document.enriched"]}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["object","id","url","description","events","enabled","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"webhook_endpoint_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchWebhookEndpointsByWebhookEndpointId","tags":["webhooks"],"summary":"Update a webhook endpoint","responses":{"200":{"description":"The endpoint","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"webhook_endpoint"},"id":{"type":"string","minLength":1},"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["response.completed","response.failed","response.cancelled","response.incomplete","response.waiting","knowledge.document.filed","knowledge.document.updated","knowledge.document.removed","knowledge.document.enriched"]}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["object","id","url","description","events","enabled","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"webhook_endpoint_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"type":"string","maxLength":200},"events":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["response.completed","response.failed","response.cancelled","response.incomplete","response.waiting","knowledge.document.filed","knowledge.document.updated","knowledge.document.removed","knowledge.document.enriched"]}},"enabled":{"type":"boolean"}}}}}}},"delete":{"operationId":"deleteWebhookEndpointsByWebhookEndpointId","tags":["webhooks"],"summary":"Delete a webhook endpoint","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"webhook_endpoint_id","schema":{"type":"string","minLength":1},"required":true}]}},"/webhook_endpoints/{webhook_endpoint_id}/rotate":{"post":{"operationId":"postWebhookEndpointsByWebhookEndpointIdRotate","tags":["webhooks"],"summary":"Rotate a webhook endpoint's signing secret","description":"The old secret stops working immediately. The new one is returned once.","responses":{"200":{"description":"The endpoint and its secret","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"webhook_endpoint"},"id":{"type":"string","minLength":1},"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["response.completed","response.failed","response.cancelled","response.incomplete","response.waiting","knowledge.document.filed","knowledge.document.updated","knowledge.document.removed","knowledge.document.enriched"]}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"secret":{"type":"string","minLength":1}},"required":["object","id","url","description","events","enabled","created_at","updated_at","secret"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"webhook_endpoint_id","schema":{"type":"string","minLength":1},"required":true}]}},"/webhook_endpoints/{webhook_endpoint_id}/test":{"post":{"operationId":"postWebhookEndpointsByWebhookEndpointIdTest","tags":["webhooks"],"summary":"Send a test event to a webhook endpoint","responses":{"200":{"description":"Delivery outcome","content":{"application/json":{"schema":{"type":"object","properties":{"delivered":{"type":"boolean"},"status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["delivered","status"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"webhook_endpoint_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/sources":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdSources","tags":["model-registry"],"summary":"Search model and dataset sources","description":"Searches Hugging Face and previews the workspace policy from metadata alone, without downloading anything.","responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["huggingface","upload","bucket","derived","provider"]},"sourceRef":{"type":"string"},"kind":{"type":"string","enum":["model","adapter","dataset"]},"displayName":{"type":"string"},"licence":{"type":["string","null"]},"pipelineTag":{"type":["string","null"]},"gated":{"type":"boolean"},"downloads":{"type":"integer","minimum":0,"maximum":9007199254740991},"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":["string","null"]},"signals":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"status":{"type":"string","enum":["pass","warn","fail","unknown"]}},"required":["label","status"],"additionalProperties":false}},"preview":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"library":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"latestVersionId":{"type":["string","null"]},"state":{"anyOf":[{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},{"type":"null"}]}},"required":["assetId","latestVersionId","state"],"additionalProperties":false},{"type":"null"}]}},"required":["source","sourceRef","kind","displayName","licence","pipelineTag","gated","downloads","likes","updatedAt","signals","preview","library"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"q","schema":{"default":"","type":"string","maxLength":200}},{"in":"query","name":"kind","schema":{"default":"model","type":"string","enum":["model","adapter","dataset"]}},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","exclusiveMinimum":0,"maximum":50}}]}},"/model_platform/workspaces/{workspace_id}/library":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdLibrary","tags":["model-registry"],"summary":"List models, adapters and datasets with their standing","responses":{"200":{"description":"Library entries","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["model","adapter","dataset"]},"source":{"type":"string","enum":["huggingface","upload","bucket","derived","provider"]},"sourceRef":{"type":"string"},"displayName":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","kind","source","sourceRef","displayName","createdAt","createdBy"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":"string"},"workspaceId":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["importing","inspecting","ready","failed"]},"attributes":{"type":"object","properties":{"licence":{"type":["string","null"]},"formats":{"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}},"parameterCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"gated":{"type":"boolean"},"remoteCode":{"type":"boolean"},"pipelineTag":{"type":["string","null"]},"libraryName":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"baseModels":{"type":"array","items":{"type":"string"}},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"trainingComputeFlops":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"architecture":{"anyOf":[{"type":"object","properties":{"modelType":{"type":["string","null"]},"layers":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hiddenSize":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"attentionHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kvHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"headDim":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"contextLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"torchDtype":{"type":["string","null"]}},"required":["modelType","layers","hiddenSize","attentionHeads","kvHeads","headDim","contextLength","torchDtype"],"additionalProperties":false},{"type":"null"}]},"location":{"type":["string","null"]}},"required":["licence","formats","parameterCount","gated","remoteCode","pipelineTag","libraryName","tags","baseModels","totalBytes","trainingComputeFlops","architecture","location"],"additionalProperties":false},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","assetId","workspaceId","revision","status","attributes","failureReason","createdAt","createdBy"],"additionalProperties":false},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"usable":{"type":"boolean"},"decision":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"state":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string"}},"isException":{"type":"boolean"},"conditions":{"type":["string","null"]},"note":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","versionId","routeId","state","verdict","evidenceIds","isException","conditions","note","requestedBy","decidedBy","decidedAt","expiresAt","createdAt"],"additionalProperties":false},{"type":"null"}]},"routeCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["asset","version","verdict","usable","decision","routeCount"],"additionalProperties":false}}},"required":["entries"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"kind","schema":{"type":"string","enum":["model","adapter","dataset"]}},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"approved_only","schema":{"type":"string","enum":["true","false"]}}]}},"/model_platform/workspaces/{workspace_id}/imports":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdImports","tags":["model-registry"],"summary":"Import a model or dataset version","description":"With source huggingface, pins a Hugging Face revision to a commit, records file hashes and queues static inspection. With provider aws, registers weights that already live in a connected bucket.","responses":{"200":{"description":"Imported version","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["model","adapter","dataset"]},"source":{"type":"string","enum":["huggingface","upload","bucket","derived","provider"]},"sourceRef":{"type":"string"},"displayName":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","kind","source","sourceRef","displayName","createdAt","createdBy"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":"string"},"workspaceId":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["importing","inspecting","ready","failed"]},"attributes":{"type":"object","properties":{"licence":{"type":["string","null"]},"formats":{"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}},"parameterCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"gated":{"type":"boolean"},"remoteCode":{"type":"boolean"},"pipelineTag":{"type":["string","null"]},"libraryName":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"baseModels":{"type":"array","items":{"type":"string"}},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"trainingComputeFlops":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"architecture":{"anyOf":[{"type":"object","properties":{"modelType":{"type":["string","null"]},"layers":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hiddenSize":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"attentionHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kvHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"headDim":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"contextLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"torchDtype":{"type":["string","null"]}},"required":["modelType","layers","hiddenSize","attentionHeads","kvHeads","headDim","contextLength","torchDtype"],"additionalProperties":false},{"type":"null"}]},"location":{"type":["string","null"]}},"required":["licence","formats","parameterCount","gated","remoteCode","pipelineTag","libraryName","tags","baseModels","totalBytes","trainingComputeFlops","architecture","location"],"additionalProperties":false},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","assetId","workspaceId","revision","status","attributes","failureReason","createdAt","createdBy"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"type":["string","null"]},"format":{"anyOf":[{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]},{"type":"null"}]}},"required":["path","size","sha256","format"],"additionalProperties":false}},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]},"source":{"type":"string","enum":["hub_metadata","hub_scan","static_inspection","polychat_eval","polychat_benchmark","community_eval","guardrails","route_registry","replay","upload","dataset_pipeline","provider","erasure_request"]},"status":{"type":"string","enum":["pass","warn","fail","unknown"]},"summary":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"observedAt":{"type":"string"}},"required":["id","versionId","routeId","kind","source","status","summary","details","observedAt"],"additionalProperties":false}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"state":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string"}},"isException":{"type":"boolean"},"conditions":{"type":["string","null"]},"note":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","versionId","routeId","state","verdict","evidenceIds","isException","conditions","note","requestedBy","decidedBy","decidedAt","expiresAt","createdAt"],"additionalProperties":false}},"routes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt"],"additionalProperties":false}},"lineage":{"type":"array","items":{"type":"object","properties":{"fromVersionId":{"type":"string"},"toVersionId":{"type":"string"},"relation":{"type":"string","enum":["fine_tuned_from","trained_on","evaluated_on","quantised_from","adapter_of","merged_from","distilled_from","derived_from","checkpoint_of"]}},"required":["fromVersionId","toVersionId","relation"],"additionalProperties":false}},"evalRuns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"trigger":{"type":"string","enum":["manual","deployment","checkpoint","promotion","replay"]},"status":{"type":"string","enum":["queued","running","completed","failed"]},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"latencyP95Ms":{"type":["number","null"]},"casesCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"casesTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","suiteId","routeId","versionId","trigger","status","scores","latencyP95Ms","casesCompleted","casesTotal","failureReason","createdAt","completedAt"],"additionalProperties":false}},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","revision","createdAt"],"additionalProperties":false}}},"required":["asset","version","files","evidence","decisions","routes","lineage","evalRuns","verdict","versions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","const":"huggingface"},"kind":{"type":"string","enum":["model","adapter","dataset"]},"sourceRef":{"type":"string","minLength":3,"maxLength":200,"pattern":"^[A-Za-z0-9][\\w.-]*\\/[\\w.-]+$"},"revision":{"type":"string","pattern":"^[\\w./-]{1,120}$"}},"required":["source","kind","sourceRef"]},{"type":"object","properties":{"provider":{"type":"string","const":"aws"},"uri":{"type":"string","pattern":"^s3:\\/\\/[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]\\/.+\\/$"},"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["model","adapter"]},"baseVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"licence":{"type":"string","minLength":1,"maxLength":100},"provenance":{"type":"string","minLength":1,"maxLength":2000}},"required":["provider","uri","name","kind","licence","provenance"]}]}}}}}},"/model_platform/workspaces/{workspace_id}/uploads":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdUploads","tags":["model-registry"],"summary":"Start a multipart upload of weights, an adapter or a dataset","description":"Pickle formats are refused; use safetensors, GGUF or ONNX.","responses":{"200":{"description":"Upload session","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"purpose":{"type":"string","enum":["model","adapter","dataset"]},"name":{"type":"string"},"status":{"type":"string","enum":["uploading","hashing","ready","failed","aborted"]},"files":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"partCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"partsUploaded":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"sha256":{"type":["string","null"]}},"required":["index","path","size","partCount","partsUploaded","sha256"],"additionalProperties":false}},"partBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","purpose","name","status","files","partBytes","failureReason","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","enum":["model","adapter","dataset"]},"name":{"type":"string","minLength":1,"maxLength":120},"files":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":300,"pattern":"^(?!\\/)(?!.*\\.\\.)[\\w./-]+$"},"size":{"type":"integer","exclusiveMinimum":0,"maximum":214748364800}},"required":["path","size"]}}},"required":["purpose","name","files"]}}}}}},"/model_platform/workspaces/{workspace_id}/uploads/{upload_id}":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdUploadsByUploadId","tags":["model-registry"],"summary":"Get an upload session","responses":{"200":{"description":"Upload session","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"purpose":{"type":"string","enum":["model","adapter","dataset"]},"name":{"type":"string"},"status":{"type":"string","enum":["uploading","hashing","ready","failed","aborted"]},"files":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"partCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"partsUploaded":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"sha256":{"type":["string","null"]}},"required":["index","path","size","partCount","partsUploaded","sha256"],"additionalProperties":false}},"partBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","purpose","name","status","files","partBytes","failureReason","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"upload_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdUploadsByUploadId","tags":["model-registry"],"summary":"Complete an upload and queue hashing and publishing","description":"Set status to completed once every part is stored.","responses":{"200":{"description":"Upload session","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"purpose":{"type":"string","enum":["model","adapter","dataset"]},"name":{"type":"string"},"status":{"type":"string","enum":["uploading","hashing","ready","failed","aborted"]},"files":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"partCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"partsUploaded":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"sha256":{"type":["string","null"]}},"required":["index","path","size","partCount","partsUploaded","sha256"],"additionalProperties":false}},"partBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","purpose","name","status","files","partBytes","failureReason","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"upload_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"completed"}},"required":["status"]}}}}},"delete":{"operationId":"deleteModelPlatformWorkspacesByWorkspaceIdUploadsByUploadId","tags":["model-registry"],"summary":"Abort an upload and discard its parts","responses":{"200":{"description":"Upload session","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"purpose":{"type":"string","enum":["model","adapter","dataset"]},"name":{"type":"string"},"status":{"type":"string","enum":["uploading","hashing","ready","failed","aborted"]},"files":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"partCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"partsUploaded":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"sha256":{"type":["string","null"]}},"required":["index","path","size","partCount","partsUploaded","sha256"],"additionalProperties":false}},"partBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","purpose","name","status","files","partBytes","failureReason","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"upload_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/uploads/{upload_id}/files/{file_id}/parts/{part_id}":{"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdUploadsByUploadIdFilesByFileIdPartsByPartId","tags":["model-registry"],"summary":"Upload one part of a file","responses":{"200":{"description":"Stored part","content":{"application/json":{"schema":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"etag":{"type":"string"}},"required":["partNumber","etag"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"upload_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"file_id","schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":true},{"in":"path","name":"part_id","schema":{"type":"integer","exclusiveMinimum":0,"maximum":10000},"required":true}]}},"/model_platform/workspaces/{workspace_id}/versions":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdVersions","tags":["model-registry"],"summary":"Register uploaded weights as a governed model or adapter","responses":{"200":{"description":"Registered version","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["model","adapter","dataset"]},"source":{"type":"string","enum":["huggingface","upload","bucket","derived","provider"]},"sourceRef":{"type":"string"},"displayName":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","kind","source","sourceRef","displayName","createdAt","createdBy"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":"string"},"workspaceId":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["importing","inspecting","ready","failed"]},"attributes":{"type":"object","properties":{"licence":{"type":["string","null"]},"formats":{"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}},"parameterCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"gated":{"type":"boolean"},"remoteCode":{"type":"boolean"},"pipelineTag":{"type":["string","null"]},"libraryName":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"baseModels":{"type":"array","items":{"type":"string"}},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"trainingComputeFlops":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"architecture":{"anyOf":[{"type":"object","properties":{"modelType":{"type":["string","null"]},"layers":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hiddenSize":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"attentionHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kvHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"headDim":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"contextLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"torchDtype":{"type":["string","null"]}},"required":["modelType","layers","hiddenSize","attentionHeads","kvHeads","headDim","contextLength","torchDtype"],"additionalProperties":false},{"type":"null"}]},"location":{"type":["string","null"]}},"required":["licence","formats","parameterCount","gated","remoteCode","pipelineTag","libraryName","tags","baseModels","totalBytes","trainingComputeFlops","architecture","location"],"additionalProperties":false},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","assetId","workspaceId","revision","status","attributes","failureReason","createdAt","createdBy"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"type":["string","null"]},"format":{"anyOf":[{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]},{"type":"null"}]}},"required":["path","size","sha256","format"],"additionalProperties":false}},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]},"source":{"type":"string","enum":["hub_metadata","hub_scan","static_inspection","polychat_eval","polychat_benchmark","community_eval","guardrails","route_registry","replay","upload","dataset_pipeline","provider","erasure_request"]},"status":{"type":"string","enum":["pass","warn","fail","unknown"]},"summary":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"observedAt":{"type":"string"}},"required":["id","versionId","routeId","kind","source","status","summary","details","observedAt"],"additionalProperties":false}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"state":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string"}},"isException":{"type":"boolean"},"conditions":{"type":["string","null"]},"note":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","versionId","routeId","state","verdict","evidenceIds","isException","conditions","note","requestedBy","decidedBy","decidedAt","expiresAt","createdAt"],"additionalProperties":false}},"routes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt"],"additionalProperties":false}},"lineage":{"type":"array","items":{"type":"object","properties":{"fromVersionId":{"type":"string"},"toVersionId":{"type":"string"},"relation":{"type":"string","enum":["fine_tuned_from","trained_on","evaluated_on","quantised_from","adapter_of","merged_from","distilled_from","derived_from","checkpoint_of"]}},"required":["fromVersionId","toVersionId","relation"],"additionalProperties":false}},"evalRuns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"trigger":{"type":"string","enum":["manual","deployment","checkpoint","promotion","replay"]},"status":{"type":"string","enum":["queued","running","completed","failed"]},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"latencyP95Ms":{"type":["number","null"]},"casesCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"casesTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","suiteId","routeId","versionId","trigger","status","scores","latencyP95Ms","casesCompleted","casesTotal","failureReason","createdAt","completedAt"],"additionalProperties":false}},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","revision","createdAt"],"additionalProperties":false}}},"required":["asset","version","files","evidence","decisions","routes","lineage","evalRuns","verdict","versions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string","minLength":1},"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"kind":{"type":"string","enum":["model","adapter"]},"baseVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"licence":{"type":"string","minLength":1,"maxLength":100},"provenance":{"type":"string","minLength":1,"maxLength":2000},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["uploadId","kind","licence","provenance"]}}}}}},"/model_platform/workspaces/{workspace_id}/versions/{version_id}":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdVersionsByVersionId","tags":["model-registry"],"summary":"Get a version with its evidence, decisions, routes, lineage and evals","responses":{"200":{"description":"Version detail","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["model","adapter","dataset"]},"source":{"type":"string","enum":["huggingface","upload","bucket","derived","provider"]},"sourceRef":{"type":"string"},"displayName":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","kind","source","sourceRef","displayName","createdAt","createdBy"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":"string"},"workspaceId":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["importing","inspecting","ready","failed"]},"attributes":{"type":"object","properties":{"licence":{"type":["string","null"]},"formats":{"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}},"parameterCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"gated":{"type":"boolean"},"remoteCode":{"type":"boolean"},"pipelineTag":{"type":["string","null"]},"libraryName":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"baseModels":{"type":"array","items":{"type":"string"}},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"trainingComputeFlops":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"architecture":{"anyOf":[{"type":"object","properties":{"modelType":{"type":["string","null"]},"layers":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hiddenSize":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"attentionHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kvHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"headDim":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"contextLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"torchDtype":{"type":["string","null"]}},"required":["modelType","layers","hiddenSize","attentionHeads","kvHeads","headDim","contextLength","torchDtype"],"additionalProperties":false},{"type":"null"}]},"location":{"type":["string","null"]}},"required":["licence","formats","parameterCount","gated","remoteCode","pipelineTag","libraryName","tags","baseModels","totalBytes","trainingComputeFlops","architecture","location"],"additionalProperties":false},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","assetId","workspaceId","revision","status","attributes","failureReason","createdAt","createdBy"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"type":["string","null"]},"format":{"anyOf":[{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]},{"type":"null"}]}},"required":["path","size","sha256","format"],"additionalProperties":false}},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]},"source":{"type":"string","enum":["hub_metadata","hub_scan","static_inspection","polychat_eval","polychat_benchmark","community_eval","guardrails","route_registry","replay","upload","dataset_pipeline","provider","erasure_request"]},"status":{"type":"string","enum":["pass","warn","fail","unknown"]},"summary":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"observedAt":{"type":"string"}},"required":["id","versionId","routeId","kind","source","status","summary","details","observedAt"],"additionalProperties":false}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"state":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string"}},"isException":{"type":"boolean"},"conditions":{"type":["string","null"]},"note":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","versionId","routeId","state","verdict","evidenceIds","isException","conditions","note","requestedBy","decidedBy","decidedAt","expiresAt","createdAt"],"additionalProperties":false}},"routes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt"],"additionalProperties":false}},"lineage":{"type":"array","items":{"type":"object","properties":{"fromVersionId":{"type":"string"},"toVersionId":{"type":"string"},"relation":{"type":"string","enum":["fine_tuned_from","trained_on","evaluated_on","quantised_from","adapter_of","merged_from","distilled_from","derived_from","checkpoint_of"]}},"required":["fromVersionId","toVersionId","relation"],"additionalProperties":false}},"evalRuns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"trigger":{"type":"string","enum":["manual","deployment","checkpoint","promotion","replay"]},"status":{"type":"string","enum":["queued","running","completed","failed"]},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"latencyP95Ms":{"type":["number","null"]},"casesCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"casesTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","suiteId","routeId","versionId","trigger","status","scores","latencyP95Ms","casesCompleted","casesTotal","failureReason","createdAt","completedAt"],"additionalProperties":false}},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","revision","createdAt"],"additionalProperties":false}}},"required":["asset","version","files","evidence","decisions","routes","lineage","evalRuns","verdict","versions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/model_platform/workspaces/{workspace_id}/versions/{version_id}/reinspect":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdVersionsByVersionIdReinspect","tags":["model-registry"],"summary":"Queue a fresh static inspection","responses":{"200":{"description":"Version detail","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["model","adapter","dataset"]},"source":{"type":"string","enum":["huggingface","upload","bucket","derived","provider"]},"sourceRef":{"type":"string"},"displayName":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","kind","source","sourceRef","displayName","createdAt","createdBy"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":"string"},"workspaceId":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["importing","inspecting","ready","failed"]},"attributes":{"type":"object","properties":{"licence":{"type":["string","null"]},"formats":{"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}},"parameterCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"gated":{"type":"boolean"},"remoteCode":{"type":"boolean"},"pipelineTag":{"type":["string","null"]},"libraryName":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"baseModels":{"type":"array","items":{"type":"string"}},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"trainingComputeFlops":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"architecture":{"anyOf":[{"type":"object","properties":{"modelType":{"type":["string","null"]},"layers":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hiddenSize":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"attentionHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kvHeads":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"headDim":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"contextLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"torchDtype":{"type":["string","null"]}},"required":["modelType","layers","hiddenSize","attentionHeads","kvHeads","headDim","contextLength","torchDtype"],"additionalProperties":false},{"type":"null"}]},"location":{"type":["string","null"]}},"required":["licence","formats","parameterCount","gated","remoteCode","pipelineTag","libraryName","tags","baseModels","totalBytes","trainingComputeFlops","architecture","location"],"additionalProperties":false},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","assetId","workspaceId","revision","status","attributes","failureReason","createdAt","createdBy"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"type":["string","null"]},"format":{"anyOf":[{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]},{"type":"null"}]}},"required":["path","size","sha256","format"],"additionalProperties":false}},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]},"source":{"type":"string","enum":["hub_metadata","hub_scan","static_inspection","polychat_eval","polychat_benchmark","community_eval","guardrails","route_registry","replay","upload","dataset_pipeline","provider","erasure_request"]},"status":{"type":"string","enum":["pass","warn","fail","unknown"]},"summary":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"observedAt":{"type":"string"}},"required":["id","versionId","routeId","kind","source","status","summary","details","observedAt"],"additionalProperties":false}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"state":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string"}},"isException":{"type":"boolean"},"conditions":{"type":["string","null"]},"note":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","versionId","routeId","state","verdict","evidenceIds","isException","conditions","note","requestedBy","decidedBy","decidedAt","expiresAt","createdAt"],"additionalProperties":false}},"routes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt"],"additionalProperties":false}},"lineage":{"type":"array","items":{"type":"object","properties":{"fromVersionId":{"type":"string"},"toVersionId":{"type":"string"},"relation":{"type":"string","enum":["fine_tuned_from","trained_on","evaluated_on","quantised_from","adapter_of","merged_from","distilled_from","derived_from","checkpoint_of"]}},"required":["fromVersionId","toVersionId","relation"],"additionalProperties":false}},"evalRuns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"trigger":{"type":"string","enum":["manual","deployment","checkpoint","promotion","replay"]},"status":{"type":"string","enum":["queued","running","completed","failed"]},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"latencyP95Ms":{"type":["number","null"]},"casesCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"casesTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","suiteId","routeId","versionId","trigger","status","scores","latencyP95Ms","casesCompleted","casesTotal","failureReason","createdAt","completedAt"],"additionalProperties":false}},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","revision","createdAt"],"additionalProperties":false}}},"required":["asset","version","files","evidence","decisions","routes","lineage","evalRuns","verdict","versions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/policies":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdPolicies","tags":["model-registry"],"summary":"Get the workspace policy and any project policies","responses":{"200":{"description":"Policies","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"rules":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description":{"type":"string","maxLength":300},"effect":{"type":"string","enum":["allow","warn","review","block"]},"when":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"cedar"},"source":{"type":"string","minLength":1,"maxLength":16000},"metadataOnly":{"default":false,"type":"boolean"}},"required":["type","source","metadataOnly"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"always"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"asset_kind"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["model","adapter","dataset"]}}},"required":["type","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"licence"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"source"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"format"},"op":{"type":"string","enum":["includes","only"]},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"remote_code"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"gated"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"parameters_above"},"value":{"type":"number","exclusiveMinimum":0}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"evidence"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]},"statuses":{"minItems":1,"type":"array","items":{"type":"string","enum":["pass","warn","fail","unknown"]}}},"required":["type","kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"evidence_missing"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]}},"required":["type","kind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_region"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_weights_unverified"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_jurisdiction"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_retention"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["zero","provider","self"]}}},"required":["type","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"lawful_basis"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"customer_data"}},"required":["type"],"additionalProperties":false}]}},"required":["id","effect","when"],"additionalProperties":false}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"hash":{"type":"string"},"enforcement":{"type":"string","enum":["advisory","enforced"]},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isDefault":{"type":"boolean"}},"required":["id","workspaceId","projectId","rules","revision","hash","enforcement","updatedAt","updatedBy","isDefault"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"rules":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description":{"type":"string","maxLength":300},"effect":{"type":"string","enum":["allow","warn","review","block"]},"when":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"cedar"},"source":{"type":"string","minLength":1,"maxLength":16000},"metadataOnly":{"default":false,"type":"boolean"}},"required":["type","source","metadataOnly"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"always"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"asset_kind"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["model","adapter","dataset"]}}},"required":["type","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"licence"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"source"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"format"},"op":{"type":"string","enum":["includes","only"]},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"remote_code"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"gated"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"parameters_above"},"value":{"type":"number","exclusiveMinimum":0}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"evidence"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]},"statuses":{"minItems":1,"type":"array","items":{"type":"string","enum":["pass","warn","fail","unknown"]}}},"required":["type","kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"evidence_missing"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]}},"required":["type","kind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_region"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_weights_unverified"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_jurisdiction"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_retention"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["zero","provider","self"]}}},"required":["type","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"lawful_basis"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"customer_data"}},"required":["type"],"additionalProperties":false}]}},"required":["id","effect","when"],"additionalProperties":false}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"hash":{"type":"string"},"enforcement":{"type":"string","enum":["advisory","enforced"]},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isDefault":{"type":"boolean"}},"required":["id","workspaceId","projectId","rules","revision","hash","enforcement","updatedAt","updatedBy","isDefault"],"additionalProperties":false}}},"required":["workspace","projects"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdPolicies","tags":["model-registry"],"summary":"Save a new revision of the workspace or a project policy","responses":{"200":{"description":"Saved policy","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"rules":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description":{"type":"string","maxLength":300},"effect":{"type":"string","enum":["allow","warn","review","block"]},"when":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"cedar"},"source":{"type":"string","minLength":1,"maxLength":16000},"metadataOnly":{"default":false,"type":"boolean"}},"required":["type","source","metadataOnly"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"always"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"asset_kind"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["model","adapter","dataset"]}}},"required":["type","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"licence"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"source"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"format"},"op":{"type":"string","enum":["includes","only"]},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"remote_code"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"gated"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"parameters_above"},"value":{"type":"number","exclusiveMinimum":0}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"evidence"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]},"statuses":{"minItems":1,"type":"array","items":{"type":"string","enum":["pass","warn","fail","unknown"]}}},"required":["type","kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"evidence_missing"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]}},"required":["type","kind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_region"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_weights_unverified"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_jurisdiction"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"route_retention"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["zero","provider","self"]}}},"required":["type","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"lawful_basis"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"customer_data"}},"required":["type"],"additionalProperties":false}]}},"required":["id","effect","when"],"additionalProperties":false}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"hash":{"type":"string"},"enforcement":{"type":"string","enum":["advisory","enforced"]},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isDefault":{"type":"boolean"}},"required":["id","workspaceId","projectId","rules","revision","hash","enforcement","updatedAt","updatedBy","isDefault"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"rules":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description":{"type":"string","maxLength":300},"effect":{"type":"string","enum":["allow","warn","review","block"]},"when":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"cedar"},"source":{"type":"string","minLength":1,"maxLength":16000},"metadataOnly":{"default":false,"type":"boolean"}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","const":"always"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"asset_kind"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["model","adapter","dataset"]}}},"required":["type","values"]},{"type":"object","properties":{"type":{"type":"string","const":"licence"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"source"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"format"},"op":{"type":"string","enum":["includes","only"]},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"remote_code"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"gated"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"parameters_above"},"value":{"type":"number","exclusiveMinimum":0}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"evidence"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]},"statuses":{"minItems":1,"type":"array","items":{"type":"string","enum":["pass","warn","fail","unknown"]}}},"required":["type","kind","statuses"]},{"type":"object","properties":{"type":{"type":"string","const":"evidence_missing"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]}},"required":["type","kind"]},{"type":"object","properties":{"type":{"type":"string","const":"route_region"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"route_weights_unverified"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"route_jurisdiction"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"route_retention"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["zero","provider","self"]}}},"required":["type","values"]},{"type":"object","properties":{"type":{"type":"string","const":"lawful_basis"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"customer_data"}},"required":["type"]}]}},"required":["id","effect","when"]}},"enforcement":{"type":"string","enum":["advisory","enforced"]}},"required":["projectId","rules"]}}}}}},"/model_platform/workspaces/{workspace_id}/policies/dry_run":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdPoliciesDryRun","tags":["model-registry"],"summary":"Preview which verdicts change under proposed rules","responses":{"200":{"description":"Verdict changes","content":{"application/json":{"schema":{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"versionId":{"type":"string"},"displayName":{"type":"string"},"before":{"type":"string","enum":["allow","warn","review","block"]},"after":{"type":"string","enum":["allow","warn","review","block"]}},"required":["versionId","displayName","before","after"],"additionalProperties":false}},"evaluated":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["changes","evaluated"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"rules":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description":{"type":"string","maxLength":300},"effect":{"type":"string","enum":["allow","warn","review","block"]},"when":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"cedar"},"source":{"type":"string","minLength":1,"maxLength":16000},"metadataOnly":{"default":false,"type":"boolean"}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","const":"always"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"asset_kind"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["model","adapter","dataset"]}}},"required":["type","values"]},{"type":"object","properties":{"type":{"type":"string","const":"licence"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"source"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"format"},"op":{"type":"string","enum":["includes","only"]},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["safetensors","gguf","pickle","onnx","other"]}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"remote_code"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"gated"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"parameters_above"},"value":{"type":"number","exclusiveMinimum":0}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"evidence"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]},"statuses":{"minItems":1,"type":"array","items":{"type":"string","enum":["pass","warn","fail","unknown"]}}},"required":["type","kind","statuses"]},{"type":"object","properties":{"type":{"type":"string","const":"evidence_missing"},"kind":{"type":"string","enum":["licence","format","remote_code","chat_template","hub_scan","pickle_imports","gating","card","signature","eval","public_eval","dataset_stats","pii","residency","drift","provenance","upload_integrity","teacher_terms","decontamination","erasure","compute"]}},"required":["type","kind"]},{"type":"object","properties":{"type":{"type":"string","const":"route_region"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"route_weights_unverified"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"route_jurisdiction"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"route_retention"},"values":{"minItems":1,"type":"array","items":{"type":"string","enum":["zero","provider","self"]}}},"required":["type","values"]},{"type":"object","properties":{"type":{"type":"string","const":"lawful_basis"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["type","op","values"]},{"type":"object","properties":{"type":{"type":"string","const":"customer_data"}},"required":["type"]}]}},"required":["id","effect","when"]}},"versionIds":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1}}},"required":["projectId","rules"]}}}}}},"/model_platform/workspaces/{workspace_id}/decisions":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdDecisions","tags":["model-registry"],"summary":"List approval decisions","responses":{"200":{"description":"Decisions","content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"state":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string"}},"isException":{"type":"boolean"},"conditions":{"type":["string","null"]},"note":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"displayName":{"type":"string"},"revision":{"type":"string"}},"required":["id","workspaceId","projectId","versionId","routeId","state","verdict","evidenceIds","isException","conditions","note","requestedBy","decidedBy","decidedAt","expiresAt","createdAt","displayName","revision"],"additionalProperties":false}}},"required":["decisions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"state","schema":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]}},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdDecisions","tags":["model-registry"],"summary":"Request approval or an exception for a version or route","responses":{"200":{"description":"Decision","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"state":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string"}},"isException":{"type":"boolean"},"conditions":{"type":["string","null"]},"note":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","versionId","routeId","state","verdict","evidenceIds","isException","conditions","note","requestedBy","decidedBy","decidedAt","expiresAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"routeId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"exception":{"default":false,"type":"boolean"},"note":{"type":"string","maxLength":2000}},"required":["versionId","projectId"]}}}}}},"/model_platform/workspaces/{workspace_id}/decisions/{decision_id}":{"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdDecisionsByDecisionId","tags":["model-registry"],"summary":"Approve, reject or revoke a decision","responses":{"200":{"description":"Decision","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"state":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string"}},"isException":{"type":"boolean"},"conditions":{"type":["string","null"]},"note":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","versionId","routeId","state","verdict","evidenceIds","isException","conditions","note","requestedBy","decidedBy","decidedAt","expiresAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"decision_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["approved","rejected","revoked"]},"note":{"type":"string","maxLength":2000},"conditions":{"type":"string","maxLength":500},"expiresInDays":{"type":"integer","exclusiveMinimum":0,"maximum":730}},"required":["state"]}}}}}},"/model_platform/workspaces/{workspace_id}/datasets":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdDatasets","tags":["model-datasets"],"summary":"List governed datasets","responses":{"200":{"description":"Datasets","content":{"application/json":{"schema":{"type":"object","properties":{"datasets":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"},"revision":{"type":"string"},"profile":{"anyOf":[{"type":"object","properties":{"versionId":{"type":"string"},"status":{"type":"string","enum":["processing","ready","failed"]},"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"],"additionalProperties":false},"governance":{"type":"object","properties":{"licence":{"type":"string","minLength":1,"maxLength":100},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"containsCustomerData":{"default":false,"type":"boolean"},"retentionDays":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":3650},{"type":"null"}]},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["licence","lawfulBasis","personalDataCategories","containsCustomerData","retentionDays","intendedUse"],"additionalProperties":false},"collectionMethod":{"type":"string","enum":["upload","hub","bucket","conversations","synthetic"]},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"meanTokens":{"type":"number","minimum":0},"p95Tokens":{"type":"number","minimum":0},"maxTokens":{"type":"number","minimum":0},"duplicatesRemoved":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"flaggedRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"decontaminatedRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"languages":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"piiBefore":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"piiAfter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"lengthHistogram":{"type":"array","items":{"type":"object","properties":{"upTo":{"type":"number"},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["upTo","rows"],"additionalProperties":false}},"splits":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["train","validation","test"]},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","rows","tokens"],"additionalProperties":false}},"sourceRef":{"type":"string"},"failureReason":{"type":["string","null"]},"processedAt":{"type":["string","null"]}},"required":["versionId","status","shape","mapping","governance","collectionMethod","rows","tokens","meanTokens","p95Tokens","maxTokens","duplicatesRemoved","invalidRows","flaggedRows","decontaminatedRows","languages","piiBefore","piiAfter","lengthHistogram","splits","sourceRef","failureReason","processedAt"],"additionalProperties":false},{"type":"null"}]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"usable":{"type":"boolean"},"createdAt":{"type":"string"},"usedBy":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["assetId","versionId","name","revision","profile","verdict","usable","createdAt","usedBy"],"additionalProperties":false}}},"required":["datasets"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdDatasets","tags":["model-datasets"],"summary":"Build a dataset from an upload, the Hub, a bucket, conversations or a teacher model","description":"Queues canonicalisation, deduplication, decontamination, redaction and deterministic splits.","responses":{"200":{"description":"Dataset","content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"},"revision":{"type":"string"},"profile":{"anyOf":[{"type":"object","properties":{"versionId":{"type":"string"},"status":{"type":"string","enum":["processing","ready","failed"]},"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"],"additionalProperties":false},"governance":{"type":"object","properties":{"licence":{"type":"string","minLength":1,"maxLength":100},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"containsCustomerData":{"default":false,"type":"boolean"},"retentionDays":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":3650},{"type":"null"}]},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["licence","lawfulBasis","personalDataCategories","containsCustomerData","retentionDays","intendedUse"],"additionalProperties":false},"collectionMethod":{"type":"string","enum":["upload","hub","bucket","conversations","synthetic"]},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"meanTokens":{"type":"number","minimum":0},"p95Tokens":{"type":"number","minimum":0},"maxTokens":{"type":"number","minimum":0},"duplicatesRemoved":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"flaggedRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"decontaminatedRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"languages":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"piiBefore":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"piiAfter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"lengthHistogram":{"type":"array","items":{"type":"object","properties":{"upTo":{"type":"number"},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["upTo","rows"],"additionalProperties":false}},"splits":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["train","validation","test"]},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","rows","tokens"],"additionalProperties":false}},"sourceRef":{"type":"string"},"failureReason":{"type":["string","null"]},"processedAt":{"type":["string","null"]}},"required":["versionId","status","shape","mapping","governance","collectionMethod","rows","tokens","meanTokens","p95Tokens","maxTokens","duplicatesRemoved","invalidRows","flaggedRows","decontaminatedRows","languages","piiBefore","piiAfter","lengthHistogram","splits","sourceRef","failureReason","processedAt"],"additionalProperties":false},{"type":"null"}]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"usable":{"type":"boolean"},"createdAt":{"type":"string"},"usedBy":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["assetId","versionId","name","revision","profile","verdict","usable","createdAt","usedBy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"]},"governance":{"type":"object","properties":{"licence":{"type":"string","minLength":1,"maxLength":100},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"containsCustomerData":{"default":false,"type":"boolean"},"retentionDays":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":3650},{"type":"null"}]},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["licence","lawfulBasis"]},"split":{"default":{"validation":0.05,"test":0,"seed":42},"type":"object","properties":{"validation":{"default":0.05,"type":"number","minimum":0,"maximum":0.5},"test":{"default":0,"type":"number","minimum":0,"maximum":0.5},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991}}},"processing":{"default":{"redactPii":true,"dedupe":true,"decontaminateSuiteIds":[],"maxRows":null,"tokenizerVersionId":null},"type":"object","properties":{"redactPii":{"default":true,"type":"boolean"},"dedupe":{"default":true,"type":"boolean"},"decontaminateSuiteIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"maxRows":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2000000},{"type":"null"}]},"tokenizerVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}},"source":{"type":"string","const":"upload"},"uploadId":{"type":"string","minLength":1}},"required":["name","mapping","governance","source","uploadId"]},{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"]},"governance":{"type":"object","properties":{"licence":{"type":"string","minLength":1,"maxLength":100},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"containsCustomerData":{"default":false,"type":"boolean"},"retentionDays":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":3650},{"type":"null"}]},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["licence","lawfulBasis"]},"split":{"default":{"validation":0.05,"test":0,"seed":42},"type":"object","properties":{"validation":{"default":0.05,"type":"number","minimum":0,"maximum":0.5},"test":{"default":0,"type":"number","minimum":0,"maximum":0.5},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991}}},"processing":{"default":{"redactPii":true,"dedupe":true,"decontaminateSuiteIds":[],"maxRows":null,"tokenizerVersionId":null},"type":"object","properties":{"redactPii":{"default":true,"type":"boolean"},"dedupe":{"default":true,"type":"boolean"},"decontaminateSuiteIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"maxRows":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2000000},{"type":"null"}]},"tokenizerVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}},"source":{"type":"string","const":"hub"},"repo":{"type":"string","minLength":3,"maxLength":200,"pattern":"^[A-Za-z0-9][\\w.-]*\\/[\\w.-]+$"},"revision":{"type":"string","pattern":"^[\\w./-]{1,120}$"},"config":{"type":"string","maxLength":120},"hubSplit":{"default":"train","type":"string","maxLength":120}},"required":["name","mapping","governance","source","repo"]},{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"]},"governance":{"type":"object","properties":{"licence":{"type":"string","minLength":1,"maxLength":100},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"containsCustomerData":{"default":false,"type":"boolean"},"retentionDays":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":3650},{"type":"null"}]},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["licence","lawfulBasis"]},"split":{"default":{"validation":0.05,"test":0,"seed":42},"type":"object","properties":{"validation":{"default":0.05,"type":"number","minimum":0,"maximum":0.5},"test":{"default":0,"type":"number","minimum":0,"maximum":0.5},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991}}},"processing":{"default":{"redactPii":true,"dedupe":true,"decontaminateSuiteIds":[],"maxRows":null,"tokenizerVersionId":null},"type":"object","properties":{"redactPii":{"default":true,"type":"boolean"},"dedupe":{"default":true,"type":"boolean"},"decontaminateSuiteIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"maxRows":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2000000},{"type":"null"}]},"tokenizerVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}},"source":{"type":"string","const":"bucket"},"provider":{"type":"string","const":"aws"},"uri":{"type":"string","pattern":"^s3:\\/\\/[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]\\/.+$"}},"required":["name","mapping","governance","source","provider","uri"]},{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"]},"governance":{"type":"object","properties":{"licence":{"type":"string","minLength":1,"maxLength":100},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"containsCustomerData":{"default":false,"type":"boolean"},"retentionDays":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":3650},{"type":"null"}]},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["licence","lawfulBasis"]},"split":{"default":{"validation":0.05,"test":0,"seed":42},"type":"object","properties":{"validation":{"default":0.05,"type":"number","minimum":0,"maximum":0.5},"test":{"default":0,"type":"number","minimum":0,"maximum":0.5},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991}}},"processing":{"default":{"redactPii":true,"dedupe":true,"decontaminateSuiteIds":[],"maxRows":null,"tokenizerVersionId":null},"type":"object","properties":{"redactPii":{"default":true,"type":"boolean"},"dedupe":{"default":true,"type":"boolean"},"decontaminateSuiteIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"maxRows":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2000000},{"type":"null"}]},"tokenizerVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}},"source":{"type":"string","const":"conversations"},"filters":{"default":{"minFeedbackRating":4,"minQualityScore":null,"since":null,"limit":5000},"type":"object","properties":{"minFeedbackRating":{"default":4,"anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]},"minQualityScore":{"default":null,"anyOf":[{"type":"number","minimum":0,"maximum":10},{"type":"null"}]},"since":{"default":null,"type":["string","null"]},"limit":{"default":5000,"type":"integer","exclusiveMinimum":0,"maximum":50000}}}},"required":["name","mapping","governance","source"]},{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"]},"governance":{"type":"object","properties":{"licence":{"type":"string","minLength":1,"maxLength":100},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"containsCustomerData":{"default":false,"type":"boolean"},"retentionDays":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":3650},{"type":"null"}]},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["licence","lawfulBasis"]},"split":{"default":{"validation":0.05,"test":0,"seed":42},"type":"object","properties":{"validation":{"default":0.05,"type":"number","minimum":0,"maximum":0.5},"test":{"default":0,"type":"number","minimum":0,"maximum":0.5},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991}}},"processing":{"default":{"redactPii":true,"dedupe":true,"decontaminateSuiteIds":[],"maxRows":null,"tokenizerVersionId":null},"type":"object","properties":{"redactPii":{"default":true,"type":"boolean"},"dedupe":{"default":true,"type":"boolean"},"decontaminateSuiteIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"maxRows":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2000000},{"type":"null"}]},"tokenizerVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}},"source":{"type":"string","const":"synthetic"},"teacher":{"type":"object","properties":{"routeId":{"type":"string","minLength":1},"sampleCount":{"default":1000,"type":"integer","exclusiveMinimum":0,"maximum":20000}},"required":["routeId"]},"seedPrompts":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":8000}},"instructions":{"default":"","type":"string","maxLength":8000}},"required":["name","mapping","governance","source","teacher","seedPrompts"]}]}}}}}},"/model_platform/workspaces/{workspace_id}/uploads/{upload_id}/preview":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdUploadsByUploadIdPreview","tags":["model-datasets"],"summary":"Preview columns and a suggested mapping for an uploaded dataset file","responses":{"200":{"description":"Preview","content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"}},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"],"additionalProperties":false},"sample":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["columns","mapping","sample"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"upload_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/datasets/{version_id}":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdDatasetsByVersionId","tags":["model-datasets"],"summary":"Get a dataset with its profile, governance and lineage","responses":{"200":{"description":"Dataset","content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"},"revision":{"type":"string"},"profile":{"anyOf":[{"type":"object","properties":{"versionId":{"type":"string"},"status":{"type":"string","enum":["processing","ready","failed"]},"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"],"additionalProperties":false},"governance":{"type":"object","properties":{"licence":{"type":"string","minLength":1,"maxLength":100},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"containsCustomerData":{"default":false,"type":"boolean"},"retentionDays":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":3650},{"type":"null"}]},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["licence","lawfulBasis","personalDataCategories","containsCustomerData","retentionDays","intendedUse"],"additionalProperties":false},"collectionMethod":{"type":"string","enum":["upload","hub","bucket","conversations","synthetic"]},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"meanTokens":{"type":"number","minimum":0},"p95Tokens":{"type":"number","minimum":0},"maxTokens":{"type":"number","minimum":0},"duplicatesRemoved":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"flaggedRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"decontaminatedRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"languages":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"piiBefore":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"piiAfter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"lengthHistogram":{"type":"array","items":{"type":"object","properties":{"upTo":{"type":"number"},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["upTo","rows"],"additionalProperties":false}},"splits":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["train","validation","test"]},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","rows","tokens"],"additionalProperties":false}},"sourceRef":{"type":"string"},"failureReason":{"type":["string","null"]},"processedAt":{"type":["string","null"]}},"required":["versionId","status","shape","mapping","governance","collectionMethod","rows","tokens","meanTokens","p95Tokens","maxTokens","duplicatesRemoved","invalidRows","flaggedRows","decontaminatedRows","languages","piiBefore","piiAfter","lengthHistogram","splits","sourceRef","failureReason","processedAt"],"additionalProperties":false},{"type":"null"}]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"usable":{"type":"boolean"},"createdAt":{"type":"string"},"usedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","revision","createdAt"],"additionalProperties":false}},"derivedFrom":{"type":"array","items":{"type":"string"}},"usedByVersionIds":{"type":"array","items":{"type":"string"}}},"required":["assetId","versionId","name","revision","profile","verdict","usable","createdAt","usedBy","versions","derivedFrom","usedByVersionIds"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/datasets/{version_id}/rows":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdDatasetsByVersionIdRows","tags":["model-datasets"],"summary":"Page through processed rows","responses":{"200":{"description":"Rows","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"split":{"type":"string","enum":["train","validation","test"]},"flags":{"type":"array","items":{"type":"string"}},"record":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["index","split","flags","record"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["rows","total"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"split","schema":{"default":"train","type":"string","enum":["train","validation","test"]}},{"in":"query","name":"offset","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"limit","schema":{"default":25,"type":"integer","exclusiveMinimum":0,"maximum":100}},{"in":"query","name":"flagged_only","schema":{"type":"string","enum":["true","false"]}}]}},"/model_platform/workspaces/{workspace_id}/datasets/{version_id}/exclusions":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdDatasetsByVersionIdExclusions","tags":["model-datasets"],"summary":"Exclude rows and cut a new revision","responses":{"200":{"description":"Dataset","content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"},"revision":{"type":"string"},"profile":{"anyOf":[{"type":"object","properties":{"versionId":{"type":"string"},"status":{"type":"string","enum":["processing","ready","failed"]},"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"mapping":{"type":"object","properties":{"shape":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]},"columns":{"type":"object","propertyNames":{"type":"string","enum":["messages","system","prompt","response","chosen","rejected","reference","text","query","positive","negative","image","audio"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["shape","columns"],"additionalProperties":false},"governance":{"type":"object","properties":{"licence":{"type":"string","minLength":1,"maxLength":100},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"containsCustomerData":{"default":false,"type":"boolean"},"retentionDays":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":3650},{"type":"null"}]},"intendedUse":{"default":"","type":"string","maxLength":1000}},"required":["licence","lawfulBasis","personalDataCategories","containsCustomerData","retentionDays","intendedUse"],"additionalProperties":false},"collectionMethod":{"type":"string","enum":["upload","hub","bucket","conversations","synthetic"]},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"meanTokens":{"type":"number","minimum":0},"p95Tokens":{"type":"number","minimum":0},"maxTokens":{"type":"number","minimum":0},"duplicatesRemoved":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"flaggedRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"decontaminatedRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"languages":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"piiBefore":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"piiAfter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"lengthHistogram":{"type":"array","items":{"type":"object","properties":{"upTo":{"type":"number"},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["upTo","rows"],"additionalProperties":false}},"splits":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["train","validation","test"]},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","rows","tokens"],"additionalProperties":false}},"sourceRef":{"type":"string"},"failureReason":{"type":["string","null"]},"processedAt":{"type":["string","null"]}},"required":["versionId","status","shape","mapping","governance","collectionMethod","rows","tokens","meanTokens","p95Tokens","maxTokens","duplicatesRemoved","invalidRows","flaggedRows","decontaminatedRows","languages","piiBefore","piiAfter","lengthHistogram","splits","sourceRef","failureReason","processedAt"],"additionalProperties":false},{"type":"null"}]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"usable":{"type":"boolean"},"createdAt":{"type":"string"},"usedBy":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["assetId","versionId","name","revision","profile","verdict","usable","createdAt","usedBy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"split":{"type":"string","enum":["train","validation","test"]},"indexes":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["split","indexes","reason"]}}}}}},"/model_platform/workspaces/{workspace_id}/datasets/{version_id}/erasure":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdDatasetsByVersionIdErasure","tags":["model-datasets"],"summary":"Record an erasure request and flag models trained on the affected rows","responses":{"200":{"description":"Erasure result","content":{"application/json":{"schema":{"type":"object","properties":{"datasetVersionId":{"type":"string"},"affectedVersionIds":{"type":"array","items":{"type":"string"}},"affectedRouteIds":{"type":"array","items":{"type":"string"}},"action":{"type":"string","enum":["retrain_by","withdraw"]},"dueAt":{"type":"string"}},"required":["datasetVersionId","affectedVersionIds","affectedRouteIds","action","dueAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"split":{"type":"string","enum":["train","validation","test"]},"indexes":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"reason":{"type":"string","minLength":1,"maxLength":500},"action":{"type":"string","enum":["retrain_by","withdraw"]},"dueInDays":{"default":30,"type":"integer","exclusiveMinimum":0,"maximum":365}},"required":["split","indexes","reason","action"]}}}}}},"/model_platform/workspaces/{workspace_id}/training/recommend":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdTrainingRecommend","tags":["model-training"],"summary":"Recommend a method, base, trainer and hyperparameters for a goal","responses":{"200":{"description":"Recommendation","content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string","enum":["sft","dpo","rft","distillation","continued_pretraining","embedding","vision_sft","merge","quantise"]},"adaptation":{"type":"string","enum":["lora","qlora","full"]},"baseVersionId":{"type":["string","null"]},"target":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},{"type":"null"}]},"hyperparameters":{"type":"object","properties":{"epochs":{"default":2,"type":"number","exclusiveMinimum":0,"maximum":50},"learningRate":{"default":null,"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1},{"type":"null"}]},"batchSize":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":1024},"gradientAccumulation":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":512},"maxSequenceLength":{"default":4096,"type":"integer","exclusiveMinimum":0,"maximum":1048576},"warmupRatio":{"default":0.03,"type":"number","minimum":0,"maximum":1},"weightDecay":{"default":0,"type":"number","minimum":0,"maximum":1},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991},"packing":{"default":true,"type":"boolean"},"earlyStopping":{"default":false,"type":"boolean"},"loraRank":{"default":16,"type":"integer","exclusiveMinimum":0,"maximum":512},"loraAlpha":{"default":32,"type":"integer","exclusiveMinimum":0,"maximum":1024},"loraDropout":{"default":0.05,"type":"number","minimum":0,"maximum":1},"dpoBeta":{"default":0.1,"type":"number","exclusiveMinimum":0,"maximum":10},"generationsPerPrompt":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":64}},"required":["epochs","learningRate","batchSize","gradientAccumulation","maxSequenceLength","warmupRatio","weightDecay","seed","packing","earlyStopping","loraRank","loraAlpha","loraDropout","dpoBeta","generationsPerPrompt"],"additionalProperties":false},"reasons":{"type":"array","items":{"type":"string"}}},"required":["method","adaptation","baseVersionId","target","hyperparameters","reasons"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"goal":{"type":"string","minLength":1,"maxLength":2000},"datasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graderId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["goal"]}}}}}},"/model_platform/workspaces/{workspace_id}/training/plan":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdTrainingPlan","tags":["model-training"],"summary":"Compare trainers, costs, compute and policy standing before starting","responses":{"200":{"description":"Plan","content":{"application/json":{"schema":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"providerName":{"type":"string"},"trainer":{"type":"string"},"trainerName":{"type":"string"},"connected":{"type":"boolean"},"supported":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}},"hardware":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"accelerator":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"memoryGb":{"type":"number","minimum":0},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["id","label","accelerator","count","memoryGb","hourlyUsd"],"additionalProperties":false}},"regions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"jurisdiction":{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]}},"required":["id","label","jurisdiction"],"additionalProperties":false}},"estimate":{"type":"object","properties":{"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"low":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"high":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"basis":{"type":"string"},"gpuHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"tokens":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["usd","low","high","basis","gpuHours","tokens"],"additionalProperties":false},"output":{"type":"string","enum":["hub","provider"]}},"required":["provider","providerName","trainer","trainerName","connected","supported","reasons","hardware","regions","estimate","output"],"additionalProperties":false}},"compute":{"anyOf":[{"type":"object","properties":{"modificationFlops":{"type":"number","minimum":0},"thresholdFlops":{"type":"number","exclusiveMinimum":0},"ratio":{"type":"number","minimum":0},"exceedsThreshold":{"type":"boolean"},"basis":{"type":"string","enum":["reported","fallback"]}},"required":["modificationFlops","thresholdFlops","ratio","exceedsThreshold","basis"],"additionalProperties":false},{"type":"null"}]},"tokens":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"preflight":{"type":"object","properties":{"decision":{"type":"string","enum":["allow","warn","needs_approval","blocked"]},"estimateUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"remainingUsd":{"type":["number","null"]},"reason":{"type":["string","null"]}},"required":["decision","estimateUsd","remainingUsd","reason"],"additionalProperties":false},"verdicts":{"type":"object","properties":{"base":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"dataset":{"anyOf":[{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},{"type":"null"}]}},"required":["base","dataset"],"additionalProperties":false}},"required":["options","compute","tokens","preflight","verdicts"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"method":{"type":"string","enum":["sft","dpo","rft","distillation","continued_pretraining","embedding","vision_sft","merge","quantise"]},"adaptation":{"default":"lora","type":"string","enum":["lora","qlora","full"]},"baseVersionId":{"type":"string","minLength":1},"trainDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graderId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"hyperparameters":{"default":{"epochs":2,"learningRate":null,"batchSize":8,"gradientAccumulation":1,"maxSequenceLength":4096,"warmupRatio":0.03,"weightDecay":0,"seed":42,"packing":true,"earlyStopping":false,"loraRank":16,"loraAlpha":32,"loraDropout":0.05,"dpoBeta":0.1,"generationsPerPrompt":8},"type":"object","properties":{"epochs":{"default":2,"type":"number","exclusiveMinimum":0,"maximum":50},"learningRate":{"default":null,"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1},{"type":"null"}]},"batchSize":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":1024},"gradientAccumulation":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":512},"maxSequenceLength":{"default":4096,"type":"integer","exclusiveMinimum":0,"maximum":1048576},"warmupRatio":{"default":0.03,"type":"number","minimum":0,"maximum":1},"weightDecay":{"default":0,"type":"number","minimum":0,"maximum":1},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991},"packing":{"default":true,"type":"boolean"},"earlyStopping":{"default":false,"type":"boolean"},"loraRank":{"default":16,"type":"integer","exclusiveMinimum":0,"maximum":512},"loraAlpha":{"default":32,"type":"integer","exclusiveMinimum":0,"maximum":1024},"loraDropout":{"default":0.05,"type":"number","minimum":0,"maximum":1},"dpoBeta":{"default":0.1,"type":"number","exclusiveMinimum":0,"maximum":10},"generationsPerPrompt":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":64}}}},"required":["method","baseVersionId"]}}}}}},"/model_platform/workspaces/{workspace_id}/training/runs":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdTrainingRuns","tags":["model-training"],"summary":"List training runs","responses":{"200":{"description":"Runs","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"spec":{"type":"object","properties":{"method":{"type":"string","enum":["sft","dpo","rft","distillation","continued_pretraining","embedding","vision_sft","merge","quantise"]},"adaptation":{"default":"lora","type":"string","enum":["lora","qlora","full"]},"baseVersionId":{"type":"string","minLength":1},"mergeVersionIds":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1}},"trainDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"validationDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graderId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"hyperparameters":{"default":{"epochs":2,"learningRate":null,"batchSize":8,"gradientAccumulation":1,"maxSequenceLength":4096,"warmupRatio":0.03,"weightDecay":0,"seed":42,"packing":true,"earlyStopping":false,"loraRank":16,"loraAlpha":32,"loraDropout":0.05,"dpoBeta":0.1,"generationsPerPrompt":8},"type":"object","properties":{"epochs":{"default":2,"type":"number","exclusiveMinimum":0,"maximum":50},"learningRate":{"default":null,"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1},{"type":"null"}]},"batchSize":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":1024},"gradientAccumulation":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":512},"maxSequenceLength":{"default":4096,"type":"integer","exclusiveMinimum":0,"maximum":1048576},"warmupRatio":{"default":0.03,"type":"number","minimum":0,"maximum":1},"weightDecay":{"default":0,"type":"number","minimum":0,"maximum":1},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991},"packing":{"default":true,"type":"boolean"},"earlyStopping":{"default":false,"type":"boolean"},"loraRank":{"default":16,"type":"integer","exclusiveMinimum":0,"maximum":512},"loraAlpha":{"default":32,"type":"integer","exclusiveMinimum":0,"maximum":1024},"loraDropout":{"default":0.05,"type":"number","minimum":0,"maximum":1},"dpoBeta":{"default":0.1,"type":"number","exclusiveMinimum":0,"maximum":10},"generationsPerPrompt":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":64}},"required":["epochs","learningRate","batchSize","gradientAccumulation","maxSequenceLength","warmupRatio","weightDecay","seed","packing","earlyStopping","loraRank","loraAlpha","loraDropout","dpoBeta","generationsPerPrompt"],"additionalProperties":false},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"checkpointEvery":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":100000},{"type":"null"}]},"outputName":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","adaptation","baseVersionId","mergeVersionIds","trainDatasetVersionId","validationDatasetVersionId","graderId","quantisation","hyperparameters","target","checkpointEvery","outputName","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["queued","preparing","submitted","running","cancelling","completed","failed","cancelled"]},"providerJobId":{"type":["string","null"]},"outputVersionId":{"type":["string","null"]},"datasetVersionIds":{"type":"array","items":{"type":"string"}},"estimate":{"type":"object","properties":{"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"low":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"high":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"basis":{"type":"string"},"gpuHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"tokens":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["usd","low","high","basis","gpuHours","tokens"],"additionalProperties":false},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"compute":{"anyOf":[{"type":"object","properties":{"modificationFlops":{"type":"number","minimum":0},"thresholdFlops":{"type":"number","exclusiveMinimum":0},"ratio":{"type":"number","minimum":0},"exceedsThreshold":{"type":"boolean"},"basis":{"type":"string","enum":["reported","fallback"]}},"required":["modificationFlops","thresholdFlops","ratio","exceedsThreshold","basis"],"additionalProperties":false},{"type":"null"}]},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"baseName":{"type":"string"},"latestLoss":{"type":["number","null"]}},"required":["id","workspaceId","projectId","spec","specHash","status","providerJobId","outputVersionId","datasetVersionIds","estimate","costUsd","compute","failureReason","createdBy","createdAt","startedAt","completedAt","baseName","latestLoss"],"additionalProperties":false}}},"required":["runs"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdTrainingRuns","tags":["model-training"],"summary":"Start a training run, or file a spend request when the budget needs approval","responses":{"200":{"description":"Start result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"spec":{"type":"object","properties":{"method":{"type":"string","enum":["sft","dpo","rft","distillation","continued_pretraining","embedding","vision_sft","merge","quantise"]},"adaptation":{"default":"lora","type":"string","enum":["lora","qlora","full"]},"baseVersionId":{"type":"string","minLength":1},"mergeVersionIds":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1}},"trainDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"validationDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graderId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"hyperparameters":{"default":{"epochs":2,"learningRate":null,"batchSize":8,"gradientAccumulation":1,"maxSequenceLength":4096,"warmupRatio":0.03,"weightDecay":0,"seed":42,"packing":true,"earlyStopping":false,"loraRank":16,"loraAlpha":32,"loraDropout":0.05,"dpoBeta":0.1,"generationsPerPrompt":8},"type":"object","properties":{"epochs":{"default":2,"type":"number","exclusiveMinimum":0,"maximum":50},"learningRate":{"default":null,"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1},{"type":"null"}]},"batchSize":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":1024},"gradientAccumulation":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":512},"maxSequenceLength":{"default":4096,"type":"integer","exclusiveMinimum":0,"maximum":1048576},"warmupRatio":{"default":0.03,"type":"number","minimum":0,"maximum":1},"weightDecay":{"default":0,"type":"number","minimum":0,"maximum":1},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991},"packing":{"default":true,"type":"boolean"},"earlyStopping":{"default":false,"type":"boolean"},"loraRank":{"default":16,"type":"integer","exclusiveMinimum":0,"maximum":512},"loraAlpha":{"default":32,"type":"integer","exclusiveMinimum":0,"maximum":1024},"loraDropout":{"default":0.05,"type":"number","minimum":0,"maximum":1},"dpoBeta":{"default":0.1,"type":"number","exclusiveMinimum":0,"maximum":10},"generationsPerPrompt":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":64}},"required":["epochs","learningRate","batchSize","gradientAccumulation","maxSequenceLength","warmupRatio","weightDecay","seed","packing","earlyStopping","loraRank","loraAlpha","loraDropout","dpoBeta","generationsPerPrompt"],"additionalProperties":false},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"checkpointEvery":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":100000},{"type":"null"}]},"outputName":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","adaptation","baseVersionId","mergeVersionIds","trainDatasetVersionId","validationDatasetVersionId","graderId","quantisation","hyperparameters","target","checkpointEvery","outputName","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["queued","preparing","submitted","running","cancelling","completed","failed","cancelled"]},"providerJobId":{"type":["string","null"]},"outputVersionId":{"type":["string","null"]},"datasetVersionIds":{"type":"array","items":{"type":"string"}},"estimate":{"type":"object","properties":{"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"low":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"high":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"basis":{"type":"string"},"gpuHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"tokens":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["usd","low","high","basis","gpuHours","tokens"],"additionalProperties":false},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"compute":{"anyOf":[{"type":"object","properties":{"modificationFlops":{"type":"number","minimum":0},"thresholdFlops":{"type":"number","exclusiveMinimum":0},"ratio":{"type":"number","minimum":0},"exceedsThreshold":{"type":"boolean"},"basis":{"type":"string","enum":["reported","fallback"]}},"required":["modificationFlops","thresholdFlops","ratio","exceedsThreshold","basis"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":0,"maximum":9007199254740991},"epoch":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"trainLoss":{"type":["number","null"]},"validLoss":{"type":["number","null"]},"reward":{"type":["number","null"]},"learningRate":{"type":["number","null"]}},"required":["step","epoch","trainLoss","validLoss","reward","learningRate"],"additionalProperties":false}},"checkpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"step":{"type":"integer","minimum":0,"maximum":9007199254740991},"providerRef":{"type":"string"},"versionId":{"type":["string","null"]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"createdAt":{"type":"string"}},"required":["id","step","providerRef","versionId","metrics","createdAt"],"additionalProperties":false}},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]}},"required":["id","workspaceId","projectId","spec","specHash","status","providerJobId","outputVersionId","datasetVersionIds","estimate","costUsd","compute","metrics","checkpoints","failureReason","createdBy","createdAt","startedAt","completedAt"],"additionalProperties":false},{"type":"null"}]},"spendRequest":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"subjectType":{"type":"string","enum":["training_run","deployment"]},"summary":{"type":"string"},"estimateUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"reason":{"type":["string","null"]},"state":{"type":"string","enum":["pending","executing","approved","rejected","failed"]},"subjectId":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","subjectType","summary","estimateUsd","reason","state","subjectId","requestedBy","decidedBy","decidedAt","createdAt"],"additionalProperties":false},{"type":"null"}]},"preflight":{"type":"object","properties":{"decision":{"type":"string","enum":["allow","warn","needs_approval","blocked"]},"estimateUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"remainingUsd":{"type":["number","null"]},"reason":{"type":["string","null"]}},"required":["decision","estimateUsd","remainingUsd","reason"],"additionalProperties":false}},"required":["run","spendRequest","preflight"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"spec":{"type":"object","properties":{"method":{"type":"string","enum":["sft","dpo","rft","distillation","continued_pretraining","embedding","vision_sft","merge","quantise"]},"adaptation":{"default":"lora","type":"string","enum":["lora","qlora","full"]},"baseVersionId":{"type":"string","minLength":1},"mergeVersionIds":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1}},"trainDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"validationDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graderId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"hyperparameters":{"default":{"epochs":2,"learningRate":null,"batchSize":8,"gradientAccumulation":1,"maxSequenceLength":4096,"warmupRatio":0.03,"weightDecay":0,"seed":42,"packing":true,"earlyStopping":false,"loraRank":16,"loraAlpha":32,"loraDropout":0.05,"dpoBeta":0.1,"generationsPerPrompt":8},"type":"object","properties":{"epochs":{"default":2,"type":"number","exclusiveMinimum":0,"maximum":50},"learningRate":{"default":null,"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1},{"type":"null"}]},"batchSize":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":1024},"gradientAccumulation":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":512},"maxSequenceLength":{"default":4096,"type":"integer","exclusiveMinimum":0,"maximum":1048576},"warmupRatio":{"default":0.03,"type":"number","minimum":0,"maximum":1},"weightDecay":{"default":0,"type":"number","minimum":0,"maximum":1},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991},"packing":{"default":true,"type":"boolean"},"earlyStopping":{"default":false,"type":"boolean"},"loraRank":{"default":16,"type":"integer","exclusiveMinimum":0,"maximum":512},"loraAlpha":{"default":32,"type":"integer","exclusiveMinimum":0,"maximum":1024},"loraDropout":{"default":0.05,"type":"number","minimum":0,"maximum":1},"dpoBeta":{"default":0.1,"type":"number","exclusiveMinimum":0,"maximum":10},"generationsPerPrompt":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":64}}},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target"]},"checkpointEvery":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":100000},{"type":"null"}]},"outputName":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","baseVersionId","target","outputName"]}},"required":["spec"]}}}}}},"/model_platform/workspaces/{workspace_id}/training/runs/{run_id}":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdTrainingRunsByRunId","tags":["model-training"],"summary":"Get a run with metrics and checkpoints","responses":{"200":{"description":"Run","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"spec":{"type":"object","properties":{"method":{"type":"string","enum":["sft","dpo","rft","distillation","continued_pretraining","embedding","vision_sft","merge","quantise"]},"adaptation":{"default":"lora","type":"string","enum":["lora","qlora","full"]},"baseVersionId":{"type":"string","minLength":1},"mergeVersionIds":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1}},"trainDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"validationDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graderId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"hyperparameters":{"default":{"epochs":2,"learningRate":null,"batchSize":8,"gradientAccumulation":1,"maxSequenceLength":4096,"warmupRatio":0.03,"weightDecay":0,"seed":42,"packing":true,"earlyStopping":false,"loraRank":16,"loraAlpha":32,"loraDropout":0.05,"dpoBeta":0.1,"generationsPerPrompt":8},"type":"object","properties":{"epochs":{"default":2,"type":"number","exclusiveMinimum":0,"maximum":50},"learningRate":{"default":null,"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1},{"type":"null"}]},"batchSize":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":1024},"gradientAccumulation":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":512},"maxSequenceLength":{"default":4096,"type":"integer","exclusiveMinimum":0,"maximum":1048576},"warmupRatio":{"default":0.03,"type":"number","minimum":0,"maximum":1},"weightDecay":{"default":0,"type":"number","minimum":0,"maximum":1},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991},"packing":{"default":true,"type":"boolean"},"earlyStopping":{"default":false,"type":"boolean"},"loraRank":{"default":16,"type":"integer","exclusiveMinimum":0,"maximum":512},"loraAlpha":{"default":32,"type":"integer","exclusiveMinimum":0,"maximum":1024},"loraDropout":{"default":0.05,"type":"number","minimum":0,"maximum":1},"dpoBeta":{"default":0.1,"type":"number","exclusiveMinimum":0,"maximum":10},"generationsPerPrompt":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":64}},"required":["epochs","learningRate","batchSize","gradientAccumulation","maxSequenceLength","warmupRatio","weightDecay","seed","packing","earlyStopping","loraRank","loraAlpha","loraDropout","dpoBeta","generationsPerPrompt"],"additionalProperties":false},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"checkpointEvery":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":100000},{"type":"null"}]},"outputName":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","adaptation","baseVersionId","mergeVersionIds","trainDatasetVersionId","validationDatasetVersionId","graderId","quantisation","hyperparameters","target","checkpointEvery","outputName","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["queued","preparing","submitted","running","cancelling","completed","failed","cancelled"]},"providerJobId":{"type":["string","null"]},"outputVersionId":{"type":["string","null"]},"datasetVersionIds":{"type":"array","items":{"type":"string"}},"estimate":{"type":"object","properties":{"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"low":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"high":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"basis":{"type":"string"},"gpuHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"tokens":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["usd","low","high","basis","gpuHours","tokens"],"additionalProperties":false},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"compute":{"anyOf":[{"type":"object","properties":{"modificationFlops":{"type":"number","minimum":0},"thresholdFlops":{"type":"number","exclusiveMinimum":0},"ratio":{"type":"number","minimum":0},"exceedsThreshold":{"type":"boolean"},"basis":{"type":"string","enum":["reported","fallback"]}},"required":["modificationFlops","thresholdFlops","ratio","exceedsThreshold","basis"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":0,"maximum":9007199254740991},"epoch":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"trainLoss":{"type":["number","null"]},"validLoss":{"type":["number","null"]},"reward":{"type":["number","null"]},"learningRate":{"type":["number","null"]}},"required":["step","epoch","trainLoss","validLoss","reward","learningRate"],"additionalProperties":false}},"checkpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"step":{"type":"integer","minimum":0,"maximum":9007199254740991},"providerRef":{"type":"string"},"versionId":{"type":["string","null"]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"createdAt":{"type":"string"}},"required":["id","step","providerRef","versionId","metrics","createdAt"],"additionalProperties":false}},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]}},"required":["id","workspaceId","projectId","spec","specHash","status","providerJobId","outputVersionId","datasetVersionIds","estimate","costUsd","compute","metrics","checkpoints","failureReason","createdBy","createdAt","startedAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"run_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/training/runs/{run_id}/cancel":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdTrainingRunsByRunIdCancel","tags":["model-training"],"summary":"Cancel a run with its provider","responses":{"200":{"description":"Run","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"spec":{"type":"object","properties":{"method":{"type":"string","enum":["sft","dpo","rft","distillation","continued_pretraining","embedding","vision_sft","merge","quantise"]},"adaptation":{"default":"lora","type":"string","enum":["lora","qlora","full"]},"baseVersionId":{"type":"string","minLength":1},"mergeVersionIds":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1}},"trainDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"validationDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graderId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"hyperparameters":{"default":{"epochs":2,"learningRate":null,"batchSize":8,"gradientAccumulation":1,"maxSequenceLength":4096,"warmupRatio":0.03,"weightDecay":0,"seed":42,"packing":true,"earlyStopping":false,"loraRank":16,"loraAlpha":32,"loraDropout":0.05,"dpoBeta":0.1,"generationsPerPrompt":8},"type":"object","properties":{"epochs":{"default":2,"type":"number","exclusiveMinimum":0,"maximum":50},"learningRate":{"default":null,"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1},{"type":"null"}]},"batchSize":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":1024},"gradientAccumulation":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":512},"maxSequenceLength":{"default":4096,"type":"integer","exclusiveMinimum":0,"maximum":1048576},"warmupRatio":{"default":0.03,"type":"number","minimum":0,"maximum":1},"weightDecay":{"default":0,"type":"number","minimum":0,"maximum":1},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991},"packing":{"default":true,"type":"boolean"},"earlyStopping":{"default":false,"type":"boolean"},"loraRank":{"default":16,"type":"integer","exclusiveMinimum":0,"maximum":512},"loraAlpha":{"default":32,"type":"integer","exclusiveMinimum":0,"maximum":1024},"loraDropout":{"default":0.05,"type":"number","minimum":0,"maximum":1},"dpoBeta":{"default":0.1,"type":"number","exclusiveMinimum":0,"maximum":10},"generationsPerPrompt":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":64}},"required":["epochs","learningRate","batchSize","gradientAccumulation","maxSequenceLength","warmupRatio","weightDecay","seed","packing","earlyStopping","loraRank","loraAlpha","loraDropout","dpoBeta","generationsPerPrompt"],"additionalProperties":false},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"checkpointEvery":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":100000},{"type":"null"}]},"outputName":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","adaptation","baseVersionId","mergeVersionIds","trainDatasetVersionId","validationDatasetVersionId","graderId","quantisation","hyperparameters","target","checkpointEvery","outputName","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["queued","preparing","submitted","running","cancelling","completed","failed","cancelled"]},"providerJobId":{"type":["string","null"]},"outputVersionId":{"type":["string","null"]},"datasetVersionIds":{"type":"array","items":{"type":"string"}},"estimate":{"type":"object","properties":{"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"low":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"high":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"basis":{"type":"string"},"gpuHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"tokens":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["usd","low","high","basis","gpuHours","tokens"],"additionalProperties":false},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"compute":{"anyOf":[{"type":"object","properties":{"modificationFlops":{"type":"number","minimum":0},"thresholdFlops":{"type":"number","exclusiveMinimum":0},"ratio":{"type":"number","minimum":0},"exceedsThreshold":{"type":"boolean"},"basis":{"type":"string","enum":["reported","fallback"]}},"required":["modificationFlops","thresholdFlops","ratio","exceedsThreshold","basis"],"additionalProperties":false},{"type":"null"}]},"metrics":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":0,"maximum":9007199254740991},"epoch":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"trainLoss":{"type":["number","null"]},"validLoss":{"type":["number","null"]},"reward":{"type":["number","null"]},"learningRate":{"type":["number","null"]}},"required":["step","epoch","trainLoss","validLoss","reward","learningRate"],"additionalProperties":false}},"checkpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"step":{"type":"integer","minimum":0,"maximum":9007199254740991},"providerRef":{"type":"string"},"versionId":{"type":["string","null"]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"createdAt":{"type":"string"}},"required":["id","step","providerRef","versionId","metrics","createdAt"],"additionalProperties":false}},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]}},"required":["id","workspaceId","projectId","spec","specHash","status","providerJobId","outputVersionId","datasetVersionIds","estimate","costUsd","compute","metrics","checkpoints","failureReason","createdBy","createdAt","startedAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"run_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/deployments/plan":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdDeploymentsPlan","tags":["model-serving"],"summary":"Size a model and compare every connected host that can serve it","responses":{"200":{"description":"Plan","content":{"application/json":{"schema":{"type":"object","properties":{"sizing":{"anyOf":[{"type":"object","properties":{"parameters":{"type":"number","minimum":0},"quantisation":{"type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"bytesPerParameter":{"type":"number","exclusiveMinimum":0},"weightBytes":{"type":"number","minimum":0},"kvBytesPerToken":{"type":"number","minimum":0},"contextLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"concurrency":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"kvBytes":{"type":"number","minimum":0},"overheadBytes":{"type":"number","minimum":0},"totalBytes":{"type":"number","minimum":0},"basis":{"type":"string","enum":["config","parameters_only"]}},"required":["parameters","quantisation","bytesPerParameter","weightBytes","kvBytesPerToken","contextLength","concurrency","kvBytes","overheadBytes","totalBytes","basis"],"additionalProperties":false},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"providerName":{"type":"string"},"host":{"type":"string"},"hostName":{"type":"string"},"shape":{"type":"string","enum":["serverless","dedicated","adapter_pool","external"]},"region":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"jurisdiction":{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]}},"required":["id","label","jurisdiction"],"additionalProperties":false},{"type":"null"}]},"hardware":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"accelerator":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"memoryGb":{"type":"number","minimum":0},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["id","label","accelerator","count","memoryGb","hourlyUsd"],"additionalProperties":false},{"type":"null"}]},"fits":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"perMillionTokensUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"scaleToZero":{"type":"boolean"},"weightsVerified":{"type":"boolean"},"retention":{"type":"string","enum":["zero","provider","self"]},"connected":{"type":"boolean"},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"engines":{"type":"array","items":{"type":"string","enum":["vllm","sglang","tgi","tensorrt-llm","llama.cpp","provider"]}},"quantisations":{"type":"array","items":{"type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]}}},"required":["provider","providerName","host","hostName","shape","region","hardware","fits","reasons","hourlyUsd","perMillionTokensUsd","scaleToZero","weightsVerified","retention","connected","verdict","engines","quantisations"],"additionalProperties":false}}},"required":["sizing","options"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"versionId":{"type":"string","minLength":1},"adapterVersionIds":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"contextLength":{"default":8192,"type":"integer","exclusiveMinimum":0,"maximum":1048576},"concurrency":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":4096}},"required":["versionId"]}}}}}},"/model_platform/workspaces/{workspace_id}/deployments":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdDeployments","tags":["model-serving"],"summary":"List deployments","responses":{"200":{"description":"Deployments","content":{"application/json":{"schema":{"type":"object","properties":{"deployments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pauseSupported":{"type":"boolean"},"spendRequestId":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"spec":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"adapterVersionIds":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"shape":{"type":"string","enum":["serverless","dedicated","adapter_pool","external"]},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"engine":{"default":"vllm","type":"string","enum":["vllm","sglang","tgi","tensorrt-llm","llama.cpp","provider"]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"scaling":{"default":{"minReplicas":0,"maxReplicas":1,"scaleToZeroAfterMinutes":30},"type":"object","properties":{"minReplicas":{"default":0,"type":"integer","minimum":0,"maximum":64},"maxReplicas":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":64},"scaleToZeroAfterMinutes":{"default":30,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1440},{"type":"null"}]}},"required":["minReplicas","maxReplicas","scaleToZeroAfterMinutes"],"additionalProperties":false},"access":{"default":"private","type":"string","enum":["private","authenticated","public"]},"contextLength":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1048576},{"type":"null"}]},"maxConcurrency":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":4096},"external":{"default":null,"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","maxLength":500,"format":"uri"},"modelId":{"type":"string","minLength":1,"maxLength":200}},"required":["baseUrl","modelId"],"additionalProperties":false},{"type":"null"}]},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["versionId","adapterVersionIds","shape","target","engine","quantisation","scaling","access","contextLength","maxConcurrency","external","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["pending","provisioning","running","scaled_to_zero","paused","updating","failed","deleting","deleted"]},"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"host":{"type":"string"},"providerRef":{"type":["string","null"]},"region":{"type":["string","null"]},"jurisdiction":{"anyOf":[{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]},{"type":"null"}]},"weightsVerified":{"type":"boolean"},"routeId":{"type":["string","null"]},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastCheckedAt":{"type":["string","null"]},"displayName":{"type":"string"}},"required":["id","workspaceId","projectId","name","spec","specHash","status","provider","host","providerRef","region","jurisdiction","weightsVerified","routeId","hourlyUsd","failureReason","createdBy","createdAt","updatedAt","lastCheckedAt","displayName"],"additionalProperties":false}}},"required":["deployments"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdDeployments","tags":["model-serving"],"summary":"Deploy a governed version, or file a spend request when the budget needs approval","responses":{"200":{"description":"Start result","content":{"application/json":{"schema":{"type":"object","properties":{"deployment":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"pauseSupported":{"type":"boolean"},"spendRequestId":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"spec":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"adapterVersionIds":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"shape":{"type":"string","enum":["serverless","dedicated","adapter_pool","external"]},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"engine":{"default":"vllm","type":"string","enum":["vllm","sglang","tgi","tensorrt-llm","llama.cpp","provider"]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"scaling":{"default":{"minReplicas":0,"maxReplicas":1,"scaleToZeroAfterMinutes":30},"type":"object","properties":{"minReplicas":{"default":0,"type":"integer","minimum":0,"maximum":64},"maxReplicas":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":64},"scaleToZeroAfterMinutes":{"default":30,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1440},{"type":"null"}]}},"required":["minReplicas","maxReplicas","scaleToZeroAfterMinutes"],"additionalProperties":false},"access":{"default":"private","type":"string","enum":["private","authenticated","public"]},"contextLength":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1048576},{"type":"null"}]},"maxConcurrency":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":4096},"external":{"default":null,"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","maxLength":500,"format":"uri"},"modelId":{"type":"string","minLength":1,"maxLength":200}},"required":["baseUrl","modelId"],"additionalProperties":false},{"type":"null"}]},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["versionId","adapterVersionIds","shape","target","engine","quantisation","scaling","access","contextLength","maxConcurrency","external","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["pending","provisioning","running","scaled_to_zero","paused","updating","failed","deleting","deleted"]},"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"host":{"type":"string"},"providerRef":{"type":["string","null"]},"region":{"type":["string","null"]},"jurisdiction":{"anyOf":[{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]},{"type":"null"}]},"weightsVerified":{"type":"boolean"},"routeId":{"type":["string","null"]},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastCheckedAt":{"type":["string","null"]}},"required":["id","workspaceId","projectId","name","spec","specHash","status","provider","host","providerRef","region","jurisdiction","weightsVerified","routeId","hourlyUsd","failureReason","createdBy","createdAt","updatedAt","lastCheckedAt"],"additionalProperties":false},{"type":"null"}]},"spendRequest":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"subjectType":{"type":"string","enum":["training_run","deployment"]},"summary":{"type":"string"},"estimateUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"reason":{"type":["string","null"]},"state":{"type":"string","enum":["pending","executing","approved","rejected","failed"]},"subjectId":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","subjectType","summary","estimateUsd","reason","state","subjectId","requestedBy","decidedBy","decidedAt","createdAt"],"additionalProperties":false},{"type":"null"}]},"preflight":{"type":"object","properties":{"decision":{"type":"string","enum":["allow","warn","needs_approval","blocked"]},"estimateUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"remainingUsd":{"type":["number","null"]},"reason":{"type":["string","null"]}},"required":["decision","estimateUsd","remainingUsd","reason"],"additionalProperties":false}},"required":["deployment","spendRequest","preflight"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":3,"maxLength":48,"pattern":"^[a-z0-9][a-z0-9-]*$"},"spec":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"adapterVersionIds":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"shape":{"type":"string","enum":["serverless","dedicated","adapter_pool","external"]},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target"]},"engine":{"default":"vllm","type":"string","enum":["vllm","sglang","tgi","tensorrt-llm","llama.cpp","provider"]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"scaling":{"default":{"minReplicas":0,"maxReplicas":1,"scaleToZeroAfterMinutes":30},"type":"object","properties":{"minReplicas":{"default":0,"type":"integer","minimum":0,"maximum":64},"maxReplicas":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":64},"scaleToZeroAfterMinutes":{"default":30,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1440},{"type":"null"}]}}},"access":{"default":"private","type":"string","enum":["private","authenticated","public"]},"contextLength":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1048576},{"type":"null"}]},"maxConcurrency":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":4096},"external":{"default":null,"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","maxLength":500,"format":"uri"},"modelId":{"type":"string","minLength":1,"maxLength":200}},"required":["baseUrl","modelId"]},{"type":"null"}]},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["versionId","shape","target"]},"aliasName":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9][a-z0-9-]*$"}},"required":["name","spec"]}}}}}},"/model_platform/workspaces/{workspace_id}/deployments/{deployment_id}":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdDeploymentsByDeploymentId","tags":["model-serving"],"summary":"Get a deployment with its route, aliases, usage and spend","responses":{"200":{"description":"Deployment","content":{"application/json":{"schema":{"type":"object","properties":{"deployment":{"type":"object","properties":{"id":{"type":"string"},"pauseSupported":{"type":"boolean"},"spendRequestId":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"spec":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"adapterVersionIds":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"shape":{"type":"string","enum":["serverless","dedicated","adapter_pool","external"]},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"engine":{"default":"vllm","type":"string","enum":["vllm","sglang","tgi","tensorrt-llm","llama.cpp","provider"]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"scaling":{"default":{"minReplicas":0,"maxReplicas":1,"scaleToZeroAfterMinutes":30},"type":"object","properties":{"minReplicas":{"default":0,"type":"integer","minimum":0,"maximum":64},"maxReplicas":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":64},"scaleToZeroAfterMinutes":{"default":30,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1440},{"type":"null"}]}},"required":["minReplicas","maxReplicas","scaleToZeroAfterMinutes"],"additionalProperties":false},"access":{"default":"private","type":"string","enum":["private","authenticated","public"]},"contextLength":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1048576},{"type":"null"}]},"maxConcurrency":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":4096},"external":{"default":null,"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","maxLength":500,"format":"uri"},"modelId":{"type":"string","minLength":1,"maxLength":200}},"required":["baseUrl","modelId"],"additionalProperties":false},{"type":"null"}]},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["versionId","adapterVersionIds","shape","target","engine","quantisation","scaling","access","contextLength","maxConcurrency","external","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["pending","provisioning","running","scaled_to_zero","paused","updating","failed","deleting","deleted"]},"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"host":{"type":"string"},"providerRef":{"type":["string","null"]},"region":{"type":["string","null"]},"jurisdiction":{"anyOf":[{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]},{"type":"null"}]},"weightsVerified":{"type":"boolean"},"routeId":{"type":["string","null"]},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastCheckedAt":{"type":["string","null"]}},"required":["id","workspaceId","projectId","name","spec","specHash","status","provider","host","providerRef","region","jurisdiction","weightsVerified","routeId","hourlyUsd","failureReason","createdBy","createdAt","updatedAt","lastCheckedAt"],"additionalProperties":false},"route":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt"],"additionalProperties":false},{"type":"null"}]},"aliases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"routeId":{"type":["string","null"]},"canaryRouteId":{"type":["string","null"]},"canaryPercent":{"type":"integer","minimum":0,"maximum":100},"gate":{"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"],"additionalProperties":false},{"type":"null"}]},"requiresApproval":{"type":"boolean"},"chatModelId":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","projectId","name","description","routeId","canaryRouteId","canaryPercent","gate","requiresApproval","chatModelId","updatedAt","updatedBy"],"additionalProperties":false}},"displayName":{"type":"string"},"health":{"type":"object","properties":{"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0}},"required":["requests","inputTokens","outputTokens","costUsd"],"additionalProperties":false},"spendUsd":{"type":"number","minimum":0}},"required":["deployment","route","aliases","displayName","health","spendUsd"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"deployment_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdDeploymentsByDeploymentId","tags":["model-serving"],"summary":"Change replica bounds and scale-to-zero","responses":{"200":{"description":"Deployment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"pauseSupported":{"type":"boolean"},"spendRequestId":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"spec":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"adapterVersionIds":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"shape":{"type":"string","enum":["serverless","dedicated","adapter_pool","external"]},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"engine":{"default":"vllm","type":"string","enum":["vllm","sglang","tgi","tensorrt-llm","llama.cpp","provider"]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"scaling":{"default":{"minReplicas":0,"maxReplicas":1,"scaleToZeroAfterMinutes":30},"type":"object","properties":{"minReplicas":{"default":0,"type":"integer","minimum":0,"maximum":64},"maxReplicas":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":64},"scaleToZeroAfterMinutes":{"default":30,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1440},{"type":"null"}]}},"required":["minReplicas","maxReplicas","scaleToZeroAfterMinutes"],"additionalProperties":false},"access":{"default":"private","type":"string","enum":["private","authenticated","public"]},"contextLength":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1048576},{"type":"null"}]},"maxConcurrency":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":4096},"external":{"default":null,"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","maxLength":500,"format":"uri"},"modelId":{"type":"string","minLength":1,"maxLength":200}},"required":["baseUrl","modelId"],"additionalProperties":false},{"type":"null"}]},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["versionId","adapterVersionIds","shape","target","engine","quantisation","scaling","access","contextLength","maxConcurrency","external","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["pending","provisioning","running","scaled_to_zero","paused","updating","failed","deleting","deleted"]},"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"host":{"type":"string"},"providerRef":{"type":["string","null"]},"region":{"type":["string","null"]},"jurisdiction":{"anyOf":[{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]},{"type":"null"}]},"weightsVerified":{"type":"boolean"},"routeId":{"type":["string","null"]},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastCheckedAt":{"type":["string","null"]}},"required":["id","workspaceId","projectId","name","spec","specHash","status","provider","host","providerRef","region","jurisdiction","weightsVerified","routeId","hourlyUsd","failureReason","createdBy","createdAt","updatedAt","lastCheckedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"deployment_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"minReplicas":{"type":"integer","minimum":0,"maximum":64},"maxReplicas":{"type":"integer","exclusiveMinimum":0,"maximum":64}},"required":["minReplicas","maxReplicas"]}}}}}},"/model_platform/workspaces/{workspace_id}/deployments/{deployment_id}/playground":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdDeploymentsByDeploymentIdPlayground","tags":["model-serving"],"summary":"Send a test conversation to a deployment","responses":{"200":{"description":"Completion","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"type":"string"},"latencyMs":{"type":"number","minimum":0},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["output","latencyMs","inputTokens","outputTokens"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"deployment_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":100000}},"required":["role","content"]}},"maxTokens":{"default":512,"type":"integer","exclusiveMinimum":0,"maximum":8192},"temperature":{"default":0.7,"type":"number","minimum":0,"maximum":2}},"required":["messages"]}}}}}},"/model_platform/workspaces/{workspace_id}/deployments/{deployment_id}/actions":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdDeploymentsByDeploymentIdActions","tags":["model-serving"],"summary":"Pause, resume or delete a deployment","responses":{"200":{"description":"Deployment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"pauseSupported":{"type":"boolean"},"spendRequestId":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"spec":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"adapterVersionIds":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"shape":{"type":"string","enum":["serverless","dedicated","adapter_pool","external"]},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"engine":{"default":"vllm","type":"string","enum":["vllm","sglang","tgi","tensorrt-llm","llama.cpp","provider"]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"scaling":{"default":{"minReplicas":0,"maxReplicas":1,"scaleToZeroAfterMinutes":30},"type":"object","properties":{"minReplicas":{"default":0,"type":"integer","minimum":0,"maximum":64},"maxReplicas":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":64},"scaleToZeroAfterMinutes":{"default":30,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1440},{"type":"null"}]}},"required":["minReplicas","maxReplicas","scaleToZeroAfterMinutes"],"additionalProperties":false},"access":{"default":"private","type":"string","enum":["private","authenticated","public"]},"contextLength":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1048576},{"type":"null"}]},"maxConcurrency":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":4096},"external":{"default":null,"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","maxLength":500,"format":"uri"},"modelId":{"type":"string","minLength":1,"maxLength":200}},"required":["baseUrl","modelId"],"additionalProperties":false},{"type":"null"}]},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["versionId","adapterVersionIds","shape","target","engine","quantisation","scaling","access","contextLength","maxConcurrency","external","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["pending","provisioning","running","scaled_to_zero","paused","updating","failed","deleting","deleted"]},"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"host":{"type":"string"},"providerRef":{"type":["string","null"]},"region":{"type":["string","null"]},"jurisdiction":{"anyOf":[{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]},{"type":"null"}]},"weightsVerified":{"type":"boolean"},"routeId":{"type":["string","null"]},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastCheckedAt":{"type":["string","null"]}},"required":["id","workspaceId","projectId","name","spec","specHash","status","provider","host","providerRef","region","jurisdiction","weightsVerified","routeId","hourlyUsd","failureReason","createdBy","createdAt","updatedAt","lastCheckedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"deployment_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["pause","resume","delete"]}},"required":["action"]}}}}}},"/model_platform/workspaces/{workspace_id}/aliases":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdAliases","tags":["model-serving"],"summary":"List stable aliases that chat and apps call","responses":{"200":{"description":"Aliases","content":{"application/json":{"schema":{"type":"object","properties":{"aliases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"routeId":{"type":["string","null"]},"canaryRouteId":{"type":["string","null"]},"canaryPercent":{"type":"integer","minimum":0,"maximum":100},"gate":{"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"],"additionalProperties":false},{"type":"null"}]},"requiresApproval":{"type":"boolean"},"chatModelId":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"targetName":{"type":["string","null"]}},"required":["id","workspaceId","projectId","name","description","routeId","canaryRouteId","canaryPercent","gate","requiresApproval","chatModelId","updatedAt","updatedBy","targetName"],"additionalProperties":false}}},"required":["aliases"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdAliases","tags":["model-serving"],"summary":"Create an alias","responses":{"200":{"description":"Alias","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"routeId":{"type":["string","null"]},"canaryRouteId":{"type":["string","null"]},"canaryPercent":{"type":"integer","minimum":0,"maximum":100},"gate":{"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"],"additionalProperties":false},{"type":"null"}]},"requiresApproval":{"type":"boolean"},"chatModelId":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","projectId","name","description","routeId","canaryRouteId","canaryPercent","gate","requiresApproval","chatModelId","updatedAt","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description":{"type":"string","maxLength":500},"routeId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"gate":{"default":null,"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"]},{"type":"null"}]},"requiresApproval":{"default":false,"type":"boolean"}},"required":["name"]}}}}}},"/model_platform/workspaces/{workspace_id}/aliases/{alias_id}":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdAliasesByAliasId","tags":["model-serving"],"summary":"Get an alias with its history","responses":{"200":{"description":"Alias","content":{"application/json":{"schema":{"type":"object","properties":{"alias":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"routeId":{"type":["string","null"]},"canaryRouteId":{"type":["string","null"]},"canaryPercent":{"type":"integer","minimum":0,"maximum":100},"gate":{"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"],"additionalProperties":false},{"type":"null"}]},"requiresApproval":{"type":"boolean"},"chatModelId":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","projectId","name","description","routeId","canaryRouteId","canaryPercent","gate","requiresApproval","chatModelId","updatedAt","updatedBy"],"additionalProperties":false},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"aliasId":{"type":"string"},"kind":{"type":"string","enum":["created","promoted","rolled_back","canary_started","canary_ended","requested","revoked"]},"fromRouteId":{"type":["string","null"]},"toRouteId":{"type":["string","null"]},"reason":{"type":["string","null"]},"gate":{"anyOf":[{"type":"object","properties":{"passed":{"type":"boolean"},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"failures":{"type":"array","items":{"type":"string"}},"runId":{"type":["string","null"]}},"required":["passed","scores","failures","runId"],"additionalProperties":false},{"type":"null"}]},"actorUserId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","aliasId","kind","fromRouteId","toRouteId","reason","gate","actorUserId","createdAt"],"additionalProperties":false}},"route":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt"],"additionalProperties":false},{"type":"null"}]},"canaryRoute":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt"],"additionalProperties":false},{"type":"null"}]}},"required":["alias","events","route","canaryRoute"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"alias_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdAliasesByAliasId","tags":["model-serving"],"summary":"Update an alias gate, canary or description","responses":{"200":{"description":"Alias","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"routeId":{"type":["string","null"]},"canaryRouteId":{"type":["string","null"]},"canaryPercent":{"type":"integer","minimum":0,"maximum":100},"gate":{"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"],"additionalProperties":false},{"type":"null"}]},"requiresApproval":{"type":"boolean"},"chatModelId":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","projectId","name","description","routeId","canaryRouteId","canaryPercent","gate","requiresApproval","chatModelId","updatedAt","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"alias_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"gate":{"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"]},{"type":"null"}]},"requiresApproval":{"type":"boolean"}}}}}}},"delete":{"operationId":"deleteModelPlatformWorkspacesByWorkspaceIdAliasesByAliasId","tags":["model-serving"],"summary":"Delete an alias","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"alias_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/aliases/{alias_id}/promote":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdAliasesByAliasIdPromote","tags":["model-serving"],"summary":"Promote a route behind an alias through its evaluation gate","responses":{"200":{"description":"Promotion","content":{"application/json":{"schema":{"type":"object","properties":{"alias":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"routeId":{"type":["string","null"]},"canaryRouteId":{"type":["string","null"]},"canaryPercent":{"type":"integer","minimum":0,"maximum":100},"gate":{"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"],"additionalProperties":false},{"type":"null"}]},"requiresApproval":{"type":"boolean"},"chatModelId":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","projectId","name","description","routeId","canaryRouteId","canaryPercent","gate","requiresApproval","chatModelId","updatedAt","updatedBy"],"additionalProperties":false},"outcome":{"type":"string","enum":["promoted","canary_started","awaiting_approval","gate_failed"]},"event":{"type":"object","properties":{"id":{"type":"string"},"aliasId":{"type":"string"},"kind":{"type":"string","enum":["created","promoted","rolled_back","canary_started","canary_ended","requested","revoked"]},"fromRouteId":{"type":["string","null"]},"toRouteId":{"type":["string","null"]},"reason":{"type":["string","null"]},"gate":{"anyOf":[{"type":"object","properties":{"passed":{"type":"boolean"},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"failures":{"type":"array","items":{"type":"string"}},"runId":{"type":["string","null"]}},"required":["passed","scores","failures","runId"],"additionalProperties":false},{"type":"null"}]},"actorUserId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","aliasId","kind","fromRouteId","toRouteId","reason","gate","actorUserId","createdAt"],"additionalProperties":false},"decision":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"versionId":{"type":"string"},"routeId":{"type":["string","null"]},"state":{"type":"string","enum":["pending","approved","rejected","revoked","expired"]},"verdict":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","warn","review","block"]},"matches":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyHash":{"type":"string"},"scope":{"type":"string","enum":["workspace","project"]},"ruleId":{"type":"string"},"effect":{"type":"string","enum":["allow","warn","review","block"]},"reason":{"type":"string"},"evaluationFailed":{"type":"boolean"}},"required":["policyId","policyHash","scope","ruleId","effect","reason"],"additionalProperties":false}},"policyHashes":{"type":"array","items":{"type":"string"}}},"required":["effect","matches","policyHashes"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string"}},"isException":{"type":"boolean"},"conditions":{"type":["string","null"]},"note":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","versionId","routeId","state","verdict","evidenceIds","isException","conditions","note","requestedBy","decidedBy","decidedAt","expiresAt","createdAt"],"additionalProperties":false},{"type":"null"}]}},"required":["alias","outcome","event","decision"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"alias_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"routeId":{"type":"string","minLength":1},"reason":{"type":"string","maxLength":500},"canaryPercent":{"type":"integer","minimum":1,"maximum":99}},"required":["routeId"]}}}}}},"/model_platform/workspaces/{workspace_id}/aliases/{alias_id}/rollback":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdAliasesByAliasIdRollback","tags":["model-serving"],"summary":"Point an alias back at its previous route","responses":{"200":{"description":"Alias","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"routeId":{"type":["string","null"]},"canaryRouteId":{"type":["string","null"]},"canaryPercent":{"type":"integer","minimum":0,"maximum":100},"gate":{"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"],"additionalProperties":false},{"type":"null"}]},"requiresApproval":{"type":"boolean"},"chatModelId":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","projectId","name","description","routeId","canaryRouteId","canaryPercent","gate","requiresApproval","chatModelId","updatedAt","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"alias_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/routes":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdRoutes","tags":["model-serving"],"summary":"List serving routes and whether each is approved in scope","responses":{"200":{"description":"Routes","content":{"application/json":{"schema":{"type":"object","properties":{"routes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"},"displayName":{"type":"string"},"approved":{"type":"boolean"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt","displayName","approved"],"additionalProperties":false}}},"required":["routes"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdRoutes","tags":["model-serving"],"summary":"Register a serverless provider route for a version","responses":{"200":{"description":"Route","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1,"maxLength":64},"providerModelId":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":32},"weightsVerified":{"default":false,"type":"boolean"}},"required":["versionId","provider","providerModelId","region"]}}}}}},"/model_platform/workspaces/{workspace_id}/routes/{route_id}":{"delete":{"operationId":"deleteModelPlatformWorkspacesByWorkspaceIdRoutesByRouteId","tags":["model-serving"],"summary":"Retire a serving route","responses":{"200":{"description":"Route","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"versionId":{"type":"string"},"provider":{"type":"string"},"providerModelId":{"type":"string"},"region":{"type":"string"},"weightsVerified":{"type":"boolean"},"status":{"type":"string","enum":["active","retired"]},"deploymentId":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"retention":{"anyOf":[{"type":"string","enum":["zero","provider","self"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","versionId","provider","providerModelId","region","weightsVerified","status","deploymentId","jurisdiction","retention","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"route_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/routes/{route_id}/health":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdRoutesByRouteIdHealth","tags":["model-serving"],"summary":"Usage, spend and replay trend for a route","responses":{"200":{"description":"Route health","content":{"application/json":{"schema":{"type":"object","properties":{"routeId":{"type":"string"},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"latencyP95Ms":{"type":["number","null"]},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0},"replayTrend":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"score":{"type":"number"},"metric":{"type":"string"}},"required":["at","score","metric"],"additionalProperties":false}},"baseline":{"anyOf":[{"type":"object","properties":{"metric":{"type":"string"},"score":{"type":"number"}},"required":["metric","score"],"additionalProperties":false},{"type":"null"}]}},"required":["routeId","requests","latencyP95Ms","inputTokens","outputTokens","costUsd","replayTrend","baseline"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"route_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/versions/{version_id}/route_suggestions":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdVersionsByVersionIdRouteSuggestions","tags":["model-serving"],"summary":"List catalogue providers that already serve this model","responses":{"200":{"description":"Route suggestions","content":{"application/json":{"schema":{"type":"object","properties":{"suggestions":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"providerModelId":{"type":"string"},"name":{"type":"string"},"region":{"type":"string"},"registered":{"type":"boolean"}},"required":["provider","providerModelId","name","region","registered"],"additionalProperties":false}}},"required":["suggestions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/graders":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdGraders","tags":["model-evaluation"],"summary":"List graders shared by evals, RFT rewards and promotion gates","responses":{"200":{"description":"Graders","content":{"application/json":{"schema":{"type":"object","properties":{"graders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"metric":{"type":"string"},"description":{"type":["string","null"]},"config":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"exact"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contains"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"regex"},"pattern":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"json_schema"},"requiredKeys":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["kind","requiredKeys"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"numeric"},"tolerance":{"type":"number","minimum":0,"maximum":1000000000}},"required":["kind","tolerance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fact_coverage"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"grounded_numbers"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"judge"},"rubric":{"type":"string","minLength":1,"maxLength":8000},"judgeModelId":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["kind","rubric","judgeModelId"],"additionalProperties":false}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","projectId","name","metric","description","config","revision","createdAt","updatedAt"],"additionalProperties":false}}},"required":["graders"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdGraders","tags":["model-evaluation"],"summary":"Create a grader","responses":{"200":{"description":"Grader","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"metric":{"type":"string"},"description":{"type":["string","null"]},"config":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"exact"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contains"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"regex"},"pattern":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"json_schema"},"requiredKeys":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["kind","requiredKeys"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"numeric"},"tolerance":{"type":"number","minimum":0,"maximum":1000000000}},"required":["kind","tolerance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fact_coverage"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"grounded_numbers"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"judge"},"rubric":{"type":"string","minLength":1,"maxLength":8000},"judgeModelId":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["kind","rubric","judgeModelId"],"additionalProperties":false}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","projectId","name","metric","description","config","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"metric":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"description":{"type":"string","maxLength":1000},"config":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"exact"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"contains"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"regex"},"pattern":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","pattern"]},{"type":"object","properties":{"kind":{"type":"string","const":"json_schema"},"requiredKeys":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"numeric"},"tolerance":{"type":"number","minimum":0,"maximum":1000000000}},"required":["kind","tolerance"]},{"type":"object","properties":{"kind":{"type":"string","const":"fact_coverage"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"grounded_numbers"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"judge"},"rubric":{"type":"string","minLength":1,"maxLength":8000},"judgeModelId":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["kind","rubric"]}]}},"required":["name","metric","config"]}}}}}},"/model_platform/workspaces/{workspace_id}/graders/{grader_id}":{"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdGradersByGraderId","tags":["model-evaluation"],"summary":"Update a grader","responses":{"200":{"description":"Grader","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"metric":{"type":"string"},"description":{"type":["string","null"]},"config":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"exact"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contains"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"regex"},"pattern":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"json_schema"},"requiredKeys":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["kind","requiredKeys"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"numeric"},"tolerance":{"type":"number","minimum":0,"maximum":1000000000}},"required":["kind","tolerance"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fact_coverage"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"grounded_numbers"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"judge"},"rubric":{"type":"string","minLength":1,"maxLength":8000},"judgeModelId":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["kind","rubric","judgeModelId"],"additionalProperties":false}]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","projectId","name","metric","description","config","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"grader_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"metric":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"description":{"type":"string","maxLength":1000},"config":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"exact"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"contains"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"regex"},"pattern":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","pattern"]},{"type":"object","properties":{"kind":{"type":"string","const":"json_schema"},"requiredKeys":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"numeric"},"tolerance":{"type":"number","minimum":0,"maximum":1000000000}},"required":["kind","tolerance"]},{"type":"object","properties":{"kind":{"type":"string","const":"fact_coverage"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"grounded_numbers"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"judge"},"rubric":{"type":"string","minLength":1,"maxLength":8000},"judgeModelId":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["kind","rubric"]}]}},"required":["name","metric","config"]}}}}},"delete":{"operationId":"deleteModelPlatformWorkspacesByWorkspaceIdGradersByGraderId","tags":["model-evaluation"],"summary":"Delete a grader","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"grader_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/graders/{grader_id}/preview":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdGradersByGraderIdPreview","tags":["model-evaluation"],"summary":"Score one output with a grader","responses":{"200":{"description":"Score","content":{"application/json":{"schema":{"type":"object","properties":{"score":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["score"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"grader_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"output":{"type":"string","maxLength":100000},"expected":{"type":"string","maxLength":100000}},"required":["output"]}}}}}},"/model_platform/workspaces/{workspace_id}/eval_suites":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdEvalSuites","tags":["model-evaluation"],"summary":"List eval suites","responses":{"200":{"description":"Suites","content":{"application/json":{"schema":{"type":"object","properties":{"suites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"systemPrompt":{"type":["string","null"]},"cases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"input":{"type":"string","minLength":1,"maxLength":20000},"expected":{"type":"string","maxLength":20000}},"required":["id","input"],"additionalProperties":false}},"graderIds":{"type":"array","items":{"type":"string"}},"replaySampleSize":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","projectId","name","description","systemPrompt","cases","graderIds","replaySampleSize","createdAt","updatedAt"],"additionalProperties":false}}},"required":["suites"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]},"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdEvalSuites","tags":["model-evaluation"],"summary":"Create an eval suite","responses":{"200":{"description":"Suite","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"systemPrompt":{"type":["string","null"]},"cases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"input":{"type":"string","minLength":1,"maxLength":20000},"expected":{"type":"string","maxLength":20000}},"required":["id","input"],"additionalProperties":false}},"graderIds":{"type":"array","items":{"type":"string"}},"replaySampleSize":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","projectId","name","description","systemPrompt","cases","graderIds","replaySampleSize","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":1000},"systemPrompt":{"type":"string","maxLength":8000},"cases":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"input":{"type":"string","minLength":1,"maxLength":20000},"expected":{"type":"string","maxLength":20000}},"required":["id","input"]}},"graderIds":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1}},"replaySampleSize":{"default":50,"type":"integer","exclusiveMinimum":0,"maximum":200}},"required":["projectId","name","cases","graderIds"]}}}}}},"/model_platform/workspaces/{workspace_id}/eval_suites/{suite_id}":{"delete":{"operationId":"deleteModelPlatformWorkspacesByWorkspaceIdEvalSuitesBySuiteId","tags":["model-evaluation"],"summary":"Delete an eval suite","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"suite_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/eval_suites/{suite_id}/runs":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdEvalSuitesBySuiteIdRuns","tags":["model-evaluation"],"summary":"Run a suite against up to six routes","responses":{"200":{"description":"Queued runs","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"trigger":{"type":"string","enum":["manual","deployment","checkpoint","promotion","replay"]},"status":{"type":"string","enum":["queued","running","completed","failed"]},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"latencyP95Ms":{"type":["number","null"]},"casesCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"casesTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","suiteId","routeId","versionId","trigger","status","scores","latencyP95Ms","casesCompleted","casesTotal","failureReason","createdAt","completedAt"],"additionalProperties":false}}},"required":["runs"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"suite_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"routeIds":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1}},"batch":{"default":false,"type":"boolean"}},"required":["routeIds"]}}}}},"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdEvalSuitesBySuiteIdRuns","tags":["model-evaluation"],"summary":"List runs for a suite","responses":{"200":{"description":"Runs","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"suiteId":{"type":"string"},"routeId":{"type":"string"},"versionId":{"type":"string"},"trigger":{"type":"string","enum":["manual","deployment","checkpoint","promotion","replay"]},"status":{"type":"string","enum":["queued","running","completed","failed"]},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"mean":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","low","high","n"],"additionalProperties":false}},"latencyP95Ms":{"type":["number","null"]},"casesCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991},"casesTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","suiteId","routeId","versionId","trigger","status","scores","latencyP95Ms","casesCompleted","casesTotal","failureReason","createdAt","completedAt"],"additionalProperties":false}}},"required":["runs"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"suite_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/eval_runs/{run_id}/results":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdEvalRunsByRunIdResults","tags":["model-evaluation"],"summary":"Per-case outputs and scores for a run","responses":{"200":{"description":"Case results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"caseId":{"type":"string"},"output":{"type":"string"},"latencyMs":{"type":"number"},"scores":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"error":{"type":"string"}},"required":["caseId","output","latencyMs","scores"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"run_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/overview":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdOverview","tags":["model-governance"],"summary":"Aliases, deployments, runs, pending decisions and spend at a glance","responses":{"200":{"description":"Overview","content":{"application/json":{"schema":{"type":"object","properties":{"aliases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"routeId":{"type":["string","null"]},"canaryRouteId":{"type":["string","null"]},"canaryPercent":{"type":"integer","minimum":0,"maximum":100},"gate":{"anyOf":[{"type":"object","properties":{"suiteId":{"type":"string","minLength":1},"thresholds":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0,"maximum":1}}},"required":["suiteId","thresholds"],"additionalProperties":false},{"type":"null"}]},"requiresApproval":{"type":"boolean"},"chatModelId":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"targetName":{"type":["string","null"]}},"required":["id","workspaceId","projectId","name","description","routeId","canaryRouteId","canaryPercent","gate","requiresApproval","chatModelId","updatedAt","updatedBy","targetName"],"additionalProperties":false}},"deployments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pauseSupported":{"type":"boolean"},"spendRequestId":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"spec":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"adapterVersionIds":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"shape":{"type":"string","enum":["serverless","dedicated","adapter_pool","external"]},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"engine":{"default":"vllm","type":"string","enum":["vllm","sglang","tgi","tensorrt-llm","llama.cpp","provider"]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"scaling":{"default":{"minReplicas":0,"maxReplicas":1,"scaleToZeroAfterMinutes":30},"type":"object","properties":{"minReplicas":{"default":0,"type":"integer","minimum":0,"maximum":64},"maxReplicas":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":64},"scaleToZeroAfterMinutes":{"default":30,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1440},{"type":"null"}]}},"required":["minReplicas","maxReplicas","scaleToZeroAfterMinutes"],"additionalProperties":false},"access":{"default":"private","type":"string","enum":["private","authenticated","public"]},"contextLength":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1048576},{"type":"null"}]},"maxConcurrency":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":4096},"external":{"default":null,"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","maxLength":500,"format":"uri"},"modelId":{"type":"string","minLength":1,"maxLength":200}},"required":["baseUrl","modelId"],"additionalProperties":false},{"type":"null"}]},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["versionId","adapterVersionIds","shape","target","engine","quantisation","scaling","access","contextLength","maxConcurrency","external","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["pending","provisioning","running","scaled_to_zero","paused","updating","failed","deleting","deleted"]},"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"host":{"type":"string"},"providerRef":{"type":["string","null"]},"region":{"type":["string","null"]},"jurisdiction":{"anyOf":[{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]},{"type":"null"}]},"weightsVerified":{"type":"boolean"},"routeId":{"type":["string","null"]},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastCheckedAt":{"type":["string","null"]},"displayName":{"type":"string"}},"required":["id","workspaceId","projectId","name","spec","specHash","status","provider","host","providerRef","region","jurisdiction","weightsVerified","routeId","hourlyUsd","failureReason","createdBy","createdAt","updatedAt","lastCheckedAt","displayName"],"additionalProperties":false}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"spec":{"type":"object","properties":{"method":{"type":"string","enum":["sft","dpo","rft","distillation","continued_pretraining","embedding","vision_sft","merge","quantise"]},"adaptation":{"default":"lora","type":"string","enum":["lora","qlora","full"]},"baseVersionId":{"type":"string","minLength":1},"mergeVersionIds":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1}},"trainDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"validationDatasetVersionId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graderId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"quantisation":{"default":"none","type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]},"hyperparameters":{"default":{"epochs":2,"learningRate":null,"batchSize":8,"gradientAccumulation":1,"maxSequenceLength":4096,"warmupRatio":0.03,"weightDecay":0,"seed":42,"packing":true,"earlyStopping":false,"loraRank":16,"loraAlpha":32,"loraDropout":0.05,"dpoBeta":0.1,"generationsPerPrompt":8},"type":"object","properties":{"epochs":{"default":2,"type":"number","exclusiveMinimum":0,"maximum":50},"learningRate":{"default":null,"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1},{"type":"null"}]},"batchSize":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":1024},"gradientAccumulation":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":512},"maxSequenceLength":{"default":4096,"type":"integer","exclusiveMinimum":0,"maximum":1048576},"warmupRatio":{"default":0.03,"type":"number","minimum":0,"maximum":1},"weightDecay":{"default":0,"type":"number","minimum":0,"maximum":1},"seed":{"default":42,"type":"integer","minimum":0,"maximum":9007199254740991},"packing":{"default":true,"type":"boolean"},"earlyStopping":{"default":false,"type":"boolean"},"loraRank":{"default":16,"type":"integer","exclusiveMinimum":0,"maximum":512},"loraAlpha":{"default":32,"type":"integer","exclusiveMinimum":0,"maximum":1024},"loraDropout":{"default":0.05,"type":"number","minimum":0,"maximum":1},"dpoBeta":{"default":0.1,"type":"number","exclusiveMinimum":0,"maximum":10},"generationsPerPrompt":{"default":8,"type":"integer","exclusiveMinimum":0,"maximum":64}},"required":["epochs","learningRate","batchSize","gradientAccumulation","maxSequenceLength","warmupRatio","weightDecay","seed","packing","earlyStopping","loraRank","loraAlpha","loraDropout","dpoBeta","generationsPerPrompt"],"additionalProperties":false},"target":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"target":{"type":"string","minLength":1,"maxLength":64},"hardware":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"region":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["provider","target","hardware","region"],"additionalProperties":false},"checkpointEvery":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":100000},{"type":"null"}]},"outputName":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"providerOptions":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["method","adaptation","baseVersionId","mergeVersionIds","trainDatasetVersionId","validationDatasetVersionId","graderId","quantisation","hyperparameters","target","checkpointEvery","outputName","providerOptions"],"additionalProperties":false},"specHash":{"type":"string"},"status":{"type":"string","enum":["queued","preparing","submitted","running","cancelling","completed","failed","cancelled"]},"providerJobId":{"type":["string","null"]},"outputVersionId":{"type":["string","null"]},"datasetVersionIds":{"type":"array","items":{"type":"string"}},"estimate":{"type":"object","properties":{"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"low":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"high":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"basis":{"type":"string"},"gpuHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"tokens":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["usd","low","high","basis","gpuHours","tokens"],"additionalProperties":false},"costUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"compute":{"anyOf":[{"type":"object","properties":{"modificationFlops":{"type":"number","minimum":0},"thresholdFlops":{"type":"number","exclusiveMinimum":0},"ratio":{"type":"number","minimum":0},"exceedsThreshold":{"type":"boolean"},"basis":{"type":"string","enum":["reported","fallback"]}},"required":["modificationFlops","thresholdFlops","ratio","exceedsThreshold","basis"],"additionalProperties":false},{"type":"null"}]},"failureReason":{"type":["string","null"]},"createdBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"baseName":{"type":"string"},"latestLoss":{"type":["number","null"]}},"required":["id","workspaceId","projectId","spec","specHash","status","providerJobId","outputVersionId","datasetVersionIds","estimate","costUsd","compute","failureReason","createdBy","createdAt","startedAt","completedAt","baseName","latestLoss"],"additionalProperties":false}},"pendingDecisions":{"type":"integer","minimum":0,"maximum":9007199254740991},"spend":{"type":"object","properties":{"periodStart":{"type":"string"},"workspace":{"type":"object","properties":{"projectId":{"type":["string","null"]},"spentUsd":{"type":"number","minimum":0},"committedUsd":{"type":"number","minimum":0},"limitUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["projectId","spentUsd","committedUsd","limitUsd"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":["string","null"]},"spentUsd":{"type":"number","minimum":0},"committedUsd":{"type":"number","minimum":0},"limitUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["projectId","spentUsd","committedUsd","limitUsd"],"additionalProperties":false}},"bySubject":{"type":"array","items":{"type":"object","properties":{"subjectType":{"type":"string","enum":["training_run","deployment","inference","job"]},"subjectId":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"usd":{"type":"number","minimum":0}},"required":["subjectType","subjectId","name","provider","usd"],"additionalProperties":false}},"budgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"monthlyLimitUsd":{"type":"number","minimum":0},"softLimitPercent":{"type":"integer","minimum":1,"maximum":100},"hardStop":{"type":"boolean"},"approvalAboveUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"idlePauseMinutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","projectId","monthlyLimitUsd","softLimitPercent","hardStop","approvalAboveUsd","idlePauseMinutes","updatedAt","updatedBy"],"additionalProperties":false}}},"required":["periodStart","workspace","projects","bySubject","budgets"],"additionalProperties":false},"connectedProviders":{"type":"array","items":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]}},"permissions":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"]},"actions":{"type":"array","items":{"type":"string","enum":["view","import","upload","build_datasets","train","deploy","promote","approve","manage_policy","manage_connections","manage_budgets"]}},"separationOfDuties":{"type":"boolean"}},"required":["role","actions","separationOfDuties"],"additionalProperties":false}},"required":["aliases","deployments","runs","pendingDecisions","spend","connectedProviders","permissions"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/model_platform/workspaces/{workspace_id}/providers":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdProviders","tags":["model-governance"],"summary":"List providers with their trainers, hosts, hardware and connection state","responses":{"200":{"description":"Provider catalogue","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"manifest":{"type":"object","properties":{"id":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"name":{"type":"string"},"vendor":{"type":"string"},"description":{"type":"string"},"docsUrl":{"type":"string"},"connection":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["secret","text","select"]},"required":{"type":"boolean"},"placeholder":{"type":"string"},"help":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}}},"required":["key","label","kind","required"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},"source":{"type":"boolean"},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"versioned":{"type":"boolean"}},"required":["id","name","versioned"],"additionalProperties":false},{"type":"null"}]},"trainers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"methods":{"type":"array","items":{"type":"string","enum":["sft","dpo","rft","distillation","continued_pretraining","embedding","vision_sft","merge","quantise"]}},"adaptations":{"type":"array","items":{"type":"string","enum":["lora","qlora","full"]}},"datasetShapes":{"type":"array","items":{"type":"string","enum":["messages","preference","prompt_grader","text","retrieval","image_text","audio_text"]}},"graderKinds":{"type":"array","items":{"type":"string","enum":["exact","contains","regex","json_schema","numeric","fact_coverage","grounded_numbers","judge"]}},"bases":{"type":"object","properties":{"kind":{"type":"string","enum":["hub","catalogue"]},"models":{"type":"array","items":{"type":"string"}},"maxParameters":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["kind","models","maxParameters"],"additionalProperties":false},"hardware":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"accelerator":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"memoryGb":{"type":"number","minimum":0},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["id","label","accelerator","count","memoryGb","hourlyUsd"],"additionalProperties":false}},"regions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"jurisdiction":{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]}},"required":["id","label","jurisdiction"],"additionalProperties":false}},"output":{"type":"string","enum":["hub","provider"]},"pricing":{"type":"object","properties":{"unit":{"type":"string","enum":["gpu_hour","million_tokens"]},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"note":{"type":"string"}},"required":["unit","usd","note"],"additionalProperties":false}},"required":["id","name","description","methods","adaptations","datasetShapes","graderKinds","bases","hardware","regions","output","pricing"],"additionalProperties":false}},"hosts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pauseSupported":{"type":"boolean"},"name":{"type":"string"},"description":{"type":"string"},"shapes":{"type":"array","items":{"type":"string","enum":["serverless","dedicated","adapter_pool","external"]}},"weights":{"type":"string","enum":["hub","provider","catalogue","external"]},"adapters":{"type":"boolean"},"scaleToZero":{"type":"boolean"},"weightsVerified":{"type":"boolean"},"retention":{"type":"string","enum":["zero","provider","self"]},"engines":{"type":"array","items":{"type":"string","enum":["vllm","sglang","tgi","tensorrt-llm","llama.cpp","provider"]}},"quantisations":{"type":"array","items":{"type":"string","enum":["none","fp8","awq","gptq","nvfp4","bnb-4bit","gguf"]}},"hardware":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"accelerator":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"memoryGb":{"type":"number","minimum":0},"hourlyUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["id","label","accelerator","count","memoryGb","hourlyUsd"],"additionalProperties":false}},"regions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"jurisdiction":{"type":"string","enum":["eu","uk","us","ca","apac","me","global"]}},"required":["id","label","jurisdiction"],"additionalProperties":false}},"architectures":{"type":"array","items":{"type":"string"}},"maxParameters":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"pricing":{"type":"object","properties":{"unit":{"type":"string","enum":["gpu_hour","million_tokens","request"]},"usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"note":{"type":"string"}},"required":["unit","usd","note"],"additionalProperties":false}},"required":["id","name","description","shapes","weights","adapters","scaleToZero","weightsVerified","retention","engines","quantisations","hardware","regions","architectures","maxParameters","pricing"],"additionalProperties":false}}},"required":["id","name","vendor","description","docsUrl","connection","source","store","trainers","hosts"],"additionalProperties":false},"connection":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"account":{"type":["string","null"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"secretKeys":{"type":"array","items":{"type":"string"}},"capabilities":{"type":"object","properties":{"read":{"type":"boolean"},"store":{"type":"boolean"},"train":{"type":"boolean"},"host":{"type":"boolean"}},"required":["read","store","train","host"],"additionalProperties":false},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["provider","account","config","secretKeys","capabilities","updatedAt","updatedBy"],"additionalProperties":false},{"type":"null"}]}},"required":["manifest","connection"],"additionalProperties":false}}},"required":["providers"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/providers/{provider_id}/check":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdProvidersByProviderIdCheck","tags":["model-governance"],"summary":"Check provider credentials before saving them","responses":{"200":{"description":"Check result","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string"},"capabilities":{"type":"object","properties":{"read":{"type":"boolean"},"store":{"type":"boolean"},"train":{"type":"boolean"},"host":{"type":"boolean"}},"required":["read","store","train","host"],"additionalProperties":false},"namespaces":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"canWrite":{"type":"boolean"}},"required":["name","canWrite"],"additionalProperties":false}},"message":{"type":["string","null"]}},"required":["account","capabilities","namespaces","message"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"provider_id","schema":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"secrets":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":20000}},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500}}}}}}}}},"/model_platform/workspaces/{workspace_id}/providers/{provider_id}":{"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdProvidersByProviderId","tags":["model-governance"],"summary":"Connect this workspace to a provider account","responses":{"200":{"description":"Connection","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"account":{"type":["string","null"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"secretKeys":{"type":"array","items":{"type":"string"}},"capabilities":{"type":"object","properties":{"read":{"type":"boolean"},"store":{"type":"boolean"},"train":{"type":"boolean"},"host":{"type":"boolean"}},"required":["read","store","train","host"],"additionalProperties":false},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["provider","account","config","secretKeys","capabilities","updatedAt","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"provider_id","schema":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"secrets":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":20000}},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500}}}}}}}},"delete":{"operationId":"deleteModelPlatformWorkspacesByWorkspaceIdProvidersByProviderId","tags":["model-governance"],"summary":"Disconnect a provider account","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"provider_id","schema":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"required":true}]}},"/model_platform/workspaces/{workspace_id}/permissions":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdPermissions","tags":["model-governance"],"summary":"Get which roles may take each model action","responses":{"200":{"description":"Permissions","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"grants":{"type":"object","propertyNames":{"type":"string","enum":["owner","admin","member"]},"additionalProperties":{"type":"array","items":{"type":"string","enum":["view","import","upload","build_datasets","train","deploy","promote","approve","manage_policy","manage_connections","manage_budgets"]}},"required":["owner","admin","member"]},"separationOfDuties":{"type":"boolean"},"updatedAt":{"type":["string","null"]},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["workspaceId","grants","separationOfDuties","updatedAt","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdPermissions","tags":["model-governance"],"summary":"Save role grants and separation of duties","responses":{"200":{"description":"Permissions","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"grants":{"type":"object","propertyNames":{"type":"string","enum":["owner","admin","member"]},"additionalProperties":{"type":"array","items":{"type":"string","enum":["view","import","upload","build_datasets","train","deploy","promote","approve","manage_policy","manage_connections","manage_budgets"]}},"required":["owner","admin","member"]},"separationOfDuties":{"type":"boolean"},"updatedAt":{"type":["string","null"]},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["workspaceId","grants","separationOfDuties","updatedAt","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"object","properties":{"admin":{"type":"array","items":{"type":"string","enum":["view","import","upload","build_datasets","train","deploy","promote","approve","manage_policy","manage_connections","manage_budgets"]}},"member":{"type":"array","items":{"type":"string","enum":["view","import","upload","build_datasets","train","deploy","promote","approve","manage_policy","manage_connections","manage_budgets"]}}},"required":["admin","member"]},"separationOfDuties":{"type":"boolean"}},"required":["grants","separationOfDuties"]}}}}}},"/model_platform/workspaces/{workspace_id}/permissions/me":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdPermissionsMe","tags":["model-governance"],"summary":"Get the model actions available to the current member","responses":{"200":{"description":"Permissions","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"]},"actions":{"type":"array","items":{"type":"string","enum":["view","import","upload","build_datasets","train","deploy","promote","approve","manage_policy","manage_connections","manage_budgets"]}},"separationOfDuties":{"type":"boolean"}},"required":["role","actions","separationOfDuties"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/spend":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdSpend","tags":["model-governance"],"summary":"Month-to-date spend, commitments and budgets","responses":{"200":{"description":"Spend","content":{"application/json":{"schema":{"type":"object","properties":{"periodStart":{"type":"string"},"workspace":{"type":"object","properties":{"projectId":{"type":["string","null"]},"spentUsd":{"type":"number","minimum":0},"committedUsd":{"type":"number","minimum":0},"limitUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["projectId","spentUsd","committedUsd","limitUsd"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":["string","null"]},"spentUsd":{"type":"number","minimum":0},"committedUsd":{"type":"number","minimum":0},"limitUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["projectId","spentUsd","committedUsd","limitUsd"],"additionalProperties":false}},"bySubject":{"type":"array","items":{"type":"object","properties":{"subjectType":{"type":"string","enum":["training_run","deployment","inference","job"]},"subjectId":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string","enum":["openai","huggingface","aws","together","fireworks","nebius","google-vertex","azure-foundry","runpod","cloudflare-workers-ai","openai-compatible"]},"usd":{"type":"number","minimum":0}},"required":["subjectType","subjectId","name","provider","usd"],"additionalProperties":false}},"budgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"monthlyLimitUsd":{"type":"number","minimum":0},"softLimitPercent":{"type":"integer","minimum":1,"maximum":100},"hardStop":{"type":"boolean"},"approvalAboveUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"idlePauseMinutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","projectId","monthlyLimitUsd","softLimitPercent","hardStop","approvalAboveUsd","idlePauseMinutes","updatedAt","updatedBy"],"additionalProperties":false}}},"required":["periodStart","workspace","projects","bySubject","budgets"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/budgets":{"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdBudgets","tags":["model-governance"],"summary":"Save the workspace or a project budget","responses":{"200":{"description":"Budget","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"monthlyLimitUsd":{"type":"number","minimum":0},"softLimitPercent":{"type":"integer","minimum":1,"maximum":100},"hardStop":{"type":"boolean"},"approvalAboveUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"idlePauseMinutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"updatedAt":{"type":"string"},"updatedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","workspaceId","projectId","monthlyLimitUsd","softLimitPercent","hardStop","approvalAboveUsd","idlePauseMinutes","updatedAt","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"monthlyLimitUsd":{"type":"number","minimum":0,"maximum":10000000},"softLimitPercent":{"default":80,"type":"integer","minimum":1,"maximum":100},"hardStop":{"default":true,"type":"boolean"},"approvalAboveUsd":{"default":null,"anyOf":[{"type":"number","minimum":0,"maximum":10000000},{"type":"null"}]},"idlePauseMinutes":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":10080},{"type":"null"}]}},"required":["monthlyLimitUsd"]}}}}},"delete":{"operationId":"deleteModelPlatformWorkspacesByWorkspaceIdBudgets","tags":["model-governance"],"summary":"Remove the workspace or a project budget","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"project_id","schema":{"type":"string","minLength":1}}]}},"/model_platform/workspaces/{workspace_id}/spend_requests":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdSpendRequests","tags":["model-governance"],"summary":"List spend requests awaiting or past approval","responses":{"200":{"description":"Requests","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"subjectType":{"type":"string","enum":["training_run","deployment"]},"summary":{"type":"string"},"estimateUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"reason":{"type":["string","null"]},"state":{"type":"string","enum":["pending","executing","approved","rejected","failed"]},"subjectId":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","subjectType","summary","estimateUsd","reason","state","subjectId","requestedBy","decidedBy","decidedAt","createdAt"],"additionalProperties":false}}},"required":["requests"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/spend_requests/{request_id}":{"patch":{"operationId":"patchModelPlatformWorkspacesByWorkspaceIdSpendRequestsByRequestId","tags":["model-governance"],"summary":"Approve and start, or reject, a spend request","responses":{"200":{"description":"Request","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"subjectType":{"type":"string","enum":["training_run","deployment"]},"summary":{"type":"string"},"estimateUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"reason":{"type":["string","null"]},"state":{"type":"string","enum":["pending","executing","approved","rejected","failed"]},"subjectId":{"type":["string","null"]},"requestedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","workspaceId","projectId","subjectType","summary","estimateUsd","reason","state","subjectId","requestedBy","decidedBy","decidedAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"request_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["approved","rejected"]}},"required":["state"]}}}}}},"/model_platform/workspaces/{workspace_id}/audit":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdAudit","tags":["model-governance"],"summary":"Model platform audit trail","responses":{"200":{"description":"Audit events","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"actorUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"action":{"type":"string"},"targetType":{"type":"string"},"targetId":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","workspaceId","actorUserId","action","targetType","targetId","metadata","createdAt"],"additionalProperties":false}}},"required":["events"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"target_type","schema":{"type":"string","maxLength":60}},{"in":"query","name":"target_id","schema":{"type":"string","maxLength":120}},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","exclusiveMinimum":0,"maximum":500}}]}},"/model_platform/workspaces/{workspace_id}/inventory":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdInventory","tags":["model-governance"],"summary":"Export the AI system inventory","responses":{"200":{"description":"Inventory","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"versionId":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"source":{"type":"string"},"revision":{"type":"string"},"licence":{"type":["string","null"]},"standing":{"type":"string"},"owner":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"deployments":{"type":"integer","minimum":0,"maximum":9007199254740991},"aliases":{"type":"array","items":{"type":"string"}},"jurisdictions":{"type":"array","items":{"type":"string"}},"exceedsModificationThreshold":{"type":"boolean"}},"required":["versionId","name","kind","source","revision","licence","standing","owner","deployments","aliases","jurisdictions","exceedsModificationThreshold"],"additionalProperties":false}}},"required":["generatedAt","items"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/versions/{version_id}/revoke":{"post":{"operationId":"postModelPlatformWorkspacesByWorkspaceIdVersionsByVersionIdRevoke","tags":["model-governance"],"summary":"Revoke a version and everything derived from it","description":"Revokes approvals, retires routes, pauses deployments and clears aliases.","responses":{"200":{"description":"Revocation","content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"},"retiredRouteIds":{"type":"array","items":{"type":"string"}},"pausedDeploymentIds":{"type":"array","items":{"type":"string"}},"clearedAliasIds":{"type":"array","items":{"type":"string"}}},"required":["versionId","retiredRouteIds","pausedDeploymentIds","clearedAliasIds"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"]}}}}}},"/model_platform/workspaces/{workspace_id}/versions/{version_id}/bom":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdVersionsByVersionIdBom","tags":["model-governance"],"summary":"Export a CycloneDX or SPDX AI bill of materials","responses":{"200":{"description":"BOM document","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"route_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"format","schema":{"default":"cyclonedx","type":"string","enum":["cyclonedx","spdx"]}}]}},"/model_platform/workspaces/{workspace_id}/versions/{version_id}/card":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdVersionsByVersionIdCard","tags":["model-governance"],"summary":"Render a model card","responses":{"200":{"description":"Model card","content":{"application/json":{"schema":{"type":"object","properties":{"markdown":{"type":"string"}},"required":["markdown"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true}]}},"/model_platform/workspaces/{workspace_id}/versions/{version_id}/training_content":{"get":{"operationId":"getModelPlatformWorkspacesByWorkspaceIdVersionsByVersionIdTrainingContent","tags":["model-governance"],"summary":"Summarise training content for a modified model","responses":{"200":{"description":"Summary","content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"},"generatedAt":{"type":"string"},"modifier":{"type":"object","properties":{"workspace":{"type":"string"}},"required":["workspace"],"additionalProperties":false},"baseModel":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"revision":{"type":"string"}},"required":["name","revision"],"additionalProperties":false},{"type":"null"}]},"compute":{"anyOf":[{"type":"object","properties":{"modificationFlops":{"type":"number","minimum":0},"thresholdFlops":{"type":"number","exclusiveMinimum":0},"ratio":{"type":"number","minimum":0},"exceedsThreshold":{"type":"boolean"},"basis":{"type":"string","enum":["reported","fallback"]}},"required":["modificationFlops","thresholdFlops","ratio","exceedsThreshold","basis"],"additionalProperties":false},{"type":"null"}]},"providerObligationsLikely":{"type":"boolean"},"datasets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"collectionMethod":{"type":"string","enum":["upload","hub","bucket","conversations","synthetic"]},"licence":{"type":"string"},"lawfulBasis":{"type":"string","enum":["not_personal_data","consent","contract","legitimate_interests","legal_obligation","unknown"]},"personalDataCategories":{"type":"array","items":{"type":"string"}},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"piiRedacted":{"type":"boolean"},"teacher":{"type":["string","null"]}},"required":["name","collectionMethod","licence","lawfulBasis","personalDataCategories","rows","tokens","piiRedacted","teacher"],"additionalProperties":false}}},"required":["versionId","generatedAt","modifier","baseModel","compute","providerObligationsLikely","datasets"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version_id","schema":{"type":"string","minLength":1},"required":true}]}},"/workspaces":{"get":{"operationId":"getWorkspaces","tags":["workspaces"],"summary":"List the caller's workspaces","responses":{"200":{"description":"Workspaces","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"colour":{"type":"string"},"mission":{"default":"","type":"string"},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"default":null,"type":["string","null"]},"setupProjectId":{"default":null,"type":["string","null"]},"setupTaskId":{"default":null,"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","name","description","colour","mission","monthlyCreditCapMicros","leadTeammateId","setupProjectId","setupTaskId","role","memberCount","projectCount","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}}},"hide":false},"post":{"operationId":"postWorkspaces","tags":["workspaces"],"summary":"Create a workspace","responses":{"200":{"description":"The workspace","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"colour":{"type":"string"},"mission":{"default":"","type":"string"},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"default":null,"type":["string","null"]},"setupProjectId":{"default":null,"type":["string","null"]},"setupTaskId":{"default":null,"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"leadRoutines":{"type":"object","properties":{"dailyBrief":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false},"initiativeReview":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false}},"required":["dailyBrief","initiativeReview"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"avatarUrl":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"}},"required":["userId","name","email","avatarUrl","role","joinedAt"],"additionalProperties":false}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","workspaceId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}}},"required":["id","name","description","colour","mission","monthlyCreditCapMicros","leadTeammateId","setupProjectId","setupTaskId","role","memberCount","projectCount","createdAt","updatedAt","leadRoutines","projects","members","invitations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"description":{"default":"","type":"string","maxLength":500},"colour":{"default":"#E8643C","type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["name"]}}}}}},"/workspaces/onboarding/start":{"post":{"operationId":"postWorkspacesOnboardingStart","tags":["workspaces"],"summary":"Create a workspace with a lead","description":"Creates the workspace, hires a lead and opens the setup task. The lead proposes a setup plan for approval.","responses":{"200":{"description":"Setup","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"projectId":{"type":"string"},"setupTaskId":{"type":"string"},"leadTeammateId":{"type":"string"},"setup":{"anyOf":[{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"plan":{"type":"object","properties":{"mission":{"type":"string","minLength":1,"maxLength":1000},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"initiatives":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":2000}},"required":["key","name","description"],"additionalProperties":false}},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":2,"maxLength":100},"description":{"default":"","type":"string","maxLength":1000},"starterId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"taskPrefix":{"type":"string","pattern":"^[A-Z]{2,5}$"},"initiative":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"standup":{"default":null,"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"string","enum":["everyone","people","teammates"]},"windowMinutes":{"type":"integer","minimum":15,"maximum":1440},"shareBindingId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pausedUntil":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["enabled","time","days","timeZone","questions","participants","windowMinutes","shareBindingId","pausedUntil"],"additionalProperties":false},{"type":"null"}]}},"required":["key","name","description","starterId","taskPrefix","initiative","standup"],"additionalProperties":false}},"teammates":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80},"roleSlug":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"jobDescription":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"reportsTo":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"heartbeatMinutes":{"default":null,"anyOf":[{"type":"integer","minimum":15,"maximum":1440},{"type":"null"}]},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"projects":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["key","name","title","roleSlug","jobDescription","reportsTo","heartbeatMinutes","monthlyCreditCapMicros","projects"],"additionalProperties":false}},"tasks":{"default":[],"maxItems":30,"type":"array","items":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["project","objective","owner","priority"],"additionalProperties":false}},"connectors":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"access":{"default":"read","type":"string","enum":["read","write"]},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"reason":{"default":"","type":"string","maxLength":300}},"required":["provider","access","projects","reason"],"additionalProperties":false}},"suggestions":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["provider","reason"],"additionalProperties":false}}},"required":["mission","monthlyCreditCapMicros","initiatives","projects","teammates","tasks","connectors","suggestions"],"additionalProperties":false},"appliedAt":{"type":["string","null"]},"created":{"anyOf":[{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"string"}},"teammateIds":{"type":"array","items":{"type":"string"}},"initiativeIds":{"type":"array","items":{"type":"string"}},"taskIds":{"type":"array","items":{"type":"string"}}},"required":["projectIds","teammateIds","initiativeIds","taskIds"],"additionalProperties":false},{"type":"null"}]},"failure":{"default":null,"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"message":{"type":"string"}},"required":["at","revision","message"],"additionalProperties":false},{"type":"null"}]}},"required":["revision","plan","appliedAt","created","failure"],"additionalProperties":false},{"type":"null"}]}},"required":["workspaceId","projectId","setupTaskId","leadTeammateId","setup"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":2,"maxLength":80},"mission":{"type":"string","minLength":1,"maxLength":1000},"sources":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","format":"uri"}},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"colour":{"default":"#E8643C","type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["name","mission"]}}}}}},"/workspaces/invitations/accept":{"post":{"operationId":"postWorkspacesInvitationsAccept","tags":["workspaces"],"summary":"Accept a workspace invitation","description":"The invitation token identifies the workspace.","responses":{"200":{"description":"The joined workspace","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"colour":{"type":"string"},"mission":{"default":"","type":"string"},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"default":null,"type":["string","null"]},"setupProjectId":{"default":null,"type":["string","null"]},"setupTaskId":{"default":null,"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"leadRoutines":{"type":"object","properties":{"dailyBrief":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false},"initiativeReview":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false}},"required":["dailyBrief","initiativeReview"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"avatarUrl":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"}},"required":["userId","name","email","avatarUrl","role","joinedAt"],"additionalProperties":false}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","workspaceId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}}},"required":["id","name","description","colour","mission","monthlyCreditCapMicros","leadTeammateId","setupProjectId","setupTaskId","role","memberCount","projectCount","createdAt","updatedAt","leadRoutines","projects","members","invitations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":32,"maxLength":512}},"required":["token"]}}}}}},"/workspaces/{workspace_id}":{"get":{"operationId":"getWorkspacesByWorkspaceId","tags":["workspaces"],"summary":"Get a workspace","responses":{"200":{"description":"The workspace","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"colour":{"type":"string"},"mission":{"default":"","type":"string"},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"default":null,"type":["string","null"]},"setupProjectId":{"default":null,"type":["string","null"]},"setupTaskId":{"default":null,"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"leadRoutines":{"type":"object","properties":{"dailyBrief":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false},"initiativeReview":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false}},"required":["dailyBrief","initiativeReview"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"avatarUrl":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"}},"required":["userId","name","email","avatarUrl","role","joinedAt"],"additionalProperties":false}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","workspaceId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}}},"required":["id","name","description","colour","mission","monthlyCreditCapMicros","leadTeammateId","setupProjectId","setupTaskId","role","memberCount","projectCount","createdAt","updatedAt","leadRoutines","projects","members","invitations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchWorkspacesByWorkspaceId","tags":["workspaces"],"summary":"Update a workspace","responses":{"200":{"description":"The workspace","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"colour":{"type":"string"},"mission":{"default":"","type":"string"},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"default":null,"type":["string","null"]},"setupProjectId":{"default":null,"type":["string","null"]},"setupTaskId":{"default":null,"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"leadRoutines":{"type":"object","properties":{"dailyBrief":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false},"initiativeReview":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false}},"required":["dailyBrief","initiativeReview"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"avatarUrl":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"}},"required":["userId","name","email","avatarUrl","role","joinedAt"],"additionalProperties":false}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","workspaceId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}}},"required":["id","name","description","colour","mission","monthlyCreditCapMicros","leadTeammateId","setupProjectId","setupTaskId","role","memberCount","projectCount","createdAt","updatedAt","leadRoutines","projects","members","invitations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"description":{"type":"string","maxLength":500},"colour":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"mission":{"type":"string","maxLength":1000},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadRoutines":{"type":"object","properties":{"dailyBrief":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone"]},"initiativeReview":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone"]}},"required":["dailyBrief","initiativeReview"]}}}}}}},"delete":{"operationId":"deleteWorkspacesByWorkspaceId","tags":["workspaces"],"summary":"Delete a workspace","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/workspaces/{workspace_id}/save_team_template":{"post":{"operationId":"postWorkspacesByWorkspaceIdSaveTeamTemplate","tags":["workspaces"],"summary":"Save the team as a template","description":"Saves the projects, initiatives, teammates, reporting lines and routines as a personal team template. New workspaces can start from it.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":500}},"required":["name"]}}}}}},"/workspaces/{workspace_id}/leave":{"post":{"operationId":"postWorkspacesByWorkspaceIdLeave","tags":["workspaces"],"summary":"Leave a workspace","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/workspaces/{workspace_id}/transfer_ownership":{"post":{"operationId":"postWorkspacesByWorkspaceIdTransferOwnership","tags":["workspaces"],"summary":"Transfer workspace ownership","responses":{"200":{"description":"The workspace","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"colour":{"type":"string"},"mission":{"default":"","type":"string"},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"default":null,"type":["string","null"]},"setupProjectId":{"default":null,"type":["string","null"]},"setupTaskId":{"default":null,"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"leadRoutines":{"type":"object","properties":{"dailyBrief":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false},"initiativeReview":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false}},"required":["dailyBrief","initiativeReview"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"avatarUrl":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"}},"required":["userId","name","email","avatarUrl","role","joinedAt"],"additionalProperties":false}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","workspaceId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}}},"required":["id","name","description","colour","mission","monthlyCreditCapMicros","leadTeammateId","setupProjectId","setupTaskId","role","memberCount","projectCount","createdAt","updatedAt","leadRoutines","projects","members","invitations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newOwnerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["newOwnerUserId"]}}}}}},"/workspaces/{workspace_id}/team":{"get":{"operationId":"getWorkspacesByWorkspaceIdTeam","tags":["workspaces"],"summary":"List the workspace team","description":"Teammates employed by the workspace, with reporting lines, wake rules and spend.","responses":{"200":{"description":"The team","content":{"application/json":{"schema":{"type":"object","properties":{"teammates":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"},"teammateId":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":["string","null"]},"characterId":{"type":["string","null"]},"title":{"type":"string"},"reportsToTeammateId":{"type":["string","null"]},"status":{"type":"string","enum":["proposed","active","paused","archived"]},"pausedReason":{"anyOf":[{"type":"string","enum":["manual","budget"]},{"type":"null"}]},"responsibleUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"heartbeatMinutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastHeartbeatAt":{"type":["string","null"]},"lastWake":{"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"projectId":{"type":"string"},"reason":{"type":"string","enum":["assigned","mentioned","review","heartbeat","standup","standup_summary","escalation","setup","blocker_cleared","report_blocked","report_budget"]},"taskId":{"type":["string","null"]},"settled":{"type":"boolean"}},"required":["at","projectId","reason","taskId","settled"],"additionalProperties":false},{"type":"null"}]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"spentCreditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"isLead":{"type":"boolean"},"runsOn":{"type":"string","enum":["hosted","sandbox","machine","harness"]},"proposal":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"proposedByTeammateId":{"type":["string","null"]},"proposedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"roleSlug":{"type":["string","null"]},"jobDescription":{"type":["string","null"]},"projectIds":{"type":"array","items":{"type":"string"}},"proposedAt":{"type":"string"}},"required":["reason","proposedByTeammateId","proposedByUserId","roleSlug","jobDescription","projectIds","proposedAt"],"additionalProperties":false},{"type":"null"}]},"projectIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"}},"required":["workspaceId","teammateId","name","avatarUrl","characterId","title","reportsToTeammateId","status","pausedReason","responsibleUserId","heartbeatMinutes","lastHeartbeatAt","lastWake","monthlyCreditCapMicros","spentCreditMicros","isLead","runsOn","proposal","projectIds","createdAt"],"additionalProperties":false}},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"type":["string","null"]}},"required":["teammates","monthlyCreditCapMicros","leadTeammateId"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/workspaces/{workspace_id}/team_directory":{"get":{"operationId":"getWorkspacesByWorkspaceIdTeamDirectory","tags":["workspaces"],"summary":"List the workspace team by name","description":"A light list of the team for naming owners and reviewers, without spend.","responses":{"200":{"description":"The team directory","content":{"application/json":{"schema":{"type":"object","properties":{"teammates":{"type":"array","items":{"type":"object","properties":{"teammateId":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["proposed","active","paused","archived"]},"reportsToTeammateId":{"type":["string","null"]},"projectIds":{"type":"array","items":{"type":"string"}}},"required":["teammateId","name","title","status","reportsToTeammateId","projectIds"],"additionalProperties":false}},"leadTeammateId":{"type":["string","null"]}},"required":["teammates","leadTeammateId"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/workspaces/{workspace_id}/team/{teammate_id}":{"patch":{"operationId":"patchWorkspacesByWorkspaceIdTeamByTeammateId","tags":["workspaces"],"summary":"Change a teammate's place on the team","responses":{"200":{"description":"The teammate","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"teammateId":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":["string","null"]},"characterId":{"type":["string","null"]},"title":{"type":"string"},"reportsToTeammateId":{"type":["string","null"]},"status":{"type":"string","enum":["proposed","active","paused","archived"]},"pausedReason":{"anyOf":[{"type":"string","enum":["manual","budget"]},{"type":"null"}]},"responsibleUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"heartbeatMinutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastHeartbeatAt":{"type":["string","null"]},"lastWake":{"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"projectId":{"type":"string"},"reason":{"type":"string","enum":["assigned","mentioned","review","heartbeat","standup","standup_summary","escalation","setup","blocker_cleared","report_blocked","report_budget"]},"taskId":{"type":["string","null"]},"settled":{"type":"boolean"}},"required":["at","projectId","reason","taskId","settled"],"additionalProperties":false},{"type":"null"}]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"spentCreditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"isLead":{"type":"boolean"},"runsOn":{"type":"string","enum":["hosted","sandbox","machine","harness"]},"proposal":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"proposedByTeammateId":{"type":["string","null"]},"proposedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"roleSlug":{"type":["string","null"]},"jobDescription":{"type":["string","null"]},"projectIds":{"type":"array","items":{"type":"string"}},"proposedAt":{"type":"string"}},"required":["reason","proposedByTeammateId","proposedByUserId","roleSlug","jobDescription","projectIds","proposedAt"],"additionalProperties":false},{"type":"null"}]},"projectIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"}},"required":["workspaceId","teammateId","name","avatarUrl","characterId","title","reportsToTeammateId","status","pausedReason","responsibleUserId","heartbeatMinutes","lastHeartbeatAt","lastWake","monthlyCreditCapMicros","spentCreditMicros","isLead","runsOn","proposal","projectIds","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80},"reportsToTeammateId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"heartbeatMinutes":{"anyOf":[{"type":"integer","minimum":15,"maximum":1440},{"type":"null"}]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["active","paused","archived"]},"projectIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}}}}}}}},"/workspaces/{workspace_id}/team/{teammate_id}/decision":{"post":{"operationId":"postWorkspacesByWorkspaceIdTeamByTeammateIdDecision","tags":["workspaces"],"summary":"Approve or reject a proposed hire","responses":{"200":{"description":"The team","content":{"application/json":{"schema":{"type":"object","properties":{"teammates":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"},"teammateId":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":["string","null"]},"characterId":{"type":["string","null"]},"title":{"type":"string"},"reportsToTeammateId":{"type":["string","null"]},"status":{"type":"string","enum":["proposed","active","paused","archived"]},"pausedReason":{"anyOf":[{"type":"string","enum":["manual","budget"]},{"type":"null"}]},"responsibleUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"heartbeatMinutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastHeartbeatAt":{"type":["string","null"]},"lastWake":{"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"projectId":{"type":"string"},"reason":{"type":"string","enum":["assigned","mentioned","review","heartbeat","standup","standup_summary","escalation","setup","blocker_cleared","report_blocked","report_budget"]},"taskId":{"type":["string","null"]},"settled":{"type":"boolean"}},"required":["at","projectId","reason","taskId","settled"],"additionalProperties":false},{"type":"null"}]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"spentCreditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"isLead":{"type":"boolean"},"runsOn":{"type":"string","enum":["hosted","sandbox","machine","harness"]},"proposal":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"proposedByTeammateId":{"type":["string","null"]},"proposedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"roleSlug":{"type":["string","null"]},"jobDescription":{"type":["string","null"]},"projectIds":{"type":"array","items":{"type":"string"}},"proposedAt":{"type":"string"}},"required":["reason","proposedByTeammateId","proposedByUserId","roleSlug","jobDescription","projectIds","proposedAt"],"additionalProperties":false},{"type":"null"}]},"projectIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"}},"required":["workspaceId","teammateId","name","avatarUrl","characterId","title","reportsToTeammateId","status","pausedReason","responsibleUserId","heartbeatMinutes","lastHeartbeatAt","lastWake","monthlyCreditCapMicros","spentCreditMicros","isLead","runsOn","proposal","projectIds","createdAt"],"additionalProperties":false}},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"type":["string","null"]}},"required":["teammates","monthlyCreditCapMicros","leadTeammateId"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"teammate_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]}},"required":["decision"]}}}}}},"/workspaces/{workspace_id}/hires":{"post":{"operationId":"postWorkspacesByWorkspaceIdHires","tags":["workspaces"],"summary":"Propose a hire","description":"Creates the teammate as proposed. An owner or admin approves it before it works.","responses":{"200":{"description":"The proposed teammate","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"teammateId":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":["string","null"]},"characterId":{"type":["string","null"]},"title":{"type":"string"},"reportsToTeammateId":{"type":["string","null"]},"status":{"type":"string","enum":["proposed","active","paused","archived"]},"pausedReason":{"anyOf":[{"type":"string","enum":["manual","budget"]},{"type":"null"}]},"responsibleUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"heartbeatMinutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastHeartbeatAt":{"type":["string","null"]},"lastWake":{"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"projectId":{"type":"string"},"reason":{"type":"string","enum":["assigned","mentioned","review","heartbeat","standup","standup_summary","escalation","setup","blocker_cleared","report_blocked","report_budget"]},"taskId":{"type":["string","null"]},"settled":{"type":"boolean"}},"required":["at","projectId","reason","taskId","settled"],"additionalProperties":false},{"type":"null"}]},"monthlyCreditCapMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"spentCreditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"isLead":{"type":"boolean"},"runsOn":{"type":"string","enum":["hosted","sandbox","machine","harness"]},"proposal":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"proposedByTeammateId":{"type":["string","null"]},"proposedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"roleSlug":{"type":["string","null"]},"jobDescription":{"type":["string","null"]},"projectIds":{"type":"array","items":{"type":"string"}},"proposedAt":{"type":"string"}},"required":["reason","proposedByTeammateId","proposedByUserId","roleSlug","jobDescription","projectIds","proposedAt"],"additionalProperties":false},{"type":"null"}]},"projectIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"}},"required":["workspaceId","teammateId","name","avatarUrl","characterId","title","reportsToTeammateId","status","pausedReason","responsibleUserId","heartbeatMinutes","lastHeartbeatAt","lastWake","monthlyCreditCapMicros","spentCreditMicros","isLead","runsOn","proposal","projectIds","createdAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80},"roleSlug":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"jobDescription":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"reportsToTeammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"heartbeatMinutes":{"default":null,"anyOf":[{"type":"integer","minimum":15,"maximum":1440},{"type":"null"}]},"projectIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["name","title","reason"]}}}}}},"/workspaces/{workspace_id}/initiatives":{"get":{"operationId":"getWorkspacesByWorkspaceIdInitiatives","tags":["workspaces"],"summary":"List the mission and initiatives","responses":{"200":{"description":"Initiatives","content":{"application/json":{"schema":{"type":"object","properties":{"mission":{"type":"string"},"initiatives":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["active","completed","archived"]},"targetDate":{"type":["string","null"]},"ownerTeammateId":{"type":["string","null"]},"projectIds":{"type":"array","items":{"type":"string"}},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["done","total"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","workspaceId","name","description","status","targetDate","ownerTeammateId","projectIds","progress","createdAt","updatedAt"],"additionalProperties":false}},"unalignedProjectIds":{"type":"array","items":{"type":"string"}}},"required":["mission","initiatives","unalignedProjectIds"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postWorkspacesByWorkspaceIdInitiatives","tags":["workspaces"],"summary":"Create an initiative","responses":{"200":{"description":"The initiative","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["active","completed","archived"]},"targetDate":{"type":["string","null"]},"ownerTeammateId":{"type":["string","null"]},"projectIds":{"type":"array","items":{"type":"string"}},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["done","total"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","workspaceId","name","description","status","targetDate","ownerTeammateId","projectIds","progress","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":2000},"status":{"default":"active","type":"string","enum":["active","completed","archived"]},"targetDate":{"default":null,"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"ownerTeammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"projectIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}},"required":["name"]}}}}}},"/workspaces/{workspace_id}/initiatives/{initiative_id}":{"patch":{"operationId":"patchWorkspacesByWorkspaceIdInitiativesByInitiativeId","tags":["workspaces"],"summary":"Update an initiative","responses":{"200":{"description":"The initiative","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["active","completed","archived"]},"targetDate":{"type":["string","null"]},"ownerTeammateId":{"type":["string","null"]},"projectIds":{"type":"array","items":{"type":"string"}},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["done","total"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["id","workspaceId","name","description","status","targetDate","ownerTeammateId","projectIds","progress","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"initiative_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"status":{"type":"string","enum":["active","completed","archived"]},"targetDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"ownerTeammateId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"projectIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}}}}}}},"delete":{"operationId":"deleteWorkspacesByWorkspaceIdInitiativesByInitiativeId","tags":["workspaces"],"summary":"Delete an initiative","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"initiative_id","schema":{"type":"string","minLength":1},"required":true}]}},"/workspaces/{workspace_id}/tasks":{"get":{"operationId":"getWorkspacesByWorkspaceIdTasks","tags":["workspaces"],"summary":"List open work across the workspace","description":"Filter by teammate to see what it owns or is reviewing.","responses":{"200":{"description":"Tasks","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}}},"required":["tasks"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"owner_teammate_id","schema":{"type":"string","minLength":1}},{"in":"query","name":"include_done","schema":{"type":"boolean"}}]}},"/workspaces/{workspace_id}/costs":{"get":{"operationId":"getWorkspacesByWorkspaceIdCosts","tags":["workspaces"],"summary":"Read a month's spend by teammate, initiative, project and task","responses":{"200":{"description":"Spend","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string"},"totalCreditMicros":{"type":"number","minimum":0},"capCreditMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"creditMicros":{"type":"number","minimum":0},"costMicros":{"type":"number","minimum":0},"runCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"capCreditMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","creditMicros","costMicros","runCount","capCreditMicros"],"additionalProperties":false}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"creditMicros":{"type":"number","minimum":0},"costMicros":{"type":"number","minimum":0},"runCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"capCreditMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","creditMicros","costMicros","runCount","capCreditMicros"],"additionalProperties":false}},"initiatives":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"creditMicros":{"type":"number","minimum":0},"costMicros":{"type":"number","minimum":0},"runCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"capCreditMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","creditMicros","costMicros","runCount","capCreditMicros"],"additionalProperties":false}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"creditMicros":{"type":"number","minimum":0},"costMicros":{"type":"number","minimum":0},"runCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"capCreditMicros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","creditMicros","costMicros","runCount","capCreditMicros"],"additionalProperties":false}}},"required":["period","totalCreditMicros","capCreditMicros","teammates","projects","initiatives","tasks"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"period","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}}]}},"/workspaces/{workspace_id}/rails":{"get":{"operationId":"getWorkspacesByWorkspaceIdRails","tags":["workspaces"],"summary":"Read teammate heartbeat rails","responses":{"200":{"description":"Rails","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"rails":{"type":"array","items":{"type":"object","properties":{"teammateId":{"type":"string"},"beats":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","enum":["ran","blocked","running","scheduled"]},"trigger":{"type":"string"},"label":{"type":["string","null"]},"runId":{"type":["string","null"]},"taskId":{"type":["string","null"]},"projectId":{"type":["string","null"]}},"required":["at","kind","trigger","label","runId","taskId","projectId"],"additionalProperties":false}}},"required":["teammateId","beats"],"additionalProperties":false}}},"required":["from","to","rails"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"hours","schema":{"default":24,"type":"integer","minimum":1,"maximum":168}}]}},"/workspaces/{workspace_id}/setup":{"get":{"operationId":"getWorkspacesByWorkspaceIdSetup","tags":["workspaces"],"summary":"Read the workspace setup","responses":{"200":{"description":"Setup","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"projectId":{"type":"string"},"setupTaskId":{"type":"string"},"leadTeammateId":{"type":"string"},"setup":{"anyOf":[{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"plan":{"type":"object","properties":{"mission":{"type":"string","minLength":1,"maxLength":1000},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"initiatives":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":2000}},"required":["key","name","description"],"additionalProperties":false}},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":2,"maxLength":100},"description":{"default":"","type":"string","maxLength":1000},"starterId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"taskPrefix":{"type":"string","pattern":"^[A-Z]{2,5}$"},"initiative":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"standup":{"default":null,"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"string","enum":["everyone","people","teammates"]},"windowMinutes":{"type":"integer","minimum":15,"maximum":1440},"shareBindingId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pausedUntil":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["enabled","time","days","timeZone","questions","participants","windowMinutes","shareBindingId","pausedUntil"],"additionalProperties":false},{"type":"null"}]}},"required":["key","name","description","starterId","taskPrefix","initiative","standup"],"additionalProperties":false}},"teammates":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80},"roleSlug":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"jobDescription":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"reportsTo":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"heartbeatMinutes":{"default":null,"anyOf":[{"type":"integer","minimum":15,"maximum":1440},{"type":"null"}]},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"projects":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["key","name","title","roleSlug","jobDescription","reportsTo","heartbeatMinutes","monthlyCreditCapMicros","projects"],"additionalProperties":false}},"tasks":{"default":[],"maxItems":30,"type":"array","items":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["project","objective","owner","priority"],"additionalProperties":false}},"connectors":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"access":{"default":"read","type":"string","enum":["read","write"]},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"reason":{"default":"","type":"string","maxLength":300}},"required":["provider","access","projects","reason"],"additionalProperties":false}},"suggestions":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["provider","reason"],"additionalProperties":false}}},"required":["mission","monthlyCreditCapMicros","initiatives","projects","teammates","tasks","connectors","suggestions"],"additionalProperties":false},"appliedAt":{"type":["string","null"]},"created":{"anyOf":[{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"string"}},"teammateIds":{"type":"array","items":{"type":"string"}},"initiativeIds":{"type":"array","items":{"type":"string"}},"taskIds":{"type":"array","items":{"type":"string"}}},"required":["projectIds","teammateIds","initiativeIds","taskIds"],"additionalProperties":false},{"type":"null"}]},"failure":{"default":null,"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"message":{"type":"string"}},"required":["at","revision","message"],"additionalProperties":false},{"type":"null"}]}},"required":["revision","plan","appliedAt","created","failure"],"additionalProperties":false},{"type":"null"}]}},"required":["workspaceId","projectId","setupTaskId","leadTeammateId","setup"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postWorkspacesByWorkspaceIdSetup","tags":["workspaces"],"summary":"Hire a lead and start setup","description":"For an existing workspace without a lead.","responses":{"200":{"description":"Setup","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"projectId":{"type":"string"},"setupTaskId":{"type":"string"},"leadTeammateId":{"type":"string"},"setup":{"anyOf":[{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"plan":{"type":"object","properties":{"mission":{"type":"string","minLength":1,"maxLength":1000},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"initiatives":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":2000}},"required":["key","name","description"],"additionalProperties":false}},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":2,"maxLength":100},"description":{"default":"","type":"string","maxLength":1000},"starterId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"taskPrefix":{"type":"string","pattern":"^[A-Z]{2,5}$"},"initiative":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"standup":{"default":null,"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"string","enum":["everyone","people","teammates"]},"windowMinutes":{"type":"integer","minimum":15,"maximum":1440},"shareBindingId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pausedUntil":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["enabled","time","days","timeZone","questions","participants","windowMinutes","shareBindingId","pausedUntil"],"additionalProperties":false},{"type":"null"}]}},"required":["key","name","description","starterId","taskPrefix","initiative","standup"],"additionalProperties":false}},"teammates":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80},"roleSlug":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"jobDescription":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"reportsTo":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"heartbeatMinutes":{"default":null,"anyOf":[{"type":"integer","minimum":15,"maximum":1440},{"type":"null"}]},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"projects":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["key","name","title","roleSlug","jobDescription","reportsTo","heartbeatMinutes","monthlyCreditCapMicros","projects"],"additionalProperties":false}},"tasks":{"default":[],"maxItems":30,"type":"array","items":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["project","objective","owner","priority"],"additionalProperties":false}},"connectors":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"access":{"default":"read","type":"string","enum":["read","write"]},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"reason":{"default":"","type":"string","maxLength":300}},"required":["provider","access","projects","reason"],"additionalProperties":false}},"suggestions":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["provider","reason"],"additionalProperties":false}}},"required":["mission","monthlyCreditCapMicros","initiatives","projects","teammates","tasks","connectors","suggestions"],"additionalProperties":false},"appliedAt":{"type":["string","null"]},"created":{"anyOf":[{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"string"}},"teammateIds":{"type":"array","items":{"type":"string"}},"initiativeIds":{"type":"array","items":{"type":"string"}},"taskIds":{"type":"array","items":{"type":"string"}}},"required":["projectIds","teammateIds","initiativeIds","taskIds"],"additionalProperties":false},{"type":"null"}]},"failure":{"default":null,"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"message":{"type":"string"}},"required":["at","revision","message"],"additionalProperties":false},{"type":"null"}]}},"required":["revision","plan","appliedAt","created","failure"],"additionalProperties":false},{"type":"null"}]}},"required":["workspaceId","projectId","setupTaskId","leadTeammateId","setup"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchWorkspacesByWorkspaceIdSetup","tags":["workspaces"],"summary":"Edit the setup plan","description":"Creates a new revision and clears any approval.","responses":{"200":{"description":"Setup plan","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"plan":{"type":"object","properties":{"mission":{"type":"string","minLength":1,"maxLength":1000},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"initiatives":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":2000}},"required":["key","name","description"],"additionalProperties":false}},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":2,"maxLength":100},"description":{"default":"","type":"string","maxLength":1000},"starterId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"taskPrefix":{"type":"string","pattern":"^[A-Z]{2,5}$"},"initiative":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"standup":{"default":null,"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"string","enum":["everyone","people","teammates"]},"windowMinutes":{"type":"integer","minimum":15,"maximum":1440},"shareBindingId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pausedUntil":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["enabled","time","days","timeZone","questions","participants","windowMinutes","shareBindingId","pausedUntil"],"additionalProperties":false},{"type":"null"}]}},"required":["key","name","description","starterId","taskPrefix","initiative","standup"],"additionalProperties":false}},"teammates":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80},"roleSlug":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"jobDescription":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"reportsTo":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"heartbeatMinutes":{"default":null,"anyOf":[{"type":"integer","minimum":15,"maximum":1440},{"type":"null"}]},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"projects":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["key","name","title","roleSlug","jobDescription","reportsTo","heartbeatMinutes","monthlyCreditCapMicros","projects"],"additionalProperties":false}},"tasks":{"default":[],"maxItems":30,"type":"array","items":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["project","objective","owner","priority"],"additionalProperties":false}},"connectors":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"access":{"default":"read","type":"string","enum":["read","write"]},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"reason":{"default":"","type":"string","maxLength":300}},"required":["provider","access","projects","reason"],"additionalProperties":false}},"suggestions":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["provider","reason"],"additionalProperties":false}}},"required":["mission","monthlyCreditCapMicros","initiatives","projects","teammates","tasks","connectors","suggestions"],"additionalProperties":false},"appliedAt":{"type":["string","null"]},"created":{"anyOf":[{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"string"}},"teammateIds":{"type":"array","items":{"type":"string"}},"initiativeIds":{"type":"array","items":{"type":"string"}},"taskIds":{"type":"array","items":{"type":"string"}}},"required":["projectIds","teammateIds","initiativeIds","taskIds"],"additionalProperties":false},{"type":"null"}]},"failure":{"default":null,"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"message":{"type":"string"}},"required":["at","revision","message"],"additionalProperties":false},{"type":"null"}]}},"required":["revision","plan","appliedAt","created","failure"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"object","properties":{"mission":{"type":"string","minLength":1,"maxLength":1000},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"initiatives":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":2000}},"required":["key","name"]}},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":2,"maxLength":100},"description":{"default":"","type":"string","maxLength":1000},"starterId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"taskPrefix":{"type":"string","pattern":"^[A-Z]{2,5}$"},"initiative":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"standup":{"default":null,"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"string","enum":["everyone","people","teammates"]},"windowMinutes":{"type":"integer","minimum":15,"maximum":1440},"shareBindingId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pausedUntil":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["enabled","time","days","timeZone","questions","participants","windowMinutes"]},{"type":"null"}]}},"required":["key","name","taskPrefix"]}},"teammates":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80},"roleSlug":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"jobDescription":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"reportsTo":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"heartbeatMinutes":{"default":null,"anyOf":[{"type":"integer","minimum":15,"maximum":1440},{"type":"null"}]},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"projects":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["key","name","title"]}},"tasks":{"default":[],"maxItems":30,"type":"array","items":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["project","objective"]}},"connectors":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"access":{"default":"read","type":"string","enum":["read","write"]},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"reason":{"default":"","type":"string","maxLength":300}},"required":["provider","projects"]}},"suggestions":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["provider","reason"]}}},"required":["mission","projects"]},"expectedRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["plan","expectedRevision"]}}}}}},"/workspaces/{workspace_id}/setup/approve":{"post":{"operationId":"postWorkspacesByWorkspaceIdSetupApprove","tags":["workspaces"],"summary":"Approve the setup plan and start the workspace","responses":{"200":{"description":"Setup plan","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"plan":{"type":"object","properties":{"mission":{"type":"string","minLength":1,"maxLength":1000},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"initiatives":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":2000}},"required":["key","name","description"],"additionalProperties":false}},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":2,"maxLength":100},"description":{"default":"","type":"string","maxLength":1000},"starterId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"taskPrefix":{"type":"string","pattern":"^[A-Z]{2,5}$"},"initiative":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"standup":{"default":null,"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"string","enum":["everyone","people","teammates"]},"windowMinutes":{"type":"integer","minimum":15,"maximum":1440},"shareBindingId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pausedUntil":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["enabled","time","days","timeZone","questions","participants","windowMinutes","shareBindingId","pausedUntil"],"additionalProperties":false},{"type":"null"}]}},"required":["key","name","description","starterId","taskPrefix","initiative","standup"],"additionalProperties":false}},"teammates":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80},"roleSlug":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"jobDescription":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"reportsTo":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"heartbeatMinutes":{"default":null,"anyOf":[{"type":"integer","minimum":15,"maximum":1440},{"type":"null"}]},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"projects":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["key","name","title","roleSlug","jobDescription","reportsTo","heartbeatMinutes","monthlyCreditCapMicros","projects"],"additionalProperties":false}},"tasks":{"default":[],"maxItems":30,"type":"array","items":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["project","objective","owner","priority"],"additionalProperties":false}},"connectors":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"access":{"default":"read","type":"string","enum":["read","write"]},"projects":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"reason":{"default":"","type":"string","maxLength":300}},"required":["provider","access","projects","reason"],"additionalProperties":false}},"suggestions":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["_1password","agent_mail","airtable","algolia","alpaca","apollo","artificial_analysis","asana","attio","basecamp","better_proposals","bitbucket","box","browserbase_tool","cal","calendly","canva","clickhouse","clickup","cloudflare","cloudflare_api_key","cloudflare_browser_rendering","coinbase","confluence","contentful","convex","crawlbase","cursor","databricks","datadog","devto","digital_ocean","discord","discordbot","docker_hub","dropbox","dropbox_sign","dynamics365","eventbrite","excel","facebook","fathom","figma","firecrawl","fireflies","fly","foursquare","freshbooks","freshdesk","gamma","giphy","gist","gitea","github","gitlab","gmail","google_analytics","google_maps","google_search_console","googleads","googlebigquery","googlecalendar","googledocs","googledrive","googlemeet","googlephotos","googlesheets","googleslides","googlesuper","googletasks","grafana","gumroad","harvest","heygen","hostinger","hubspot","hugging_face","hyperbrowser","incident_io","instagram","intercom","jira","kibana","klaviyo","launch_darkly","line","linear","linkedin","listennotes","mailchimp","metabase","microsoft_clarity","microsoft_teams","miro","mixpanel","monday","nasa","nasdaq","neon","new_relic","ngrok","notion","npm","one_drive","openweather_api","outlook","pagerduty","pandadoc","plausible_analytics","polymarket_us","posthog","postman","postmark","railway","raindrop","reddit","resend","salesforce","semrush","sendgrid","sentry","serpapi","share_point","shortcut","slack","slackbot","smugmug","square","stack_exchange","stripe","supabase","ticketmaster","ticktick","todoist","toneden","trello","tripadvisor","typeform","vercel","wakatime","webex","webflow","whatsapp","wolfram_alpha_api","wrike","yandex","youtube","zendesk","zeplin","zoho","zoom","devin","hindsight","honcho","netlify","readwise","lastfm","trakt","hardcover","podcastindex","oura","audiobookshelf","marquee","cloudflare_ai_search","bedrock_knowledge_base"]},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["provider","reason"],"additionalProperties":false}}},"required":["mission","monthlyCreditCapMicros","initiatives","projects","teammates","tasks","connectors","suggestions"],"additionalProperties":false},"appliedAt":{"type":["string","null"]},"created":{"anyOf":[{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"string"}},"teammateIds":{"type":"array","items":{"type":"string"}},"initiativeIds":{"type":"array","items":{"type":"string"}},"taskIds":{"type":"array","items":{"type":"string"}}},"required":["projectIds","teammateIds","initiativeIds","taskIds"],"additionalProperties":false},{"type":"null"}]},"failure":{"default":null,"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"message":{"type":"string"}},"required":["at","revision","message"],"additionalProperties":false},{"type":"null"}]}},"required":["revision","plan","appliedAt","created","failure"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revision"]}}}}}},"/workspaces/{workspace_id}/setup/archive":{"post":{"operationId":"postWorkspacesByWorkspaceIdSetupArchive","tags":["workspaces"],"summary":"Undo what the setup plan created","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}]}},"/workspaces/{workspace_id}/audit":{"get":{"operationId":"getWorkspacesByWorkspaceIdAudit","tags":["workspaces"],"summary":"List workspace audit records","responses":{"200":{"description":"Audit records","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"actorUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"action":{"type":"string"},"targetType":{"type":"string"},"targetId":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","workspaceId","actorUserId","action","targetType","targetId","metadata","createdAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","last_id"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"after","schema":{"type":"string","minLength":1}}]}},"/workspaces/{workspace_id}/invitations":{"post":{"operationId":"postWorkspacesByWorkspaceIdInvitations","tags":["workspaces"],"summary":"Invite a workspace member","responses":{"200":{"description":"Single-use invitation","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","workspaceId","email","role","status","expiresAt","createdAt"],"additionalProperties":false},"inviteUrl":{"type":"string","format":"uri"}},"required":["invitation","inviteUrl"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"role":{"default":"member","type":"string","enum":["admin","member"]}},"required":["email"]}}}}}},"/workspaces/{workspace_id}/invitations/{invitation_id}":{"delete":{"operationId":"deleteWorkspacesByWorkspaceIdInvitationsByInvitationId","tags":["workspaces"],"summary":"Revoke a workspace invitation","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"invitation_id","schema":{"type":"string","minLength":1},"required":true}]}},"/workspaces/{workspace_id}/members/{member_id}":{"patch":{"operationId":"patchWorkspacesByWorkspaceIdMembersByMemberId","tags":["workspaces"],"summary":"Change a member's role","responses":{"200":{"description":"The workspace","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"colour":{"type":"string"},"mission":{"default":"","type":"string"},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"default":null,"type":["string","null"]},"setupProjectId":{"default":null,"type":["string","null"]},"setupTaskId":{"default":null,"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"leadRoutines":{"type":"object","properties":{"dailyBrief":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false},"initiativeReview":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false}},"required":["dailyBrief","initiativeReview"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"avatarUrl":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"}},"required":["userId","name","email","avatarUrl","role","joinedAt"],"additionalProperties":false}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","workspaceId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}}},"required":["id","name","description","colour","mission","monthlyCreditCapMicros","leadTeammateId","setupProjectId","setupTaskId","role","memberCount","projectCount","createdAt","updatedAt","leadRoutines","projects","members","invitations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"member_id","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["admin","member"]}},"required":["role"]}}}}},"delete":{"operationId":"deleteWorkspacesByWorkspaceIdMembersByMemberId","tags":["workspaces"],"summary":"Remove a workspace member","responses":{"200":{"description":"The workspace","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"colour":{"type":"string"},"mission":{"default":"","type":"string"},"monthlyCreditCapMicros":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"leadTeammateId":{"default":null,"type":["string","null"]},"setupProjectId":{"default":null,"type":["string","null"]},"setupTaskId":{"default":null,"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"leadRoutines":{"type":"object","properties":{"dailyBrief":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false},"initiativeReview":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"lastRunAt":{"default":null,"type":["string","null"]}},"required":["enabled","time","days","timeZone","lastRunAt"],"additionalProperties":false}},"required":["dailyBrief","initiativeReview"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"avatarUrl":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"}},"required":["userId","name","email","avatarUrl","role","joinedAt"],"additionalProperties":false}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","workspaceId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}}},"required":["id","name","description","colour","mission","monthlyCreditCapMicros","leadTeammateId","setupProjectId","setupTaskId","role","memberCount","projectCount","createdAt","updatedAt","leadRoutines","projects","members","invitations"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"workspace_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"member_id","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"required":true}]}},"/projects":{"post":{"operationId":"postProjects","tags":["projects"],"summary":"Create a project in a workspace","description":"Send the project's fields, or template_id or starter_id to create it from a saved template or a built-in starter.","responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"type":"string","enum":["app","recipe","skill","tool","teammate","connector"]},"capabilityId":{"type":"string"},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"excluded":{"type":"boolean"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","projectId","kind","capabilityId","configuration","createdBy","createdAt"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"title":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"lastMessageAt":{"type":["string","null"]},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isPinned":{"type":"boolean"},"isUnread":{"type":"boolean"},"snooze":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"until"},"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["kind","until"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"next_response"}},"required":["kind"],"additionalProperties":false}]},{"type":"null"}]},"group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false},{"type":"null"}]},"createdBy":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","name","avatarUrl"],"additionalProperties":false}},"required":["id","type","title","createdAt","updatedAt","lastMessageAt","messageCount","isPinned","isUnread","snooze","group","createdBy"],"additionalProperties":false}},"flow":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId","capabilities","conversations","flow"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":2,"maxLength":100},"template_id":{"type":"string","minLength":1}},"required":["workspace_id","template_id"],"additionalProperties":false},{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":2,"maxLength":100},"starter_id":{"type":"string","minLength":1}},"required":["workspace_id","starter_id"],"additionalProperties":false},{"type":"object","properties":{"taskPrefix":{"type":"string","pattern":"^[A-Z]{2,5}$"},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"name":{"type":"string","minLength":2,"maxLength":100},"description":{"default":"","type":"string","maxLength":1000},"instructions":{"default":"","type":"string","maxLength":8000},"colour":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"codingEnvironment":{"anyOf":[{"type":"object","properties":{"executionProvider":{"default":"polychat","type":"string","enum":["polychat","openai"]},"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repository":{"type":"string","minLength":1,"pattern":"^[\\w.-]+\\/[\\w.-]+$"},"promptStrategy":{"default":"auto","type":"string","enum":["auto","feature-delivery","bug-fix","refactor","test-hardening"]},"deliveryPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"environmentSetup":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"polychat"},"definition":{"type":"object","properties":{"version":{"default":1,"type":"number","const":1},"setupCommands":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"resumeCommands":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"runtimes":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"setupTimeoutSeconds":{"default":600,"type":"integer","minimum":30,"maximum":1800},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"networkHosts":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","maxLength":253,"pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"default":".","type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"command":{"type":"string","minLength":1,"maxLength":500},"dependencies":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"}},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path"],"additionalProperties":false}]},"startupTimeoutSeconds":{"default":60,"type":"integer","minimum":5,"maximum":300},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"restartPolicy":{"default":{"mode":"never","maxRestarts":0,"backoffSeconds":1},"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"never"},"maxRestarts":{"default":0,"type":"number","const":0},"backoffSeconds":{"default":1,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"on_failure"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"always"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false}]}},"required":["name","command"],"additionalProperties":false}}},"required":["setupCommands"],"additionalProperties":false}},"required":["source","definition"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"repository"}},"required":["source"],"additionalProperties":false}]},"timeoutSeconds":{"default":900,"type":"integer","minimum":30,"maximum":7200},"inspectionWindowSeconds":{"default":0,"type":"integer","minimum":0,"maximum":300}},"required":["installationId","repository"]},{"type":"null"}]},"workspace_id":{"type":"string","minLength":1}},"required":["name","workspace_id"]}]}}}}}},"/projects/{project_id}":{"get":{"operationId":"getProjectsByProjectId","tags":["projects"],"summary":"Get a project work surface","responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"type":"string","enum":["app","recipe","skill","tool","teammate","connector"]},"capabilityId":{"type":"string"},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"excluded":{"type":"boolean"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","projectId","kind","capabilityId","configuration","createdBy","createdAt"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"title":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"lastMessageAt":{"type":["string","null"]},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isPinned":{"type":"boolean"},"isUnread":{"type":"boolean"},"snooze":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"until"},"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["kind","until"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"next_response"}},"required":["kind"],"additionalProperties":false}]},{"type":"null"}]},"group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false},{"type":"null"}]},"createdBy":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","name","avatarUrl"],"additionalProperties":false}},"required":["id","type","title","createdAt","updatedAt","lastMessageAt","messageCount","isPinned","isUnread","snooze","group","createdBy"],"additionalProperties":false}},"flow":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId","capabilities","conversations","flow"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchProjectsByProjectId","tags":["projects"],"summary":"Update a project","responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"type":"string","enum":["app","recipe","skill","tool","teammate","connector"]},"capabilityId":{"type":"string"},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"excluded":{"type":"boolean"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","projectId","kind","capabilityId","configuration","createdBy","createdAt"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"title":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"lastMessageAt":{"type":["string","null"]},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isPinned":{"type":"boolean"},"isUnread":{"type":"boolean"},"snooze":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"until"},"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["kind","until"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"next_response"}},"required":["kind"],"additionalProperties":false}]},{"type":"null"}]},"group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false},{"type":"null"}]},"createdBy":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","name","avatarUrl"],"additionalProperties":false}},"required":["id","type","title","createdAt","updatedAt","lastMessageAt","messageCount","isPinned","isUnread","snooze","group","createdBy"],"additionalProperties":false}},"flow":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId","capabilities","conversations","flow"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskPrefix":{"type":"string","pattern":"^[A-Z]{2,5}$"},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"name":{"type":"string","minLength":2,"maxLength":100},"description":{"type":"string","maxLength":1000},"instructions":{"type":"string","maxLength":8000},"colour":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"codingEnvironment":{"anyOf":[{"type":"object","properties":{"executionProvider":{"default":"polychat","type":"string","enum":["polychat","openai"]},"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repository":{"type":"string","minLength":1,"pattern":"^[\\w.-]+\\/[\\w.-]+$"},"promptStrategy":{"default":"auto","type":"string","enum":["auto","feature-delivery","bug-fix","refactor","test-hardening"]},"deliveryPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"leave_uncommitted"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"review_branch"},"destination":{"default":"pull_request","type":"string","enum":["branch","pull_request"]}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"commit_to_branch"},"targetBranch":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["mode","targetBranch"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"custom"},"instructions":{"type":"string","minLength":1,"maxLength":2000}},"required":["mode","instructions"],"additionalProperties":false}]},"environmentSetup":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"polychat"},"definition":{"type":"object","properties":{"version":{"default":1,"type":"number","const":1},"setupCommands":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"resumeCommands":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"runtimes":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["node","python","go","rust","java","ruby"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false}},"packageManager":{"type":"object","properties":{"name":{"type":"string","enum":["npm","pnpm","yarn","bun","pip","poetry","uv","cargo","bundler","maven","gradle","swiftpm"]},"version":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[vV]?\\d+(?:\\.\\d+){0,3}(?:[-+][A-Za-z0-9.-]+)?$"}},"required":["name"],"additionalProperties":false},"setupTimeoutSeconds":{"default":600,"type":"integer","minimum":30,"maximum":1800},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"networkHosts":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","maxLength":253,"pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"services":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"},"workingDirectory":{"default":".","type":"string","minLength":1,"maxLength":200,"pattern":"^(?:\\.|[A-Za-z0-9._-]+(?:\\/[A-Za-z0-9._-]+)*)$"},"command":{"type":"string","minLength":1,"maxLength":500},"dependencies":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9-]*$"}},"expectedPort":{"type":"integer","minimum":1024,"maximum":65535},"healthCheck":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"tcp"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"},"expectedStatus":{"default":{"min":200,"max":399},"type":"object","properties":{"min":{"type":"integer","minimum":100,"maximum":599},"max":{"type":"integer","minimum":100,"maximum":599}},"required":["min","max"],"additionalProperties":false}},"required":["type","path"],"additionalProperties":false}]},"startupTimeoutSeconds":{"default":60,"type":"integer","minimum":5,"maximum":300},"environment":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"}},"restartPolicy":{"default":{"mode":"never","maxRestarts":0,"backoffSeconds":1},"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"never"},"maxRestarts":{"default":0,"type":"number","const":0},"backoffSeconds":{"default":1,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"on_failure"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"always"},"maxRestarts":{"default":1,"type":"integer","minimum":1,"maximum":3},"backoffSeconds":{"default":2,"type":"integer","minimum":1,"maximum":30}},"required":["mode"],"additionalProperties":false}]}},"required":["name","command"],"additionalProperties":false}}},"required":["setupCommands"],"additionalProperties":false}},"required":["source","definition"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"repository"}},"required":["source"],"additionalProperties":false}]},"timeoutSeconds":{"default":900,"type":"integer","minimum":30,"maximum":7200},"inspectionWindowSeconds":{"default":0,"type":"integer","minimum":0,"maximum":300}},"required":["installationId","repository"]},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteProjectsByProjectId","tags":["projects"],"summary":"Archive a project","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/environment_cache":{"post":{"operationId":"postProjectsByProjectIdEnvironmentCache","tags":["projects"],"summary":"Rebuild the project environment cache","responses":{"200":{"description":"Cache result","content":{"application/json":{"schema":{"type":"object","properties":{"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"storageDeletion":{"type":"string","enum":["deleted","not_found","failed"]},"warning":{"type":"string","minLength":1}},"required":["environmentCache","storageDeletion"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}]},"delete":{"operationId":"deleteProjectsByProjectIdEnvironmentCache","tags":["projects"],"summary":"Delete the project environment cache","responses":{"200":{"description":"Cache result","content":{"application/json":{"schema":{"type":"object","properties":{"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"storageDeletion":{"type":"string","enum":["deleted","not_found","failed"]},"warning":{"type":"string","minLength":1}},"required":["environmentCache","storageDeletion"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/environment_variables":{"get":{"operationId":"getProjectsByProjectIdEnvironmentVariables","tags":["projects"],"summary":"List project environment variable names","description":"Values are write-only; the list carries names and metadata.","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postProjectsByProjectIdEnvironmentVariables","tags":["projects"],"summary":"Set a project environment variable","responses":{"200":{"description":"Variable names","content":{"application/json":{"schema":{"type":"object","properties":{"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"},"isSet":{"type":"boolean"},"updatedAt":{"type":"string","minLength":1}},"required":["name","isSet","updatedAt"],"additionalProperties":false}}},"required":["variables"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"},"value":{"type":"string","maxLength":16384}},"required":["name","value"]}}}}}},"/projects/{project_id}/environment_variables/{variable_id}":{"delete":{"operationId":"deleteProjectsByProjectIdEnvironmentVariablesByVariableId","tags":["projects"],"summary":"Clear a project environment variable","responses":{"200":{"description":"Variable names","content":{"application/json":{"schema":{"type":"object","properties":{"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"},"isSet":{"type":"boolean"},"updatedAt":{"type":"string","minLength":1}},"required":["name","isSet","updatedAt"],"additionalProperties":false}}},"required":["variables"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"variable_id","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,63}$"},"required":true}]}},"/projects/{project_id}/capabilities":{"post":{"operationId":"postProjectsByProjectIdCapabilities","tags":["projects"],"summary":"Add an app, recipe or tool to a project","responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"type":"string","enum":["app","recipe","skill","tool","teammate","connector"]},"capabilityId":{"type":"string"},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"excluded":{"type":"boolean"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","projectId","kind","capabilityId","configuration","createdBy","createdAt"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"title":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"lastMessageAt":{"type":["string","null"]},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isPinned":{"type":"boolean"},"isUnread":{"type":"boolean"},"snooze":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"until"},"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["kind","until"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"next_response"}},"required":["kind"],"additionalProperties":false}]},{"type":"null"}]},"group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false},{"type":"null"}]},"createdBy":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","name","avatarUrl"],"additionalProperties":false}},"required":["id","type","title","createdAt","updatedAt","lastMessageAt","messageCount","isPinned","isUnread","snooze","group","createdBy"],"additionalProperties":false}},"flow":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId","capabilities","conversations","flow"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["app","recipe","skill","tool","teammate","connector"]},"capabilityId":{"type":"string","minLength":1,"maxLength":160},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","capabilityId"]}}}}}},"/projects/{project_id}/capabilities/{capability_id}":{"delete":{"operationId":"deleteProjectsByProjectIdCapabilitiesByCapabilityId","tags":["projects"],"summary":"Remove a capability from a project","responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"colour":{"type":"string"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"conversationCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"capabilityCount":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"defaultModelTier":{"anyOf":[{"type":"string","enum":["low","medium","high","ultra"]},{"type":"null"}]},"codingEnvironment":{"anyOf":[{},{"type":"null"}]},"environmentCache":{"anyOf":[{"type":"object","properties":{"cacheKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generation":{"type":"integer","minimum":0,"maximum":9007199254740991},"repositoryRevision":{"type":"string","minLength":1},"configurationRevision":{"type":"string","minLength":1},"platformVersion":{"type":"string","minLength":1},"status":{"type":"string","enum":["ready","invalidated","failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalidationReason":{"type":"string","minLength":1},"invalidatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["cacheKey","generation","repositoryRevision","configurationRevision","platformVersion","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"taskPrefix":{"default":null,"type":["string","null"]},"initiativeId":{"default":null,"type":["string","null"]},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"type":"string","enum":["app","recipe","skill","tool","teammate","connector"]},"capabilityId":{"type":"string"},"configuration":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"excluded":{"type":"boolean"},"createdBy":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","projectId","kind","capabilityId","configuration","createdBy","createdAt"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["chat","task","poly","delegate"]},"title":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"lastMessageAt":{"type":["string","null"]},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isPinned":{"type":"boolean"},"isUnread":{"type":"boolean"},"snooze":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"until"},"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["kind","until"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"next_response"}},"required":["kind"],"additionalProperties":false}]},{"type":"null"}]},"group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":40},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"personal"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"project"},"projectId":{"type":"string","minLength":1}},"required":["kind","projectId"],"additionalProperties":false}]}},"required":["id","name","scope"],"additionalProperties":false},{"type":"null"}]},"createdBy":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","name","avatarUrl"],"additionalProperties":false}},"required":["id","type","title","createdAt","updatedAt","lastMessageAt","messageCount","isPinned","isUnread","snooze","group","createdBy"],"additionalProperties":false}},"flow":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","name","description","instructions","colour","createdBy","createdAt","updatedAt","conversationCount","capabilityCount","codingEnvironment","taskPrefix","initiativeId","capabilities","conversations","flow"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"capability_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/flow":{"get":{"operationId":"getProjectsByProjectIdFlow","tags":["projects","tasks"],"summary":"Get the project flow","responses":{"200":{"description":"The flow","content":{"application/json":{"schema":{"type":"object","properties":{"flow":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]}},"required":["flow"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchProjectsByProjectIdFlow","tags":["projects","tasks"],"summary":"Set or clear the project flow","responses":{"200":{"description":"The flow","content":{"application/json":{"schema":{"type":"object","properties":{"flow":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]}},"required":["flow"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flow":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","advance"]}}},"required":["stages"]},{"type":"null"}]}},"required":["flow"]}}}}}},"/projects/{project_id}/tasks":{"get":{"operationId":"getProjectsByProjectIdTasks","tags":["projects","tasks"],"summary":"List project tasks","description":"The project board, with the project flow alongside.","responses":{"200":{"description":"Tasks","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"flow":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]}},"required":["object","data","has_more","last_id","flow"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"status","schema":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]}},{"in":"query","name":"assignee_user_id","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"in":"query","name":"include_done","schema":{"type":"boolean"}},{"in":"query","name":"kind","schema":{"type":"string","enum":["task","case","standup"]}}]},"post":{"operationId":"postProjectsByProjectIdTasks","tags":["projects","tasks"],"summary":"Add a task to the project board","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"objective":{"type":"string","minLength":1,"maxLength":2000},"kind":{"type":"string","enum":["task","case","standup"]},"acceptanceCriteria":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500},"id":{"type":"string"}},"required":["text"]}},"assumptions":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":500},"id":{"type":"string"}},"required":["statement"]}},"killConditions":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"condition":{"type":"string","minLength":1,"maxLength":500},"id":{"type":"string"}},"required":["condition"]}},"expectedOutput":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url"]}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}}},{"type":"null"}]},"dependsOnTaskIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"maxItems":8,"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind"]},{"type":"null"}]},"stageId":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":10000000},{"type":"null"}]},"originConversationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"priority":{"type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"owner":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"]}]},{"type":"null"}]},"reviewer":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"]}]},{"type":"null"}]}},"required":["objective"]}}}}}},"/projects/{project_id}/tasks/{task_id}":{"get":{"operationId":"getProjectsByProjectIdTasksByTaskId","tags":["projects","tasks"],"summary":"Get one project task","responses":{"200":{"description":"The task and its run","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false},"goal":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":["string","null"]},"sandbox_run_id":{"type":["string","null"]},"user_id":{"type":"number"},"objective":{"type":"string"},"status":{"type":"string","enum":["active","paused","completed","cleared","blocked","stalled","limit_reached"]},"source":{"type":"string","enum":["user","model"]},"iteration_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"stall_streak":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokens_spent":{"type":"integer","minimum":0,"maximum":9007199254740991},"progress":{"type":"array","items":{"type":"object","properties":{"iteration":{"type":"integer","minimum":0,"maximum":9007199254740991},"surface":{"type":"string","enum":["chat","agent","sandbox"]},"summary":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"string"}},"next":{"type":"string"},"steer":{"description":"A user instruction that redirected the work.","type":"string"},"at":{"type":"string"}},"required":["iteration","surface","summary","evidence","at"],"additionalProperties":false}},"evidence":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},{"type":"null"}]},"stopped_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"last_continued_at":{"type":["string","null"]}},"required":["id","conversation_id","sandbox_run_id","user_id","objective","status","source","iteration_count","stall_streak","tokens_spent","progress","evidence","stopped_reason","created_at","updated_at","completed_at","last_continued_at"],"additionalProperties":false},{"type":"null"}]},"pendingQuestions":{"anyOf":[{"type":"object","properties":{"interactionId":{"type":"string","minLength":1},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"prompt":{"type":"string","minLength":1,"maxLength":500},"options":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"description":{"default":null,"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]}},"required":["label","description"],"additionalProperties":false}},"allowOther":{"default":true,"type":"boolean"},"requestsFile":{"type":"boolean"}},"required":["id","prompt","options","allowOther"],"additionalProperties":false}},"requestedAt":{"type":"string"}},"required":["interactionId","questions","requestedAt"],"additionalProperties":false},{"type":"null"}]},"pendingApproval":{"anyOf":[{"type":"object","properties":{"interactionId":{"type":"string","minLength":1},"toolName":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}},"required":["interactionId","toolName","reason"],"additionalProperties":false},{"type":"null"}]},"interaction":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"projectId":{"type":"string","minLength":1},"taskId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"interactionId":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","resolved","expired","interrupted"]},"requestedAt":{"type":"string"},"resolvedAt":{"type":["string","null"]},"detail":{"type":["string","null"]},"type":{"type":"string","const":"question"},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"prompt":{"type":"string","minLength":1,"maxLength":500},"options":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"description":{"default":null,"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]}},"required":["label","description"],"additionalProperties":false}},"allowOther":{"default":true,"type":"boolean"},"requestsFile":{"type":"boolean"}},"required":["id","prompt","options","allowOther"],"additionalProperties":false}},"answers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string","minLength":1},"answer":{"type":"string","minLength":1,"maxLength":2000}},"required":["questionId","answer"],"additionalProperties":false}},{"type":"null"}]}},"required":["protocolVersion","projectId","taskId","runId","interactionId","status","requestedAt","resolvedAt","detail","type","questions","answers"],"additionalProperties":false},{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"projectId":{"type":"string","minLength":1},"taskId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"interactionId":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","resolved","expired","interrupted"]},"requestedAt":{"type":"string"},"resolvedAt":{"type":["string","null"]},"detail":{"type":["string","null"]},"type":{"type":"string","const":"approval"},"toolName":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1},"resolution":{"anyOf":[{"type":"string","enum":["approved","rejected"]},{"type":"null"}]}},"required":["protocolVersion","projectId","taskId","runId","interactionId","status","requestedAt","resolvedAt","detail","type","toolName","reason","resolution"],"additionalProperties":false}]},{"type":"null"}]},"activity":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"projectId":{"type":"string","minLength":1},"taskId":{"type":"string","minLength":1},"items":{"type":"array","items":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"id":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"taskId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"type":{"type":"string","minLength":1},"category":{"type":"string","enum":["plan","run","step","tool","interaction","output"]},"status":{"type":"string","enum":["proposed","active","waiting","succeeded","failed","interrupted","cancelled","resolved","unknown"]},"title":{"type":"string","minLength":1},"detail":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"items":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"occurredAt":{"type":"string"},"sourceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"actionable":{"type":"boolean"},"terminal":{"type":"boolean"}},"required":["protocolVersion","id","projectId","taskId","runId","type","category","status","title","detail","items","occurredAt","sourceId","actionable","terminal"],"additionalProperties":false}}},"required":["protocolVersion","projectId","taskId","items"],"additionalProperties":false},"plan":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","completed","abandoned"]},"stages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"flowStageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["proposed","executing","completed","failed","interrupted","abandoned"]},"input":{"type":"object","properties":{"objective":{"type":"string","minLength":1},"acceptanceCriterionIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["objective","acceptanceCriterionIds"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["accepted","running","awaiting_input","awaiting_approval","awaiting_takeover","cancelling","succeeded","failed","cancelled","interrupted"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"terminalReason":{"type":["string","null"]},"provenance":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"capturedAt":{"type":"string","maxLength":64},"completeness":{"type":"string","enum":["complete","partial"]},"origin":{"type":"string","enum":["generated","user","imported","unknown"]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","attempt"],"additionalProperties":false},{"type":"null"}]},"model":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","minLength":1,"maxLength":128}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"skills":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string","minLength":1,"maxLength":512},"revisionId":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","name"],"additionalProperties":false}},"sources":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"state":{"type":"string","enum":["referenced","unavailable"]}},"required":["id","name","state"],"additionalProperties":false}},"approvals":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["approval","question"]},"status":{"type":"string","enum":["pending","approved","rejected","resolved","expired","interrupted"]},"toolName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["id","type","status","toolName"],"additionalProperties":false}}},"required":["protocolVersion","capturedAt","completeness","origin","run","model","skills","sources","approvals"],"additionalProperties":false},"completionIds":{"type":"array","items":{"type":"string","minLength":1}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","ready","failed","archived"]}},"required":["id","title","kind","status"],"additionalProperties":false}},"usage":{"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"runId":{"type":"string","minLength":1},"currentAttempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"reservation":{"anyOf":[{"type":"object","properties":{"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["held","releasing","settled","released"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}},"required":["creditMicros","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"consumption":{"type":"object","properties":{"status":{"type":"string","enum":["recorded","processing","unknown"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["model","hosted_tool","capability","infrastructure"]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}}},"required":["status","eventCount","costMicros","creditMicros","estimatedPriceEventCount","bySource"],"additionalProperties":false},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"inputTokens":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"costMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedPriceEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["attempt","measurement","inputTokens","eventCount","costMicros","creditMicros","estimatedPriceEventCount"],"additionalProperties":false}},"settlement":{"type":"object","properties":{"status":{"type":"string","enum":["pending","settled","released","missing"]},"at":{"type":["string","null"]}},"required":["status","at"],"additionalProperties":false},"delegated":{"type":"array","items":{"type":"object","properties":{"delegationId":{"type":"string","minLength":1},"teammateId":{"type":"string","minLength":1},"teammateName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","awaiting_input","awaiting_approval","awaiting_takeover","done","failed","cancelled","expired"]},"runIds":{"type":"array","items":{"type":"string","minLength":1}},"measurement":{"type":"string","enum":["reported","estimated","mixed","off_platform","unknown"]},"consumptionStatus":{"type":"string","enum":["recorded","processing","unknown"]},"creditMicros":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["delegationId","teammateId","teammateName","state","runIds","measurement","consumptionStatus","creditMicros"],"additionalProperties":false}}},"required":["protocolVersion","runId","currentAttempt","measurement","reservation","consumption","attempts","settlement"],"additionalProperties":false}},"required":["id","runId","conversationId","attempt","status","startedAt","completedAt","terminalReason","provenance","completionIds","outputs"],"additionalProperties":false}},"completionIds":{"type":"array","items":{"type":"string","minLength":1}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","ready","failed","archived"]}},"required":["id","title","kind","status"],"additionalProperties":false}}},"required":["id","flowStageId","name","status","input","attempts","completionIds","outputs"],"additionalProperties":false}},"resume":{"type":"object","properties":{"supported":{"type":"boolean"},"reason":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["supported","reason"],"additionalProperties":false}},"required":["protocolVersion","id","status","stages","resume"],"additionalProperties":false},"children":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"default":null,"type":["string","null"]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"projectId":{"type":"string"}},"required":["id","key","kind","objective","status","priority","owner","projectId"],"additionalProperties":false}},"links":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromTaskId":{"type":"string"},"toTaskId":{"type":"string"},"kind":{"type":"string","enum":["raised_from","resolved_by","duplicate_of","relates_to"]},"createdAt":{"type":"string"},"direction":{"type":"string","enum":["outgoing","incoming"]},"task":{"type":"object","properties":{"id":{"type":"string"},"key":{"default":null,"type":["string","null"]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"projectId":{"type":"string"}},"required":["id","key","kind","objective","status","priority","owner","projectId"],"additionalProperties":false}},"required":["id","fromTaskId","toTaskId","kind","createdAt","direction","task"],"additionalProperties":false}},"outputs":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","ready","failed","archived"]}},"required":["id","title","kind","status"],"additionalProperties":false}}},"required":["task","goal","pendingQuestions","pendingApproval","interaction","activity","plan","children","links","outputs"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchProjectsByProjectIdTasksByTaskId","tags":["projects","tasks"],"summary":"Update a project task","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"objective":{"type":"string","minLength":1,"maxLength":2000},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"position":{"type":"number"},"acceptanceCriteria":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500},"id":{"type":"string"}},"required":["text"]}},"assumptions":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":500},"id":{"type":"string"}},"required":["statement"]}},"killConditions":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"condition":{"type":"string","minLength":1,"maxLength":500},"id":{"type":"string"}},"required":["condition"]}},"expectedOutput":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url"]}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}}},{"type":"null"}]},"dependsOnTaskIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"maxItems":8,"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind"]},{"type":"null"}]},"stageId":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":10000000},{"type":"null"}]},"originConversationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"priority":{"type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"owner":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"]}]},{"type":"null"}]},"reviewer":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"]}]},{"type":"null"}]}}}}}}},"delete":{"operationId":"deleteProjectsByProjectIdTasksByTaskId","tags":["projects","tasks"],"summary":"Delete a project task","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/tasks/{task_id}/start":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdStart","tags":["projects","tasks"],"summary":"Queue a project task for its runner","description":"The caller becomes the run's identity: it executes with their connections and installations.","responses":{"200":{"description":"The queued task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/tasks/{task_id}/accept":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdAccept","tags":["projects","tasks"],"summary":"Accept a reviewed task","description":"Moves the task to done, or to the next flow stage when the project has one.","responses":{"200":{"description":"The accepted task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/tasks/{task_id}/review":{"get":{"operationId":"getProjectsByProjectIdTasksByTaskIdReview","tags":["projects","tasks"],"summary":"Read the pull request review for a task","responses":{"200":{"description":"Task review","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"ownerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"taskId":{"type":"string"},"sourceId":{"type":"string"},"target":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectionId":{"type":"string","minLength":1},"repositoryId":{"type":"string","minLength":1,"maxLength":300},"baseSha":{},"headSha":{}},"required":["provider","accountId","repository","pullRequestNumber","connectionId","repositoryId","baseSha","headSha"],"additionalProperties":false},"policyId":{"type":["string","null"]},"policyRevision":{"type":["string","null"]},"publicationStatus":{"type":"string","enum":["unpublished","publishing","published","unknown"]},"publishedUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","ownerUserId","projectId","taskId","sourceId","target","policyId","policyRevision","publicationStatus","publishedUrl","createdAt"],"additionalProperties":false},{"type":"null"}]}},"required":["review"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdReview","tags":["projects","tasks"],"summary":"Accept a task or ask for changes","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["accept","changes"]},"note":{"default":"","type":"string","maxLength":4000}},"required":["decision"]}}}}}},"/projects/{project_id}/tasks/{task_id}/comment":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdComment","tags":["projects","tasks"],"summary":"Comment on a task","description":"Posts to the task thread. Mentioning a teammate with @name wakes it.","responses":{"200":{"description":"The post","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["comment","update","event"]},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["person","teammate","system"]},"name":{"type":"string"},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"type":["string","null"]}},"required":["kind","name","userId","teammateId"],"additionalProperties":false},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","kind","author","body","createdAt"],"additionalProperties":false}},"required":["post"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":8000}},"required":["body"]}}}}}},"/projects/{project_id}/tasks/{task_id}/assign":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdAssign","tags":["projects","tasks"],"summary":"Hand a task to a teammate or person","description":"A teammate owner wakes and starts straight away under the caller's authority.","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"owner":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"]}]}},"required":["owner"]}}}}}},"/projects/{project_id}/tasks/{task_id}/request_review":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdRequestReview","tags":["projects","tasks"],"summary":"Send a task for review","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reviewer":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"]}]},"note":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["reviewer"]}}}}}},"/projects/{project_id}/tasks/{task_id}/block":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdBlock","tags":["projects","tasks"],"summary":"Block a task on someone","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"]}]}},"required":["reason","unblocker"]}}}}}},"/projects/{project_id}/tasks/{task_id}/accept_breakdown":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdAcceptBreakdown","tags":["projects","tasks"],"summary":"Accept a proposed breakdown","description":"Creates the sub-tasks of the given breakdown revision with their blockers and starts the ones that are ready.","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revision"]}}}}}},"/projects/{project_id}/tasks/{task_id}/escalate":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdEscalate","tags":["projects","tasks"],"summary":"Escalate a task","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["reason"]}}}}}},"/projects/{project_id}/tasks/{task_id}/send_again":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdSendAgain","tags":["projects","tasks"],"summary":"Send a stuck task to the queue again","description":"Redelivers the task's current run when its message was lost or its worker stopped. A run that is still going is left alone.","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/tasks/{task_id}/clear_escalation":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdClearEscalation","tags":["projects","tasks"],"summary":"Mark an escalation handled","responses":{"200":{"description":"The task","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/tasks/{task_id}/resolve":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdResolve","tags":["projects","tasks"],"summary":"Resolve a case","responses":{"200":{"description":"The case","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resolution":{"type":"string","minLength":1,"maxLength":4000}},"required":["resolution"]}}}}}},"/projects/{project_id}/tasks/{task_id}/send_reply":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdSendReply","tags":["projects","tasks"],"summary":"Send a reply to the person who raised a case","description":"Sends through the channel the case arrived on. A person always sends it.","responses":{"200":{"description":"The case","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":8000}},"required":["body"]}}}}}},"/projects/{project_id}/tasks/{task_id}/answer_standup":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdAnswerStandup","tags":["projects","tasks"],"summary":"Answer a standup","responses":{"200":{"description":"The standup","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string","maxLength":4000}},"required":["question","answer"]}},"skip":{"type":"boolean"}},"required":["answers"]}}}}}},"/projects/{project_id}/tasks/{task_id}/thread":{"get":{"operationId":"getProjectsByProjectIdTasksByTaskIdThread","tags":["projects","tasks"],"summary":"Read a task's thread","description":"Comments, teammate updates and events on the task, oldest first.","responses":{"200":{"description":"The thread","content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["comment","update","event"]},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["person","teammate","system"]},"name":{"type":"string"},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"type":["string","null"]}},"required":["kind","name","userId","teammateId"],"additionalProperties":false},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","kind","author","body","createdAt"],"additionalProperties":false}}},"required":["thread"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/tasks/{task_id}/standup_draft":{"get":{"operationId":"getProjectsByProjectIdTasksByTaskIdStandupDraft","tags":["projects","tasks"],"summary":"Draft standup answers from the caller's activity","responses":{"200":{"description":"Draft answers","content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string","maxLength":4000}},"required":["question","answer"],"additionalProperties":false}},"skip":{"type":"boolean"}},"required":["answers"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/tasks/{task_id}/links":{"post":{"operationId":"postProjectsByProjectIdTasksByTaskIdLinks","tags":["projects","tasks"],"summary":"Link two tasks","responses":{"200":{"description":"The link","content":{"application/json":{"schema":{"type":"object","properties":{"link":{"type":"object","properties":{"id":{"type":"string"},"fromTaskId":{"type":"string"},"toTaskId":{"type":"string"},"kind":{"type":"string","enum":["raised_from","resolved_by","duplicate_of","relates_to"]},"createdAt":{"type":"string"}},"required":["id","fromTaskId","toTaskId","kind","createdAt"],"additionalProperties":false}},"required":["link"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"toTaskId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["raised_from","resolved_by","duplicate_of","relates_to"]}},"required":["toTaskId","kind"]}}}}}},"/projects/{project_id}/tasks/{task_id}/links/{link_id}":{"delete":{"operationId":"deleteProjectsByProjectIdTasksByTaskIdLinksByLinkId","tags":["projects","tasks"],"summary":"Remove a task link","responses":{"200":{"description":"Successful response"},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"task_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"link_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/cases":{"post":{"operationId":"postProjectsByProjectIdCases","tags":["projects","tasks"],"summary":"Raise a case","description":"Sends a problem or request to the project's Triage, optionally linked to a task.","responses":{"200":{"description":"The case","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"default":null,"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"raisedFromTaskId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["title"]}}}}}},"/projects/{project_id}/standup":{"get":{"operationId":"getProjectsByProjectIdStandup","tags":["projects","tasks"],"summary":"Read the project's standup settings","responses":{"200":{"description":"Standup settings","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"string","enum":["everyone","people","teammates"]},"windowMinutes":{"type":"integer","minimum":15,"maximum":1440},"shareBindingId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pausedUntil":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["enabled","time","days","timeZone","questions","participants","windowMinutes","shareBindingId","pausedUntil"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchProjectsByProjectIdStandup","tags":["projects","tasks"],"summary":"Change the project's standup settings","responses":{"200":{"description":"Standup settings","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"string","enum":["everyone","people","teammates"]},"windowMinutes":{"type":"integer","minimum":15,"maximum":1440},"shareBindingId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pausedUntil":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["enabled","time","days","timeZone","questions","participants","windowMinutes","shareBindingId","pausedUntil"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"timeZone":{"type":"string","minLength":1,"maxLength":60},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"string","enum":["everyone","people","teammates"]},"windowMinutes":{"type":"integer","minimum":15,"maximum":1440},"shareBindingId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pausedUntil":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["enabled","time","days","timeZone","questions","participants","windowMinutes"]}}}}}},"/projects/{project_id}/reviews":{"get":{"operationId":"getProjectsByProjectIdReviews","tags":["projects","tasks"],"summary":"List pull request reviews","description":"The project's reviews, with its automatic review policies alongside.","responses":{"200":{"description":"Reviews","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"ownerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"taskId":{"type":"string"},"sourceId":{"type":"string"},"target":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectionId":{"type":"string","minLength":1},"repositoryId":{"type":"string","minLength":1,"maxLength":300},"baseSha":{},"headSha":{}},"required":["provider","accountId","repository","pullRequestNumber","connectionId","repositoryId","baseSha","headSha"],"additionalProperties":false},"policyId":{"type":["string","null"]},"policyRevision":{"type":["string","null"]},"publicationStatus":{"type":"string","enum":["unpublished","publishing","published","unknown"]},"publishedUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","ownerUserId","projectId","taskId","sourceId","target","policyId","policyRevision","publicationStatus","publishedUrl","createdAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"last_id":{"type":["string","null"]},"policies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"enabled":{"type":"boolean"},"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"tokenBudget":{"type":"integer","minimum":1000,"maximum":100000},"projectId":{"type":"string"},"ownerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectionId":{"type":"string"},"revision":{"type":"string"}},"required":["id","workspaceId","enabled","provider","accountId","repository","tokenBudget","projectId","ownerUserId","connectionId","revision"],"additionalProperties":false}}},"required":["object","data","has_more","last_id","policies"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"operationId":"postProjectsByProjectIdReviews","tags":["projects","tasks"],"summary":"Review the current pull request revision","responses":{"200":{"description":"Admitted review","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"ownerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"taskId":{"type":"string"},"sourceId":{"type":"string"},"target":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectionId":{"type":"string","minLength":1},"repositoryId":{"type":"string","minLength":1,"maxLength":300},"baseSha":{},"headSha":{}},"required":["provider","accountId","repository","pullRequestNumber","connectionId","repositoryId","baseSha","headSha"],"additionalProperties":false},"policyId":{"type":["string","null"]},"policyRevision":{"type":["string","null"]},"publicationStatus":{"type":"string","enum":["unpublished","publishing","published","unknown"]},"publishedUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","ownerUserId","projectId","taskId","sourceId","target","policyId","policyRevision","publicationStatus","publishedUrl","createdAt"],"additionalProperties":false},"reused":{"type":"boolean"}},"required":["review","reused"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["provider","accountId","repository","pullRequestNumber"],"additionalProperties":false}}}}}},"/projects/{project_id}/reviews/{review_id}/prepare_publication":{"post":{"operationId":"postProjectsByProjectIdReviewsByReviewIdPreparePublication","tags":["projects","tasks"],"summary":"Prepare a governed review for human publication","responses":{"200":{"description":"Publication preview","content":{"application/json":{"schema":{"type":"object","properties":{"completionId":{"type":"string"},"body":{"type":"string"},"outputId":{"type":"string"},"review":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"ownerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"taskId":{"type":"string"},"sourceId":{"type":"string"},"target":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectionId":{"type":"string","minLength":1},"repositoryId":{"type":"string","minLength":1,"maxLength":300},"baseSha":{},"headSha":{}},"required":["provider","accountId","repository","pullRequestNumber","connectionId","repositoryId","baseSha","headSha"],"additionalProperties":false},"policyId":{"type":["string","null"]},"policyRevision":{"type":["string","null"]},"publicationStatus":{"type":"string","enum":["unpublished","publishing","published","unknown"]},"publishedUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","ownerUserId","projectId","taskId","sourceId","target","policyId","policyRevision","publicationStatus","publishedUrl","createdAt"],"additionalProperties":false}},"required":["completionId","body","outputId","review"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"review_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/reviews/{review_id}/publish":{"post":{"operationId":"postProjectsByProjectIdReviewsByReviewIdPublish","tags":["projects","tasks"],"summary":"Publish the approved review to its exact commit","responses":{"200":{"description":"Published review","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"ownerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"taskId":{"type":"string"},"sourceId":{"type":"string"},"target":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectionId":{"type":"string","minLength":1},"repositoryId":{"type":"string","minLength":1,"maxLength":300},"baseSha":{},"headSha":{}},"required":["provider","accountId","repository","pullRequestNumber","connectionId","repositoryId","baseSha","headSha"],"additionalProperties":false},"policyId":{"type":["string","null"]},"policyRevision":{"type":["string","null"]},"publicationStatus":{"type":"string","enum":["unpublished","publishing","published","unknown"]},"publishedUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","ownerUserId","projectId","taskId","sourceId","target","policyId","policyRevision","publicationStatus","publishedUrl","createdAt"],"additionalProperties":false}},"required":["review"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"review_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"completionId":{"type":"string","minLength":1},"body":{"type":"string","minLength":1,"maxLength":60000},"sendToAuthor":{"default":false,"type":"boolean"}},"required":["completionId","body"],"additionalProperties":false}}}}}},"/projects/{project_id}/reviews/{review_id}/check_publication":{"post":{"operationId":"postProjectsByProjectIdReviewsByReviewIdCheckPublication","tags":["projects","tasks"],"summary":"Reconcile an uncertain publication without external writes","responses":{"200":{"description":"Publication state","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"ownerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"taskId":{"type":"string"},"sourceId":{"type":"string"},"target":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectionId":{"type":"string","minLength":1},"repositoryId":{"type":"string","minLength":1,"maxLength":300},"baseSha":{},"headSha":{}},"required":["provider","accountId","repository","pullRequestNumber","connectionId","repositoryId","baseSha","headSha"],"additionalProperties":false},"policyId":{"type":["string","null"]},"policyRevision":{"type":["string","null"]},"publicationStatus":{"type":"string","enum":["unpublished","publishing","published","unknown"]},"publishedUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","ownerUserId","projectId","taskId","sourceId","target","policyId","policyRevision","publicationStatus","publishedUrl","createdAt"],"additionalProperties":false}},"required":["review"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"review_id","schema":{"type":"string","minLength":1},"required":true}]}},"/projects/{project_id}/review_policy":{"patch":{"operationId":"patchProjectsByProjectIdReviewPolicy","tags":["projects","tasks"],"summary":"Set the automatic pull request review policy","responses":{"200":{"description":"Saved policy","content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"enabled":{"type":"boolean"},"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"tokenBudget":{"type":"integer","minimum":1000,"maximum":100000},"projectId":{"type":"string"},"ownerUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectionId":{"type":"string"},"revision":{"type":"string"}},"required":["id","workspaceId","enabled","provider","accountId","repository","tokenBudget","projectId","ownerUserId","connectionId","revision"],"additionalProperties":false}},"required":["policy"],"additionalProperties":false}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"enabled":{"type":"boolean","const":false},"id":{"type":"string","minLength":1}},"required":["enabled","id"],"additionalProperties":false},{"type":"object","properties":{"enabled":{"type":"boolean","const":true},"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"tokenBudget":{"default":20000,"type":"integer","minimum":1000,"maximum":100000}},"required":["enabled","provider","accountId","repository"],"additionalProperties":false}]}}}}}},"/projects/{project_id}/imports":{"post":{"operationId":"postProjectsByProjectIdImports","tags":["projects","tasks"],"summary":"Import an external issue as a task","description":"Send only the locator to read the issue and any existing import. Send the locator with the snapshot's expectedRevision and the task to import that approved snapshot.","responses":{"200":{"description":"The issue snapshot, or the imported task","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"key":{"default":null,"type":["string","null"]},"number":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"kind":{"default":"task","type":"string","enum":["task","case","standup"]},"objective":{"type":"string"},"description":{"default":null,"type":["string","null"]},"priority":{"default":"none","type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"default":null,"type":["string","null"]},"startAt":{"default":null,"type":["string","null"]},"dueAt":{"default":null,"type":["string","null"]},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"details":{"default":{},"type":"object","properties":{"pullRequest":{"type":"object","properties":{"repository":{},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"checks":{"type":"object","properties":{"headSha":{"type":"string","minLength":1},"state":{"type":"string","enum":["pending","passing","failing"]},"failing":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["name","url"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["headSha","state","failing","updatedAt"],"additionalProperties":false}},"required":["repository","number","url"],"additionalProperties":false},"fixUp":{"type":"object","properties":{"source":{"type":"string","enum":["review","ci","pull_request_review"]},"from":{"type":"string","minLength":1,"maxLength":200},"note":{"type":"string","maxLength":8000},"at":{"type":"string"}},"required":["source","from","note","at"],"additionalProperties":false},"breakdown":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"objective":{"type":"string","minLength":1,"maxLength":2000},"owner":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"dependsOn":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"priority":{"default":"medium","type":"string","enum":["none","low","medium","high","urgent"]}},"required":["key","objective","owner","dependsOn","priority"],"additionalProperties":false}},"proposedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"proposedAt":{"type":"string"},"acceptedBy":{"default":null,"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},{"type":"null"}]},"acceptedAt":{"default":null,"type":["string","null"]},"taskIds":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["revision","items","proposedBy","proposedAt","acceptedBy","acceptedAt","taskIds"],"additionalProperties":false},"case":{"type":"object","properties":{"source":{"type":"string","enum":["person","teammate","channel","email","webhook","github","integration"]},"requester":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"userId":{"default":null,"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","userId","teammateId","address"],"additionalProperties":false},"resolution":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"resolvedAt":{"default":null,"type":["string","null"]},"channel":{"default":null,"anyOf":[{"type":"object","properties":{"bindingId":{"type":"string"},"threadId":{"type":["string","null"]},"messageId":{"type":"string"},"subject":{"type":["string","null"]}},"required":["bindingId","threadId","messageId","subject"],"additionalProperties":false},{"type":"null"}]},"draftReply":{"default":null,"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"draftedBy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["body","draftedBy","at"],"additionalProperties":false},{"type":"null"}]}},"required":["source","requester","resolution","resolvedAt","channel","draftReply"],"additionalProperties":false},"standup":{"type":"object","properties":{"date":{"type":"string"},"questions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"participants":{"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"}},"required":["actor","name"],"additionalProperties":false}},"answers":{"default":[],"type":"array","items":{"type":"object","properties":{"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"name":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"additionalProperties":false}},"answeredAt":{"type":"string"},"skipped":{"type":"boolean"}},"required":["actor","name","answers","answeredAt"],"additionalProperties":false}},"summary":{"default":null,"type":["string","null"]},"summarisedAt":{"default":null,"type":["string","null"]},"closesAt":{"type":"string"}},"required":["date","questions","participants","answers","summary","summarisedAt","closesAt"],"additionalProperties":false},"escalation":{"type":"object","properties":{"to":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reason":{"type":"string"},"by":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"at":{"type":"string"}},"required":["to","reason","by","at"],"additionalProperties":false},"unblocker":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"],"additionalProperties":false}]},"reviewRounds":{"type":"integer","minimum":0,"maximum":9007199254740991},"handoff":{"type":"object","properties":{"teammateId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["teammateId","version"],"additionalProperties":false}},"additionalProperties":false},"acceptanceCriteria":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["id","text"],"additionalProperties":false}},"assumptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"statement":{"type":"string","minLength":1,"maxLength":500}},"required":["id","statement"],"additionalProperties":false}},"killConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"condition":{"type":"string","minLength":1,"maxLength":500}},"required":["id","condition"],"additionalProperties":false}},"retrospective":{"default":null,"anyOf":[{"type":"object","properties":{"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"statement":{"type":"string"},"outcome":{"type":"string","enum":["held","broke","unknown"]},"confidence":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["id","statement","outcome","confidence"],"additionalProperties":false}},"finishedAs":{"type":"string","enum":["done","cancelled"]},"createdAt":{"type":"string"}},"required":["assumptions","finishedAs","createdAt"],"additionalProperties":false},{"type":"null"}]},"expectedOutput":{"type":["string","null"]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","label"],"additionalProperties":false}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["links","notes"],"additionalProperties":false},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["forbiddenTools","notes"],"additionalProperties":false},{"type":"null"}]},"dependsOnTaskIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"status":{"type":"string","enum":["backlog","queued","running","blocked","review","done","cancelled"]},"source":{"type":"string","enum":["user","model"]},"blockedReason":{"anyOf":[{"type":"string","enum":["awaiting_input","awaiting_approval","awaiting_takeover","stalled","usage_limits","token_budget","missing_capability","dispatch_failed","run_failed","dependencies_unmet","kill_condition_met","machine_offline"]},{"type":"null"}]},"blockedDetail":{"type":["string","null"]},"stageId":{"type":["string","null"]},"flowSnapshot":{"anyOf":[{"type":"object","properties":{"stages":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":1,"maxLength":60},"instructions":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skillIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]},"requiresApprovalFor":{"default":[],"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"advance":{"type":"string","enum":["on_goal_complete","on_human_accept","on_council_ship"]}},"required":["id","name","instructions","teammateId","skillIds","mode","requiresApprovalFor","advance"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind","teammateId","model","mode"],"additionalProperties":false},{"type":"null"}]},"executionProfile":{"anyOf":[{"type":"string","const":"diff_review"},{"type":"null"}]},"createdByUserId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runnerIdentityUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"conversationId":{"type":["string","null"]},"originConversationId":{"type":["string","null"]},"goalId":{"type":["string","null"]},"dispatchTaskId":{"type":["string","null"]},"runId":{"type":["string","null"]},"completions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"stageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"conversationId":{"type":"string","minLength":1},"goalId":{"type":"string","minLength":1},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runAttempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"dispatchTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputIds":{"type":"array","items":{"type":"string","minLength":1}},"output":{"type":"string"},"evidence":{"default":[],"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1,"description":"The part of the objective this entry speaks to."},"route":{"type":"string","minLength":1,"description":"How it was established: what was run, read, or changed."},"evidence_surface":{"type":"string","minLength":1,"description":"Where the evidence lives: a tool result, run id, file, or source."},"status":{"type":"string","enum":["confirmed","approximate","supporting","blocked"],"description":"How strongly the evidence supports the claim."},"remaining_uncertainty":{"description":"What is still unproven about this claim.","type":"string"}},"required":["claim","route","evidence_surface","status"],"additionalProperties":false}},"councilReviewIds":{"type":"array","items":{"type":"string","minLength":1}},"approval":{"type":"object","properties":{"mode":{"type":"string","enum":["human","automated"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedByUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reviewedAt":{"type":["string","null"]}},"required":["mode","status","reviewedByUserId","reviewedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","stageId","conversationId","goalId","output","evidence","approval","createdAt"],"additionalProperties":false}},"position":{"type":"number"},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tokensSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"attentionVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","projectId","workspaceId","key","number","kind","objective","description","priority","parentTaskId","startAt","dueAt","owner","reviewer","details","acceptanceCriteria","assumptions","killConditions","retrospective","expectedOutput","context","constraints","dependsOnTaskIds","requireApprovalFor","status","source","blockedReason","blockedDetail","stageId","runner","createdByUserId","assigneeUserId","runnerIdentityUserId","conversationId","originConversationId","goalId","dispatchTaskId","completions","position","tokenBudget","tokensSpent","createdAt","updatedAt","startedAt","completedAt"],"additionalProperties":false},"sourceId":{"type":"string"},"reused":{"type":"boolean"}},"required":["task","sourceId","reused"],"additionalProperties":false},{"type":"object","properties":{"issue":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"connectionId":{"type":["string","null"]},"externalId":{"type":"string","minLength":1,"maxLength":200},"identifier":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":1000},"description":{"type":"string","maxLength":100000},"url":{"type":"string","format":"uri"},"revision":{"type":"string","pattern":"^[a-f0-9]{64}$"},"capturedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["provider","accountId","connectionId","externalId","identifier","title","description","url","revision","capturedAt"],"additionalProperties":false},"existingTaskId":{"type":["string","null"]}},"required":["issue","existingTaskId"],"additionalProperties":false}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"hide":false,"parameters":[{"in":"path","name":"project_id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"locator":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"issueId":{"type":"string","minLength":1,"maxLength":100}},"required":["provider","accountId","issueId"],"additionalProperties":false},"expectedRevision":{"type":"string","pattern":"^[a-f0-9]{64}$"},"task":{"type":"object","properties":{"objective":{"type":"string","minLength":1,"maxLength":2000},"kind":{"type":"string","enum":["task","case","standup"]},"acceptanceCriteria":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500},"id":{"type":"string"}},"required":["text"]}},"assumptions":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":500},"id":{"type":"string"}},"required":["statement"]}},"killConditions":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"condition":{"type":"string","minLength":1,"maxLength":500},"id":{"type":"string"}},"required":["condition"]}},"expectedOutput":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"sourceIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"links":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url"]}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}},{"type":"null"}]},"constraints":{"anyOf":[{"type":"object","properties":{"forbiddenTools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"notes":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}}},{"type":"null"}]},"dependsOnTaskIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"requireApprovalFor":{"maxItems":8,"type":"array","items":{"type":"string","enum":["read","reasoning","network","write","sandbox","orchestration","human","delegate"]}},"assigneeUserId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["conversation"]},"teammateId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"model":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string","enum":["chat","plan","build","explore"]},{"type":"null"}]}},"required":["kind"]},{"type":"null"}]},"stageId":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"tokenBudget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":10000000},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"priority":{"type":"string","enum":["none","low","medium","high","urgent"]},"parentTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"owner":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"]}]},{"type":"null"}]},"reviewer":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"teammate"},"id":{"type":"string","minLength":1}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","const":"person"},"userId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","userId"]}]},{"type":"null"}]}},"required":["objective"]}},"required":["locator","expectedRevision","task"],"additionalProperties":false},{"type":"object","properties":{"locator":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"accountId":{"type":"string","minLength":1,"maxLength":200},"repository":{"type":"string","minLength":1,"maxLength":300},"issueId":{"type":"string","minLength":1,"maxLength":100}},"required":["provider","accountId","issueId"],"additionalProperties":false}},"required":["locator"],"additionalProperties":false}]}}}}}}}}