From 44f49df2e94b39354a1746f5fb595b7eecdd7bd5 Mon Sep 17 00:00:00 2001 From: cedricvidal <33618+cedricvidal@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:58:53 +0000 Subject: [PATCH 1/2] Initial plan From 64080312baaa628dc175b0258a530ef0049ea322 Mon Sep 17 00:00:00 2001 From: cedricvidal <33618+cedricvidal@users.noreply.github.com> Date: Thu, 19 Nov 2026 17:01:53 +0000 Subject: [PATCH 2/2] Generate deterministically indented website OpenAPI JSON Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- apps/api/src/openapi-snapshot.test.ts | 5 +- apps/api/src/openapi/generate.ts | 3 +- apps/api/src/openapi/serialize.test.ts | 91 + apps/api/src/openapi/serialize.ts | 22 + docs/architecture/app-design.md | 5 +- website/src/openapi/scope-openapi.json | 12095 ++++++++++++++++++++++- 6 files changed, 12217 insertions(+), 4 deletions(-) create mode 100644 apps/api/src/openapi/serialize.test.ts create mode 100644 apps/api/src/openapi/serialize.ts diff --git a/apps/api/src/openapi-snapshot.test.ts b/apps/api/src/openapi-snapshot.test.ts index 407bb4062..0cc05665a 100644 --- a/apps/api/src/openapi-snapshot.test.ts +++ b/apps/api/src/openapi-snapshot.test.ts @@ -4,6 +4,7 @@ import { describe, it, expect, vi } from "vitest"; import { readFile } from "node:fs/promises"; import { fileURLToPath } from "node:url"; +import { serializeOpenAPIDocument } from "./openapi/serialize.js"; // Stub checkMigrations before index.ts can import it vi.mock("db-migrations/check-migrations", () => ({ @@ -61,6 +62,8 @@ describe("OpenAPI spec snapshot", () => { new URL("../../../website/src/openapi/scope-openapi.json", import.meta.url), ); const websiteSpec = await readFile(websiteSpecPath, "utf8"); - expect(websiteSpec).toBe(JSON.stringify(doc)); + const serialized = serializeOpenAPIDocument(doc); + expect(websiteSpec).toBe(serialized); + expect(serializeOpenAPIDocument(generateOpenAPIDocument())).toBe(serialized); }, 30_000); // index.ts pulls in the entire route surface; 5s default is too tight under full-suite load. }); diff --git a/apps/api/src/openapi/generate.ts b/apps/api/src/openapi/generate.ts index 6f2d91cfd..58abc71a4 100644 --- a/apps/api/src/openapi/generate.ts +++ b/apps/api/src/openapi/generate.ts @@ -5,11 +5,12 @@ import { writeFile } from "node:fs/promises"; import { fileURLToPath } from "node:url"; import "../index.js"; import { generateOpenAPIDocument } from "./registry.js"; +import { serializeOpenAPIDocument } from "./serialize.js"; const websiteSpecPath = fileURLToPath( new URL("../../../../website/src/openapi/scope-openapi.json", import.meta.url), ); const document = generateOpenAPIDocument(); -await writeFile(websiteSpecPath, JSON.stringify(document)); +await writeFile(websiteSpecPath, serializeOpenAPIDocument(document)); console.log(`Wrote OpenAPI specification to ${websiteSpecPath}`); diff --git a/apps/api/src/openapi/serialize.test.ts b/apps/api/src/openapi/serialize.test.ts new file mode 100644 index 000000000..41d88fed7 --- /dev/null +++ b/apps/api/src/openapi/serialize.test.ts @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { OpenAPIObject } from "openapi3-ts/oas31"; +import { describe, expect, it } from "vitest"; +import { serializeOpenAPIDocument } from "./serialize.js"; + +describe("serializeOpenAPIDocument", () => { + it("uses sorted keys, two spaces, LF line endings, and a final newline", () => { + expect(serializeOpenAPIDocument({ + openapi: "3.1.0", + info: { version: "1.0.0", title: "Test API" }, + paths: {}, + })).toBe( + '{\n "info": {\n "title": "Test API",\n "version": "1.0.0"\n },\n "openapi": "3.1.0",\n "paths": {}\n}\n', + ); + }); + + it("is deterministic across nested object insertion orders", () => { + const document: OpenAPIObject = { + openapi: "3.1.0", + info: { title: "Test API", version: "1.0.0" }, + paths: {}, + servers: [{ url: "/", description: "Current server" }], + components: { + schemas: { + Example: { + type: "object", + properties: { zebra: { type: "number" }, alpha: { type: "string" } }, + }, + }, + }, + }; + + // Reverse all object keys, including objects nested inside arrays. + const reordered: OpenAPIObject = JSON.parse(JSON.stringify(document, (_key, value: unknown): unknown => { + if (value !== null && typeof value === "object" && !Array.isArray(value)) { + const object = value as Record; + return Object.fromEntries(Object.keys(object).reverse().map((key) => [key, object[key]])); + } + return value; + })); + + const serialized = serializeOpenAPIDocument(document); + expect(serializeOpenAPIDocument(reordered)).toBe(serialized); + expect(serializeOpenAPIDocument(document)).toBe(serialized); + }); + + it("preserves parsed content and array order without mutating the document", () => { + const document: OpenAPIObject = { + openapi: "3.1.0", + info: { title: "Test\r\nAPI", version: "1.0.0" }, + paths: {}, + servers: [{ url: "/z", description: "First" }, { url: "/a" }], + components: { + schemas: { + Example: { enum: ["zebra", "alpha", null], required: ["zebra", "alpha"] }, + }, + }, + }; + const original = JSON.stringify(document); + const serialized = serializeOpenAPIDocument(document); + const parsed: unknown = JSON.parse(serialized); + + expect(parsed).toEqual(document); + expect(serialized).not.toContain("\r"); + expect(JSON.stringify(document)).toBe(original); + }); + + it("limits a small schema change to its corresponding line", () => { + const document: OpenAPIObject = { + openapi: "3.1.0", + info: { title: "Test API", version: "1.0.0" }, + paths: {}, + components: { schemas: { Example: { type: "string", description: "Before" } } }, + }; + const before = serializeOpenAPIDocument(document).split("\n"); + const changed = structuredClone(document); + changed.components!.schemas!.Example = { type: "string", description: "After" }; + const after = serializeOpenAPIDocument(changed).split("\n"); + + // Only the edited description should change; neighboring schema lines stay put. + expect(after).toHaveLength(before.length); + expect(before.filter((line, index) => line !== after[index])).toEqual([ + ' "description": "Before",', + ]); + expect(after.filter((line, index) => line !== before[index])).toEqual([ + ' "description": "After",', + ]); + }); +}); diff --git a/apps/api/src/openapi/serialize.ts b/apps/api/src/openapi/serialize.ts new file mode 100644 index 000000000..9d756d370 --- /dev/null +++ b/apps/api/src/openapi/serialize.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { OpenAPIObject } from "openapi3-ts/oas31"; + +/** + * Serialize a generated document with stable object keys, two-space indentation, + * LF line endings, and a trailing newline. Array order is preserved. + * @param document OpenAPI document containing JSON-compatible values. + */ +export function serializeOpenAPIDocument(document: OpenAPIObject): string { + return JSON.stringify(document, (_key, value: unknown): unknown => { + // Canonicalize objects at every depth without reordering arrays. + if (value !== null && typeof value === "object" && !Array.isArray(value)) { + const object = value as Record; + return Object.fromEntries( + Object.keys(object).sort().map((key) => [key, object[key]]), + ); + } + return value; + }, 2) + "\n"; +} diff --git a/docs/architecture/app-design.md b/docs/architecture/app-design.md index 0cfe61c04..19bb5da9a 100644 --- a/docs/architecture/app-design.md +++ b/docs/architecture/app-design.md @@ -784,4 +784,7 @@ The static documentation site consumes the committed artifact at `website/src/openapi/scope-openapi.json`. Generate it from the API registry with `pnpm --filter api generate:openapi` rather than fetching the spec from a deployed environment. The API snapshot test verifies -that the artifact remains current. +that the artifact remains current. Generation recursively sorts object keys +while preserving array order and writes two-space-indented JSON with LF line +endings and a trailing newline. Unchanged definitions produce byte-identical +output; schema edits produce localized line diffs after the formatting migration. diff --git a/website/src/openapi/scope-openapi.json b/website/src/openapi/scope-openapi.json index a885790ae..58ce0bbe4 100644 --- a/website/src/openapi/scope-openapi.json +++ b/website/src/openapi/scope-openapi.json @@ -1 +1,12094 @@ -{"openapi":"3.1.0","info":{"title":"Scope API","version":"1.0.0","description":"REST API for the Scope platform — benchmarking AI coding agents"},"servers":[{"url":"/","description":"Current server"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Use the unchanged IdP access token, without the Bearer prefix."}},"schemas":{"KeyResponse":{"type":"object","properties":{},"additionalProperties":{}},"KeyInput":{"type":"object","properties":{},"additionalProperties":{}},"ValidateKeyInput":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"AccountResponse":{"type":"object","properties":{},"additionalProperties":{}},"AccountInput":{"type":"object","properties":{},"additionalProperties":{}},"UserMeResponse":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"email":{"type":"string"},"displayName":{"type":"string"},"idp":{"type":"string"},"idpTenant":{"type":"string"}},"required":["id"]},"ProjectResponse":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"}},"required":["_id","name","createdAt"]},"CreateProjectInput":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"creator":{"type":"string"}},"required":["name"]},"UpdateProjectInput":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}}},"RequestResponse":{"type":"object","properties":{"_id":{"type":"string"},"scenario":{"$ref":"#/components/schemas/Scenario"},"workerType":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"maxIterations":{"type":"number"},"personaInstructions":{"type":"string"},"persona":{"$ref":"#/components/schemas/Persona"},"deletedAt":{"type":["string","null"],"format":"date-time"},"taskPromptId":{"type":"string"},"agentsMdPromptId":{"type":"string"},"agentsMdParentIds":{"type":"array","items":{"type":"string"}},"mcpServers":{"type":"array","items":{"type":"string"}},"skillRevisions":{"type":"array","items":{"type":"string"}},"codebaseRevisionId":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceBinding"}},"extensions":{"type":"array","items":{"type":"string"}},"agentVersion":{"type":"string"},"profileId":{"type":"string"},"profileVersionId":{"type":"string"},"submissionId":{"type":"string"},"priority":{"type":"integer","default":0},"gates":{"type":"array","items":{"$ref":"#/components/schemas/GateConfig"}},"gateSummaries":{"type":"array","items":{"$ref":"#/components/schemas/GateRunSummary"}},"run":{"$ref":"#/components/schemas/RunState"},"projectId":{"type":"string"}},"required":["_id","scenario","workerType","createdAt","projectId"]},"Scenario":{"type":"object","properties":{"version":{"type":"string","enum":["v1","v2"]},"task":{"type":"string"},"criteria":{"type":"array","items":{"type":"string"}}},"required":["task","criteria"]},"Persona":{"type":"object","properties":{"personality":{"type":"string","enum":["demanding","friendly"]},"experience":{"type":"string","enum":["junior","senior"]},"verbosity":{"type":"string","enum":["brief","moderate"]},"type":{"type":"string","enum":["traditional","ai_assisted","vibe"]}},"required":["personality","experience","verbosity","type"]},"ResourceBinding":{"type":"object","properties":{"ref":{"type":"string"},"revisionId":{"type":"string"},"params":{"type":"object","additionalProperties":{"type":"string"}}},"required":["ref","revisionId","params"]},"GateConfig":{"type":"object","properties":{"gate":{"type":"string","enum":["select","build","test","run","deploy"]},"promptId":{"type":"string"},"promptText":{"type":"string"},"criteria":{"type":"array","items":{"type":"string"}},"maxIterations":{"type":"integer","minimum":1,"maximum":50}},"required":["gate","criteria"]},"GateRunSummary":{"type":"object","properties":{"gate":{"type":"string","enum":["select","build","test","run","deploy"]},"status":{"type":"string","enum":["passed","failed","skipped"]},"iterations":{"type":"integer","minimum":0}},"required":["gate","status","iterations"]},"RunState":{"type":"object","properties":{"_id":{"type":"string"},"attemptNumber":{"type":"integer","minimum":1},"status":{"type":"string","enum":["pending","queued","processing","paused","done"]},"queuedQueueName":{"type":"string"},"outcome":{"type":"string","enum":["succeeded","failed","finished"]},"result":{"type":"string"},"error":{"type":"string"},"logsUrl":{"type":"string"},"updatedAt":{"type":["string","null"],"format":"date-time"},"startedAt":{"type":["string","null"],"format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"durationMs":{"type":"number"},"turns":{"type":"array","items":{"$ref":"#/components/schemas/ConversationTurn"}},"workerVersion":{"type":"string"},"os":{"type":"object","properties":{"platform":{"type":"string"},"release":{"type":"string"},"arch":{"type":"string"}},"required":["platform","release","arch"]},"lastHeartbeatAt":{"type":["string","null"],"format":"date-time"},"worker":{"type":"object","properties":{"instanceId":{"type":"string"},"podName":{"type":"string"}},"required":["instanceId"]},"harUrl":{"type":"string"},"videoUrls":{"type":"array","items":{"type":"string"}},"setupVideoUrls":{"type":"array","items":{"type":"string"}},"tokenUsage":{"$ref":"#/components/schemas/TokenUsage"},"aiCallCount":{"type":"number"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceRunOutcome"}},"mcpRegistered":{"type":"boolean"},"rawChatUrl":{"type":"string"},"rawChatFormat":{"type":"string"},"pausedAt":{"type":["string","null"],"format":"date-time"},"resumedAt":{"type":["string","null"],"format":"date-time"}},"required":["_id","attemptNumber","status"]},"ConversationTurn":{"type":"object","properties":{"iteration":{"type":"number"},"gate":{"type":"string","enum":["select","build","test","run","deploy"]},"codingAgentResponse":{"type":"string"},"judgeFeedback":{"type":"string"},"snapshotUrl":{"type":"string"},"passed":{"type":"boolean"},"timestamp":{"type":["string","null"],"format":"date-time"},"criteriaResults":{"type":"array","items":{"$ref":"#/components/schemas/CriterionResult"}},"harUrl":{"type":"string"},"videoUrls":{"type":"array","items":{"type":"string"}},"tokenUsage":{"$ref":"#/components/schemas/TokenUsage"},"startedAt":{"type":["string","null"],"format":"date-time"},"durationMs":{"type":"number"},"toolCalls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"object","additionalProperties":{}},"response":{"type":"string"},"timestamp":{"type":"string"}},"required":["id","name","arguments"]}},"toolCallsUrl":{"type":"string"},"toolCallCount":{"type":"number"},"aiCallCount":{"type":"number"},"rawChatUrl":{"type":"string"},"rawChatFormat":{"type":"string"},"chatResultUrl":{"type":"string"},"chatResultFormat":{"type":"string"}},"required":["iteration","judgeFeedback","snapshotUrl","passed","timestamp"]},"CriterionResult":{"type":"object","properties":{"criterionId":{"type":"string"},"passed":{"type":"boolean"},"feedback":{"type":"string"},"evaluated":{"type":"boolean"}},"required":["criterionId","passed","feedback","evaluated"]},"TokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"]},"ResourceRunOutcome":{"type":"object","properties":{"ref":{"type":"string"},"slug":{"type":"string"},"revisionId":{"type":"string"},"setupSucceeded":{"type":"boolean"},"published":{"type":"array","items":{"type":"string"}},"params":{"type":"object","additionalProperties":{"type":"string"}},"setupDurationMs":{"type":"number"},"error":{"type":"string"},"teardownRan":{"type":"boolean"}},"required":["ref","slug","revisionId","setupSucceeded","published"]},"ResourceBindingSpec":{"anyOf":[{"type":"string"},{"type":"object","properties":{"ref":{"type":"string"},"params":{"type":"object","additionalProperties":{"type":"string"}}},"required":["ref"]}]},"CreateRequestInput":{"type":"object","properties":{"scenario":{"$ref":"#/components/schemas/Scenario"},"model":{"type":"string"},"reasoningEffort":{"type":"string"},"maxIterations":{"type":"integer","minimum":1,"maximum":50},"personaInstructions":{"type":"string"},"persona":{"$ref":"#/components/schemas/Persona"},"mcpServers":{"type":"array","items":{"type":"string"}},"skillRevisions":{"type":"array","items":{"type":"string"}},"codebaseRevisionId":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceBindingSpec"}},"extensions":{"type":"array","items":{"type":"string"}},"profileId":{"type":"string"},"profileVariations":{"type":"array","items":{"type":"string"}},"priority":{"type":"integer"},"agentsMd":{"type":"string"},"agentsMdParentIds":{"type":"array","items":{"type":"string"}},"gates":{"type":"array","items":{"$ref":"#/components/schemas/GateConfig"}}},"required":["scenario"]},"RunFacetsResponse":{"type":"object","properties":{"total":{"type":"number"},"facets":{"type":"object","properties":{"workerType":{"type":"array","items":{"$ref":"#/components/schemas/RunFacetBucket"}},"status":{"type":"array","items":{"$ref":"#/components/schemas/RunFacetBucket"}},"outcome":{"type":"array","items":{"$ref":"#/components/schemas/RunFacetBucket"}},"model":{"type":"array","items":{"$ref":"#/components/schemas/RunFacetBucket"}},"os":{"type":"array","items":{"$ref":"#/components/schemas/RunFacetBucket"}},"priority":{"type":"array","items":{"$ref":"#/components/schemas/RunFacetBucket"}},"agentVersion":{"type":"array","items":{"$ref":"#/components/schemas/RunFacetBucket"}},"profileId":{"type":"array","items":{"$ref":"#/components/schemas/RunFacetBucket"}}},"required":["workerType","status","outcome","model","os","priority","agentVersion","profileId"]}},"required":["total","facets"]},"RunFacetBucket":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]},"PaginatedRunsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RequestResponse"}},"limit":{"type":"number"},"estimatedTotal":{"type":"number"},"cursors":{"$ref":"#/components/schemas/Cursors"}},"required":["data","limit","estimatedTotal","cursors"]},"Cursors":{"type":"object","properties":{"next":{"type":["string","null"]},"prev":{"type":["string","null"]}},"required":["next","prev"]},"PaginatedRunGroupsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RunGroup"}},"limit":{"type":"number"},"estimatedTotal":{"type":"number"},"cursors":{"$ref":"#/components/schemas/Cursors"}},"required":["data","limit","estimatedTotal","cursors"]},"RunGroup":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"runIds":{"type":"array","items":{"type":"string"}},"aggregates":{"$ref":"#/components/schemas/GroupAggregates"},"uniform":{"$ref":"#/components/schemas/GroupUniformValues"}},"required":["key","label","runIds","aggregates","uniform"]},"GroupAggregates":{"type":"object","properties":{"count":{"type":"number"},"turns":{"$ref":"#/components/schemas/AggregateStats"},"duration":{"$ref":"#/components/schemas/AggregateStats"},"promptTokens":{"$ref":"#/components/schemas/AggregateStats"},"completionTokens":{"$ref":"#/components/schemas/AggregateStats"},"statusCounts":{"type":"object","additionalProperties":{"type":"number"}},"outcomeCounts":{"type":"object","additionalProperties":{"type":"number"}}},"required":["count","turns","duration","promptTokens","completionTokens","statusCounts","outcomeCounts"]},"AggregateStats":{"type":["object","null"],"properties":{"min":{"type":"number"},"max":{"type":"number"},"mean":{"type":"number"},"stdDev":{"type":"number"}},"required":["min","max","mean","stdDev"]},"GroupUniformValues":{"type":"object","properties":{"workerType":{"type":"string"},"agentVersion":{"type":"string"},"model":{"type":"string"},"platform":{"type":"string"},"mcpServers":{"type":"array","items":{"type":"string"}},"skillRevisions":{"type":"array","items":{"type":"string"}},"codebaseRevisionId":{"type":"string"},"extensions":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["pending","queued","processing","paused","done"]},"submissionId":{"type":"string"},"task":{"type":"string"}}},"BulkResubmitInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1},"count":{"type":"integer","minimum":1,"maximum":10,"default":1},"overrides":{"type":"object","properties":{"profileId":{"type":["string","null"]},"workerType":{"type":"string"},"agentVersion":{"type":"string"},"model":{"type":["string","null"]},"reasoningEffort":{"type":["string","null"]},"maxIterations":{"type":["number","null"]},"mcpServers":{"type":["array","null"],"items":{"type":"string"}},"skillRevisions":{"type":["array","null"],"items":{"type":"string"}},"extensions":{"type":["array","null"],"items":{"type":"string"}}}}},"required":["ids"]},"ReportResponse":{"type":"object","properties":{"_id":{"type":"string"},"requestId":{"type":"string"},"templateId":{"type":"string"},"reporter":{"$ref":"#/components/schemas/Reporter"},"content":{"type":"string"},"status":{"type":"string","enum":["pending","generating","completed","failed"]},"error":{"type":"string"},"insightReferences":{"type":"array","items":{"$ref":"#/components/schemas/InsightReference"}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","requestId","status","createdAt","projectId"]},"Reporter":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gitHash":{"type":"string"},"model":{"type":"string"},"agentId":{"type":"string"},"agentVersion":{"type":"string"}},"required":["id","name","gitHash","model","agentId","agentVersion"]},"InsightReference":{"type":"object","properties":{"insightId":{"type":"string"},"referencedAt":{"type":["string","null"],"format":"date-time"},"isNew":{"type":"boolean"}},"required":["insightId","referencedAt","isNew"]},"CreateCriteriaInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"prompt":{"type":"string"},"dependsOn":{"type":"array","items":{"type":"string"}},"gates":{"type":"array","items":{"type":"string","enum":["select","build","test","run","deploy"]}}},"required":["id","prompt"]},"CriteriaResponse":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"dependsOn":{"type":"array","items":{"type":"string"}},"gates":{"type":"array","items":{"type":"string","enum":["select","build","test","run","deploy"]}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["id","prompt","createdAt","projectId"]},"CriteriaGraph":{"type":"object","properties":{"nodes":{"type":"array","items":{"$ref":"#/components/schemas/CriteriaGraphNode"}},"edges":{"type":"array","items":{"$ref":"#/components/schemas/CriteriaGraphEdge"}}},"required":["nodes","edges"]},"CriteriaGraphNode":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"dependsOn":{"type":"array","items":{"type":"string"}},"gates":{"type":"array","items":{"type":"string","enum":["select","build","test","run","deploy"]}}},"required":["id","prompt"]},"CriteriaGraphEdge":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"UpdateCriteriaInput":{"type":"object","properties":{"prompt":{"type":"string"},"dependsOn":{"type":"array","items":{"type":"string"}},"gates":{"type":"array","items":{"type":"string","enum":["select","build","test","run","deploy"]}}}},"CreatePromptFeatureInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"prompt":{"type":"string"},"type":{"$ref":"#/components/schemas/PromptType"}},"required":["id","prompt"]},"PromptType":{"type":"string","enum":["select","build","test","run","deploy","agents.md"]},"PromptFeatureResult":{"type":"object","properties":{"featureId":{"type":"string"},"detected":{"type":"boolean"},"evaluated":{"type":"boolean"}},"required":["featureId","detected","evaluated"]},"SuggestedPromptFeature":{"type":"object","properties":{"suggestedId":{"type":"string"},"behavior":{"type":"string"},"prompt":{"type":"string"}},"required":["suggestedId","behavior","prompt"]},"PromptFeatureResponse":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"type":{"$ref":"#/components/schemas/PromptType"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["id","prompt","createdAt","projectId"]},"UpdatePromptFeatureInput":{"type":"object","properties":{"prompt":{"type":"string"}}},"TaskPromptResponse":{"type":"object","properties":{"_id":{"type":"string"},"keyId":{"type":"string"},"type":{"$ref":"#/components/schemas/PromptType"},"text":{"type":"string"},"contentBlobUrl":{"type":"string"},"features":{"type":"array","items":{"$ref":"#/components/schemas/PromptFeatureResult"}},"featuresExtractedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","keyId","createdAt","projectId"]},"CreateTaskPromptInput":{"type":"object","properties":{"text":{"type":"string"},"type":{"$ref":"#/components/schemas/PromptType"}},"required":["text"]},"PatchTaskPromptFeatureInput":{"type":"object","properties":{"detected":{"type":"boolean"}},"required":["detected"]},"CreateReportInput":{"type":"object","properties":{"requestId":{"type":"string"},"templateId":{"type":"string"}},"required":["requestId"]},"BulkCreateReportsInput":{"type":"object","properties":{"requestIds":{"type":"array","items":{"type":"string"}},"templateId":{"type":"string"}},"required":["requestIds"]},"BulkReportStatusInput":{"type":"object","properties":{"reportIds":{"type":"array","items":{"type":"string"}}},"required":["reportIds"]},"BulkReportSummaryResponse":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ReportSummary"}},"ReportSummary":{"type":"object","properties":{"total":{"type":"number"},"pending":{"type":"number"},"generating":{"type":"number"},"completed":{"type":"number"},"failed":{"type":"number"}},"required":["total","pending","generating","completed","failed"]},"BulkReportSummaryInput":{"type":"object","properties":{"requestIds":{"type":"array","items":{"type":"string"}}},"required":["requestIds"]},"TriggerReportsInput":{"type":"object","properties":{"requestId":{"type":"string"}},"required":["requestId"]},"BulkTriggerReportsInput":{"type":"object","properties":{"requestIds":{"type":"array","items":{"type":"string"}}},"required":["requestIds"]},"InsightResponse":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"upvotes":{"type":"number"},"downvotes":{"type":"number"},"blocked":{"type":"boolean"},"referenceCount":{"type":"number"},"createdBy":{"type":"string","enum":["agent","user"]},"sourceReportId":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","title","description","upvotes","downvotes","blocked","referenceCount","createdBy","createdAt","projectId"]},"ProfileWithVersionResponse":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"latestVersion":{"type":"number"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"version":{"$ref":"#/components/schemas/ProfileVersionResponse"},"projectId":{"type":"string"}},"required":["_id","name","latestVersion","createdAt","version","projectId"]},"ProfileVersionResponse":{"type":"object","properties":{"_id":{"type":"string"},"profileId":{"type":"string"},"version":{"type":"number"},"workerType":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"},"agentVersion":{"type":"string"},"mcpServers":{"type":"array","items":{"type":"string"}},"skillRevisions":{"type":"array","items":{"type":"string"}},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceBindingSpec"}},"extensions":{"type":"array","items":{"type":"string"}},"createdAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","profileId","version","workerType","model","createdAt","projectId"]},"CreateProfileInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","maxLength":512},"workerType":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"},"agentVersion":{"type":"string"},"mcpServers":{"type":"array","items":{"type":"string"}},"skillRevisions":{"type":"array","items":{"type":"string"}},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceBindingSpec"}},"extensions":{"type":"array","items":{"type":"string"}}},"required":["name","workerType","model"]},"ProfileResponse":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"latestVersion":{"type":"number"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","name","latestVersion","createdAt","projectId"]},"UpdateProfileIdentity":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","maxLength":512}}},"ReportTemplateResponse":{"type":"object","properties":{"_id":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"userPrompt":{"type":"string"},"systemPrompt":{"$ref":"#/components/schemas/ReportTemplateSystemPrompt"},"trigger":{"$ref":"#/components/schemas/ReportTrigger"},"model":{"type":"string"},"timeoutMs":{"type":"integer","exclusiveMinimum":0},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","id","name","userPrompt","createdAt","projectId"]},"ReportTemplateSystemPrompt":{"type":"object","properties":{"mode":{"type":"string","enum":["append","override"]},"content":{"type":"string"}},"required":["mode","content"]},"ReportTrigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["always"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["criteria"]},"criteriaIds":{"type":"array","items":{"type":"string"}},"match":{"type":"string","enum":["any","all"]}},"required":["type","criteriaIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["taskPrompt"]},"taskPromptIds":{"type":"array","items":{"type":"string"}}},"required":["type","taskPromptIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["promptFeature"]},"featureIds":{"type":"array","items":{"type":"string"}},"match":{"type":"string","enum":["any","all"]}},"required":["type","featureIds"]}]},"CreateReportTemplateInput":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"userPrompt":{"type":"string"},"systemPrompt":{"$ref":"#/components/schemas/ReportTemplateSystemPrompt"},"trigger":{"$ref":"#/components/schemas/ReportTrigger"},"model":{"type":"string"},"timeoutMs":{"type":"integer","exclusiveMinimum":0}},"required":["id","name","userPrompt"]},"UpdateReportTemplateInput":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"userPrompt":{"type":"string"},"systemPrompt":{"allOf":[{"$ref":"#/components/schemas/ReportTemplateSystemPrompt"},{"type":["object","null"]}]},"trigger":{"$ref":"#/components/schemas/ReportTrigger"},"model":{"type":["string","null"]},"timeoutMs":{"type":["integer","null"],"exclusiveMinimum":0}}},"AgentResponse":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"modelProvider":{"type":"string"},"supportedModels":{"type":"array","items":{"type":"string"}},"defaultModel":{"type":"string"},"available":{"type":"boolean"},"capabilities":{"$ref":"#/components/schemas/AgentCapabilities"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/AgentVersion"}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"}},"required":["_id","name","supportedModels","createdAt"]},"AgentCapabilities":{"type":"object","properties":{"supportsReasoningEffort":{"type":"boolean"},"supportsMcpServers":{"type":"boolean"},"supportsSkills":{"type":"boolean"},"supportsExtensions":{"type":"boolean"},"supportsResources":{"type":"boolean"}}},"AgentVersion":{"type":"object","properties":{"agentVersion":{"type":"string","minLength":1},"workerVersion":{"type":"string","minLength":1},"components":{"type":"object","additionalProperties":{"type":"string"}},"gitCommit":{"type":"string","minLength":1},"buildTime":{"type":"string","minLength":1},"imageTag":{"type":"string","minLength":1},"queueName":{"type":"string"},"status":{"type":"string","enum":["active","retired"]},"createdAt":{"type":["string","null"],"format":"date-time"}},"required":["agentVersion","workerVersion","components","gitCommit","buildTime","imageTag","status","createdAt"]},"CreateAgentInput":{"type":"object","properties":{"_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string"},"modelProvider":{"type":"string"},"supportedModels":{"type":"array","items":{"type":"string"}},"defaultModel":{"type":"string"},"available":{"type":"boolean"},"capabilities":{"$ref":"#/components/schemas/AgentCapabilities"}},"required":["_id","name"]},"UpdateAgentInput":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"modelProvider":{"type":"string"},"supportedModels":{"type":"array","items":{"type":"string"}},"defaultModel":{"type":"string"},"available":{"type":"boolean"},"capabilities":{"$ref":"#/components/schemas/AgentCapabilities"}}},"RegisterAgentVersionInput":{"type":"object","properties":{"agentVersion":{"type":"string","minLength":1},"workerVersion":{"type":"string","minLength":1},"components":{"type":"object","additionalProperties":{"type":"string"}},"gitCommit":{"type":"string","minLength":1},"buildTime":{"type":"string","minLength":1},"imageTag":{"type":"string","minLength":1},"queueName":{"type":"string","minLength":1}},"required":["agentVersion","workerVersion","components","gitCommit","buildTime","imageTag","queueName"]},"PatchAgentVersionInput":{"type":"object","properties":{"status":{"type":"string","enum":["active","retired"]}},"required":["status"]},"ModelResponse":{"type":"object","properties":{"_id":{"type":"string"},"modelId":{"type":"string"},"provider":{"type":"string"},"agentId":{"type":"string"},"firstSeenAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"disappearedAt":{"type":["string","null"],"format":"date-time"},"providerAvailableFrom":{"type":["string","null"],"format":"date-time"},"providerEndOfLife":{"type":["string","null"],"format":"date-time"},"metadata":{"type":"object","additionalProperties":{}},"capabilities":{"$ref":"#/components/schemas/ModelCapabilities"}},"required":["_id","modelId","provider","agentId","firstSeenAt","lastSeenAt"]},"ModelCapabilities":{"type":"object","properties":{"reasoningEffort":{"type":"array","items":{"type":"string"}},"toolCalls":{"type":"boolean"},"vision":{"type":"boolean"},"streaming":{"type":"boolean"},"adaptiveThinking":{"type":"boolean"},"maxThinkingBudget":{"type":"number"}}},"McpServerResponse":{"type":"object","properties":{"_id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["sse","http","stdio"]},"url":{"type":"string"},"command":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},"env":{"type":"object","additionalProperties":{"type":"string"}},"headers":{"type":"array","items":{"$ref":"#/components/schemas/McpServerHeader"}},"sessionMode":{"type":"string","enum":["stateful","stateless"]},"version":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","slug","name","type","createdAt","projectId"]},"McpServerHeader":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"UpdateMcpServerInput":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["sse","http","stdio"]},"url":{"type":"string"},"command":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},"env":{"type":"object","additionalProperties":{"type":"string"}},"headers":{"type":"array","items":{"$ref":"#/components/schemas/McpServerHeader"}},"sessionMode":{"type":"string","enum":["stateful","stateless"]},"version":{"type":"string"},"description":{"type":"string"}}},"SkillResponse":{"type":"object","properties":{"_id":{"type":"string"},"slug":{"type":"string"},"source":{"type":"string"},"skillName":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["skills-sh","manual"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","slug","source","skillName","name","origin","createdAt","projectId"]},"SkillSearchResult":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"source":{"type":"string"},"description":{"type":"string"},"internal":{"type":"boolean"},"installs":{"type":"number"}},"required":["id","name","source","internal"]},"SkillDiscoveryResult":{"type":"object","properties":{"skillName":{"type":"string"},"skillPath":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"existsInLibrary":{"type":"boolean"},"currentRevisionCommitSha":{"type":"string"},"latestUpstreamCommitSha":{"type":"string"},"updateAvailable":{"type":"boolean"},"lastImportedAt":{"type":"string"}},"required":["skillName","skillPath"]},"SkillRevisionResponse":{"type":"object","properties":{"_id":{"type":"string"},"ref":{"type":"string"},"source":{"type":"string"},"skillName":{"type":"string"},"skillPath":{"type":"string"},"commitHash":{"type":"string"},"commitTimestamp":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"license":{"type":"string"},"compatibility":{"type":"string"},"allowedTools":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"content":{"type":"string"},"archiveUrl":{"type":"string"},"validationWarnings":{"type":"array","items":{"type":"string"}},"resolvedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","ref","source","skillName","skillPath","commitHash","commitTimestamp","name","description","content","archiveUrl","resolvedAt","createdAt","projectId"]},"CreateSkillInput":{"type":"object","properties":{"source":{"type":"string"},"skillName":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["skills-sh","manual"]}},"required":["source","skillName","name","origin"]},"CodebaseResponse":{"type":"object","properties":{"_id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"sourceType":{"type":"string","enum":["git","archive"]},"source":{"type":"string"},"defaultBranch":{"type":"string"},"revisionCounter":{"type":"number"},"latestRevisionId":{"type":"string"},"creator":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","slug","name","sourceType","revisionCounter","createdAt","projectId"]},"UpdateCodebaseInput":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"defaultBranch":{"type":"string"}}},"CodebaseRevisionResponse":{"type":"object","properties":{"_id":{"type":"string"},"codebaseId":{"type":"string"},"slug":{"type":"string"},"revisionNumber":{"type":"number"},"ref":{"type":"string"},"sourceType":{"type":"string","enum":["git","archive"]},"source":{"type":"string"},"requestedRef":{"type":"string"},"resolvedCommitSha":{"type":"string"},"commitTimestamp":{"type":["string","null"],"format":"date-time"},"originalFilename":{"type":"string"},"contentSha256":{"type":"string"},"archiveUrl":{"type":"string"},"sizeBytes":{"type":"number"},"fileCount":{"type":"number"},"creator":{"type":"string"},"resolvedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"},"deduplicated":{"type":"boolean"},"projectId":{"type":"string"}},"required":["_id","codebaseId","slug","revisionNumber","ref","sourceType","archiveUrl","resolvedAt","createdAt","projectId"]},"ResolveCodebaseRevisionInput":{"type":"object","properties":{"requestedRef":{"type":"string"},"creator":{"type":"string"}}},"ResourceResponse":{"type":"object","properties":{"_id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"revisionCounter":{"type":"number"},"latestRevisionId":{"type":"string"},"latestRevisionNumber":{"type":"number"},"creator":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","slug","name","revisionCounter","createdAt","projectId"]},"CreateResourceInput":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"description":{"type":"string"},"setup":{"$ref":"#/components/schemas/ResourceScript"},"teardown":{"$ref":"#/components/schemas/ResourceScript"},"exports":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/ResourceParameter"}},"creator":{"type":"string"}},"required":["name","setup"]},"ResourceScript":{"type":"object","properties":{"sh":{"type":"string","minLength":1}}},"ResourceParameter":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"description":{"type":"string"},"required":{"type":"boolean","default":false},"default":{"type":"string"},"example":{"type":"string"}},"required":["name"]},"UpdateResourceInput":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}}},"ResourceRevisionResponse":{"type":"object","properties":{"_id":{"type":"string"},"resourceId":{"type":"string"},"slug":{"type":"string"},"revisionNumber":{"type":"number"},"ref":{"type":"string"},"setup":{"$ref":"#/components/schemas/ResourceScript"},"teardown":{"$ref":"#/components/schemas/ResourceScript"},"exports":{"type":"array","items":{"type":"string"}},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/ResourceParameter"}},"contentSha256":{"type":"string"},"creator":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"deduplicated":{"type":"boolean"},"projectId":{"type":"string"}},"required":["_id","resourceId","slug","revisionNumber","ref","setup","exports","contentSha256","createdAt","projectId"]},"CreateResourceRevisionInput":{"type":"object","properties":{"setup":{"$ref":"#/components/schemas/ResourceScript"},"teardown":{"$ref":"#/components/schemas/ResourceScript"},"exports":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/ResourceParameter"}},"creator":{"type":"string"}},"required":["setup"]},"ExtensionResponse":{"type":"object","properties":{"_id":{"type":"string"},"slug":{"type":"string"},"publisher":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["marketplace","manual"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"projectId":{"type":"string"}},"required":["_id","slug","publisher","name","origin","createdAt","projectId"]},"ExtensionSearchResult":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"description":{"type":"string"},"internal":{"type":"boolean"},"version":{"type":"string"}},"required":["id","name","publisher","internal"]},"CreateExtensionInput":{"type":"object","properties":{"_id":{"type":"string","pattern":"^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+$"},"publisher":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["marketplace","manual"]}},"required":["_id","publisher","name","origin"]},"UpdateExtensionInput":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}},"ExtensionVersionInfo":{"type":"object","properties":{"version":{"type":"string"},"preRelease":{"type":"boolean"},"lastUpdated":{"type":"string"}},"required":["version","preRelease","lastUpdated"]},"CreateInsightInput":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string","enum":["agent","user"]},"sourceReportId":{"type":"string"}},"required":["title","description"]},"UpdateInsightInput":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}},"FeatureFlagResponse":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["key","label","enabled","updatedAt"]},"UpdateFeatureFlagInput":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}},"parameters":{}},"paths":{"/api/v1/keys/preview":{"post":{"tags":["Keys"],"summary":"Preview key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyInput"}}}},"responses":{"200":{"description":"Key preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}}}}},"/api/v1/keys":{"post":{"tags":["Keys"],"summary":"Create key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyInput"}}}},"responses":{"201":{"description":"Key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}}}},"get":{"tags":["Keys"],"summary":"List keys","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyResponse"}}}}}}}},"/api/v1/keys/{id}":{"get":{"tags":["Keys"],"summary":"Get key","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}}}},"put":{"tags":["Keys"],"summary":"Update key","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyInput"}}}},"responses":{"200":{"description":"Key updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}}}},"delete":{"tags":["Keys"],"summary":"Delete key","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Key deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}}}}},"/api/v1/keys/{id}/validate":{"post":{"tags":["Keys"],"summary":"Validate key","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateKeyInput"}}}},"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{},"description":"Key validation result"}}}}}}},"/api/v1/accounts":{"post":{"tags":["Accounts"],"summary":"Create account","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInput"}}}},"responses":{"201":{"description":"Account created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}}}},"get":{"tags":["Accounts"],"summary":"List accounts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountResponse"}}}}}}}},"/api/v1/accounts/{id}":{"get":{"tags":["Accounts"],"summary":"Get account","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}}}},"put":{"tags":["Accounts"],"summary":"Update account","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInput"}}}},"responses":{"200":{"description":"Account updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}}}},"delete":{"tags":["Accounts"],"summary":"Delete account","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Account deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}}}}},"/api/v1/users/me":{"get":{"tags":["Users"],"summary":"Get the authenticated user's identity","description":"Read the existing authenticated Scope identity without enrollment or profile writes. Responses must not be HTTP-cached.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMeResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"User is not enrolled or is disabled"},"503":{"description":"Authentication service unavailable"}}},"post":{"tags":["Users"],"summary":"Enroll the authenticated user","description":"JIT-enroll the authenticated user, refresh their profile and lastLoginAt, apply bootstrap-admin rules, and warm the access cache. Use this only after an explicit IdP login; do not prefetch, poll, or automatically retry transient failures.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMeResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"User is disabled"},"503":{"description":"Authentication service unavailable"}}}},"/health":{"get":{"tags":["Health"],"summary":"Liveness probe","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"version":{"type":"string"}},"required":["status","version"]}}}}}}},"/ready":{"get":{"tags":["Health"],"summary":"Readiness probe","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"migrations":{}},"required":["status"]}}}},"503":{"description":"Service is not ready"}}}},"/about":{"get":{"tags":["System"],"summary":"API metadata","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"buildTime":{"type":"string"},"environment":{"type":"string"},"description":{"type":"string"},"workers":{"type":"array","items":{"type":"string"}}},"required":["name","version","buildTime","environment","description","workers"]}}}}}}},"/api/v1/version":{"get":{"tags":["System"],"summary":"Version info","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"commit":{"type":"string"},"buildTime":{"type":"string"},"environment":{"type":"string"},"strictAgentCapabilities":{"type":"boolean"}},"required":["commit","buildTime","environment","strictAgentCapabilities"]}}}}}}},"/api/v1/projects":{"get":{"tags":["Projects"],"summary":"List all projects","parameters":[{"schema":{"type":"string","enum":["true","false"],"description":"When true, include soft-deleted projects in the result"},"required":false,"description":"When true, include soft-deleted projects in the result","name":"includeDeleted","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectResponse"}}}}}}},"post":{"tags":["Projects"],"summary":"Create a project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"400":{"description":"Invalid input"}}}},"/api/v1/projects/{id}":{"get":{"tags":["Projects"],"summary":"Get a project","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"404":{"description":"Project not found"}}},"patch":{"tags":["Projects"],"summary":"Update a project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"404":{"description":"Project not found"}}},"delete":{"tags":["Projects"],"summary":"Soft-delete a project","responses":{"204":{"description":"Success"},"404":{"description":"Project not found"}}}},"/api/v1/projects/{id}/restore":{"post":{"tags":["Projects"],"summary":"Restore a soft-deleted project","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"404":{"description":"Project not found"}}}},"/api/v1/requests":{"post":{"tags":["Requests"],"summary":"Submit request(s)","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateRequestInput"},{"type":"object","properties":{"count":{"type":"number","minimum":1,"maximum":10,"default":1},"skills":{"type":"array","items":{"type":"string"}},"agentVersion":{"type":"string"},"codebase":{"type":"string"}}}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RequestResponse"},{"type":"array","items":{"$ref":"#/components/schemas/RequestResponse"}}]}}}}}},"get":{"tags":["Requests"],"summary":"List requests","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"worker","in":"query"},{"schema":{"type":"string"},"required":false,"name":"taskPromptId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"criteria","in":"query"},{"schema":{"type":"string"},"required":false,"name":"submissionId","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"profileId","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"outcome","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"model","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"os","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"priority","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"agentVersion","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","enum":["task","submissionId","profile"]},"required":false,"name":"groupBy","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"last","in":"query"},{"schema":{"type":"string","enum":["created","updated","priority","worker","status","id","duration","createdAt"]},"required":false,"name":"sortBy","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"sortDir","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"createdAfter","in":"query"},{"schema":{"type":["string","null"],"format":"date-time"},"required":false,"name":"createdBefore","in":"query"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"turns","in":"query"},{"schema":{"type":"string","enum":["eq","gte","lte"]},"required":false,"name":"turnsOp","in":"query"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"maxIterations","in":"query"},{"schema":{"type":"string","enum":["eq","gte","lte"]},"required":false,"name":"maxIterationsOp","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaginatedRunsResponse"},{"$ref":"#/components/schemas/PaginatedRunGroupsResponse"}]}}}}}}},"/api/v1/requests/facets":{"get":{"tags":["Requests"],"summary":"List run filter facets","description":"Returns every distinct value and its full-dataset count per categorical filter dimension for the Runs list rail. Counts are absolute over all non-deleted runs **in the given project**: they intentionally ignore the active search, date range, iteration, and categorical selections so every selectable value stays visible with a stable count. Requires ?projectId=. Computed with parallel $group aggregations (Cosmos has no $facet) and cached per-project for a short TTL.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunFacetsResponse"}}}}}}},"/api/v1/requests/{id}":{"get":{"tags":["Requests"],"summary":"Get request","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestResponse"}}}},"404":{"description":"Not found"}}},"delete":{"tags":["Requests"],"summary":"Soft-delete request","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not found"}}}},"/api/v1/analysis":{"get":{"tags":["Requests"],"summary":"Compute pass@k / success@T metrics","description":"Aggregates pass@k / success@T metrics over a single project's done runs. Requires ?projectId=.","parameters":[{"schema":{"type":"string"},"required":false,"name":"worker","in":"query"},{"schema":{"type":"string"},"required":false,"name":"taskPromptId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"criteria","in":"query"},{"schema":{"type":"string"},"required":false,"name":"features","in":"query"},{"schema":{"type":"string"},"required":false,"name":"submissionId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"k","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{},"description":"Analysis metrics"}}}}}}},"/api/v1/requests/bulk-resubmit":{"post":{"tags":["Requests"],"summary":"Bulk resubmit requests","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResubmitInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RequestResponse"}}}}}}}},"/api/v1/requests/bulk":{"delete":{"tags":["Requests"],"summary":"Bulk soft-delete requests","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"]}}}}}}},"/api/v1/requests/archive":{"post":{"tags":["Requests"],"summary":"Download batch archive of multiple runs","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100}},"required":["ids"]}}}},"responses":{"201":{"description":"Gzipped batch archive containing individual run archives"},"400":{"description":"Invalid input"},"404":{"description":"One or more runs not found"}}}},"/api/v1/runs/upload":{"post":{"tags":["Requests"],"summary":"Import run archive","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"201":{"description":"Success"}}}},"/api/v1/runs/upload-batch":{"post":{"tags":["Requests"],"summary":"Import batch run archive","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"207":{"description":"Multi-status: 201 if all runs imported, 400 if none imported, 207 if partial"},"400":{"description":"No archive uploaded, empty archive, or all runs failed"}}}},"/api/v1/requests/{id}/reports":{"get":{"tags":["Reports"],"summary":"Get reports for request","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportResponse"}}}}},"404":{"description":"Run not found"}}}},"/api/v1/requests/{id}/runs":{"get":{"tags":["Requests"],"summary":"List attempts for a request","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RunState"}}}}},"404":{"description":"Request not found"}}}},"/api/v1/requests/{id}/runs/{runId}":{"get":{"tags":["Requests"],"summary":"Get a single attempt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunState"}}}},"404":{"description":"Request or run not found"}}}},"/api/v1/requests/bulk-retry":{"post":{"tags":["Requests"],"summary":"Bulk retry requests (start new attempts)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1},"force":{"type":"boolean"}},"required":["ids"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"retried":{"type":"integer"},"skipped":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"requestId":{"type":"string"},"runId":{"type":"string"},"attemptNumber":{"type":"integer"},"error":{"type":"string"}},"required":["requestId"]}}},"required":["retried","skipped","results"]}}}}}}},"/api/v1/requests/{id}/retry":{"post":{"tags":["Requests"],"summary":"Retry a request (start a new attempt)","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"},"runId":{"type":"string"},"attemptNumber":{"type":"integer"}},"required":["requestId","runId","attemptNumber"]}}}},"404":{"description":"Request not found"},"409":{"description":"Conflict — request is not in a retryable state, or a concurrent retry won the race"},"422":{"description":"Cannot retry — current run not yet terminal"}}}},"/api/v1/requests/{id}/priority":{"post":{"tags":["Requests"],"summary":"Set priority on a single request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"priority":{"type":"integer"}},"required":["priority"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"priority":{"type":"number"}},"required":["id","priority"]}}}}}}},"/api/v1/requests/bulk-priority":{"post":{"tags":["Requests"],"summary":"Set priority on multiple requests","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"priority":{"type":"integer"}},"required":["ids","priority"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"number"},"skipped":{"type":"number"}},"required":["updated","skipped"]}}}}}}},"/api/v1/requests/{id}/pause":{"post":{"tags":["Requests"],"summary":"Pause a single request","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}}}}}}},"/api/v1/requests/{id}/resume":{"post":{"tags":["Requests"],"summary":"Resume a paused request","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}}}}}}},"/api/v1/requests/bulk-pause":{"post":{"tags":["Requests"],"summary":"Pause multiple requests","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100}},"required":["ids"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"number"},"skipped":{"type":"number"}},"required":["updated","skipped"]}}}}}}},"/api/v1/requests/bulk-resume":{"post":{"tags":["Requests"],"summary":"Resume multiple paused requests","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100}},"required":["ids"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"number"},"skipped":{"type":"number"}},"required":["updated","skipped"]}}}}}}},"/api/v1/requests/{id}/cancel":{"post":{"tags":["Requests"],"summary":"Cancel a request (marks as done/failed and signals worker to exit)","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"previousStatus":{"type":"string"},"status":{"type":"string"},"outcome":{"type":"string"}},"required":["id","previousStatus","status","outcome"]}}}}}}},"/api/v1/requests/bulk-cancel":{"post":{"tags":["Requests"],"summary":"Cancel multiple requests","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100}},"required":["ids"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"type":"number"},"skipped":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"cancelled":{"type":"boolean"},"previousStatus":{"type":"string"},"error":{"type":"string"}},"required":["id","cancelled"]}}},"required":["cancelled","skipped","results"]}}}}}}},"/api/v1/requests/{id}/logs":{"get":{"tags":["Requests"],"summary":"Stream request logs (SSE)","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Server-sent event stream of log entries"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/runs/{runId}/logs":{"get":{"tags":["Requests"],"summary":"Stream logs for a specific attempt (SSE)","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"Server-sent event stream of log entries"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/har":{"get":{"tags":["Requests"],"summary":"Download HAR file","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"HAR-format JSON file"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/runs/{runId}/har":{"get":{"tags":["Requests"],"summary":"Download HAR file for a specific attempt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"HAR-format JSON file"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/atif":{"get":{"tags":["Requests"],"summary":"Download ATIF trajectory file for a specific iteration","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The iteration number (1-based)"},"required":true,"description":"The iteration number (1-based)","name":"iteration","in":"query"}],"responses":{"200":{"description":"ATIF v1.7 trajectory JSON file"},"400":{"description":"Missing or invalid iteration"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/runs/{runId}/atif":{"get":{"tags":["Requests"],"summary":"Download ATIF trajectory file for a specific attempt and iteration","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"},{"schema":{"type":"string","description":"The iteration number (1-based)"},"required":true,"description":"The iteration number (1-based)","name":"iteration","in":"query"}],"responses":{"200":{"description":"ATIF v1.7 trajectory JSON file"},"400":{"description":"Missing or invalid iteration"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/video":{"get":{"tags":["Requests"],"summary":"Download session recording","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"WebM video recording (supports Range requests)"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/runs/{runId}/video":{"get":{"tags":["Requests"],"summary":"Download session recording for a specific attempt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"WebM video recording (supports Range requests)"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/tool-calls":{"get":{"tags":["Requests"],"summary":"Download per-iteration tool-calls JSONL","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"JSONL stream — one ToolCall per line"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/runs/{runId}/tool-calls":{"get":{"tags":["Requests"],"summary":"Download per-iteration tool-calls JSONL for a specific attempt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"JSONL stream — one ToolCall per line"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/snapshots/{iteration}":{"get":{"tags":["Requests"],"summary":"Download iteration snapshot","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"iteration","in":"path"}],"responses":{"200":{"description":"Gzipped snapshot archive"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/runs/{runId}/snapshots/{iteration}":{"get":{"tags":["Requests"],"summary":"Download iteration snapshot for a specific attempt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"iteration","in":"path"}],"responses":{"200":{"description":"Gzipped snapshot archive"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/archive":{"get":{"tags":["Requests"],"summary":"Download full run archive","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Gzipped run archive"},"404":{"description":"Not found"}}}},"/api/v1/requests/{id}/runs/{runId}/archive":{"get":{"tags":["Requests"],"summary":"Download full run archive for a specific attempt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"Gzipped run archive"},"404":{"description":"Not found"}}}},"/api/v1/criteria/generate-prompt":{"post":{"tags":["Criteria"],"summary":"Generate criterion prompt from behavior","parameters":[{"schema":{"type":"string","minLength":1,"description":"Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.","example":"00000000-0000-0000-0000-000000000000"},"required":false,"description":"Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"behavior":{"type":"string"},"currentId":{"type":"string"},"gates":{"type":"array","items":{"type":"string"}}},"required":["behavior"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"suggestedId":{"type":"string"},"suggestedParents":{"type":"array","items":{"type":"string"}},"suggestedChildren":{"type":"array","items":{"type":"string"}}},"required":["prompt","suggestedId","suggestedParents","suggestedChildren"]}}}},"400":{"description":"Empty behavior string"},"503":{"description":"LLM not configured"}}}},"/api/v1/criteria/seed":{"post":{"tags":["Criteria"],"summary":"Seed criteria in bulk","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"criteria":{"type":"array","items":{"$ref":"#/components/schemas/CreateCriteriaInput"}}},"required":["criteria"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"seeded":{"type":"number"},"errors":{"type":"array","items":{"type":"string"}}},"required":["seeded","errors"]}}}},"400":{"description":"Seed batch would introduce a dependency cycle"}}}},"/api/v1/criteria":{"get":{"tags":["Criteria"],"summary":"List criteria","parameters":[{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","description":"Comma-separated criterion IDs to include"},"required":false,"description":"Comma-separated criterion IDs to include","name":"ids","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"When true and ids is set, also include dependency ancestors"},"required":false,"description":"When true and ids is set, also include dependency ancestors","name":"ancestors","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CriteriaResponse"}}}}}}},"post":{"tags":["Criteria"],"summary":"Create criterion","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCriteriaInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaResponse"}}}},"409":{"description":"Criterion already exists"}}}},"/api/v1/criteria/mdp":{"get":{"tags":["Criteria"],"summary":"Compute MDP transitions","parameters":[{"schema":{"type":"string"},"required":false,"name":"criteria","in":"query"},{"schema":{"type":"string"},"required":false,"name":"features","in":"query"},{"schema":{"type":"string"},"required":false,"name":"since","in":"query"},{"schema":{"type":"string"},"required":false,"name":"worker","in":"query"},{"schema":{"type":"string"},"required":false,"name":"taskPromptId","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}}}}},"/api/v1/criteria/graph":{"get":{"tags":["Criteria"],"summary":"Get criteria DAG","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaGraph"}}}}}}},"/api/v1/criteria/{id}":{"get":{"tags":["Criteria"],"summary":"Get criterion","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaResponse"}}}},"404":{"description":"Criterion not found"}}},"put":{"tags":["Criteria"],"summary":"Update criterion","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCriteriaInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriteriaResponse"}}}},"400":{"description":"Invalid dependency reference or self-reference"},"404":{"description":"Criterion not found"}}},"delete":{"tags":["Criteria"],"summary":"Soft-delete criterion","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","deleted"]}}}},"404":{"description":"Criterion not found"},"409":{"description":"Criterion has dependents"}}}},"/api/v1/prompt-features/generate-prompt":{"post":{"tags":["Prompt Features"],"summary":"Generate prompt feature from behavior","parameters":[{"schema":{"type":"string","minLength":1,"description":"Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.","example":"00000000-0000-0000-0000-000000000000"},"required":false,"description":"Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"behavior":{"type":"string"},"currentId":{"type":"string"}},"required":["behavior"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"}},"required":["prompt"]}}}},"400":{"description":"Empty behavior string"},"503":{"description":"LLM not configured"}}}},"/api/v1/prompt-features/seed":{"post":{"tags":["Prompt Features"],"summary":"Seed prompt features in bulk","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"features":{"type":"array","items":{"$ref":"#/components/schemas/CreatePromptFeatureInput"}}},"required":["features"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"seeded":{"type":"number"},"errors":{"type":"array","items":{"type":"string"}}},"required":["seeded","errors"]}}}}}}},"/api/v1/prompt-features/extract-from-text":{"post":{"tags":["Prompt Features"],"summary":"Extract features from text","parameters":[{"schema":{"type":"string","minLength":1,"description":"Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.","example":"00000000-0000-0000-0000-000000000000"},"required":false,"description":"Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"model":{"type":"string"},"type":{"type":"string","enum":["select","agents.md"]}},"required":["text"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"features":{"type":"array","items":{"$ref":"#/components/schemas/PromptFeatureResult"}},"suggestedFeatures":{"type":"array","items":{"$ref":"#/components/schemas/SuggestedPromptFeature"}},"cached":{"type":"boolean"}},"required":["features","cached"]}}}},"400":{"description":"Empty text string"},"503":{"description":"LLM not configured"}}}},"/api/v1/prompt-features":{"get":{"tags":["Prompt Features"],"summary":"List features","parameters":[{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["select","agents.md"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptFeatureResponse"}}}}}}},"post":{"tags":["Prompt Features"],"summary":"Create feature","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptFeatureInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFeatureResponse"}}}},"400":{"description":"Invalid input"},"409":{"description":"Feature already exists"}}}},"/api/v1/prompt-features/{id}":{"get":{"tags":["Prompt Features"],"summary":"Get feature","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFeatureResponse"}}}},"404":{"description":"Feature not found"}}},"put":{"tags":["Prompt Features"],"summary":"Update feature","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptFeatureInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFeatureResponse"}}}},"400":{"description":"Invalid input"},"404":{"description":"Feature not found"}}},"delete":{"tags":["Prompt Features"],"summary":"Soft-delete feature","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","deleted"]}}}},"404":{"description":"Feature not found"}}}},"/api/v1/task-prompts/generate":{"post":{"tags":["Task Prompts"],"summary":"Generate task prompts","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string"},"existingPrompt":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"string"}}},"required":["tasks"]}}}},"503":{"description":"LLM not configured"}}}},"/api/v1/task-prompts":{"get":{"tags":["Task Prompts"],"summary":"List task prompts","parameters":[{"schema":{"type":["number","null"]},"required":false,"name":"limit","in":"query"},{"schema":{"type":["number","null"]},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"$ref":"#/components/schemas/PromptType"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TaskPromptResponse"}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["items","total","limit","offset"]}}}}}},"post":{"tags":["Task Prompts"],"summary":"Create or find task prompt","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskPromptInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskPromptResponse"}}}},"400":{"description":"Empty text string"}}}},"/api/v1/task-prompts/{id}":{"get":{"tags":["Task Prompts"],"summary":"Get task prompt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskPromptResponse"}}}},"404":{"description":"Task prompt not found"}}},"delete":{"tags":["Task Prompts"],"summary":"Soft-delete task prompt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"]}}}},"404":{"description":"Task prompt not found"}}}},"/api/v1/task-prompts/{id}/content":{"get":{"tags":["Task Prompts"],"summary":"Get resolved task prompt content","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}}},"404":{"description":"Task prompt not found"}}}},"/api/v1/task-prompts/{id}/extract-features":{"post":{"tags":["Task Prompts"],"summary":"Extract features from task prompt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"force","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"taskPromptId":{"type":"string"},"features":{"type":"array","items":{"$ref":"#/components/schemas/PromptFeatureResult"}},"featuresExtractedAt":{"type":["string","null"],"format":"date-time"},"suggestedFeatures":{"type":"array","items":{"$ref":"#/components/schemas/SuggestedPromptFeature"}},"cached":{"type":"boolean"}},"required":["taskPromptId","features","cached"]}}}},"404":{"description":"Task prompt not found"},"503":{"description":"LLM not configured"}}}},"/api/v1/task-prompts/{id}/features/{featureId}":{"patch":{"tags":["Task Prompts"],"summary":"Toggle feature flag on task prompt","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"featureId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchTaskPromptFeatureInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskPromptResponse"}}}},"400":{"description":"Invalid detected value"},"404":{"description":"Task prompt or feature not found"}}}},"/api/v1/reports":{"post":{"tags":["Reports"],"summary":"Create report","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"400":{"description":"Invalid input"},"404":{"description":"Run or template not found"}}},"get":{"tags":["Reports"],"summary":"List reports","parameters":[{"schema":{"type":"string"},"required":false,"name":"requestId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportResponse"}}}}}}}},"/api/v1/reports/bulk-create":{"post":{"tags":["Reports"],"summary":"Bulk create reports","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateReportsInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportResponse"}}}}},"400":{"description":"Invalid input"}}}},"/api/v1/reports/bulk-status":{"post":{"tags":["Reports"],"summary":"Bulk get report statuses","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkReportStatusInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportResponse"}}}}},"400":{"description":"Invalid input"}}}},"/api/v1/reports/bulk-summary":{"post":{"tags":["Reports"],"summary":"Bulk get report summary per run","description":"Returns aggregated report status counts per run. Only the latest report per template is counted (re-triggers are deduplicated).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkReportSummaryInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkReportSummaryResponse"}}}},"400":{"description":"Invalid input"}}}},"/api/v1/reports/{id}":{"get":{"tags":["Reports"],"summary":"Get report","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"404":{"description":"Report not found"}}}},"/api/v1/reports/{id}/logs":{"get":{"tags":["Reports"],"summary":"Stream report logs (SSE)","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Server-sent event stream of log entries"},"404":{"description":"Report not found"}}}},"/api/v1/reports/trigger":{"post":{"tags":["Reports"],"summary":"Trigger reports","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerReportsInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"triggered":{"type":"number"},"reports":{"type":"array","items":{"$ref":"#/components/schemas/ReportResponse"}}},"required":["triggered","reports"]}}}},"400":{"description":"Invalid input"},"404":{"description":"Run not found"}}}},"/api/v1/reports/bulk-trigger":{"post":{"tags":["Reports"],"summary":"Bulk trigger reports","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTriggerReportsInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}}}},"400":{"description":"Invalid input"}}}},"/api/v1/reports/{id}/insights":{"get":{"tags":["Reports"],"summary":"Get insights for report","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/InsightResponse"},{"type":"object","properties":{"referencedAt":{"type":["string","null"],"format":"date-time"},"isNew":{"type":"boolean"}}}]}}}}},"404":{"description":"Report not found"}}},"post":{"tags":["Reports"],"summary":"Link insight to report","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"insightId":{"type":"string"},"isNew":{"type":"boolean"}},"required":["insightId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"insightId":{"type":"string"},"referencedAt":{"type":["string","null"],"format":"date-time"},"isNew":{"type":"boolean"}},"required":["insightId","referencedAt","isNew"]}}}},"404":{"description":"Report or insight not found"},"409":{"description":"Insight already referenced by this report"}}}},"/api/v1/profiles":{"post":{"tags":["Profiles"],"summary":"Create a new profile","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProfileInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileWithVersionResponse"}}}}}},"get":{"tags":["Profiles"],"summary":"List profiles","parameters":[{"schema":{"type":"string"},"required":false,"name":"workerType","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProfileWithVersionResponse"}}}}}}}},"/api/v1/profiles/{profileId}":{"get":{"tags":["Profiles"],"summary":"Get profile with latest version","parameters":[{"schema":{"type":"string"},"required":true,"name":"profileId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileWithVersionResponse"}}}}}},"post":{"tags":["Profiles"],"summary":"Create new profile version","parameters":[{"schema":{"type":"string"},"required":true,"name":"profileId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workerType":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"},"agentVersion":{"type":"string"},"mcpServers":{"type":"array","items":{"type":"string"}},"skillRevisions":{"type":"array","items":{"type":"string"}},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceBindingSpec"}},"extensions":{"type":"array","items":{"type":"string"}}},"required":["workerType","model"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileVersionResponse"}}}}}},"put":{"tags":["Profiles"],"summary":"Update profile identity","parameters":[{"schema":{"type":"string"},"required":true,"name":"profileId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileIdentity"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}}}},"delete":{"tags":["Profiles"],"summary":"Delete profile","parameters":[{"schema":{"type":"string"},"required":true,"name":"profileId","in":"path"}],"responses":{"204":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/profiles/{profileId}/versions":{"get":{"tags":["Profiles"],"summary":"List profile versions","parameters":[{"schema":{"type":"string"},"required":true,"name":"profileId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProfileVersionResponse"}}}}}}}},"/api/v1/profiles/{profileId}/versions/{version}":{"get":{"tags":["Profiles"],"summary":"Get profile version","parameters":[{"schema":{"type":"string"},"required":true,"name":"profileId","in":"path"},{"schema":{"type":["number","null"]},"required":false,"name":"version","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileVersionResponse"}}}}}}},"/api/v1/report-templates/default-system-prompt":{"get":{"tags":["Report Templates"],"summary":"Get default system prompt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]}}}}}}},"/api/v1/report-templates/available-models":{"get":{"tags":["Report Templates"],"summary":"List models available for report generation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string"}},"required":["modelId"]}}}}}}}},"/api/v1/report-templates":{"get":{"tags":["Report Templates"],"summary":"List report templates","parameters":[{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportTemplateResponse"}}}}}}},"post":{"tags":["Report Templates"],"summary":"Create report template","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportTemplateInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplateResponse"}}}},"409":{"description":"Report template already exists"}}}},"/api/v1/report-templates/{id}":{"get":{"tags":["Report Templates"],"summary":"Get report template","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplateResponse"}}}},"404":{"description":"Report template not found"}}},"put":{"tags":["Report Templates"],"summary":"Update report template","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReportTemplateInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplateResponse"}}}},"404":{"description":"Report template not found"}}},"delete":{"tags":["Report Templates"],"summary":"Delete report template","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"204":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Report template not found"}}}},"/api/v1/agents":{"get":{"tags":["Agents"],"summary":"List agents","parameters":[{"schema":{"type":"string"},"required":false,"name":"modelProvider","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeDeleted","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentResponse"}}}}}}},"post":{"tags":["Agents"],"summary":"Create or update agent (upsert)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"400":{"description":"Validation error"},"409":{"description":"Restored agent versions conflict with an active queue owner"}}}},"/api/v1/agents/{id}":{"get":{"tags":["Agents"],"summary":"Get agent","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeDeleted","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"404":{"description":"Agent not found"}}},"put":{"tags":["Agents"],"summary":"Update agent","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"400":{"description":"Validation error"},"404":{"description":"Agent not found"}}},"delete":{"tags":["Agents"],"summary":"Delete agent","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Agent not found"}}}},"/api/v1/agents/{id}/versions":{"get":{"tags":["Agents"],"summary":"List agent versions","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentVersion"}}}}},"404":{"description":"Agent not found"}}},"post":{"tags":["Agents"],"summary":"Register agent version (upsert)","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAgentVersionInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVersion"}}}},"400":{"description":"Validation error"},"404":{"description":"Agent not found"},"409":{"description":"Queue is assigned to another agent"},"503":{"description":"Concurrent registration did not stabilize"}}}},"/api/v1/agents/{id}/versions/{agentVersion}":{"patch":{"tags":["Agents"],"summary":"Patch agent version","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"agentVersion","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAgentVersionInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVersion"}}}},"400":{"description":"Invalid status value"},"404":{"description":"Agent or version not found"},"409":{"description":"Queue is assigned to another agent"},"503":{"description":"Concurrent activation did not stabilize"}}}},"/api/v1/models":{"get":{"tags":["Models"],"summary":"List models","parameters":[{"schema":{"type":"string"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"provider","in":"query"},{"schema":{"type":"string","enum":["active","disappeared"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelResponse"}}}}}}}},"/api/v1/models/{id}":{"get":{"tags":["Models"],"summary":"Get model","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponse"}}}}}}},"/api/v1/models/sync":{"post":{"tags":["Models"],"summary":"Sync models from provider","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"},"provider":{"type":"string"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerAvailableFrom":{"type":"string"},"providerEndOfLife":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}},"capabilities":{"type":"object","properties":{"reasoningEffort":{"type":"array","items":{"type":"string"}},"toolCalls":{"type":"boolean"},"vision":{"type":"boolean"},"streaming":{"type":"boolean"},"adaptiveThinking":{"type":"boolean"},"maxThinkingBudget":{"type":"number"}}}},"required":["id"]}},"scannedAt":{"type":"string"}},"required":["agentId","provider","models","scannedAt"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"array","items":{"type":"string"}},"removed":{"type":"array","items":{"type":"string"}},"unchanged":{"type":"array","items":{"type":"string"}}},"required":["added","removed","unchanged"]}}}}}}},"/api/v1/mcp/servers":{"get":{"tags":["MCP Servers"],"summary":"List MCP servers","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpServerResponse"}}}}}}},"post":{"tags":["MCP Servers"],"summary":"Create MCP server","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"name":{"type":"string"},"type":{"type":"string","enum":["sse","http","stdio"]},"url":{"type":"string"},"command":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},"env":{"type":"object","additionalProperties":{"type":"string"}},"headers":{"type":"array","items":{"$ref":"#/components/schemas/McpServerHeader"}},"sessionMode":{"type":"string","enum":["stateful","stateless"]},"version":{"type":"string"},"description":{"type":"string"}},"required":["_id","name","type"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerResponse"}}}}}}},"/api/v1/mcp/servers/{id}":{"get":{"tags":["MCP Servers"],"summary":"Get MCP server","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerResponse"}}}}}},"put":{"tags":["MCP Servers"],"summary":"Update MCP server","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMcpServerInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerResponse"}}}}}},"delete":{"tags":["MCP Servers"],"summary":"Delete MCP server","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"204":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/skills":{"get":{"tags":["Skills"],"summary":"List all skills","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SkillResponse"}}}}}}},"post":{"tags":["Skills"],"summary":"Create or import a skill","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}}}}},"/api/v1/skills/search":{"get":{"tags":["Skills"],"summary":"Search skills (internal + external)","parameters":[{"schema":{"type":"string"},"required":true,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SkillSearchResult"}}}}},"400":{"description":"Missing query parameter"}}}},"/api/v1/skills/search/external":{"get":{"tags":["Skills"],"summary":"Search external skills registry","parameters":[{"schema":{"type":"string"},"required":true,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Optional project scope. When provided, external results are de-duplicated only against skills already installed in that project."},"required":false,"description":"Optional project scope. When provided, external results are de-duplicated only against skills already installed in that project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SkillSearchResult"}}}}},"400":{"description":"Missing query parameter"}}}},"/api/v1/skills/discover":{"get":{"tags":["Skills"],"summary":"Discover skills in a GitHub repository","parameters":[{"schema":{"type":"string"},"required":true,"name":"source","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SkillDiscoveryResult"}}}}},"400":{"description":"Missing or malformed source parameter"},"404":{"description":"Repository not found"},"502":{"description":"GitHub API error"}}}},"/api/v1/skills/{id}(*)/revisions":{"get":{"tags":["Skills"],"summary":"List skill revisions","parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SkillRevisionResponse"}}}}},"404":{"description":"Skill not found"}}}},"/api/v1/skills/{id}(*)":{"get":{"tags":["Skills"],"summary":"Get skill by slug","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"404":{"description":"Skill not found"}}},"delete":{"tags":["Skills"],"summary":"Soft-delete a skill","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"204":{"description":"Success"},"404":{"description":"Skill not found"}}}},"/api/v1/skill-revisions/by-ref/{ref}(*)/archive":{"get":{"tags":["Skill Revisions"],"summary":"Download skill revision archive","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Binary tar.gz archive"},"404":{"description":"Skill revision or archive not found"},"500":{"description":"Blob storage error"}}}},"/api/v1/skill-revisions/by-ref/{ref}(*)":{"get":{"tags":["Skill Revisions"],"summary":"Get skill revision by ref","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRevisionResponse"}}}},"404":{"description":"Skill revision not found"}}}},"/api/v1/skill-revisions/{id}":{"get":{"tags":["Skill Revisions"],"summary":"Get skill revision by ID","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRevisionResponse"}}}},"404":{"description":"Skill revision not found"}}}},"/api/v1/skills/{id}(*)/resolve":{"post":{"tags":["Skills"],"summary":"Trigger skill resolution","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRevisionResponse"}}}},"404":{"description":"Skill not found"},"500":{"description":"Blob storage error"}}}},"/api/v1/codebases":{"get":{"tags":["Codebases"],"summary":"List all codebases","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CodebaseResponse"}}}}}}},"post":{"tags":["Codebases"],"summary":"Create a codebase (archive codebases require the archive file)","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"201":{"description":"Success"},"400":{"description":"Invalid input or missing archive"}}}},"/api/v1/codebases/{id}":{"get":{"tags":["Codebases"],"summary":"Get a codebase","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodebaseResponse"}}}},"404":{"description":"Codebase not found"}}},"patch":{"tags":["Codebases"],"summary":"Update a codebase","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCodebaseInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodebaseResponse"}}}},"404":{"description":"Codebase not found"}}},"delete":{"tags":["Codebases"],"summary":"Delete a codebase","responses":{"204":{"description":"Success"},"404":{"description":"Codebase not found"}}}},"/api/v1/codebases/{id}/revisions":{"get":{"tags":["Codebases"],"summary":"List codebase revisions","parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CodebaseRevisionResponse"}}}}},"404":{"description":"Codebase not found"}}},"post":{"tags":["Codebases"],"summary":"Resolve a new git codebase revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveCodebaseRevisionInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodebaseRevisionResponse"}}}},"400":{"description":"Not a git codebase"},"404":{"description":"Codebase not found"},"502":{"description":"GitHub resolution failed"}}}},"/api/v1/codebases/{id}/upload":{"post":{"tags":["Codebases"],"summary":"Upload a codebase archive as a new revision","responses":{"201":{"description":"Success"},"400":{"description":"Missing archive or not an archive codebase"},"404":{"description":"Codebase not found"}}}},"/api/v1/codebase-revisions/{id}/archive":{"get":{"tags":["Codebase Revisions"],"summary":"Download codebase revision archive","responses":{"200":{"description":"Binary tar.gz archive"},"404":{"description":"Revision or archive not found"},"500":{"description":"Blob storage error"}}}},"/api/v1/codebase-revisions/{id}":{"get":{"tags":["Codebase Revisions"],"summary":"Get codebase revision by id","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodebaseRevisionResponse"}}}},"404":{"description":"Revision not found"}}}},"/api/v1/resources":{"get":{"tags":["Resources"],"summary":"List all resources","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResourceResponse"}}}}}}},"post":{"tags":["Resources"],"summary":"Create a resource and its first revision","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResourceInput"}}}},"responses":{"201":{"description":"Success"},"400":{"description":"Invalid input"},"409":{"description":"Resource slug or revision ref already exists in this project"}}}},"/api/v1/resources/{id}":{"get":{"tags":["Resources"],"summary":"Get a resource","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceResponse"}}}},"404":{"description":"Resource not found"}}},"patch":{"tags":["Resources"],"summary":"Update a resource","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResourceInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceResponse"}}}},"404":{"description":"Resource not found"}}},"delete":{"tags":["Resources"],"summary":"Delete a resource","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"204":{"description":"Success"},"404":{"description":"Resource not found"}}}},"/api/v1/resources/{id}/revisions":{"get":{"tags":["Resource Revisions"],"summary":"List resource revisions","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResourceRevisionResponse"}}}}},"404":{"description":"Resource not found"}}},"post":{"tags":["Resource Revisions"],"summary":"Create a resource revision","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResourceRevisionInput"}}}},"responses":{"201":{"description":"Success"},"404":{"description":"Resource not found"},"409":{"description":"Resource revision ref already exists in this project"}}}},"/api/v1/resources/{id}/revisions/latest":{"get":{"tags":["Resource Revisions"],"summary":"Get the latest resource revision","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRevisionResponse"}}}},"404":{"description":"Revision not found"}}}},"/api/v1/resources/{id}/revisions/{revisionNumber}":{"get":{"tags":["Resource Revisions"],"summary":"Get a resource revision by resource and revision number","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"revisionNumber","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRevisionResponse"}}}},"404":{"description":"Revision not found"}}}},"/api/v1/resources/revisions/{id}":{"get":{"tags":["Resource Revisions"],"summary":"Get resource revision by id","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRevisionResponse"}}}},"404":{"description":"Revision not found"}}}},"/api/v1/extensions":{"get":{"tags":["Extensions"],"summary":"List all extensions","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExtensionResponse"}}}}}}},"post":{"tags":["Extensions"],"summary":"Create or import an extension","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExtensionInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionResponse"}}}}}}},"/api/v1/extensions/search":{"get":{"tags":["Extensions"],"summary":"Search extensions (internal + marketplace)","parameters":[{"schema":{"type":"string"},"required":true,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExtensionSearchResult"}}}}},"400":{"description":"Missing query parameter"}}}},"/api/v1/extensions/{id}":{"get":{"tags":["Extensions"],"summary":"Get extension by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionResponse"}}}}}},"put":{"tags":["Extensions"],"summary":"Update extension","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExtensionInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionResponse"}}}}}},"delete":{"tags":["Extensions"],"summary":"Delete extension","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"204":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/extensions/{id}/versions":{"get":{"tags":["Extensions"],"summary":"List available versions for an extension","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"preRelease","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExtensionVersionInfo"}}}}}}}},"/api/v1/insights":{"get":{"tags":["Insights"],"summary":"List insights","parameters":[{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"blocked","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InsightResponse"}}}}}}},"post":{"tags":["Insights"],"summary":"Create insight","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInsightInput"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightResponse"}}}}}}},"/api/v1/insights/search":{"get":{"tags":["Insights"],"summary":"Search insights","parameters":[{"schema":{"type":"string"},"required":true,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"blocked","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","example":"00000000-0000-0000-0000-000000000000"},"required":true,"description":"Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.","name":"projectId","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InsightResponse"}}}}}}}},"/api/v1/insights/{id}":{"get":{"tags":["Insights"],"summary":"Get insight","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightResponse"}}}},"404":{"description":"Insight not found"}}},"put":{"tags":["Insights"],"summary":"Update insight","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInsightInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightResponse"}}}},"404":{"description":"Insight not found"}}},"delete":{"tags":["Insights"],"summary":"Delete insight","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Insight not found"}}}},"/api/v1/insights/{id}/upvote":{"post":{"tags":["Insights"],"summary":"Upvote insight","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightResponse"}}}},"404":{"description":"Insight not found"}}}},"/api/v1/insights/{id}/downvote":{"post":{"tags":["Insights"],"summary":"Downvote insight","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightResponse"}}}},"404":{"description":"Insight not found"}}}},"/api/v1/insights/{id}/block":{"post":{"tags":["Insights"],"summary":"Block insight","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightResponse"}}}},"404":{"description":"Insight not found"}}}},"/api/v1/insights/{id}/unblock":{"post":{"tags":["Insights"],"summary":"Unblock insight","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightResponse"}}}},"404":{"description":"Insight not found"}}}},"/api/v1/insights/{id}/reports":{"get":{"tags":["Insights"],"summary":"Get reports referencing insight","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportResponse"}}}}},"404":{"description":"Insight not found"}}}},"/api/v1/feature-flags":{"get":{"tags":["Feature Flags"],"summary":"List feature flags","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeatureFlagResponse"}}}}}}}},"/api/v1/feature-flags/{key}":{"put":{"tags":["Feature Flags"],"summary":"Update feature flag","parameters":[{"schema":{"type":"string"},"required":true,"name":"key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeatureFlagInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagResponse"}}}}}}}},"webhooks":{}} \ No newline at end of file +{ + "components": { + "parameters": {}, + "schemas": { + "AccountInput": { + "additionalProperties": {}, + "properties": {}, + "type": "object" + }, + "AccountResponse": { + "additionalProperties": {}, + "properties": {}, + "type": "object" + }, + "AgentCapabilities": { + "properties": { + "supportsExtensions": { + "type": "boolean" + }, + "supportsMcpServers": { + "type": "boolean" + }, + "supportsReasoningEffort": { + "type": "boolean" + }, + "supportsResources": { + "type": "boolean" + }, + "supportsSkills": { + "type": "boolean" + } + }, + "type": "object" + }, + "AgentResponse": { + "properties": { + "_id": { + "type": "string" + }, + "available": { + "type": "boolean" + }, + "capabilities": { + "$ref": "#/components/schemas/AgentCapabilities" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "defaultModel": { + "type": "string" + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "modelProvider": { + "type": "string" + }, + "name": { + "type": "string" + }, + "supportedModels": { + "items": { + "type": "string" + }, + "type": "array" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "versions": { + "items": { + "$ref": "#/components/schemas/AgentVersion" + }, + "type": "array" + } + }, + "required": [ + "_id", + "name", + "supportedModels", + "createdAt" + ], + "type": "object" + }, + "AgentVersion": { + "properties": { + "agentVersion": { + "minLength": 1, + "type": "string" + }, + "buildTime": { + "minLength": 1, + "type": "string" + }, + "components": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "gitCommit": { + "minLength": 1, + "type": "string" + }, + "imageTag": { + "minLength": 1, + "type": "string" + }, + "queueName": { + "type": "string" + }, + "status": { + "enum": [ + "active", + "retired" + ], + "type": "string" + }, + "workerVersion": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "agentVersion", + "workerVersion", + "components", + "gitCommit", + "buildTime", + "imageTag", + "status", + "createdAt" + ], + "type": "object" + }, + "AggregateStats": { + "properties": { + "max": { + "type": "number" + }, + "mean": { + "type": "number" + }, + "min": { + "type": "number" + }, + "stdDev": { + "type": "number" + } + }, + "required": [ + "min", + "max", + "mean", + "stdDev" + ], + "type": [ + "object", + "null" + ] + }, + "BulkCreateReportsInput": { + "properties": { + "requestIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "templateId": { + "type": "string" + } + }, + "required": [ + "requestIds" + ], + "type": "object" + }, + "BulkReportStatusInput": { + "properties": { + "reportIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "reportIds" + ], + "type": "object" + }, + "BulkReportSummaryInput": { + "properties": { + "requestIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "requestIds" + ], + "type": "object" + }, + "BulkReportSummaryResponse": { + "additionalProperties": { + "$ref": "#/components/schemas/ReportSummary" + }, + "type": "object" + }, + "BulkResubmitInput": { + "properties": { + "count": { + "default": 1, + "maximum": 10, + "minimum": 1, + "type": "integer" + }, + "ids": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "overrides": { + "properties": { + "agentVersion": { + "type": "string" + }, + "extensions": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "maxIterations": { + "type": [ + "number", + "null" + ] + }, + "mcpServers": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "model": { + "type": [ + "string", + "null" + ] + }, + "profileId": { + "type": [ + "string", + "null" + ] + }, + "reasoningEffort": { + "type": [ + "string", + "null" + ] + }, + "skillRevisions": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "workerType": { + "type": "string" + } + }, + "type": "object" + } + }, + "required": [ + "ids" + ], + "type": "object" + }, + "BulkTriggerReportsInput": { + "properties": { + "requestIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "requestIds" + ], + "type": "object" + }, + "CodebaseResponse": { + "properties": { + "_id": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "creator": { + "type": "string" + }, + "defaultBranch": { + "type": "string" + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "latestRevisionId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "revisionCounter": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "source": { + "type": "string" + }, + "sourceType": { + "enum": [ + "git", + "archive" + ], + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "_id", + "slug", + "name", + "sourceType", + "revisionCounter", + "createdAt", + "projectId" + ], + "type": "object" + }, + "CodebaseRevisionResponse": { + "properties": { + "_id": { + "type": "string" + }, + "archiveUrl": { + "type": "string" + }, + "codebaseId": { + "type": "string" + }, + "commitTimestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "contentSha256": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "creator": { + "type": "string" + }, + "deduplicated": { + "type": "boolean" + }, + "fileCount": { + "type": "number" + }, + "originalFilename": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "requestedRef": { + "type": "string" + }, + "resolvedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "resolvedCommitSha": { + "type": "string" + }, + "revisionNumber": { + "type": "number" + }, + "sizeBytes": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "source": { + "type": "string" + }, + "sourceType": { + "enum": [ + "git", + "archive" + ], + "type": "string" + } + }, + "required": [ + "_id", + "codebaseId", + "slug", + "revisionNumber", + "ref", + "sourceType", + "archiveUrl", + "resolvedAt", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ConversationTurn": { + "properties": { + "aiCallCount": { + "type": "number" + }, + "chatResultFormat": { + "type": "string" + }, + "chatResultUrl": { + "type": "string" + }, + "codingAgentResponse": { + "type": "string" + }, + "criteriaResults": { + "items": { + "$ref": "#/components/schemas/CriterionResult" + }, + "type": "array" + }, + "durationMs": { + "type": "number" + }, + "gate": { + "enum": [ + "select", + "build", + "test", + "run", + "deploy" + ], + "type": "string" + }, + "harUrl": { + "type": "string" + }, + "iteration": { + "type": "number" + }, + "judgeFeedback": { + "type": "string" + }, + "passed": { + "type": "boolean" + }, + "rawChatFormat": { + "type": "string" + }, + "rawChatUrl": { + "type": "string" + }, + "snapshotUrl": { + "type": "string" + }, + "startedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "tokenUsage": { + "$ref": "#/components/schemas/TokenUsage" + }, + "toolCallCount": { + "type": "number" + }, + "toolCalls": { + "items": { + "properties": { + "arguments": { + "additionalProperties": {}, + "type": "object" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "response": { + "type": "string" + }, + "timestamp": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "arguments" + ], + "type": "object" + }, + "type": "array" + }, + "toolCallsUrl": { + "type": "string" + }, + "videoUrls": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "iteration", + "judgeFeedback", + "snapshotUrl", + "passed", + "timestamp" + ], + "type": "object" + }, + "CreateAgentInput": { + "properties": { + "_id": { + "minLength": 1, + "type": "string" + }, + "available": { + "type": "boolean" + }, + "capabilities": { + "$ref": "#/components/schemas/AgentCapabilities" + }, + "defaultModel": { + "type": "string" + }, + "description": { + "type": "string" + }, + "modelProvider": { + "type": "string" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "supportedModels": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "_id", + "name" + ], + "type": "object" + }, + "CreateCriteriaInput": { + "properties": { + "dependsOn": { + "items": { + "type": "string" + }, + "type": "array" + }, + "gates": { + "items": { + "enum": [ + "select", + "build", + "test", + "run", + "deploy" + ], + "type": "string" + }, + "type": "array" + }, + "id": { + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "prompt": { + "type": "string" + } + }, + "required": [ + "id", + "prompt" + ], + "type": "object" + }, + "CreateExtensionInput": { + "properties": { + "_id": { + "pattern": "^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+$", + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "origin": { + "enum": [ + "marketplace", + "manual" + ], + "type": "string" + }, + "publisher": { + "type": "string" + } + }, + "required": [ + "_id", + "publisher", + "name", + "origin" + ], + "type": "object" + }, + "CreateInsightInput": { + "properties": { + "category": { + "type": "string" + }, + "createdBy": { + "enum": [ + "agent", + "user" + ], + "type": "string" + }, + "description": { + "type": "string" + }, + "sourceReportId": { + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "type": "string" + } + }, + "required": [ + "title", + "description" + ], + "type": "object" + }, + "CreateProfileInput": { + "properties": { + "agentVersion": { + "type": "string" + }, + "description": { + "maxLength": 512, + "type": "string" + }, + "extensions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mcpServers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "model": { + "type": "string" + }, + "name": { + "maxLength": 128, + "minLength": 1, + "type": "string" + }, + "reasoningEffort": { + "type": "string" + }, + "resources": { + "items": { + "$ref": "#/components/schemas/ResourceBindingSpec" + }, + "type": "array" + }, + "skillRevisions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "workerType": { + "type": "string" + } + }, + "required": [ + "name", + "workerType", + "model" + ], + "type": "object" + }, + "CreateProjectInput": { + "properties": { + "creator": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "CreatePromptFeatureInput": { + "properties": { + "id": { + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "prompt": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/PromptType" + } + }, + "required": [ + "id", + "prompt" + ], + "type": "object" + }, + "CreateReportInput": { + "properties": { + "requestId": { + "type": "string" + }, + "templateId": { + "type": "string" + } + }, + "required": [ + "requestId" + ], + "type": "object" + }, + "CreateReportTemplateInput": { + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "model": { + "type": "string" + }, + "name": { + "type": "string" + }, + "systemPrompt": { + "$ref": "#/components/schemas/ReportTemplateSystemPrompt" + }, + "timeoutMs": { + "exclusiveMinimum": 0, + "type": "integer" + }, + "trigger": { + "$ref": "#/components/schemas/ReportTrigger" + }, + "userPrompt": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "userPrompt" + ], + "type": "object" + }, + "CreateRequestInput": { + "properties": { + "agentsMd": { + "type": "string" + }, + "agentsMdParentIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "codebaseRevisionId": { + "type": "string" + }, + "extensions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "gates": { + "items": { + "$ref": "#/components/schemas/GateConfig" + }, + "type": "array" + }, + "maxIterations": { + "maximum": 50, + "minimum": 1, + "type": "integer" + }, + "mcpServers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "model": { + "type": "string" + }, + "persona": { + "$ref": "#/components/schemas/Persona" + }, + "personaInstructions": { + "type": "string" + }, + "priority": { + "type": "integer" + }, + "profileId": { + "type": "string" + }, + "profileVariations": { + "items": { + "type": "string" + }, + "type": "array" + }, + "reasoningEffort": { + "type": "string" + }, + "resources": { + "items": { + "$ref": "#/components/schemas/ResourceBindingSpec" + }, + "type": "array" + }, + "scenario": { + "$ref": "#/components/schemas/Scenario" + }, + "skillRevisions": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "scenario" + ], + "type": "object" + }, + "CreateResourceInput": { + "properties": { + "creator": { + "type": "string" + }, + "description": { + "type": "string" + }, + "exports": { + "items": { + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", + "type": "string" + }, + "type": "array" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "parameters": { + "items": { + "$ref": "#/components/schemas/ResourceParameter" + }, + "type": "array" + }, + "setup": { + "$ref": "#/components/schemas/ResourceScript" + }, + "slug": { + "minLength": 1, + "type": "string" + }, + "teardown": { + "$ref": "#/components/schemas/ResourceScript" + } + }, + "required": [ + "name", + "setup" + ], + "type": "object" + }, + "CreateResourceRevisionInput": { + "properties": { + "creator": { + "type": "string" + }, + "exports": { + "items": { + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", + "type": "string" + }, + "type": "array" + }, + "parameters": { + "items": { + "$ref": "#/components/schemas/ResourceParameter" + }, + "type": "array" + }, + "setup": { + "$ref": "#/components/schemas/ResourceScript" + }, + "teardown": { + "$ref": "#/components/schemas/ResourceScript" + } + }, + "required": [ + "setup" + ], + "type": "object" + }, + "CreateSkillInput": { + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "origin": { + "enum": [ + "skills-sh", + "manual" + ], + "type": "string" + }, + "skillName": { + "type": "string" + }, + "source": { + "type": "string" + } + }, + "required": [ + "source", + "skillName", + "name", + "origin" + ], + "type": "object" + }, + "CreateTaskPromptInput": { + "properties": { + "text": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/PromptType" + } + }, + "required": [ + "text" + ], + "type": "object" + }, + "CriteriaGraph": { + "properties": { + "edges": { + "items": { + "$ref": "#/components/schemas/CriteriaGraphEdge" + }, + "type": "array" + }, + "nodes": { + "items": { + "$ref": "#/components/schemas/CriteriaGraphNode" + }, + "type": "array" + } + }, + "required": [ + "nodes", + "edges" + ], + "type": "object" + }, + "CriteriaGraphEdge": { + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + }, + "required": [ + "from", + "to" + ], + "type": "object" + }, + "CriteriaGraphNode": { + "properties": { + "dependsOn": { + "items": { + "type": "string" + }, + "type": "array" + }, + "gates": { + "items": { + "enum": [ + "select", + "build", + "test", + "run", + "deploy" + ], + "type": "string" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "prompt": { + "type": "string" + } + }, + "required": [ + "id", + "prompt" + ], + "type": "object" + }, + "CriteriaResponse": { + "properties": { + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "dependsOn": { + "items": { + "type": "string" + }, + "type": "array" + }, + "gates": { + "items": { + "enum": [ + "select", + "build", + "test", + "run", + "deploy" + ], + "type": "string" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "prompt", + "createdAt", + "projectId" + ], + "type": "object" + }, + "CriterionResult": { + "properties": { + "criterionId": { + "type": "string" + }, + "evaluated": { + "type": "boolean" + }, + "feedback": { + "type": "string" + }, + "passed": { + "type": "boolean" + } + }, + "required": [ + "criterionId", + "passed", + "feedback", + "evaluated" + ], + "type": "object" + }, + "Cursors": { + "properties": { + "next": { + "type": [ + "string", + "null" + ] + }, + "prev": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "next", + "prev" + ], + "type": "object" + }, + "ExtensionResponse": { + "properties": { + "_id": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "origin": { + "enum": [ + "marketplace", + "manual" + ], + "type": "string" + }, + "projectId": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "_id", + "slug", + "publisher", + "name", + "origin", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ExtensionSearchResult": { + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "internal": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "publisher", + "internal" + ], + "type": "object" + }, + "ExtensionVersionInfo": { + "properties": { + "lastUpdated": { + "type": "string" + }, + "preRelease": { + "type": "boolean" + }, + "version": { + "type": "string" + } + }, + "required": [ + "version", + "preRelease", + "lastUpdated" + ], + "type": "object" + }, + "FeatureFlagResponse": { + "properties": { + "enabled": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "key", + "label", + "enabled", + "updatedAt" + ], + "type": "object" + }, + "GateConfig": { + "properties": { + "criteria": { + "items": { + "type": "string" + }, + "type": "array" + }, + "gate": { + "enum": [ + "select", + "build", + "test", + "run", + "deploy" + ], + "type": "string" + }, + "maxIterations": { + "maximum": 50, + "minimum": 1, + "type": "integer" + }, + "promptId": { + "type": "string" + }, + "promptText": { + "type": "string" + } + }, + "required": [ + "gate", + "criteria" + ], + "type": "object" + }, + "GateRunSummary": { + "properties": { + "gate": { + "enum": [ + "select", + "build", + "test", + "run", + "deploy" + ], + "type": "string" + }, + "iterations": { + "minimum": 0, + "type": "integer" + }, + "status": { + "enum": [ + "passed", + "failed", + "skipped" + ], + "type": "string" + } + }, + "required": [ + "gate", + "status", + "iterations" + ], + "type": "object" + }, + "GroupAggregates": { + "properties": { + "completionTokens": { + "$ref": "#/components/schemas/AggregateStats" + }, + "count": { + "type": "number" + }, + "duration": { + "$ref": "#/components/schemas/AggregateStats" + }, + "outcomeCounts": { + "additionalProperties": { + "type": "number" + }, + "type": "object" + }, + "promptTokens": { + "$ref": "#/components/schemas/AggregateStats" + }, + "statusCounts": { + "additionalProperties": { + "type": "number" + }, + "type": "object" + }, + "turns": { + "$ref": "#/components/schemas/AggregateStats" + } + }, + "required": [ + "count", + "turns", + "duration", + "promptTokens", + "completionTokens", + "statusCounts", + "outcomeCounts" + ], + "type": "object" + }, + "GroupUniformValues": { + "properties": { + "agentVersion": { + "type": "string" + }, + "codebaseRevisionId": { + "type": "string" + }, + "extensions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mcpServers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "model": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "skillRevisions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "status": { + "enum": [ + "pending", + "queued", + "processing", + "paused", + "done" + ], + "type": "string" + }, + "submissionId": { + "type": "string" + }, + "task": { + "type": "string" + }, + "workerType": { + "type": "string" + } + }, + "type": "object" + }, + "InsightReference": { + "properties": { + "insightId": { + "type": "string" + }, + "isNew": { + "type": "boolean" + }, + "referencedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "insightId", + "referencedAt", + "isNew" + ], + "type": "object" + }, + "InsightResponse": { + "properties": { + "_id": { + "type": "string" + }, + "blocked": { + "type": "boolean" + }, + "category": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "createdBy": { + "enum": [ + "agent", + "user" + ], + "type": "string" + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "downvotes": { + "type": "number" + }, + "projectId": { + "type": "string" + }, + "referenceCount": { + "type": "number" + }, + "sourceReportId": { + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "upvotes": { + "type": "number" + } + }, + "required": [ + "_id", + "title", + "description", + "upvotes", + "downvotes", + "blocked", + "referenceCount", + "createdBy", + "createdAt", + "projectId" + ], + "type": "object" + }, + "KeyInput": { + "additionalProperties": {}, + "properties": {}, + "type": "object" + }, + "KeyResponse": { + "additionalProperties": {}, + "properties": {}, + "type": "object" + }, + "McpServerHeader": { + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "McpServerResponse": { + "properties": { + "_id": { + "type": "string" + }, + "args": { + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "env": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "headers": { + "items": { + "$ref": "#/components/schemas/McpServerHeader" + }, + "type": "array" + }, + "name": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "sessionMode": { + "enum": [ + "stateful", + "stateless" + ], + "type": "string" + }, + "slug": { + "type": "string" + }, + "type": { + "enum": [ + "sse", + "http", + "stdio" + ], + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "_id", + "slug", + "name", + "type", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ModelCapabilities": { + "properties": { + "adaptiveThinking": { + "type": "boolean" + }, + "maxThinkingBudget": { + "type": "number" + }, + "reasoningEffort": { + "items": { + "type": "string" + }, + "type": "array" + }, + "streaming": { + "type": "boolean" + }, + "toolCalls": { + "type": "boolean" + }, + "vision": { + "type": "boolean" + } + }, + "type": "object" + }, + "ModelResponse": { + "properties": { + "_id": { + "type": "string" + }, + "agentId": { + "type": "string" + }, + "capabilities": { + "$ref": "#/components/schemas/ModelCapabilities" + }, + "disappearedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "firstSeenAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "lastSeenAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "metadata": { + "additionalProperties": {}, + "type": "object" + }, + "modelId": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "providerAvailableFrom": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "providerEndOfLife": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "_id", + "modelId", + "provider", + "agentId", + "firstSeenAt", + "lastSeenAt" + ], + "type": "object" + }, + "PaginatedRunGroupsResponse": { + "properties": { + "cursors": { + "$ref": "#/components/schemas/Cursors" + }, + "data": { + "items": { + "$ref": "#/components/schemas/RunGroup" + }, + "type": "array" + }, + "estimatedTotal": { + "type": "number" + }, + "limit": { + "type": "number" + } + }, + "required": [ + "data", + "limit", + "estimatedTotal", + "cursors" + ], + "type": "object" + }, + "PaginatedRunsResponse": { + "properties": { + "cursors": { + "$ref": "#/components/schemas/Cursors" + }, + "data": { + "items": { + "$ref": "#/components/schemas/RequestResponse" + }, + "type": "array" + }, + "estimatedTotal": { + "type": "number" + }, + "limit": { + "type": "number" + } + }, + "required": [ + "data", + "limit", + "estimatedTotal", + "cursors" + ], + "type": "object" + }, + "PatchAgentVersionInput": { + "properties": { + "status": { + "enum": [ + "active", + "retired" + ], + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "PatchTaskPromptFeatureInput": { + "properties": { + "detected": { + "type": "boolean" + } + }, + "required": [ + "detected" + ], + "type": "object" + }, + "Persona": { + "properties": { + "experience": { + "enum": [ + "junior", + "senior" + ], + "type": "string" + }, + "personality": { + "enum": [ + "demanding", + "friendly" + ], + "type": "string" + }, + "type": { + "enum": [ + "traditional", + "ai_assisted", + "vibe" + ], + "type": "string" + }, + "verbosity": { + "enum": [ + "brief", + "moderate" + ], + "type": "string" + } + }, + "required": [ + "personality", + "experience", + "verbosity", + "type" + ], + "type": "object" + }, + "ProfileResponse": { + "properties": { + "_id": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "latestVersion": { + "type": "number" + }, + "name": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "_id", + "name", + "latestVersion", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ProfileVersionResponse": { + "properties": { + "_id": { + "type": "string" + }, + "agentVersion": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "extensions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mcpServers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "model": { + "type": "string" + }, + "profileId": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "reasoningEffort": { + "type": "string" + }, + "resources": { + "items": { + "$ref": "#/components/schemas/ResourceBindingSpec" + }, + "type": "array" + }, + "skillRevisions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "version": { + "type": "number" + }, + "workerType": { + "type": "string" + } + }, + "required": [ + "_id", + "profileId", + "version", + "workerType", + "model", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ProfileWithVersionResponse": { + "properties": { + "_id": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "latestVersion": { + "type": "number" + }, + "name": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "version": { + "$ref": "#/components/schemas/ProfileVersionResponse" + } + }, + "required": [ + "_id", + "name", + "latestVersion", + "createdAt", + "version", + "projectId" + ], + "type": "object" + }, + "ProjectResponse": { + "properties": { + "_id": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "creator": { + "type": "string" + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "_id", + "name", + "createdAt" + ], + "type": "object" + }, + "PromptFeatureResponse": { + "properties": { + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "id": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/PromptType" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "prompt", + "createdAt", + "projectId" + ], + "type": "object" + }, + "PromptFeatureResult": { + "properties": { + "detected": { + "type": "boolean" + }, + "evaluated": { + "type": "boolean" + }, + "featureId": { + "type": "string" + } + }, + "required": [ + "featureId", + "detected", + "evaluated" + ], + "type": "object" + }, + "PromptType": { + "enum": [ + "select", + "build", + "test", + "run", + "deploy", + "agents.md" + ], + "type": "string" + }, + "RegisterAgentVersionInput": { + "properties": { + "agentVersion": { + "minLength": 1, + "type": "string" + }, + "buildTime": { + "minLength": 1, + "type": "string" + }, + "components": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "gitCommit": { + "minLength": 1, + "type": "string" + }, + "imageTag": { + "minLength": 1, + "type": "string" + }, + "queueName": { + "minLength": 1, + "type": "string" + }, + "workerVersion": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "agentVersion", + "workerVersion", + "components", + "gitCommit", + "buildTime", + "imageTag", + "queueName" + ], + "type": "object" + }, + "ReportResponse": { + "properties": { + "_id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "error": { + "type": "string" + }, + "insightReferences": { + "items": { + "$ref": "#/components/schemas/InsightReference" + }, + "type": "array" + }, + "projectId": { + "type": "string" + }, + "reporter": { + "$ref": "#/components/schemas/Reporter" + }, + "requestId": { + "type": "string" + }, + "status": { + "enum": [ + "pending", + "generating", + "completed", + "failed" + ], + "type": "string" + }, + "templateId": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "_id", + "requestId", + "status", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ReportSummary": { + "properties": { + "completed": { + "type": "number" + }, + "failed": { + "type": "number" + }, + "generating": { + "type": "number" + }, + "pending": { + "type": "number" + }, + "total": { + "type": "number" + } + }, + "required": [ + "total", + "pending", + "generating", + "completed", + "failed" + ], + "type": "object" + }, + "ReportTemplateResponse": { + "properties": { + "_id": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "model": { + "type": "string" + }, + "name": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "systemPrompt": { + "$ref": "#/components/schemas/ReportTemplateSystemPrompt" + }, + "timeoutMs": { + "exclusiveMinimum": 0, + "type": "integer" + }, + "trigger": { + "$ref": "#/components/schemas/ReportTrigger" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "userPrompt": { + "type": "string" + } + }, + "required": [ + "_id", + "id", + "name", + "userPrompt", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ReportTemplateSystemPrompt": { + "properties": { + "content": { + "type": "string" + }, + "mode": { + "enum": [ + "append", + "override" + ], + "type": "string" + } + }, + "required": [ + "mode", + "content" + ], + "type": "object" + }, + "ReportTrigger": { + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "always" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "criteriaIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "match": { + "enum": [ + "any", + "all" + ], + "type": "string" + }, + "type": { + "enum": [ + "criteria" + ], + "type": "string" + } + }, + "required": [ + "type", + "criteriaIds" + ], + "type": "object" + }, + { + "properties": { + "taskPromptIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "taskPrompt" + ], + "type": "string" + } + }, + "required": [ + "type", + "taskPromptIds" + ], + "type": "object" + }, + { + "properties": { + "featureIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "match": { + "enum": [ + "any", + "all" + ], + "type": "string" + }, + "type": { + "enum": [ + "promptFeature" + ], + "type": "string" + } + }, + "required": [ + "type", + "featureIds" + ], + "type": "object" + } + ] + }, + "Reporter": { + "properties": { + "agentId": { + "type": "string" + }, + "agentVersion": { + "type": "string" + }, + "gitHash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "model": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "gitHash", + "model", + "agentId", + "agentVersion" + ], + "type": "object" + }, + "RequestResponse": { + "properties": { + "_id": { + "type": "string" + }, + "agentVersion": { + "type": "string" + }, + "agentsMdParentIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "agentsMdPromptId": { + "type": "string" + }, + "codebaseRevisionId": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "extensions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "gateSummaries": { + "items": { + "$ref": "#/components/schemas/GateRunSummary" + }, + "type": "array" + }, + "gates": { + "items": { + "$ref": "#/components/schemas/GateConfig" + }, + "type": "array" + }, + "maxIterations": { + "type": "number" + }, + "mcpServers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "model": { + "type": "string" + }, + "persona": { + "$ref": "#/components/schemas/Persona" + }, + "personaInstructions": { + "type": "string" + }, + "priority": { + "default": 0, + "type": "integer" + }, + "profileId": { + "type": "string" + }, + "profileVersionId": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "reasoningEffort": { + "type": "string" + }, + "resources": { + "items": { + "$ref": "#/components/schemas/ResourceBinding" + }, + "type": "array" + }, + "run": { + "$ref": "#/components/schemas/RunState" + }, + "scenario": { + "$ref": "#/components/schemas/Scenario" + }, + "skillRevisions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "submissionId": { + "type": "string" + }, + "taskPromptId": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "workerType": { + "type": "string" + } + }, + "required": [ + "_id", + "scenario", + "workerType", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ResolveCodebaseRevisionInput": { + "properties": { + "creator": { + "type": "string" + }, + "requestedRef": { + "type": "string" + } + }, + "type": "object" + }, + "ResourceBinding": { + "properties": { + "params": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "ref": { + "type": "string" + }, + "revisionId": { + "type": "string" + } + }, + "required": [ + "ref", + "revisionId", + "params" + ], + "type": "object" + }, + "ResourceBindingSpec": { + "anyOf": [ + { + "type": "string" + }, + { + "properties": { + "params": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "ref": { + "type": "string" + } + }, + "required": [ + "ref" + ], + "type": "object" + } + ] + }, + "ResourceParameter": { + "properties": { + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "example": { + "type": "string" + }, + "name": { + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", + "type": "string" + }, + "required": { + "default": false, + "type": "boolean" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "ResourceResponse": { + "properties": { + "_id": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "creator": { + "type": "string" + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "latestRevisionId": { + "type": "string" + }, + "latestRevisionNumber": { + "type": "number" + }, + "name": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "revisionCounter": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "_id", + "slug", + "name", + "revisionCounter", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ResourceRevisionResponse": { + "properties": { + "_id": { + "type": "string" + }, + "contentSha256": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "creator": { + "type": "string" + }, + "deduplicated": { + "type": "boolean" + }, + "exports": { + "items": { + "type": "string" + }, + "type": "array" + }, + "parameters": { + "items": { + "$ref": "#/components/schemas/ResourceParameter" + }, + "type": "array" + }, + "projectId": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "resourceId": { + "type": "string" + }, + "revisionNumber": { + "type": "number" + }, + "setup": { + "$ref": "#/components/schemas/ResourceScript" + }, + "slug": { + "type": "string" + }, + "teardown": { + "$ref": "#/components/schemas/ResourceScript" + } + }, + "required": [ + "_id", + "resourceId", + "slug", + "revisionNumber", + "ref", + "setup", + "exports", + "contentSha256", + "createdAt", + "projectId" + ], + "type": "object" + }, + "ResourceRunOutcome": { + "properties": { + "error": { + "type": "string" + }, + "params": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "published": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ref": { + "type": "string" + }, + "revisionId": { + "type": "string" + }, + "setupDurationMs": { + "type": "number" + }, + "setupSucceeded": { + "type": "boolean" + }, + "slug": { + "type": "string" + }, + "teardownRan": { + "type": "boolean" + } + }, + "required": [ + "ref", + "slug", + "revisionId", + "setupSucceeded", + "published" + ], + "type": "object" + }, + "ResourceScript": { + "properties": { + "sh": { + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "RunFacetBucket": { + "properties": { + "count": { + "type": "number" + }, + "value": { + "type": "string" + } + }, + "required": [ + "value", + "count" + ], + "type": "object" + }, + "RunFacetsResponse": { + "properties": { + "facets": { + "properties": { + "agentVersion": { + "items": { + "$ref": "#/components/schemas/RunFacetBucket" + }, + "type": "array" + }, + "model": { + "items": { + "$ref": "#/components/schemas/RunFacetBucket" + }, + "type": "array" + }, + "os": { + "items": { + "$ref": "#/components/schemas/RunFacetBucket" + }, + "type": "array" + }, + "outcome": { + "items": { + "$ref": "#/components/schemas/RunFacetBucket" + }, + "type": "array" + }, + "priority": { + "items": { + "$ref": "#/components/schemas/RunFacetBucket" + }, + "type": "array" + }, + "profileId": { + "items": { + "$ref": "#/components/schemas/RunFacetBucket" + }, + "type": "array" + }, + "status": { + "items": { + "$ref": "#/components/schemas/RunFacetBucket" + }, + "type": "array" + }, + "workerType": { + "items": { + "$ref": "#/components/schemas/RunFacetBucket" + }, + "type": "array" + } + }, + "required": [ + "workerType", + "status", + "outcome", + "model", + "os", + "priority", + "agentVersion", + "profileId" + ], + "type": "object" + }, + "total": { + "type": "number" + } + }, + "required": [ + "total", + "facets" + ], + "type": "object" + }, + "RunGroup": { + "properties": { + "aggregates": { + "$ref": "#/components/schemas/GroupAggregates" + }, + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "runIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "uniform": { + "$ref": "#/components/schemas/GroupUniformValues" + } + }, + "required": [ + "key", + "label", + "runIds", + "aggregates", + "uniform" + ], + "type": "object" + }, + "RunState": { + "properties": { + "_id": { + "type": "string" + }, + "aiCallCount": { + "type": "number" + }, + "attemptNumber": { + "minimum": 1, + "type": "integer" + }, + "durationMs": { + "type": "number" + }, + "error": { + "type": "string" + }, + "finishedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "harUrl": { + "type": "string" + }, + "lastHeartbeatAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "logsUrl": { + "type": "string" + }, + "mcpRegistered": { + "type": "boolean" + }, + "os": { + "properties": { + "arch": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + } + }, + "required": [ + "platform", + "release", + "arch" + ], + "type": "object" + }, + "outcome": { + "enum": [ + "succeeded", + "failed", + "finished" + ], + "type": "string" + }, + "pausedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "queuedQueueName": { + "type": "string" + }, + "rawChatFormat": { + "type": "string" + }, + "rawChatUrl": { + "type": "string" + }, + "resources": { + "items": { + "$ref": "#/components/schemas/ResourceRunOutcome" + }, + "type": "array" + }, + "result": { + "type": "string" + }, + "resumedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "setupVideoUrls": { + "items": { + "type": "string" + }, + "type": "array" + }, + "startedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "status": { + "enum": [ + "pending", + "queued", + "processing", + "paused", + "done" + ], + "type": "string" + }, + "tokenUsage": { + "$ref": "#/components/schemas/TokenUsage" + }, + "turns": { + "items": { + "$ref": "#/components/schemas/ConversationTurn" + }, + "type": "array" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "videoUrls": { + "items": { + "type": "string" + }, + "type": "array" + }, + "worker": { + "properties": { + "instanceId": { + "type": "string" + }, + "podName": { + "type": "string" + } + }, + "required": [ + "instanceId" + ], + "type": "object" + }, + "workerVersion": { + "type": "string" + } + }, + "required": [ + "_id", + "attemptNumber", + "status" + ], + "type": "object" + }, + "Scenario": { + "properties": { + "criteria": { + "items": { + "type": "string" + }, + "type": "array" + }, + "task": { + "type": "string" + }, + "version": { + "enum": [ + "v1", + "v2" + ], + "type": "string" + } + }, + "required": [ + "task", + "criteria" + ], + "type": "object" + }, + "SkillDiscoveryResult": { + "properties": { + "currentRevisionCommitSha": { + "type": "string" + }, + "description": { + "type": "string" + }, + "existsInLibrary": { + "type": "boolean" + }, + "lastImportedAt": { + "type": "string" + }, + "latestUpstreamCommitSha": { + "type": "string" + }, + "name": { + "type": "string" + }, + "skillName": { + "type": "string" + }, + "skillPath": { + "type": "string" + }, + "updateAvailable": { + "type": "boolean" + } + }, + "required": [ + "skillName", + "skillPath" + ], + "type": "object" + }, + "SkillResponse": { + "properties": { + "_id": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "origin": { + "enum": [ + "skills-sh", + "manual" + ], + "type": "string" + }, + "projectId": { + "type": "string" + }, + "skillName": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "source": { + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "_id", + "slug", + "source", + "skillName", + "name", + "origin", + "createdAt", + "projectId" + ], + "type": "object" + }, + "SkillRevisionResponse": { + "properties": { + "_id": { + "type": "string" + }, + "allowedTools": { + "type": "string" + }, + "archiveUrl": { + "type": "string" + }, + "commitHash": { + "type": "string" + }, + "commitTimestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "compatibility": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "license": { + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "name": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "resolvedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "skillName": { + "type": "string" + }, + "skillPath": { + "type": "string" + }, + "source": { + "type": "string" + }, + "validationWarnings": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "_id", + "ref", + "source", + "skillName", + "skillPath", + "commitHash", + "commitTimestamp", + "name", + "description", + "content", + "archiveUrl", + "resolvedAt", + "createdAt", + "projectId" + ], + "type": "object" + }, + "SkillSearchResult": { + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "installs": { + "type": "number" + }, + "internal": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "source": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "source", + "internal" + ], + "type": "object" + }, + "SuggestedPromptFeature": { + "properties": { + "behavior": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "suggestedId": { + "type": "string" + } + }, + "required": [ + "suggestedId", + "behavior", + "prompt" + ], + "type": "object" + }, + "TaskPromptResponse": { + "properties": { + "_id": { + "type": "string" + }, + "contentBlobUrl": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deletedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "features": { + "items": { + "$ref": "#/components/schemas/PromptFeatureResult" + }, + "type": "array" + }, + "featuresExtractedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "keyId": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "text": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/PromptType" + } + }, + "required": [ + "_id", + "keyId", + "createdAt", + "projectId" + ], + "type": "object" + }, + "TokenUsage": { + "properties": { + "completionTokens": { + "type": "number" + }, + "promptTokens": { + "type": "number" + }, + "totalTokens": { + "type": "number" + } + }, + "required": [ + "promptTokens", + "completionTokens", + "totalTokens" + ], + "type": "object" + }, + "TriggerReportsInput": { + "properties": { + "requestId": { + "type": "string" + } + }, + "required": [ + "requestId" + ], + "type": "object" + }, + "UpdateAgentInput": { + "properties": { + "available": { + "type": "boolean" + }, + "capabilities": { + "$ref": "#/components/schemas/AgentCapabilities" + }, + "defaultModel": { + "type": "string" + }, + "description": { + "type": "string" + }, + "modelProvider": { + "type": "string" + }, + "name": { + "type": "string" + }, + "supportedModels": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "UpdateCodebaseInput": { + "properties": { + "defaultBranch": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "UpdateCriteriaInput": { + "properties": { + "dependsOn": { + "items": { + "type": "string" + }, + "type": "array" + }, + "gates": { + "items": { + "enum": [ + "select", + "build", + "test", + "run", + "deploy" + ], + "type": "string" + }, + "type": "array" + }, + "prompt": { + "type": "string" + } + }, + "type": "object" + }, + "UpdateExtensionInput": { + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "UpdateFeatureFlagInput": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "type": "object" + }, + "UpdateInsightInput": { + "properties": { + "category": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "type": "string" + } + }, + "type": "object" + }, + "UpdateMcpServerInput": { + "properties": { + "args": { + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "type": "string" + }, + "description": { + "type": "string" + }, + "env": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "headers": { + "items": { + "$ref": "#/components/schemas/McpServerHeader" + }, + "type": "array" + }, + "name": { + "type": "string" + }, + "sessionMode": { + "enum": [ + "stateful", + "stateless" + ], + "type": "string" + }, + "type": { + "enum": [ + "sse", + "http", + "stdio" + ], + "type": "string" + }, + "url": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "UpdateProfileIdentity": { + "properties": { + "description": { + "maxLength": 512, + "type": "string" + }, + "name": { + "maxLength": 128, + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "UpdateProjectInput": { + "properties": { + "description": { + "type": "string" + }, + "name": { + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "UpdatePromptFeatureInput": { + "properties": { + "prompt": { + "type": "string" + } + }, + "type": "object" + }, + "UpdateReportTemplateInput": { + "properties": { + "description": { + "type": "string" + }, + "model": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "systemPrompt": { + "allOf": [ + { + "$ref": "#/components/schemas/ReportTemplateSystemPrompt" + }, + { + "type": [ + "object", + "null" + ] + } + ] + }, + "timeoutMs": { + "exclusiveMinimum": 0, + "type": [ + "integer", + "null" + ] + }, + "trigger": { + "$ref": "#/components/schemas/ReportTrigger" + }, + "userPrompt": { + "type": "string" + } + }, + "type": "object" + }, + "UpdateResourceInput": { + "properties": { + "description": { + "type": "string" + }, + "name": { + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "UserMeResponse": { + "properties": { + "displayName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "id": { + "type": "string" + }, + "idp": { + "type": "string" + }, + "idpTenant": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "ValidateKeyInput": { + "properties": { + "token": { + "type": "string" + } + }, + "required": [ + "token" + ], + "type": "object" + } + }, + "securitySchemes": { + "bearerAuth": { + "bearerFormat": "JWT", + "description": "Use the unchanged IdP access token, without the Bearer prefix.", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "description": "REST API for the Scope platform — benchmarking AI coding agents", + "title": "Scope API", + "version": "1.0.0" + }, + "openapi": "3.1.0", + "paths": { + "/about": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "buildTime": { + "type": "string" + }, + "description": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "workers": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "version", + "buildTime", + "environment", + "description", + "workers" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "API metadata", + "tags": [ + "System" + ] + } + }, + "/api/v1/accounts": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AccountResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List accounts", + "tags": [ + "Accounts" + ] + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountResponse" + } + } + }, + "description": "Account created" + } + }, + "summary": "Create account", + "tags": [ + "Accounts" + ] + } + }, + "/api/v1/accounts/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ], + "type": "object" + } + } + }, + "description": "Account deleted" + } + }, + "summary": "Delete account", + "tags": [ + "Accounts" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get account", + "tags": [ + "Accounts" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountResponse" + } + } + }, + "description": "Account updated" + } + }, + "summary": "Update account", + "tags": [ + "Accounts" + ] + } + }, + "/api/v1/agents": { + "get": { + "parameters": [ + { + "in": "query", + "name": "modelProvider", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeDeleted", + "required": false, + "schema": { + "enum": [ + "true", + "false" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AgentResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List agents", + "tags": [ + "Agents" + ] + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Validation error" + }, + "409": { + "description": "Restored agent versions conflict with an active queue owner" + } + }, + "summary": "Create or update agent (upsert)", + "tags": [ + "Agents" + ] + } + }, + "/api/v1/agents/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Agent not found" + } + }, + "summary": "Delete agent", + "tags": [ + "Agents" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeDeleted", + "required": false, + "schema": { + "enum": [ + "true", + "false" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Agent not found" + } + }, + "summary": "Get agent", + "tags": [ + "Agents" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAgentInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Validation error" + }, + "404": { + "description": "Agent not found" + } + }, + "summary": "Update agent", + "tags": [ + "Agents" + ] + } + }, + "/api/v1/agents/{id}/versions": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "status", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AgentVersion" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Agent not found" + } + }, + "summary": "List agent versions", + "tags": [ + "Agents" + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterAgentVersionInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersion" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Validation error" + }, + "404": { + "description": "Agent not found" + }, + "409": { + "description": "Queue is assigned to another agent" + }, + "503": { + "description": "Concurrent registration did not stabilize" + } + }, + "summary": "Register agent version (upsert)", + "tags": [ + "Agents" + ] + } + }, + "/api/v1/agents/{id}/versions/{agentVersion}": { + "patch": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "agentVersion", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchAgentVersionInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersion" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid status value" + }, + "404": { + "description": "Agent or version not found" + }, + "409": { + "description": "Queue is assigned to another agent" + }, + "503": { + "description": "Concurrent activation did not stabilize" + } + }, + "summary": "Patch agent version", + "tags": [ + "Agents" + ] + } + }, + "/api/v1/analysis": { + "get": { + "description": "Aggregates pass@k / success@T metrics over a single project's done runs. Requires ?projectId=.", + "parameters": [ + { + "in": "query", + "name": "worker", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "taskPromptId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "criteria", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "features", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "submissionId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "k", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": {}, + "description": "Analysis metrics", + "properties": {}, + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Compute pass@k / success@T metrics", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/codebase-revisions/{id}": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CodebaseRevisionResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Revision not found" + } + }, + "summary": "Get codebase revision by id", + "tags": [ + "Codebase Revisions" + ] + } + }, + "/api/v1/codebase-revisions/{id}/archive": { + "get": { + "responses": { + "200": { + "description": "Binary tar.gz archive" + }, + "404": { + "description": "Revision or archive not found" + }, + "500": { + "description": "Blob storage error" + } + }, + "summary": "Download codebase revision archive", + "tags": [ + "Codebase Revisions" + ] + } + }, + "/api/v1/codebases": { + "get": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/CodebaseResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List all codebases", + "tags": [ + "Codebases" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "Success" + }, + "400": { + "description": "Invalid input or missing archive" + } + }, + "summary": "Create a codebase (archive codebases require the archive file)", + "tags": [ + "Codebases" + ] + } + }, + "/api/v1/codebases/{id}": { + "delete": { + "responses": { + "204": { + "description": "Success" + }, + "404": { + "description": "Codebase not found" + } + }, + "summary": "Delete a codebase", + "tags": [ + "Codebases" + ] + }, + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CodebaseResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Codebase not found" + } + }, + "summary": "Get a codebase", + "tags": [ + "Codebases" + ] + }, + "patch": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCodebaseInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CodebaseResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Codebase not found" + } + }, + "summary": "Update a codebase", + "tags": [ + "Codebases" + ] + } + }, + "/api/v1/codebases/{id}/revisions": { + "get": { + "parameters": [ + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/CodebaseRevisionResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Codebase not found" + } + }, + "summary": "List codebase revisions", + "tags": [ + "Codebases" + ] + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveCodebaseRevisionInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CodebaseRevisionResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Not a git codebase" + }, + "404": { + "description": "Codebase not found" + }, + "502": { + "description": "GitHub resolution failed" + } + }, + "summary": "Resolve a new git codebase revision", + "tags": [ + "Codebases" + ] + } + }, + "/api/v1/codebases/{id}/upload": { + "post": { + "responses": { + "201": { + "description": "Success" + }, + "400": { + "description": "Missing archive or not an archive codebase" + }, + "404": { + "description": "Codebase not found" + } + }, + "summary": "Upload a codebase archive as a new revision", + "tags": [ + "Codebases" + ] + } + }, + "/api/v1/criteria": { + "get": { + "parameters": [ + { + "in": "query", + "name": "q", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Comma-separated criterion IDs to include", + "in": "query", + "name": "ids", + "required": false, + "schema": { + "description": "Comma-separated criterion IDs to include", + "type": "string" + } + }, + { + "description": "When true and ids is set, also include dependency ancestors", + "in": "query", + "name": "ancestors", + "required": false, + "schema": { + "description": "When true and ids is set, also include dependency ancestors", + "enum": [ + "true", + "false" + ], + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/CriteriaResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List criteria", + "tags": [ + "Criteria" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCriteriaInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CriteriaResponse" + } + } + }, + "description": "Success" + }, + "409": { + "description": "Criterion already exists" + } + }, + "summary": "Create criterion", + "tags": [ + "Criteria" + ] + } + }, + "/api/v1/criteria/generate-prompt": { + "post": { + "parameters": [ + { + "description": "Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.", + "in": "query", + "name": "projectId", + "required": false, + "schema": { + "description": "Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "behavior": { + "type": "string" + }, + "currentId": { + "type": "string" + }, + "gates": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "behavior" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "prompt": { + "type": "string" + }, + "suggestedChildren": { + "items": { + "type": "string" + }, + "type": "array" + }, + "suggestedId": { + "type": "string" + }, + "suggestedParents": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "prompt", + "suggestedId", + "suggestedParents", + "suggestedChildren" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Empty behavior string" + }, + "503": { + "description": "LLM not configured" + } + }, + "summary": "Generate criterion prompt from behavior", + "tags": [ + "Criteria" + ] + } + }, + "/api/v1/criteria/graph": { + "get": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CriteriaGraph" + } + } + }, + "description": "Success" + } + }, + "summary": "Get criteria DAG", + "tags": [ + "Criteria" + ] + } + }, + "/api/v1/criteria/mdp": { + "get": { + "parameters": [ + { + "in": "query", + "name": "criteria", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "features", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "since", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "worker", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "taskPromptId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": {}, + "properties": {}, + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Compute MDP transitions", + "tags": [ + "Criteria" + ] + } + }, + "/api/v1/criteria/seed": { + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "criteria": { + "items": { + "$ref": "#/components/schemas/CreateCriteriaInput" + }, + "type": "array" + } + }, + "required": [ + "criteria" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "seeded": { + "type": "number" + } + }, + "required": [ + "seeded", + "errors" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Seed batch would introduce a dependency cycle" + } + }, + "summary": "Seed criteria in bulk", + "tags": [ + "Criteria" + ] + } + }, + "/api/v1/criteria/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + } + }, + "required": [ + "id", + "deleted" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Criterion not found" + }, + "409": { + "description": "Criterion has dependents" + } + }, + "summary": "Soft-delete criterion", + "tags": [ + "Criteria" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CriteriaResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Criterion not found" + } + }, + "summary": "Get criterion", + "tags": [ + "Criteria" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCriteriaInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CriteriaResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid dependency reference or self-reference" + }, + "404": { + "description": "Criterion not found" + } + }, + "summary": "Update criterion", + "tags": [ + "Criteria" + ] + } + }, + "/api/v1/extensions": { + "get": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExtensionResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List all extensions", + "tags": [ + "Extensions" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExtensionInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Create or import an extension", + "tags": [ + "Extensions" + ] + } + }, + "/api/v1/extensions/search": { + "get": { + "parameters": [ + { + "in": "query", + "name": "q", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExtensionSearchResult" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Missing query parameter" + } + }, + "summary": "Search extensions (internal + marketplace)", + "tags": [ + "Extensions" + ] + } + }, + "/api/v1/extensions/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Delete extension", + "tags": [ + "Extensions" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get extension by ID", + "tags": [ + "Extensions" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateExtensionInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Update extension", + "tags": [ + "Extensions" + ] + } + }, + "/api/v1/extensions/{id}/versions": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "preRelease", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExtensionVersionInfo" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List available versions for an extension", + "tags": [ + "Extensions" + ] + } + }, + "/api/v1/feature-flags": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/FeatureFlagResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List feature flags", + "tags": [ + "Feature Flags" + ] + } + }, + "/api/v1/feature-flags/{key}": { + "put": { + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFeatureFlagInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeatureFlagResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Update feature flag", + "tags": [ + "Feature Flags" + ] + } + }, + "/api/v1/insights": { + "get": { + "parameters": [ + { + "in": "query", + "name": "q", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "blocked", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/InsightResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List insights", + "tags": [ + "Insights" + ] + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInsightInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Create insight", + "tags": [ + "Insights" + ] + } + }, + "/api/v1/insights/search": { + "get": { + "parameters": [ + { + "in": "query", + "name": "q", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "blocked", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/InsightResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Search insights", + "tags": [ + "Insights" + ] + } + }, + "/api/v1/insights/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Insight not found" + } + }, + "summary": "Delete insight", + "tags": [ + "Insights" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Insight not found" + } + }, + "summary": "Get insight", + "tags": [ + "Insights" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInsightInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Insight not found" + } + }, + "summary": "Update insight", + "tags": [ + "Insights" + ] + } + }, + "/api/v1/insights/{id}/block": { + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Insight not found" + } + }, + "summary": "Block insight", + "tags": [ + "Insights" + ] + } + }, + "/api/v1/insights/{id}/downvote": { + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Insight not found" + } + }, + "summary": "Downvote insight", + "tags": [ + "Insights" + ] + } + }, + "/api/v1/insights/{id}/reports": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReportResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Insight not found" + } + }, + "summary": "Get reports referencing insight", + "tags": [ + "Insights" + ] + } + }, + "/api/v1/insights/{id}/unblock": { + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Insight not found" + } + }, + "summary": "Unblock insight", + "tags": [ + "Insights" + ] + } + }, + "/api/v1/insights/{id}/upvote": { + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Insight not found" + } + }, + "summary": "Upvote insight", + "tags": [ + "Insights" + ] + } + }, + "/api/v1/keys": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/KeyResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List keys", + "tags": [ + "Keys" + ] + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyResponse" + } + } + }, + "description": "Key created" + } + }, + "summary": "Create key", + "tags": [ + "Keys" + ] + } + }, + "/api/v1/keys/preview": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyResponse" + } + } + }, + "description": "Key preview" + } + }, + "summary": "Preview key", + "tags": [ + "Keys" + ] + } + }, + "/api/v1/keys/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ], + "type": "object" + } + } + }, + "description": "Key deleted" + } + }, + "summary": "Delete key", + "tags": [ + "Keys" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get key", + "tags": [ + "Keys" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyResponse" + } + } + }, + "description": "Key updated" + } + }, + "summary": "Update key", + "tags": [ + "Keys" + ] + } + }, + "/api/v1/keys/{id}/validate": { + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateKeyInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": {}, + "description": "Key validation result", + "properties": {}, + "type": "object" + } + } + }, + "description": "Validation result" + } + }, + "summary": "Validate key", + "tags": [ + "Keys" + ] + } + }, + "/api/v1/mcp/servers": { + "get": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/McpServerResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List MCP servers", + "tags": [ + "MCP Servers" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "_id": { + "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "args": { + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "type": "string" + }, + "description": { + "type": "string" + }, + "env": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "headers": { + "items": { + "$ref": "#/components/schemas/McpServerHeader" + }, + "type": "array" + }, + "name": { + "type": "string" + }, + "sessionMode": { + "enum": [ + "stateful", + "stateless" + ], + "type": "string" + }, + "type": { + "enum": [ + "sse", + "http", + "stdio" + ], + "type": "string" + }, + "url": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "_id", + "name", + "type" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/McpServerResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Create MCP server", + "tags": [ + "MCP Servers" + ] + } + }, + "/api/v1/mcp/servers/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Delete MCP server", + "tags": [ + "MCP Servers" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/McpServerResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get MCP server", + "tags": [ + "MCP Servers" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMcpServerInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/McpServerResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Update MCP server", + "tags": [ + "MCP Servers" + ] + } + }, + "/api/v1/models": { + "get": { + "parameters": [ + { + "in": "query", + "name": "agentId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "provider", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "status", + "required": false, + "schema": { + "enum": [ + "active", + "disappeared" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ModelResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List models", + "tags": [ + "Models" + ] + } + }, + "/api/v1/models/sync": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "agentId": { + "type": "string" + }, + "models": { + "items": { + "properties": { + "capabilities": { + "properties": { + "adaptiveThinking": { + "type": "boolean" + }, + "maxThinkingBudget": { + "type": "number" + }, + "reasoningEffort": { + "items": { + "type": "string" + }, + "type": "array" + }, + "streaming": { + "type": "boolean" + }, + "toolCalls": { + "type": "boolean" + }, + "vision": { + "type": "boolean" + } + }, + "type": "object" + }, + "id": { + "type": "string" + }, + "metadata": { + "additionalProperties": {}, + "type": "object" + }, + "providerAvailableFrom": { + "type": "string" + }, + "providerEndOfLife": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "type": "array" + }, + "provider": { + "type": "string" + }, + "scannedAt": { + "type": "string" + } + }, + "required": [ + "agentId", + "provider", + "models", + "scannedAt" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "added": { + "items": { + "type": "string" + }, + "type": "array" + }, + "removed": { + "items": { + "type": "string" + }, + "type": "array" + }, + "unchanged": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "added", + "removed", + "unchanged" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Sync models from provider", + "tags": [ + "Models" + ] + } + }, + "/api/v1/models/{id}": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get model", + "tags": [ + "Models" + ] + } + }, + "/api/v1/profiles": { + "get": { + "parameters": [ + { + "in": "query", + "name": "workerType", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ProfileWithVersionResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List profiles", + "tags": [ + "Profiles" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProfileInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileWithVersionResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Create a new profile", + "tags": [ + "Profiles" + ] + } + }, + "/api/v1/profiles/{profileId}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "profileId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Delete profile", + "tags": [ + "Profiles" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "profileId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileWithVersionResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get profile with latest version", + "tags": [ + "Profiles" + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "name": "profileId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "agentVersion": { + "type": "string" + }, + "extensions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mcpServers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "model": { + "type": "string" + }, + "reasoningEffort": { + "type": "string" + }, + "resources": { + "items": { + "$ref": "#/components/schemas/ResourceBindingSpec" + }, + "type": "array" + }, + "skillRevisions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "workerType": { + "type": "string" + } + }, + "required": [ + "workerType", + "model" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileVersionResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Create new profile version", + "tags": [ + "Profiles" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "profileId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateProfileIdentity" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Update profile identity", + "tags": [ + "Profiles" + ] + } + }, + "/api/v1/profiles/{profileId}/versions": { + "get": { + "parameters": [ + { + "in": "path", + "name": "profileId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ProfileVersionResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List profile versions", + "tags": [ + "Profiles" + ] + } + }, + "/api/v1/profiles/{profileId}/versions/{version}": { + "get": { + "parameters": [ + { + "in": "path", + "name": "profileId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": false, + "schema": { + "type": [ + "number", + "null" + ] + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileVersionResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get profile version", + "tags": [ + "Profiles" + ] + } + }, + "/api/v1/projects": { + "get": { + "parameters": [ + { + "description": "When true, include soft-deleted projects in the result", + "in": "query", + "name": "includeDeleted", + "required": false, + "schema": { + "description": "When true, include soft-deleted projects in the result", + "enum": [ + "true", + "false" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ProjectResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List all projects", + "tags": [ + "Projects" + ] + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid input" + } + }, + "summary": "Create a project", + "tags": [ + "Projects" + ] + } + }, + "/api/v1/projects/{id}": { + "delete": { + "responses": { + "204": { + "description": "Success" + }, + "404": { + "description": "Project not found" + } + }, + "summary": "Soft-delete a project", + "tags": [ + "Projects" + ] + }, + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Project not found" + } + }, + "summary": "Get a project", + "tags": [ + "Projects" + ] + }, + "patch": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateProjectInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Project not found" + } + }, + "summary": "Update a project", + "tags": [ + "Projects" + ] + } + }, + "/api/v1/projects/{id}/restore": { + "post": { + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Project not found" + } + }, + "summary": "Restore a soft-deleted project", + "tags": [ + "Projects" + ] + } + }, + "/api/v1/prompt-features": { + "get": { + "parameters": [ + { + "in": "query", + "name": "q", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "select", + "agents.md" + ], + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PromptFeatureResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List features", + "tags": [ + "Prompt Features" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePromptFeatureInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptFeatureResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid input" + }, + "409": { + "description": "Feature already exists" + } + }, + "summary": "Create feature", + "tags": [ + "Prompt Features" + ] + } + }, + "/api/v1/prompt-features/extract-from-text": { + "post": { + "parameters": [ + { + "description": "Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.", + "in": "query", + "name": "projectId", + "required": false, + "schema": { + "description": "Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "model": { + "type": "string" + }, + "text": { + "type": "string" + }, + "type": { + "enum": [ + "select", + "agents.md" + ], + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "cached": { + "type": "boolean" + }, + "features": { + "items": { + "$ref": "#/components/schemas/PromptFeatureResult" + }, + "type": "array" + }, + "suggestedFeatures": { + "items": { + "$ref": "#/components/schemas/SuggestedPromptFeature" + }, + "type": "array" + } + }, + "required": [ + "features", + "cached" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Empty text string" + }, + "503": { + "description": "LLM not configured" + } + }, + "summary": "Extract features from text", + "tags": [ + "Prompt Features" + ] + } + }, + "/api/v1/prompt-features/generate-prompt": { + "post": { + "parameters": [ + { + "description": "Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.", + "in": "query", + "name": "projectId", + "required": false, + "schema": { + "description": "Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "behavior": { + "type": "string" + }, + "currentId": { + "type": "string" + } + }, + "required": [ + "behavior" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "prompt": { + "type": "string" + } + }, + "required": [ + "prompt" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Empty behavior string" + }, + "503": { + "description": "LLM not configured" + } + }, + "summary": "Generate prompt feature from behavior", + "tags": [ + "Prompt Features" + ] + } + }, + "/api/v1/prompt-features/seed": { + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "features": { + "items": { + "$ref": "#/components/schemas/CreatePromptFeatureInput" + }, + "type": "array" + } + }, + "required": [ + "features" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "seeded": { + "type": "number" + } + }, + "required": [ + "seeded", + "errors" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Seed prompt features in bulk", + "tags": [ + "Prompt Features" + ] + } + }, + "/api/v1/prompt-features/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + } + }, + "required": [ + "id", + "deleted" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Feature not found" + } + }, + "summary": "Soft-delete feature", + "tags": [ + "Prompt Features" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptFeatureResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Feature not found" + } + }, + "summary": "Get feature", + "tags": [ + "Prompt Features" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePromptFeatureInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptFeatureResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid input" + }, + "404": { + "description": "Feature not found" + } + }, + "summary": "Update feature", + "tags": [ + "Prompt Features" + ] + } + }, + "/api/v1/report-templates": { + "get": { + "parameters": [ + { + "in": "query", + "name": "q", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReportTemplateResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List report templates", + "tags": [ + "Report Templates" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReportTemplateInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportTemplateResponse" + } + } + }, + "description": "Success" + }, + "409": { + "description": "Report template already exists" + } + }, + "summary": "Create report template", + "tags": [ + "Report Templates" + ] + } + }, + "/api/v1/report-templates/available-models": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "properties": { + "modelId": { + "type": "string" + } + }, + "required": [ + "modelId" + ], + "type": "object" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List models available for report generation", + "tags": [ + "Report Templates" + ] + } + }, + "/api/v1/report-templates/default-system-prompt": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "content": { + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Get default system prompt", + "tags": [ + "Report Templates" + ] + } + }, + "/api/v1/report-templates/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Report template not found" + } + }, + "summary": "Delete report template", + "tags": [ + "Report Templates" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportTemplateResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Report template not found" + } + }, + "summary": "Get report template", + "tags": [ + "Report Templates" + ] + }, + "put": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateReportTemplateInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportTemplateResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Report template not found" + } + }, + "summary": "Update report template", + "tags": [ + "Report Templates" + ] + } + }, + "/api/v1/reports": { + "get": { + "parameters": [ + { + "in": "query", + "name": "requestId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "projectId", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReportResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List reports", + "tags": [ + "Reports" + ] + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReportInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid input" + }, + "404": { + "description": "Run or template not found" + } + }, + "summary": "Create report", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/reports/bulk-create": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkCreateReportsInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReportResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid input" + } + }, + "summary": "Bulk create reports", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/reports/bulk-status": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkReportStatusInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReportResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid input" + } + }, + "summary": "Bulk get report statuses", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/reports/bulk-summary": { + "post": { + "description": "Returns aggregated report status counts per run. Only the latest report per template is counted (re-triggers are deduplicated).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkReportSummaryInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkReportSummaryResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid input" + } + }, + "summary": "Bulk get report summary per run", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/reports/bulk-trigger": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkTriggerReportsInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": {}, + "properties": {}, + "type": "object" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid input" + } + }, + "summary": "Bulk trigger reports", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/reports/trigger": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerReportsInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "reports": { + "items": { + "$ref": "#/components/schemas/ReportResponse" + }, + "type": "array" + }, + "triggered": { + "type": "number" + } + }, + "required": [ + "triggered", + "reports" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid input" + }, + "404": { + "description": "Run not found" + } + }, + "summary": "Trigger reports", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/reports/{id}": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Report not found" + } + }, + "summary": "Get report", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/reports/{id}/insights": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightResponse" + }, + { + "properties": { + "isNew": { + "type": "boolean" + }, + "referencedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + ] + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Report not found" + } + }, + "summary": "Get insights for report", + "tags": [ + "Reports" + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "insightId": { + "type": "string" + }, + "isNew": { + "type": "boolean" + } + }, + "required": [ + "insightId" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "insightId": { + "type": "string" + }, + "isNew": { + "type": "boolean" + }, + "referencedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "insightId", + "referencedAt", + "isNew" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Report or insight not found" + }, + "409": { + "description": "Insight already referenced by this report" + } + }, + "summary": "Link insight to report", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/reports/{id}/logs": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Server-sent event stream of log entries" + }, + "404": { + "description": "Report not found" + } + }, + "summary": "Stream report logs (SSE)", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/requests": { + "get": { + "parameters": [ + { + "in": "query", + "name": "worker", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + { + "in": "query", + "name": "taskPromptId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "criteria", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "submissionId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "profileId", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + { + "in": "query", + "name": "status", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + { + "in": "query", + "name": "outcome", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + { + "in": "query", + "name": "model", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + { + "in": "query", + "name": "os", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + { + "in": "query", + "name": "priority", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + { + "in": "query", + "name": "agentVersion", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + { + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "groupBy", + "required": false, + "schema": { + "enum": [ + "task", + "submissionId", + "profile" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "in": "query", + "name": "after", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "before", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "last", + "required": false, + "schema": { + "enum": [ + "true", + "false" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "sortBy", + "required": false, + "schema": { + "enum": [ + "created", + "updated", + "priority", + "worker", + "status", + "id", + "duration", + "createdAt" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "sortDir", + "required": false, + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "createdAfter", + "required": false, + "schema": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + { + "in": "query", + "name": "createdBefore", + "required": false, + "schema": { + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + { + "in": "query", + "name": "turns", + "required": false, + "schema": { + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + { + "in": "query", + "name": "turnsOp", + "required": false, + "schema": { + "enum": [ + "eq", + "gte", + "lte" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "maxIterations", + "required": false, + "schema": { + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + { + "in": "query", + "name": "maxIterationsOp", + "required": false, + "schema": { + "enum": [ + "eq", + "gte", + "lte" + ], + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PaginatedRunsResponse" + }, + { + "$ref": "#/components/schemas/PaginatedRunGroupsResponse" + } + ] + } + } + }, + "description": "Success" + } + }, + "summary": "List requests", + "tags": [ + "Requests" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateRequestInput" + }, + { + "properties": { + "agentVersion": { + "type": "string" + }, + "codebase": { + "type": "string" + }, + "count": { + "default": 1, + "maximum": 10, + "minimum": 1, + "type": "number" + }, + "skills": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/RequestResponse" + }, + { + "items": { + "$ref": "#/components/schemas/RequestResponse" + }, + "type": "array" + } + ] + } + } + }, + "description": "Success" + } + }, + "summary": "Submit request(s)", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/archive": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "ids": { + "items": { + "type": "string" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Gzipped batch archive containing individual run archives" + }, + "400": { + "description": "Invalid input" + }, + "404": { + "description": "One or more runs not found" + } + }, + "summary": "Download batch archive of multiple runs", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/bulk": { + "delete": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "ids": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "deleted": { + "type": "number" + } + }, + "required": [ + "deleted" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Bulk soft-delete requests", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/bulk-cancel": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "ids": { + "items": { + "type": "string" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "cancelled": { + "type": "number" + }, + "results": { + "items": { + "properties": { + "cancelled": { + "type": "boolean" + }, + "error": { + "type": "string" + }, + "id": { + "type": "string" + }, + "previousStatus": { + "type": "string" + } + }, + "required": [ + "id", + "cancelled" + ], + "type": "object" + }, + "type": "array" + }, + "skipped": { + "type": "number" + } + }, + "required": [ + "cancelled", + "skipped", + "results" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Cancel multiple requests", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/bulk-pause": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "ids": { + "items": { + "type": "string" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "skipped": { + "type": "number" + }, + "updated": { + "type": "number" + } + }, + "required": [ + "updated", + "skipped" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Pause multiple requests", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/bulk-priority": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "ids": { + "items": { + "type": "string" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "priority": { + "type": "integer" + } + }, + "required": [ + "ids", + "priority" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "skipped": { + "type": "number" + }, + "updated": { + "type": "number" + } + }, + "required": [ + "updated", + "skipped" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Set priority on multiple requests", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/bulk-resubmit": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkResubmitInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/RequestResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Bulk resubmit requests", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/bulk-resume": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "ids": { + "items": { + "type": "string" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "skipped": { + "type": "number" + }, + "updated": { + "type": "number" + } + }, + "required": [ + "updated", + "skipped" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Resume multiple paused requests", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/bulk-retry": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "force": { + "type": "boolean" + }, + "ids": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "results": { + "items": { + "properties": { + "attemptNumber": { + "type": "integer" + }, + "error": { + "type": "string" + }, + "requestId": { + "type": "string" + }, + "runId": { + "type": "string" + } + }, + "required": [ + "requestId" + ], + "type": "object" + }, + "type": "array" + }, + "retried": { + "type": "integer" + }, + "skipped": { + "type": "integer" + } + }, + "required": [ + "retried", + "skipped", + "results" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Bulk retry requests (start new attempts)", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/facets": { + "get": { + "description": "Returns every distinct value and its full-dataset count per categorical filter dimension for the Runs list rail. Counts are absolute over all non-deleted runs **in the given project**: they intentionally ignore the active search, date range, iteration, and categorical selections so every selectable value stays visible with a stable count. Requires ?projectId=. Computed with parallel $group aggregations (Cosmos has no $facet) and cached per-project for a short TTL.", + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunFacetsResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "List run filter facets", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Soft-delete request", + "tags": [ + "Requests" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Get request", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/archive": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Gzipped run archive" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download full run archive", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/atif": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The iteration number (1-based)", + "in": "query", + "name": "iteration", + "required": true, + "schema": { + "description": "The iteration number (1-based)", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ATIF v1.7 trajectory JSON file" + }, + "400": { + "description": "Missing or invalid iteration" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download ATIF trajectory file for a specific iteration", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/cancel": { + "post": { + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "string" + }, + "outcome": { + "type": "string" + }, + "previousStatus": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": [ + "id", + "previousStatus", + "status", + "outcome" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Cancel a request (marks as done/failed and signals worker to exit)", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/har": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "HAR-format JSON file" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download HAR file", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/logs": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Server-sent event stream of log entries" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Stream request logs (SSE)", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/pause": { + "post": { + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": [ + "id", + "status" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Pause a single request", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/priority": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "priority": { + "type": "integer" + } + }, + "required": [ + "priority" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "string" + }, + "priority": { + "type": "number" + } + }, + "required": [ + "id", + "priority" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Set priority on a single request", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/reports": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReportResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Run not found" + } + }, + "summary": "Get reports for request", + "tags": [ + "Reports" + ] + } + }, + "/api/v1/requests/{id}/resume": { + "post": { + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": [ + "id", + "status" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Resume a paused request", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/retry": { + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "force": { + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "attemptNumber": { + "type": "integer" + }, + "requestId": { + "type": "string" + }, + "runId": { + "type": "string" + } + }, + "required": [ + "requestId", + "runId", + "attemptNumber" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Request not found" + }, + "409": { + "description": "Conflict — request is not in a retryable state, or a concurrent retry won the race" + }, + "422": { + "description": "Cannot retry — current run not yet terminal" + } + }, + "summary": "Retry a request (start a new attempt)", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/runs": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/RunState" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Request not found" + } + }, + "summary": "List attempts for a request", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/runs/{runId}": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "runId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunState" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Request or run not found" + } + }, + "summary": "Get a single attempt", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/runs/{runId}/archive": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "runId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Gzipped run archive" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download full run archive for a specific attempt", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/runs/{runId}/atif": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "runId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The iteration number (1-based)", + "in": "query", + "name": "iteration", + "required": true, + "schema": { + "description": "The iteration number (1-based)", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ATIF v1.7 trajectory JSON file" + }, + "400": { + "description": "Missing or invalid iteration" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download ATIF trajectory file for a specific attempt and iteration", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/runs/{runId}/har": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "runId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "HAR-format JSON file" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download HAR file for a specific attempt", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/runs/{runId}/logs": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "runId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Server-sent event stream of log entries" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Stream logs for a specific attempt (SSE)", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/runs/{runId}/snapshots/{iteration}": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "runId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "iteration", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Gzipped snapshot archive" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download iteration snapshot for a specific attempt", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/runs/{runId}/tool-calls": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "runId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "JSONL stream — one ToolCall per line" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download per-iteration tool-calls JSONL for a specific attempt", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/runs/{runId}/video": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "runId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "WebM video recording (supports Range requests)" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download session recording for a specific attempt", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/snapshots/{iteration}": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "iteration", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Gzipped snapshot archive" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download iteration snapshot", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/tool-calls": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "JSONL stream — one ToolCall per line" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download per-iteration tool-calls JSONL", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/requests/{id}/video": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "WebM video recording (supports Range requests)" + }, + "404": { + "description": "Not found" + } + }, + "summary": "Download session recording", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/resources": { + "get": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ResourceResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List all resources", + "tags": [ + "Resources" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateResourceInput" + } + } + } + }, + "responses": { + "201": { + "description": "Success" + }, + "400": { + "description": "Invalid input" + }, + "409": { + "description": "Resource slug or revision ref already exists in this project" + } + }, + "summary": "Create a resource and its first revision", + "tags": [ + "Resources" + ] + } + }, + "/api/v1/resources/revisions/{id}": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceRevisionResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Revision not found" + } + }, + "summary": "Get resource revision by id", + "tags": [ + "Resource Revisions" + ] + } + }, + "/api/v1/resources/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "404": { + "description": "Resource not found" + } + }, + "summary": "Delete a resource", + "tags": [ + "Resources" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Resource not found" + } + }, + "summary": "Get a resource", + "tags": [ + "Resources" + ] + }, + "patch": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateResourceInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Resource not found" + } + }, + "summary": "Update a resource", + "tags": [ + "Resources" + ] + } + }, + "/api/v1/resources/{id}/revisions": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ResourceRevisionResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Resource not found" + } + }, + "summary": "List resource revisions", + "tags": [ + "Resource Revisions" + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateResourceRevisionInput" + } + } + } + }, + "responses": { + "201": { + "description": "Success" + }, + "404": { + "description": "Resource not found" + }, + "409": { + "description": "Resource revision ref already exists in this project" + } + }, + "summary": "Create a resource revision", + "tags": [ + "Resource Revisions" + ] + } + }, + "/api/v1/resources/{id}/revisions/latest": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceRevisionResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Revision not found" + } + }, + "summary": "Get the latest resource revision", + "tags": [ + "Resource Revisions" + ] + } + }, + "/api/v1/resources/{id}/revisions/{revisionNumber}": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "revisionNumber", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceRevisionResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Revision not found" + } + }, + "summary": "Get a resource revision by resource and revision number", + "tags": [ + "Resource Revisions" + ] + } + }, + "/api/v1/runs/upload": { + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "Success" + } + }, + "summary": "Import run archive", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/runs/upload-batch": { + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "207": { + "description": "Multi-status: 201 if all runs imported, 400 if none imported, 207 if partial" + }, + "400": { + "description": "No archive uploaded, empty archive, or all runs failed" + } + }, + "summary": "Import batch run archive", + "tags": [ + "Requests" + ] + } + }, + "/api/v1/skill-revisions/by-ref/{ref}(*)": { + "get": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillRevisionResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Skill revision not found" + } + }, + "summary": "Get skill revision by ref", + "tags": [ + "Skill Revisions" + ] + } + }, + "/api/v1/skill-revisions/by-ref/{ref}(*)/archive": { + "get": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Binary tar.gz archive" + }, + "404": { + "description": "Skill revision or archive not found" + }, + "500": { + "description": "Blob storage error" + } + }, + "summary": "Download skill revision archive", + "tags": [ + "Skill Revisions" + ] + } + }, + "/api/v1/skill-revisions/{id}": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillRevisionResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Skill revision not found" + } + }, + "summary": "Get skill revision by ID", + "tags": [ + "Skill Revisions" + ] + } + }, + "/api/v1/skills": { + "get": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SkillResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List all skills", + "tags": [ + "Skills" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSkillInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Create or import a skill", + "tags": [ + "Skills" + ] + } + }, + "/api/v1/skills/discover": { + "get": { + "parameters": [ + { + "in": "query", + "name": "source", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SkillDiscoveryResult" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Missing or malformed source parameter" + }, + "404": { + "description": "Repository not found" + }, + "502": { + "description": "GitHub API error" + } + }, + "summary": "Discover skills in a GitHub repository", + "tags": [ + "Skills" + ] + } + }, + "/api/v1/skills/search": { + "get": { + "parameters": [ + { + "in": "query", + "name": "q", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SkillSearchResult" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Missing query parameter" + } + }, + "summary": "Search skills (internal + external)", + "tags": [ + "Skills" + ] + } + }, + "/api/v1/skills/search/external": { + "get": { + "parameters": [ + { + "in": "query", + "name": "q", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Optional project scope. When provided, external results are de-duplicated only against skills already installed in that project.", + "in": "query", + "name": "projectId", + "required": false, + "schema": { + "description": "Optional project scope. When provided, external results are de-duplicated only against skills already installed in that project.", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SkillSearchResult" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Missing query parameter" + } + }, + "summary": "Search external skills registry", + "tags": [ + "Skills" + ] + } + }, + "/api/v1/skills/{id}(*)": { + "delete": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "404": { + "description": "Skill not found" + } + }, + "summary": "Soft-delete a skill", + "tags": [ + "Skills" + ] + }, + "get": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Skill not found" + } + }, + "summary": "Get skill by slug", + "tags": [ + "Skills" + ] + } + }, + "/api/v1/skills/{id}(*)/resolve": { + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillRevisionResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Skill not found" + }, + "500": { + "description": "Blob storage error" + } + }, + "summary": "Trigger skill resolution", + "tags": [ + "Skills" + ] + } + }, + "/api/v1/skills/{id}(*)/revisions": { + "get": { + "parameters": [ + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SkillRevisionResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Skill not found" + } + }, + "summary": "List skill revisions", + "tags": [ + "Skills" + ] + } + }, + "/api/v1/task-prompts": { + "get": { + "parameters": [ + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": [ + "number", + "null" + ] + } + }, + { + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": [ + "number", + "null" + ] + } + }, + { + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "type", + "required": false, + "schema": { + "$ref": "#/components/schemas/PromptType" + } + }, + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/TaskPromptResponse" + }, + "type": "array" + }, + "limit": { + "type": "number" + }, + "offset": { + "type": "number" + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total", + "limit", + "offset" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "List task prompts", + "tags": [ + "Task Prompts" + ] + }, + "post": { + "parameters": [ + { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "in": "query", + "name": "projectId", + "required": true, + "schema": { + "description": "Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.", + "example": "00000000-0000-0000-0000-000000000000", + "minLength": 1, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTaskPromptInput" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskPromptResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Empty text string" + } + }, + "summary": "Create or find task prompt", + "tags": [ + "Task Prompts" + ] + } + }, + "/api/v1/task-prompts/generate": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "description": { + "type": "string" + }, + "existingPrompt": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "tasks": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "tasks" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "503": { + "description": "LLM not configured" + } + }, + "summary": "Generate task prompts", + "tags": [ + "Task Prompts" + ] + } + }, + "/api/v1/task-prompts/{id}": { + "delete": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "deleted": { + "type": "boolean" + } + }, + "required": [ + "deleted" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Task prompt not found" + } + }, + "summary": "Soft-delete task prompt", + "tags": [ + "Task Prompts" + ] + }, + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskPromptResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Task prompt not found" + } + }, + "summary": "Get task prompt", + "tags": [ + "Task Prompts" + ] + } + }, + "/api/v1/task-prompts/{id}/content": { + "get": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "id", + "text" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Task prompt not found" + } + }, + "summary": "Get resolved task prompt content", + "tags": [ + "Task Prompts" + ] + } + }, + "/api/v1/task-prompts/{id}/extract-features": { + "post": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "force", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "model": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "cached": { + "type": "boolean" + }, + "features": { + "items": { + "$ref": "#/components/schemas/PromptFeatureResult" + }, + "type": "array" + }, + "featuresExtractedAt": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "suggestedFeatures": { + "items": { + "$ref": "#/components/schemas/SuggestedPromptFeature" + }, + "type": "array" + }, + "taskPromptId": { + "type": "string" + } + }, + "required": [ + "taskPromptId", + "features", + "cached" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Task prompt not found" + }, + "503": { + "description": "LLM not configured" + } + }, + "summary": "Extract features from task prompt", + "tags": [ + "Task Prompts" + ] + } + }, + "/api/v1/task-prompts/{id}/features/{featureId}": { + "patch": { + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "featureId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchTaskPromptFeatureInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskPromptResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Invalid detected value" + }, + "404": { + "description": "Task prompt or feature not found" + } + }, + "summary": "Toggle feature flag on task prompt", + "tags": [ + "Task Prompts" + ] + } + }, + "/api/v1/users/me": { + "get": { + "description": "Read the existing authenticated Scope identity without enrollment or profile writes. Responses must not be HTTP-cached.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserMeResponse" + } + } + }, + "description": "Success" + }, + "401": { + "description": "Not authenticated" + }, + "403": { + "description": "User is not enrolled or is disabled" + }, + "503": { + "description": "Authentication service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get the authenticated user's identity", + "tags": [ + "Users" + ] + }, + "post": { + "description": "JIT-enroll the authenticated user, refresh their profile and lastLoginAt, apply bootstrap-admin rules, and warm the access cache. Use this only after an explicit IdP login; do not prefetch, poll, or automatically retry transient failures.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserMeResponse" + } + } + }, + "description": "Success" + }, + "401": { + "description": "Not authenticated" + }, + "403": { + "description": "User is disabled" + }, + "503": { + "description": "Authentication service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Enroll the authenticated user", + "tags": [ + "Users" + ] + } + }, + "/api/v1/version": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "buildTime": { + "type": "string" + }, + "commit": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "strictAgentCapabilities": { + "type": "boolean" + } + }, + "required": [ + "commit", + "buildTime", + "environment", + "strictAgentCapabilities" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Version info", + "tags": [ + "System" + ] + } + }, + "/health": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "status", + "version" + ], + "type": "object" + } + } + }, + "description": "Success" + } + }, + "summary": "Liveness probe", + "tags": [ + "Health" + ] + } + }, + "/ready": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "migrations": {}, + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + } + } + }, + "description": "Success" + }, + "503": { + "description": "Service is not ready" + } + }, + "summary": "Readiness probe", + "tags": [ + "Health" + ] + } + } + }, + "servers": [ + { + "description": "Current server", + "url": "/" + } + ], + "webhooks": {} +}