{"openapi":"3.1.0","info":{"title":"LiveGraph API","version":"1.0.0","description":"LiveGraph — the live, editable agent canvas. Authenticate with the livegraph_session cookie or an x-api-key header. Errors share the {error, code?} envelope; validation failures return 400."},"paths":{"/auth/signup":{"post":{"summary":"Create an account — email + password, sets the session cookie.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":8},"next":{"type":"string","maxLength":300}},"required":["email","password"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/auth/login":{"post":{"summary":"Log in — sets the session cookie on valid credentials.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":8}},"required":["email","password"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/auth/logout":{"post":{"summary":"Log out — clears the session cookie.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/auth/verify":{"post":{"summary":"Verify an email address with the mailed token.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1}},"required":["token"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/auth/resend-verification":{"post":{"summary":"Resend the verification email.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"next":{"type":"string","maxLength":300}},"required":["email"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/auth/forgot-password":{"post":{"summary":"Request a password-reset email.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/auth/reset-password":{"post":{"summary":"Reset the password with a mailed token.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1},"password":{"type":"string","minLength":8}},"required":["token","password"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/auth/me":{"get":{"summary":"The signed-in user's profile + plan.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}},"patch":{"summary":"Update the caller's profile — notification webhook, approval veto window, autonomous gate decisions.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notifyWebhookUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"autoApproveWindowSeconds":{"anyOf":[{"type":"integer","minimum":30,"maximum":604800},{"type":"null"}]},"agentGateDecisions":{"type":"boolean"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/auth/github/connect":{"get":{"summary":"Start the GitHub connect flow for a logged-in user (stores the token as a credential — not a sign-in).","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","maxLength":300}}]}},"/auth/github":{"get":{"summary":"Start GitHub OAuth sign-in — redirects to GitHub.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","maxLength":300}}]}},"/auth/github/callback":{"get":{"summary":"GitHub OAuth callback — completes sign-in or the credential-connect flow.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"error","in":"query","required":false,"schema":{"type":"string"}}]}},"/auth/google":{"get":{"summary":"Start Google OAuth sign-in — redirects to Google.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","maxLength":300}}]}},"/auth/google/callback":{"get":{"summary":"Google OAuth callback — completes sign-in.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"error","in":"query","required":false,"schema":{"type":"string"}}]}},"/auth/google/connect":{"get":{"summary":"Start the Google connect flow — vends short-lived tokens as a credential, tied to the starting session.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","maxLength":300}}]}},"/auth/google/connect/callback":{"get":{"summary":"Google connect callback — stores the grant on the session that started the flow.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"error","in":"query","required":false,"schema":{"type":"string"}}]}},"/graphs":{"post":{"summary":"Create a graph — lands on the live editable canvas.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"project":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"get":{"summary":"List graphs the caller can see — owned + shared, with role and node count.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}]}},"/graphs/examples/live-reroute":{"post":{"summary":"Create the live-reroute demo graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/graphs/examples/guided-demo":{"post":{"summary":"Create the guided-tour demo graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/graphs/examples/agency":{"post":{"summary":"Create the agency example graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/graphs/{id}":{"get":{"summary":"A graph with its nodes and edges — the canvas model.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]},"delete":{"summary":"Delete a graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]},"patch":{"summary":"Update a graph's settings (name, description, flags).","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"project":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"entryNodeId":{"type":"string","format":"uuid"},"fallbackChain":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string","minLength":1}},"required":["provider","model"],"additionalProperties":false}},"defaultRunBudgetUsd":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"budgetDowngradeTarget":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string","minLength":1}},"required":["provider","model"],"additionalProperties":false},{"type":"null"}]},"contextFiles":{"type":"array","items":{"type":"string"}},"allowedCredentialProviders":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"assistant":{"type":"boolean"},"mcpSlug":{"anyOf":[{"type":"string","pattern":"^[a-z0-9-]{2,48}$"},{"type":"null"}]},"mcpPublic":{"type":"boolean"},"assistantPrefs":{"anyOf":[{"type":"object","properties":{"voiceId":{"type":"string","minLength":1,"maxLength":100},"voiceProvider":{"type":"string","enum":["elevenlabs","local","openai-compatible","openai"]},"tone":{"type":"string","enum":["professional","casual","terse"]},"persona":{"type":"string","maxLength":500},"identity":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":80},"avatarUrl":{"type":"string","maxLength":200,"pattern":"^\\/(?!\\/)[\\w.~/-]+$"},"tagline":{"type":"string","maxLength":140},"pronouns":{"type":"string","enum":["she","he","they"]}},"additionalProperties":false},"publishing":{"type":"object","properties":{"posts":{"type":"boolean"},"profile":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{id}/nodes":{"post":{"summary":"Add a node to a graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["supervisor","worker","router","reviewer"]},"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string","minLength":1},"tier":{"type":"string","enum":["flagship","standard","economy"]},"systemPrompt":{"type":"string"},"description":{"type":"string"},"tools":{"type":"array","items":{"type":"string"}},"fileAccessRoot":{"anyOf":[{"type":"string"},{"type":"null"}]},"fallbackChain":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string","minLength":1}},"required":["provider","model"],"additionalProperties":false}},"modelPolicy":{"anyOf":[{"type":"string","enum":["cheapest"]},{"type":"null"}]},"escalateOn":{"type":"array","items":{"type":"string","enum":["unparseable","empty","validation_failed"]}},"maxOutputTokens":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"cacheable":{"type":["boolean","null"]},"consensusGroup":{"anyOf":[{"type":"object","properties":{"edgeIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":2},"aggregatorNodeId":{"type":"string","format":"uuid"}},"required":["edgeIds","aggregatorNodeId"],"additionalProperties":false},{"type":"null"}]},"dispatchTargets":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"*"}]}},"sshTarget":{"anyOf":[{"type":"object","properties":{"host":{"type":"string","minLength":1},"username":{"type":"string","minLength":1},"allowedCommands":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"command":{"type":"string","minLength":1},"timeoutSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":900}},"required":["label","command"],"additionalProperties":false},"default":[]}},"required":["host","username"],"additionalProperties":false},{"type":"null"}]},"mcpServers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"url":{"type":"string","format":"uri"},"allowedTools":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"credentialProvider":{"type":"string","minLength":1},"headerName":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"},{"type":"null"}]},"headers":{"type":"object","additionalProperties":{"type":"string","maxLength":2000},"propertyNames":{"minLength":1,"maxLength":100,"pattern":"^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"}},"allowedWriteBranches":{"type":"array","items":{"type":"string","minLength":1}}},"required":["slug","url"],"additionalProperties":false}},{"type":"null"}]},"httpEndpoints":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"baseUrl":{"type":"string","format":"uri"},"credentialProvider":{"type":"string","minLength":1},"headerName":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"},{"type":"null"}]},"credentialHeaders":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":64},"propertyNames":{"minLength":1,"maxLength":100,"pattern":"^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"}},"credentialParams":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":64},"propertyNames":{"minLength":1,"maxLength":64}},"headerValuePrefix":{"type":"string","maxLength":32},"headerValuePrefixAlt":{"type":"object","properties":{"tokenPattern":{"type":"string","minLength":1,"maxLength":128},"prefix":{"type":"string","maxLength":32}},"required":["tokenPattern","prefix"],"additionalProperties":false},"followRedirects":{"type":"boolean"},"redirectScope":{"type":"string","enum":["any","apex-www"]},"responseFields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":30},"maxOutputBytes":{"type":"integer","minimum":1024,"maximum":262144},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1},"risk":{"type":"string","enum":["read","ensure","money","delete"]},"paths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":20},"allowVaultRefs":{"type":"boolean"},"openrouterBatch":{"type":"boolean"},"bodyEncoding":{"type":"string","enum":["json","form"]},"credentialExchange":{"type":"object","properties":{"tokenPath":{"type":"string","minLength":1,"maxLength":256},"clientIdField":{"type":"string","minLength":1,"maxLength":64},"clientSecretField":{"type":"string","minLength":1,"maxLength":64}},"required":["tokenPath"],"additionalProperties":false}},"required":["slug","baseUrl"],"additionalProperties":false}},{"type":"null"}]},"mapConfig":{"anyOf":[{"type":"object","properties":{"targetNodeId":{"type":"string","format":"uuid"},"aggregatorNodeId":{"type":"string","format":"uuid"},"maxConcurrency":{"type":"integer","minimum":1,"maximum":20},"maxItems":{"type":"integer","minimum":1,"maximum":500}},"required":["targetNodeId","aggregatorNodeId"],"additionalProperties":false},{"type":"null"}]},"approvalConfig":{"anyOf":[{"type":"object","properties":{"instructions":{"type":"string","maxLength":2000},"notifyWebhookUrl":{"type":"string","format":"uri","maxLength":2048},"timeoutSeconds":{"type":"integer","minimum":1,"maximum":604800},"secrets":{"type":"object","additionalProperties":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}(\\.[A-Za-z0-9_-]{1,64})?$"},"propertyNames":{"pattern":"^[A-Z_][A-Z0-9_]*$"}}},"additionalProperties":false},{"type":"null"}]},"toolApprovalPolicy":{"anyOf":[{"type":"object","properties":{"gatedTools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\w-]+(:[\\w-]+)?$"},"minItems":1,"maxItems":100},"instructions":{"type":"string","maxLength":2000},"notifyWebhookUrl":{"type":"string","format":"uri","maxLength":2048},"timeoutSeconds":{"type":"integer","minimum":1,"maximum":604800}},"required":["gatedTools"],"additionalProperties":false},{"type":"null"}]},"toolRiskPolicy":{"anyOf":[{"type":"object","properties":{"auto":{"type":"array","items":{"type":"string","enum":["read","ensure","money","delete"]},"maxItems":4,"default":[]},"gated":{"type":"array","items":{"type":"string","enum":["read","ensure","money","delete"]},"maxItems":4,"default":[]},"instructions":{"type":"string","maxLength":2000},"notifyWebhookUrl":{"type":"string","format":"uri","maxLength":2048},"timeoutSeconds":{"type":"integer","minimum":1,"maximum":604800}},"additionalProperties":false},{"type":"null"}]},"externalAgentConfig":{"anyOf":[{"type":"object","properties":{"repo":{"type":"string"},"baseRef":{"type":"string"},"command":{"type":"string"},"autoCreatePr":{"type":"boolean"},"instructions":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"contextFiles":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":10},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"required":["name","role","provider","model","position"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{id}/nodes/from-existing":{"post":{"summary":"Copy a node from another of the caller's graphs into this one.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceNodeId":{"type":"string","format":"uuid"},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"required":["sourceNodeId","position"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{id}/nodes/{nodeId}":{"patch":{"summary":"Update a node (prompt, model, tools, position) — live-editable mid-run.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"nodeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["supervisor","worker","router","reviewer"]},"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string","minLength":1},"tier":{"type":"string","enum":["flagship","standard","economy"]},"systemPrompt":{"type":"string"},"description":{"type":"string"},"tools":{"type":"array","items":{"type":"string"}},"fileAccessRoot":{"anyOf":[{"type":"string"},{"type":"null"}]},"fallbackChain":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string","minLength":1}},"required":["provider","model"],"additionalProperties":false}},"modelPolicy":{"anyOf":[{"type":"string","enum":["cheapest"]},{"type":"null"}]},"escalateOn":{"type":"array","items":{"type":"string","enum":["unparseable","empty","validation_failed"]}},"maxOutputTokens":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"cacheable":{"type":["boolean","null"]},"consensusGroup":{"anyOf":[{"type":"object","properties":{"edgeIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":2},"aggregatorNodeId":{"type":"string","format":"uuid"}},"required":["edgeIds","aggregatorNodeId"],"additionalProperties":false},{"type":"null"}]},"dispatchTargets":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"*"}]}},"sshTarget":{"anyOf":[{"type":"object","properties":{"host":{"type":"string","minLength":1},"username":{"type":"string","minLength":1},"allowedCommands":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"command":{"type":"string","minLength":1},"timeoutSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":900}},"required":["label","command"],"additionalProperties":false},"default":[]}},"required":["host","username"],"additionalProperties":false},{"type":"null"}]},"mcpServers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"url":{"type":"string","format":"uri"},"allowedTools":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"credentialProvider":{"type":"string","minLength":1},"headerName":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"},{"type":"null"}]},"headers":{"type":"object","additionalProperties":{"type":"string","maxLength":2000},"propertyNames":{"minLength":1,"maxLength":100,"pattern":"^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"}},"allowedWriteBranches":{"type":"array","items":{"type":"string","minLength":1}}},"required":["slug","url"],"additionalProperties":false}},{"type":"null"}]},"httpEndpoints":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"baseUrl":{"type":"string","format":"uri"},"credentialProvider":{"type":"string","minLength":1},"headerName":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"},{"type":"null"}]},"credentialHeaders":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":64},"propertyNames":{"minLength":1,"maxLength":100,"pattern":"^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"}},"credentialParams":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":64},"propertyNames":{"minLength":1,"maxLength":64}},"headerValuePrefix":{"type":"string","maxLength":32},"headerValuePrefixAlt":{"type":"object","properties":{"tokenPattern":{"type":"string","minLength":1,"maxLength":128},"prefix":{"type":"string","maxLength":32}},"required":["tokenPattern","prefix"],"additionalProperties":false},"followRedirects":{"type":"boolean"},"redirectScope":{"type":"string","enum":["any","apex-www"]},"responseFields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":30},"maxOutputBytes":{"type":"integer","minimum":1024,"maximum":262144},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1},"risk":{"type":"string","enum":["read","ensure","money","delete"]},"paths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":20},"allowVaultRefs":{"type":"boolean"},"openrouterBatch":{"type":"boolean"},"bodyEncoding":{"type":"string","enum":["json","form"]},"credentialExchange":{"type":"object","properties":{"tokenPath":{"type":"string","minLength":1,"maxLength":256},"clientIdField":{"type":"string","minLength":1,"maxLength":64},"clientSecretField":{"type":"string","minLength":1,"maxLength":64}},"required":["tokenPath"],"additionalProperties":false}},"required":["slug","baseUrl"],"additionalProperties":false}},{"type":"null"}]},"mapConfig":{"anyOf":[{"type":"object","properties":{"targetNodeId":{"type":"string","format":"uuid"},"aggregatorNodeId":{"type":"string","format":"uuid"},"maxConcurrency":{"type":"integer","minimum":1,"maximum":20},"maxItems":{"type":"integer","minimum":1,"maximum":500}},"required":["targetNodeId","aggregatorNodeId"],"additionalProperties":false},{"type":"null"}]},"approvalConfig":{"anyOf":[{"type":"object","properties":{"instructions":{"type":"string","maxLength":2000},"notifyWebhookUrl":{"type":"string","format":"uri","maxLength":2048},"timeoutSeconds":{"type":"integer","minimum":1,"maximum":604800},"secrets":{"type":"object","additionalProperties":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}(\\.[A-Za-z0-9_-]{1,64})?$"},"propertyNames":{"pattern":"^[A-Z_][A-Z0-9_]*$"}}},"additionalProperties":false},{"type":"null"}]},"toolApprovalPolicy":{"anyOf":[{"type":"object","properties":{"gatedTools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\w-]+(:[\\w-]+)?$"},"minItems":1,"maxItems":100},"instructions":{"type":"string","maxLength":2000},"notifyWebhookUrl":{"type":"string","format":"uri","maxLength":2048},"timeoutSeconds":{"type":"integer","minimum":1,"maximum":604800}},"required":["gatedTools"],"additionalProperties":false},{"type":"null"}]},"toolRiskPolicy":{"anyOf":[{"type":"object","properties":{"auto":{"type":"array","items":{"type":"string","enum":["read","ensure","money","delete"]},"maxItems":4,"default":[]},"gated":{"type":"array","items":{"type":"string","enum":["read","ensure","money","delete"]},"maxItems":4,"default":[]},"instructions":{"type":"string","maxLength":2000},"notifyWebhookUrl":{"type":"string","format":"uri","maxLength":2048},"timeoutSeconds":{"type":"integer","minimum":1,"maximum":604800}},"additionalProperties":false},{"type":"null"}]},"externalAgentConfig":{"anyOf":[{"type":"object","properties":{"repo":{"type":"string"},"baseRef":{"type":"string"},"command":{"type":"string"},"autoCreatePr":{"type":"boolean"},"instructions":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"contextFiles":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":10},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"delete":{"summary":"Delete a node from a graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"nodeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{id}/edges":{"post":{"summary":"Add a routing edge between nodes.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceNodeId":{"type":"string","format":"uuid"},"targetNodeId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["explicit","auto","consensus"],"default":"explicit"},"condition":{"type":"string","enum":["default","on_tool_call","on_classifier_result","manual"]},"priority":{"type":"integer"},"label":{"type":"string"}},"required":["sourceNodeId","targetNodeId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{id}/edges/{edgeId}":{"patch":{"summary":"Update an edge (condition, target) — reroutes a running execution when live.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"edgeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetNodeId":{"type":"string","format":"uuid"},"condition":{"type":"string","enum":["default","on_tool_call","on_classifier_result","manual"]},"priority":{"type":"integer"},"label":{"type":"string"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"delete":{"summary":"Delete a routing edge.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"edgeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{id}/versions":{"get":{"summary":"Version history of a graph's saved states.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{id}/diff":{"get":{"summary":"Diff two saved versions of a graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":true,"schema":{"type":"integer","minimum":0}},{"name":"to","in":"query","required":false,"schema":{"type":"integer","minimum":0}}]}},"/graphs/{id}/restore":{"post":{"summary":"Restore a graph to a saved version.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0}},"required":["version"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/agents":{"get":{"summary":"List agent nodes across every graph the caller owns — the pick-list for 'add existing agent'.","tags":["agents"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}]}},"/graphs/{id}/agents/quick-add":{"post":{"summary":"Quick-add an agent node from a short brief — an extraction LLM fills role/prompt/model.","tags":["agents"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1},"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string"},"fileAccessRoot":{"type":"string"},"tools":{"type":"array","items":{"type":"string"}},"dispatchTargets":{"type":"array","items":{"type":"string","format":"uuid"}},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"required":["description"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/generate":{"post":{"summary":"Generate a whole graph from a prompt — one bounded LLM call, applied directly to the canvas.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000}},"required":["description"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/import/flowise":{"post":{"summary":"Import a Flowise chatflow export as a LiveGraph graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flow":{},"name":{"type":"string","minLength":1,"maxLength":200},"useDefaultModel":{"type":"boolean"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/import/agent-builder":{"post":{"summary":"Import an OpenAI Agent Builder export (Agents SDK code, parsed without executing) as a graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":1000000},"name":{"type":"string","minLength":1,"maxLength":200},"useDefaultModel":{"type":"boolean"}},"required":["code"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{graphId}/nodes/{nodeId}/mcp-pins":{"get":{"summary":"List a node's MCP tool pins — pinned definition plus any pending (changed) definition awaiting review.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"nodeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/nodes/{nodeId}/mcp-pins/{pinId}/accept":{"post":{"summary":"Accept a changed MCP tool definition — the pending definition becomes the pin and tools flow again.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"nodeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pinId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/runs":{"post":{"summary":"Start a run — dispatches the entry hop and streams via WS.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"graphId":{"type":"string","format":"uuid"},"input":{},"mode":{"type":"string","enum":["pinned","live"],"default":"pinned"},"maxCostUsd":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"budgetDowngradeTarget":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string","minLength":1}},"required":["provider","model"],"additionalProperties":false},{"type":"null"}]},"modelOverride":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string","minLength":1}},"required":["provider","model"],"additionalProperties":false},"conversationId":{"type":"string","format":"uuid"}},"required":["graphId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/runs/{id}/rerun":{"post":{"summary":"Rerun — a fresh run from the same input and graph snapshot.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/runs/{id}/routing-overlay":{"post":{"summary":"Redirect a live run's next hop — the canvas edge-drag lands here.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"edgeId":{"type":"string","format":"uuid"},"targetNodeId":{"type":"string","format":"uuid"}},"required":["edgeId","targetNodeId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/runs/{id}/approve":{"post":{"summary":"Approve a gate — resumes the held hop with optional input/declared secrets.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{},"reason":{"type":"string","maxLength":2000},"secrets":{"type":"object","additionalProperties":{"type":"string","maxLength":4000}}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/runs/{id}/deny-tool-approval":{"post":{"summary":"Deny a pending tool approval on a run.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":2000}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/runs/{id}/share":{"post":{"summary":"Create a read-only embed/share token for one run.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ttlSeconds":{"type":"integer","minimum":60,"maximum":86400}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/runs/{id}/pause":{"post":{"summary":"Pause a run at the next step/hop boundary — resumable via POST /runs/:id/resume.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/runs/{id}/cancel":{"post":{"summary":"Cancel a run — in-flight hops finish, queued hops no-op.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/runs/{id}/request-changes":{"post":{"summary":"Send reviewer feedback back into a run (request-changes on a gated hop).","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"feedback":{"type":"string","minLength":1,"maxLength":4000}},"required":["feedback"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/runs/{id}/memory-proposals/{index}/apply":{"post":{"summary":"Apply a run's memory proposal — writes the file in the worktree and commits it (queued to the worker).","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","minimum":0}}]}},"/runs/{id}/memory-proposals/{index}/reject":{"post":{"summary":"Reject a run's memory proposal — no worktree write.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","minimum":0}}]}},"/runs/{id}/memory-proposals":{"post":{"summary":"Promote selected hops' memory proposals to the run's proposal list.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sharedContextIndex":{"type":"integer","minimum":0},"path":{"type":"string","minLength":1,"maxLength":500}},"required":["sharedContextIndex"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/runs/{id}/resume":{"post":{"summary":"Resume an errored/budget-exceeded/paused run — optionally with a new cost ceiling.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"maxCostUsd":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{graphId}/runs/{runId}/fork":{"post":{"summary":"Fork a run at a hop — branches execution with optional overrides and mode.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromSequence":{"type":"integer","minimum":0},"mode":{"type":"string","enum":["pinned","live"]},"overrides":{"type":"object","properties":{"input":{},"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"model":{"type":"string","minLength":1},"systemPrompt":{"type":"string"}},"additionalProperties":false}},"required":["fromSequence"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/runs/{id}":{"get":{"summary":"A run with its hop/event detail — the live run view.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{id}/runs":{"get":{"summary":"Runs on a graph — paginated, optionally narrowed to one launcher.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"launcher","in":"query","required":false,"schema":{"anyOf":[{"type":"string","const":"me"},{"type":"string","format":"uuid"}]}}]}},"/approvals":{"get":{"summary":"Pending approval gates across the caller's approvable graphs.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}]}},"/approvals/decisions":{"get":{"summary":"Tool-approval decision history across the caller's graphs.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}]}},"/graphs/{graphId}/nodes/{nodeId}/conversations":{"get":{"summary":"Conversation history for one node across recent runs.","tags":["runs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"nodeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}]}},"/overview":{"get":{"summary":"Dashboard rollup for the caller's graphs — recent runs, awaiting-approval badges, schedules.","tags":["dashboard"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/graphs/{graphId}/schedules":{"post":{"summary":"Create a cron schedule that fires runs on the graph.","tags":["schedules"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"input":{},"cronExpression":{"type":"string"},"mode":{"type":"string","enum":["pinned","live"],"default":"pinned"},"enabled":{"type":"boolean","default":true},"quiet":{"type":"boolean","default":false},"queueGate":{"anyOf":[{"type":"object","properties":{"repo":{"type":"string","pattern":"^[a-zA-Z0-9_.-]+\\/[a-zA-Z0-9_.-]+$"},"branchPrefix":{"type":"string","minLength":1,"maxLength":80},"signal":{"type":"boolean"},"baseBranch":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*\\.md$"},"idPrefix":{"type":"string","pattern":"^[a-z]{1,4}-$"},"wipLimit":{"type":"integer","exclusiveMinimum":0,"maximum":20},"dailyCap":{"type":"integer","exclusiveMinimum":0,"maximum":500},"dailyUsd":{"type":"number","exclusiveMinimum":0,"maximum":10000},"refillNodeId":{"type":"string","format":"uuid"},"lowWaterMark":{"type":"integer","exclusiveMinimum":0,"maximum":20},"artifactDir":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-zA-Z0-9_./-]+$"}},"required":["repo"],"additionalProperties":false},{"type":"null"}]}},"required":["name","input","cronExpression"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"get":{"summary":"List a graph's schedules.","tags":["schedules"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/schedules/{id}":{"patch":{"summary":"Update a schedule (cron, input, enabled).","tags":["schedules"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"input":{},"cronExpression":{"type":"string"},"mode":{"type":"string","enum":["pinned","live"]},"enabled":{"type":"boolean"},"quiet":{"type":"boolean"},"queueGate":{"anyOf":[{"type":"object","properties":{"repo":{"type":"string","pattern":"^[a-zA-Z0-9_.-]+\\/[a-zA-Z0-9_.-]+$"},"branchPrefix":{"type":"string","minLength":1,"maxLength":80},"signal":{"type":"boolean"},"baseBranch":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*\\.md$"},"idPrefix":{"type":"string","pattern":"^[a-z]{1,4}-$"},"wipLimit":{"type":"integer","exclusiveMinimum":0,"maximum":20},"dailyCap":{"type":"integer","exclusiveMinimum":0,"maximum":500},"dailyUsd":{"type":"number","exclusiveMinimum":0,"maximum":10000},"refillNodeId":{"type":"string","format":"uuid"},"lowWaterMark":{"type":"integer","exclusiveMinimum":0,"maximum":20},"artifactDir":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-zA-Z0-9_./-]+$"}},"required":["repo"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"delete":{"summary":"Delete a schedule.","tags":["schedules"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/schedules/{id}/runs":{"get":{"summary":"Runs fired by a schedule.","tags":["schedules"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/schedules/{id}/skip":{"post":{"summary":"Skip a schedule's next firing.","tags":["schedules"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]},"delete":{"summary":"Cancel a pending skip on a schedule.","tags":["schedules"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/schedules/{id}/run":{"post":{"summary":"Fire a schedule immediately.","tags":["schedules"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/schedules/{id}/queue-items/{itemId}":{"post":{"summary":"Act on a queue item (done/drop/reopen/snooze/accept/edit/move/answer/retry) — writes through to the queue file the loop reads.","tags":["queue"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z]{1,4}-\\d{1,6}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["done","drop","reopen","snooze","unsnooze","accept","edit","move","answer","retry"]},"note":{"type":"string","maxLength":300},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"title":{"type":"string","minLength":1,"maxLength":300},"detail":{"type":"string","maxLength":1000},"position":{"type":"integer","minimum":0}},"required":["action"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{graphId}/schedules/{id}/queue-items":{"post":{"summary":"Add an item to a schedule's queue file.","tags":["queue"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"detail":{"type":"string","maxLength":1000},"position":{"type":"integer","minimum":0}},"required":["title"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{graphId}/webhooks":{"post":{"summary":"Create a webhook trigger — inbound token URL that fires a run.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"mode":{"type":"string","enum":["pinned","live"],"default":"pinned"},"ciRoute":{"anyOf":[{"type":"object","properties":{"branchPrefix":{"type":"string","maxLength":80},"successNodeId":{"type":"string","format":"uuid"},"failureNodeId":{"type":"string","format":"uuid"},"continueScheduleId":{"type":"string","format":"uuid"},"deployVerify":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":2048},"probeSite":{"type":"string","minLength":1,"maxLength":64},"smokePath":{"type":"string","pattern":"^\\/","maxLength":200},"appEnv":{"type":"object","properties":{"appName":{"type":"string","minLength":1,"maxLength":60},"repo":{"type":"string","pattern":"^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$"},"domains":{"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"maxItems":10}},"required":["appName","repo","domains"],"additionalProperties":false}},"required":["url"],"additionalProperties":false}},"required":["branchPrefix","failureNodeId"],"additionalProperties":false},{"type":"null"}]}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"get":{"summary":"List a graph's webhook triggers (secrets never returned).","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/webhooks/{id}":{"patch":{"summary":"Update a webhook trigger (source filter, CI route, enabled).","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"mode":{"type":"string","enum":["pinned","live"]},"enabled":{"type":"boolean"},"ciRoute":{"anyOf":[{"type":"object","properties":{"branchPrefix":{"type":"string","maxLength":80},"successNodeId":{"type":"string","format":"uuid"},"failureNodeId":{"type":"string","format":"uuid"},"continueScheduleId":{"type":"string","format":"uuid"},"deployVerify":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":2048},"probeSite":{"type":"string","minLength":1,"maxLength":64},"smokePath":{"type":"string","pattern":"^\\/","maxLength":200},"appEnv":{"type":"object","properties":{"appName":{"type":"string","minLength":1,"maxLength":60},"repo":{"type":"string","pattern":"^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$"},"domains":{"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"maxItems":10}},"required":["appName","repo","domains"],"additionalProperties":false}},"required":["url"],"additionalProperties":false}},"required":["branchPrefix","failureNodeId"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"delete":{"summary":"Delete a webhook trigger.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/webhooks/{id}/rotate":{"post":{"summary":"Rotate a webhook trigger's fire token.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/webhooks/{id}/signing-secret":{"post":{"summary":"Attach a signing secret — fires only on a valid HMAC of the raw body.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","pattern":"^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"delete":{"summary":"Remove a webhook trigger's signing secret.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/webhooks/dismiss-skips":{"post":{"summary":"Clear skip-reason notices on a graph's triggers.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/env-sync":{"post":{"summary":"Re-run env sync for the graph's notices — clears them once variables are set.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/webhooks/{id}/runs":{"get":{"summary":"Runs fired by one webhook trigger.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}]}},"/webhooks/{token}":{"post":{"summary":"Fire a webhook trigger — public, token-gated, HMAC-verified when a signing secret is set.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}]}},"/webhooks/logs":{"get":{"summary":"Webhook delivery log across the caller's viewable graphs (redacted payloads).","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}]}},"/webhooks/logs/{id}/retry":{"post":{"summary":"Re-dispatch a logged webhook delivery — replays through the same processor with every guard re-applied.","tags":["webhooks"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/commits":{"get":{"summary":"Worktree commits made by a graph's runs.","tags":["commits"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/commits/{commitId}/diff":{"get":{"summary":"Diff of one worktree commit — computed on the worker.","tags":["commits"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/pr-status":{"get":{"summary":"PR status for a graph's commits — remote URL lookups run on the worker.","tags":["commits"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/graphs/{graphId}/commits/{commitId}/pr":{"post":{"summary":"Push the commit's branch and open a pull request — executed on the worker.","tags":["commits"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{id}/credentials":{"post":{"summary":"Add a provider credential (API key) to a graph — node-scoped or graph-wide fallback.","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai","xai","openrouter","openai-compatible","groq","cerebras","mistral","github-models","nvidia","mock","transform","devin","github-copilot","cursor","cli-agent"]},"apiKey":{"type":"string","minLength":1},"label":{"type":"string"},"nodeId":{"type":"string","format":"uuid"},"baseUrl":{"type":"string","format":"uri"}},"required":["provider","apiKey"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"get":{"summary":"List a graph's provider credentials (summaries only — key material is never returned).","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}]}},"/graphs/{id}/credentials/{credentialId}":{"delete":{"summary":"Delete a provider credential from a graph.","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"credentialId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/me/credentials":{"post":{"summary":"Store a user credential (encrypted) — upserts on provider.","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"apiKey":{"type":"string","minLength":1},"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":50},"baseUrl":{"type":"string","format":"uri"}},"required":["provider","apiKey"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"get":{"summary":"List the caller's credentials (summaries — no key material).","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/me/credentials/bulk":{"post":{"summary":"Store several credentials at once — per-item results, never fails the batch.","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{},"minItems":1,"maxItems":50}},"required":["items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/me/credentials/{id}":{"delete":{"summary":"Delete a stored credential.","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/api/user-credentials/{provider}/test":{"post":{"summary":"Probe a stored credential against its provider API (v1 alias).","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}]}},"/user-credentials/{provider}/test":{"post":{"summary":"Probe a stored credential against its provider API.","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}]}},"/me/allowlists":{"get":{"summary":"The effective outbound HTTP endpoint + MCP server allowlists (what credentialed calls may reach).","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/me/credential-references":{"get":{"summary":"Where the caller's graphs reference credential env vars — for save-time allowlist validation.","tags":["credentials"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/me/connections/status":{"get":{"summary":"Health status of the caller's linked connections (GitHub token validity, etc.).","tags":["connections"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/services/connect":{"post":{"summary":"Connect a service — store its credential, resolve it registry-first (MCP directory row) or as a generic HTTP endpoint (origin allowlist + authenticated probe), optionally pin it onto nodes.","tags":["connections"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","minLength":1,"maxLength":80},"baseUrl":{"type":"string","format":"uri"},"authStyle":{"type":"string","enum":["bearer","apikey","basic","query"]},"headerName":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"},"headerValuePrefix":{"type":"string","maxLength":32},"queryParam":{"type":"string","minLength":1,"maxLength":64},"credentialName":{"type":"string","minLength":1,"maxLength":100},"credentialValue":{"type":"string","minLength":1,"maxLength":4096},"pingPath":{"type":"string","maxLength":200},"pinTo":{"type":"array","items":{"type":"object","properties":{"graphId":{"type":"string","format":"uuid"},"nodeId":{"type":"string","format":"uuid"}},"required":["graphId","nodeId"],"additionalProperties":false},"maxItems":10}},"required":["service"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/integrations":{"get":{"summary":"List the caller's connected third-party integrations (GitHub, Linear, …).","tags":["integrations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/integrations/{provider}":{"delete":{"summary":"Disconnect an integration — removes its stored credential.","tags":["integrations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.:-]{0,63}$"}}]}},"/integrations/{provider}/discovery":{"get":{"summary":"Provider-specific discovery (e.g. repos the connected account can see).","tags":["integrations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.:-]{0,63}$"}}]}},"/templates":{"post":{"summary":"Save a graph as a reusable template.","tags":["templates"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"graphId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["graphId","name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"get":{"summary":"List the caller's saved templates.","tags":["templates"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/templates/{id}/instantiate":{"post":{"summary":"Create a new live graph from a template.","tags":["templates"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/starters":{"get":{"summary":"Starter catalog — curated starters plus the caller's own private imports.","tags":["starters"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/starters/import":{"post":{"summary":"Import a GitHub repo as a private starter — read-only tree walk, secrets scan, contract synthesis.","tags":["starters"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","pattern":"^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$"},"ref":{"type":"string","maxLength":255},"name":{"type":"string","minLength":1,"maxLength":80}},"required":["repo"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{id}/routing-changes":{"get":{"summary":"Versioned audit trail of graph mutations (before/after diffs per change).","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}]}},"/graphs/{id}/members":{"get":{"summary":"List a graph's members and roles.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}]},"post":{"summary":"Add a member to a graph (owner/editor/viewer).","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["viewer","editor"]}},"required":["email","role"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{id}/members/{userId}":{"patch":{"summary":"Change a graph member's role.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthlySpendCapUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["monthlySpendCapUsd"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"delete":{"summary":"Remove a member from a graph.","tags":["graphs"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/workspaces/mine":{"get":{"summary":"The caller's workspaces with their role in each.","tags":["workspaces"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/workspaces/{id}/members":{"get":{"summary":"List a workspace's members.","tags":["workspaces"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/workspaces/{id}/invites":{"post":{"summary":"Invite a member to a workspace — email or shareable link.","tags":["workspaces"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"expiresInDays":{"type":"integer","minimum":1,"maximum":90},"deliver":{"type":"boolean"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"get":{"summary":"List a workspace's pending invites.","tags":["workspaces"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/workspaces/{id}/invites/{inviteId}":{"delete":{"summary":"Revoke a pending workspace invite.","tags":["workspaces"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"inviteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/workspaces/{id}/members/{userId}":{"delete":{"summary":"Remove a member from a workspace.","tags":["workspaces"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/invites/{token}":{"get":{"summary":"Look up a workspace invite by token (pre-accept preview — public).","tags":["workspaces"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":1}}]}},"/invites/{token}/accept":{"post":{"summary":"Accept a workspace invite — adds the signed-in user as a member.","tags":["workspaces"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":1}}]}},"/files":{"get":{"summary":"List indexed files (worktree writes, uploads, outputs) — keyset-paginated.","tags":["files"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["worktree","file_root","pdfwork","github"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}}]}},"/files/{id}/content":{"get":{"summary":"Preview a file's contents (reads the worktree/store filesystem).","tags":["files"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]},"put":{"summary":"Edit a file's contents — bounded by the preview byte cap.","tags":["files"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":524288}},"required":["text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/files/{id}/download":{"get":{"summary":"Download a file with its stored content type.","tags":["files"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/files/{id}":{"get":{"summary":"File metadata (path, source, graph, size).","tags":["files"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/files/repos":{"get":{"summary":"List repos reachable via the caller's GitHub credential.","tags":["files"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"repo","in":"query","required":false,"schema":{"type":"string","maxLength":200}}]}},"/files/repos/{owner}/{repo}/tree":{"get":{"summary":"Browse a GitHub repo's directory tree via the caller's credential (60s cached).","tags":["files"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]+$"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]+$"}},{"name":"ref","in":"query","required":false,"schema":{"type":"string","maxLength":255}},{"name":"path","in":"query","required":false,"schema":{"type":"string","maxLength":512}}]}},"/files/repos/{owner}/{repo}/file":{"get":{"summary":"Fetch a single file's contents from a GitHub repo via the caller's credential.","tags":["files"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]+$"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]+$"}},{"name":"ref","in":"query","required":false,"schema":{"type":"string","maxLength":255}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512}}]}},"/me/api-keys":{"get":{"summary":"List the caller's API keys (prefixes and scopes only — key material is shown once at creation).","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}},"post":{"summary":"Create an API key — optionally scoped to one graph + action set. The raw key is returned once.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","maxLength":120,"default":""},"scope":{"type":"object","properties":{"graphIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":20},"actions":{"type":"array","items":{"type":"string","enum":["runs:create","runs:read","runs:share"]},"minItems":1}},"required":["graphIds","actions"],"additionalProperties":false}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/me/api-keys/{id}":{"delete":{"summary":"Revoke an API key.","tags":["auth"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/ws/embed/runs/{runId}":{"get":{"summary":"WebSocket — reduced run-event stream for an embed share token (t query param).","tags":["ws"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/ws/graphs/{graphId}/runs":{"get":{"summary":"WebSocket — live run-event stream for a graph (viewer role required).","tags":["ws"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/embed/runs/{id}":{"get":{"summary":"Public, token-gated, read-only run view — the signed share token (query ?t=) is the whole authorization.","tags":["embed"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/mcp/servers":{"get":{"summary":"MCP servers reachable under the caller's configured allowlists.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/mcp/discover":{"post":{"summary":"Discover an MCP server's tools (and pin them).","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"credentialProvider":{"type":"string","minLength":1},"headerName":{"type":"string","minLength":1},"headers":{"type":"object","additionalProperties":{"type":"string","maxLength":2000},"propertyNames":{"minLength":1,"maxLength":100}}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/mcp/registry/search":{"get":{"summary":"Search the curated MCP registry.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10}},{"name":"verifiedOnly","in":"query","required":false,"schema":{"type":"boolean","default":false}}]}},"/mcp/registry/server-url":{"get":{"summary":"Resolve a registry server's connect URL.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"qualifiedName","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}]}},"/mcp/marketplace/search":{"post":{"summary":"Search the MCP marketplace catalog.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":1,"maxLength":200},"limit":{"type":"integer","minimum":1,"maximum":50,"default":15}},"required":["q"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/mcp/oauth/connect":{"get":{"summary":"Start an OAuth connect flow for a remote MCP server — discovers its authorization server and redirects to it.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri","maxLength":500}},{"name":"name","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"}},{"name":"next","in":"query","required":false,"schema":{"type":"string","maxLength":300}}]}},"/mcp/oauth/callback":{"get":{"summary":"MCP OAuth callback — exchanges the code and stores the grant as an mcp_oauth_* credential plus an mcp_servers row.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"error","in":"query","required":false,"schema":{"type":"string"}}]}},"/mcp/serve/{slug}":{"post":{"summary":"Serve a published graph as an MCP endpoint — JSON-RPC tools/list + tools/call. Public graphs answer anonymous callers.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}]}},"/mcp":{"post":{"summary":"Workspace MCP endpoint — JSON-RPC 2.0. Tools: list_graphs, get_graph, start_run, get_run, pause_run, resume_run, cancel_run, share_run, search_runs, draft_node, create_graph, update_graph_nodes, get_canvas_url, get_started, list_templates, instantiate_template, provision_credential. Auth via X-Api-Key or session.","tags":["mcp"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/config/sandbox-provider":{"get":{"summary":"The deployment's configured sandbox provider, if any.","tags":["meta"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/config/public":{"get":{"summary":"Public feature flags for the logged-out UI — OAuth buttons, billing presence, Turnstile site key. Non-sensitive only.","tags":["meta"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/status/public":{"get":{"summary":"Public status page data — db liveness, in-flight run count, last event timestamp. Coarse aggregates only.","tags":["meta"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/voice/transcribe":{"post":{"summary":"Transcribe an audio clip (opus/webm body, ~10MB max) to text.","tags":["voice"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/voice/voices":{"get":{"summary":"List available TTS voices for the configured provider.","tags":["voice"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/voice/speak":{"post":{"summary":"Synthesize speech for a text snippet — returns audio.","tags":["voice"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1},"graphId":{"type":"string","format":"uuid"},"voice":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","local","openai-compatible","openai"]},"voiceId":{"type":"string","minLength":1,"maxLength":100}},"required":["provider","voiceId"],"additionalProperties":false}},"required":["text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/admin/stats":{"get":{"summary":"Platform-wide stats — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/admin/stalled-signups":{"get":{"summary":"Signups that stalled mid-onboarding — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":90,"default":14}},{"name":"minAgeHours","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":720,"default":24}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":100}}]}},"/admin/users":{"get":{"summary":"User list with usage — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["createdAt","email","graphCount","runCount","costUsd","lastActiveAt"],"default":"createdAt"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}}]}},"/admin/users/{id}":{"get":{"summary":"One user's detail — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/admin/users/{id}/logout":{"post":{"summary":"Force-logout a user — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/admin/users/{id}/disable":{"post":{"summary":"Disable a user's login — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/admin/users/{id}/enable":{"post":{"summary":"Re-enable a disabled user's login — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/admin/users/{id}/reset-link":{"post":{"summary":"Issue a password-reset link for a user — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/admin/workspaces/{id}":{"patch":{"summary":"Patch a workspace's plan/daily budget — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","team","enterprise"]},"dailyBudgetUsd":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/admin/public-graphs":{"get":{"summary":"Graphs currently serving anonymous MCP callers — the public-tier audit/takedown list.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/admin/graphs/{id}/unpublish":{"post":{"summary":"Unpublish a public graph — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/admin/config":{"get":{"summary":"Effective deployment config — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/admin/audit-log":{"get":{"summary":"Admin action journal — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"action","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}}]}},"/me/usage/models":{"get":{"summary":"Per-model usage ranked by trailing-30-day spend — the fleet's live incumbents.","tags":["billing"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/me/usage":{"get":{"summary":"Usage and cost totals for the authenticated user, with per-graph and per-day breakdowns.","tags":["billing"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/public/automations":{"get":{"summary":"Public automation catalog (names, categories, required credentials) — cached 5min.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/automations/catalog":{"get":{"summary":"Automation registry metadata for the gallery (field specs, no instantiate fns).","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/automations/ci-check":{"get":{"summary":"Does the repo's CI cover pushes to the loop's item branches?","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/automations/{id}/preflight":{"post":{"summary":"Preflight an automation template — which credentials/origins the caller still needs.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80}}]}},"/automations/{id}/instantiate":{"post":{"summary":"Instantiate an automation template — the body is the template's own input schema.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80}}]}},"/automations/instances":{"get":{"summary":"The caller's live automation instances.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/automations/instances/{id}/status":{"get":{"summary":"An instance's live status (runs, queue, freeze state).","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/automations/instances/{id}/pre-approvals":{"get":{"summary":"An instance's pre-approved action rules.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]},"post":{"summary":"Approve a pending pre-approval rules hash on an instance.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rulesHash":{"type":"string","pattern":"^[0-9a-f]{32}$"}},"required":["rulesHash"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/automations/instances/{id}/freeze":{"post":{"summary":"Freeze an instance — triggers stop dispatching until unfrozen.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/automations/instances/{id}/unfreeze":{"post":{"summary":"Unfreeze an instance.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/automations/instances/{id}/go-live":{"post":{"summary":"Promote a draft instance to live — starts firing its triggers.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/automations/instances/{id}":{"patch":{"summary":"Patch a live instance's published policy spec.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"specPatch":{"type":"object","properties":{"autoPublishTiers":{"anyOf":[{"type":"array","items":{"type":"string","enum":["docs","code"]},"maxItems":4},{"type":"null"}]},"codeTierMaxFiles":{"anyOf":[{"type":"integer","minimum":1,"maximum":50},{"type":"null"}]},"codeTierMaxLines":{"anyOf":[{"type":"integer","minimum":1,"maximum":5000},{"type":"null"}]},"protectedPathsExtra":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":50},{"type":"null"}]},"autoPathAllow":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":50},{"type":"null"}]},"protectedFileBudgets":{"anyOf":[{"type":"object","additionalProperties":{"type":"integer","minimum":1,"maximum":5000},"propertyNames":{"minLength":1,"maxLength":200}},{"type":"null"}]},"autonomous":{"type":["boolean","null"]}},"additionalProperties":false}},"required":["specPatch"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/automations/{id}":{"patch":{"summary":"Patch a live instance's published policy spec (v1 alias).","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"specPatch":{"type":"object","properties":{"autoPublishTiers":{"anyOf":[{"type":"array","items":{"type":"string","enum":["docs","code"]},"maxItems":4},{"type":"null"}]},"codeTierMaxFiles":{"anyOf":[{"type":"integer","minimum":1,"maximum":50},{"type":"null"}]},"codeTierMaxLines":{"anyOf":[{"type":"integer","minimum":1,"maximum":5000},{"type":"null"}]},"protectedPathsExtra":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":50},{"type":"null"}]},"autoPathAllow":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":50},{"type":"null"}]},"protectedFileBudgets":{"anyOf":[{"type":"object","additionalProperties":{"type":"integer","minimum":1,"maximum":5000},"propertyNames":{"minLength":1,"maxLength":200}},{"type":"null"}]},"autonomous":{"type":["boolean","null"]}},"additionalProperties":false}},"required":["specPatch"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/automations/app-bootstrap/draft-queue":{"post":{"summary":"Draft a starter's initial work queue from a product brief — optionally async (202 + jobId).","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productBrief":{"type":"string","minLength":20,"maxLength":2000},"starter":{"type":"string","minLength":1,"maxLength":60},"repoName":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"async":{"type":"boolean"}},"required":["productBrief","starter","repoName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/automations/app-bootstrap/draft-queue/{jobId}":{"get":{"summary":"Poll an async queue-draft job.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/automations/{id}/spec-assist":{"post":{"summary":"AI-fill a template's input fields from a plain-language transcript.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transcript":{"type":"string","minLength":1,"maxLength":20000}},"required":["transcript"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/automations/instances/{id}/blueprint":{"post":{"summary":"Save a live automation instance as a reusable blueprint.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/blueprints":{"get":{"summary":"List the caller's blueprints.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/blueprints/{id}":{"get":{"summary":"A blueprint's saved spec.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]},"patch":{"summary":"Rename a blueprint.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"delete":{"summary":"Delete a blueprint.","tags":["automations"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/onboarding/github/repo-info":{"get":{"summary":"Repo details for the onboarding wizard (via the caller's GitHub credential).","tags":["onboarding"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"repo","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_.-]+\\/[a-zA-Z0-9_.-]+$"}}]}},"/onboarding/github/prepare-repo":{"post":{"summary":"Prepare an existing repo for graph use (labels, hooks).","tags":["onboarding"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","pattern":"^[a-zA-Z0-9_.-]+\\/[a-zA-Z0-9_.-]+$"},"baseBranch":{"type":"string","minLength":1,"maxLength":100},"checks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":20,"default":[]}},"required":["repo"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/onboarding/github/create-repo":{"post":{"summary":"Create a fresh GitHub repo from a starter for the onboarding wizard.","tags":["onboarding"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_.-]+$"},"org":{"type":"string","maxLength":100,"pattern":"^[a-zA-Z0-9_.-]+$"},"private":{"type":"boolean","default":true},"description":{"type":"string","maxLength":500},"checklist":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":20,"default":[]}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/onboarding/assistant":{"post":{"summary":"Create the workspace's assistant (name/tone/focus + optional starter template) — lands on the live canvas.","tags":["onboarding"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"tone":{"type":"string","enum":["professional","casual","terse"]},"focus":{"type":"string","minLength":1,"maxLength":500},"voiceId":{"type":"string","minLength":1,"maxLength":100},"voiceProvider":{"type":"string","enum":["elevenlabs","local","openai-compatible","openai"]},"template":{"type":"string","minLength":1},"spec":{"type":"object","additionalProperties":{}}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/analytics/track":{"post":{"summary":"Record a page view (public, rate-limited, bot-filtered).","tags":["analytics"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":2000},"referrer":{"type":"string","maxLength":2000},"visitorId":{"type":"string","minLength":8,"maxLength":64},"source":{"type":"string","maxLength":200},"medium":{"type":"string","maxLength":200},"campaign":{"type":"string","maxLength":200},"screen":{"type":"string","maxLength":20},"viewport":{"type":"string","maxLength":20},"tz":{"type":"string","maxLength":60},"display":{"type":"string","maxLength":20}},"required":["path"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/analytics/bot":{"post":{"summary":"Self-report a bot visit (kept out of page-view stats).","tags":["analytics"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":2000}},"required":["path"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/analytics/event":{"post":{"summary":"Record a product site event (public, rate-limited).","tags":["analytics"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","enum":["cta_demo","cta_signup","demo_session_started","demo_run_started","demo_scene_selected","signup_completed","onboarding_completed","onboarding_step_entered","onboarding_step_completed","onboarding_step_skipped","voice_stt","voice_agent","voice_tts","voice_roundtrip","voice_barge_in"]},"path":{"type":"string","minLength":1,"maxLength":2000},"visitorId":{"type":"string","minLength":8,"maxLength":64},"source":{"type":"string","maxLength":200},"step":{"type":"string","enum":["intent","intent_code","intent_assistant","intent_website","assistant","assistant_blank","assistant_ops_chief","github","model","repo","project","workflow","automations","website","recap"]},"bucket":{"type":"string","enum":["lt1s","1_3s","3_8s","8_20s","gt20s"]}},"required":["name","path"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/admin/analytics":{"get":{"summary":"Site analytics rollup — admin only.","tags":["admin"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/billing/status":{"get":{"summary":"Billing overview for the caller's workspace — plan, limits, usage, Stripe subscription state.","tags":["billing"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/billing/checkout":{"post":{"summary":"Create a Stripe checkout session for the workspace's Team subscription.","tags":["billing"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/billing/daily-budget":{"put":{"summary":"Set the workspace's shared daily spend ceiling — null clears it. Operator guardrail, works without Stripe.","tags":["billing"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dailyBudgetUsd":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":100000},{"type":"null"}]}},"required":["dailyBudgetUsd"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/billing/automations-paused":{"put":{"summary":"Pause or resume every automatic firing in the workspace — the emergency stop for reloading credits or mid-fix.","tags":["billing"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/billing/portal":{"post":{"summary":"Create a Stripe customer-portal session (cards, cancellation, invoices).","tags":["billing"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/billing/webhook":{"post":{"summary":"Stripe webhook — plan flips on signed events only; 404 when billing is unconfigured.","tags":["billing"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/demo/session":{"post":{"summary":"Mint a throwaway demo session (user + workspace + seeded mock-provider graph) — sets the session cookie.","description":"404 when DEMO_ENABLED=false. Signed-in users get the demo graph seeded into their own workspace instead.","tags":["demo"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}},"get":{"summary":"Whether the current session is a demo session.","tags":["demo"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/public/model-radar/scans":{"get":{"summary":"Public model-radar scan history — run ids and timestamps for the operator-designated radar graph.","tags":["public"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/public/model-radar":{"get":{"summary":"Public model-radar results for a scan (the marker payloads of the operator-designated radar graph).","tags":["public"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/graphs/{graphId}/dismissals":{"get":{"summary":"List the caller's dismissed overview items for a graph.","tags":["overview"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]},"post":{"summary":"Dismiss an overview item (failure/schedule/flagged-hop) for the caller.","tags":["overview"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemType":{"type":"string","enum":["failure","schedule","flagged_hop"]},"itemId":{"type":"string","minLength":1},"triggerValue":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]}},"required":["itemType","itemId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}},"/graphs/{graphId}/dismissals/{id}":{"delete":{"summary":"Remove a dismissal (re-surfaces the item in the overview).","tags":["overview"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"name":"graphId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/openapi.json":{"get":{"summary":"This OpenAPI document, generated from the routes' own zod schemas.","tags":["meta"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/health":{"get":{"summary":"Liveness probe.","tags":["meta"],"responses":{"200":{"description":"Success — see summary for the response shape."},"4XX":{"description":"Client error — body is the shared {error, code?} envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}}},"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"livegraph_session"},"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"errorEnvelope":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}},"security":[{"sessionCookie":[]},{"apiKey":[]}]}