openapi: 3.0.3 info: title: AEP BFF API version: 1.0.0 servers: - url: /api/v1 paths: /ae-studio: get: description: > Returns the org's AE Studio state and, once ready, the public URLs of its three services. Starts an idempotent, single-flight converge when what is installed has drifted from what the org wants, and never waits for it. An install with no AE Studio configuration answers failed, not an error. operationId: get-ae-studio responses: '200': content: application/json: schema: $ref: '#/components/schemas/AeStudio' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: The org's AE Studio state and URLs tags: - AE Studio /config: get: operationId: get-config responses: '200': content: application/json: schema: $ref: '#/components/schemas/ConfigProjection' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get the organization's integration config (statuses/kinds, no secrets) tags: - Org Config patch: operationId: update-config requestBody: content: application/json: schema: $ref: '#/components/schemas/ConfigPatch' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/ConfigProjection' description: OK '502': content: application/json: schema: $ref: '#/components/schemas/Error' description: >- `agent_manager_not_updated` (on `body.llm`): the key is saved, but pushing it to Agent Manager's provider failed, so governed deploys fail until the key is saved again. `secret_store_write_failed` (on `body.llm` for the connection key, `body.agents` for the subscription token, `body.gitProvider` for the GitHub token): the secret store did not accept the secret and nothing is saved. `ae_studio_setup_incomplete` (on `body.gitProvider`): the GitHub connection is saved but AE Studio setup did not finish; saving the token again retries. Also an upstream failure while probing a section (for example `llm_upstream_error`). '503': content: application/json: schema: $ref: '#/components/schemas/Error' description: >- `secrets_delivery_unavailable` (on `body.llm`, `body.agents` or `body.gitProvider`): this installation has no secret store configured, so the secret cannot be saved. Nothing is saved. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Patch the organization's integration config (per-section, atomic) tags: - Org Config /config/llm/test: post: operationId: test-llm-connection description: >- Probes a model connection WITHOUT saving anything: the same checks a save of the `llm` section runs, on the connection the body describes merged over the saved one (an omitted field keeps the saved value, and on first connect the format's defaults fill `baseURL` and `model`). `apiKey` is required: the probe runs only with the key the request carries, and a stored key is never read back (it lives only in the vault). A body without one is refused 400 `llm_key_required`. The probe follows no redirects. Refusals use the `llm` section's codes (see ConfigPatch.llm) on `body.llm`. Rate-limited per organization: more than 10 calls in a minute answer 429 `llm_test_rate_limited`. Every call is logged with the organization and the host it probed. requestBody: content: application/json: schema: $ref: '#/components/schemas/LLMPatch' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/LLMCheck' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Test a model connection without saving it tags: - Org Config /config/git-provider/disconnect: post: operationId: disconnect-git-provider responses: '200': content: application/json: schema: $ref: '#/components/schemas/DisconnectOutputBody' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Disconnect the git provider (cascade) for the org tags: - Org Config /config/idp/discovery: get: operationId: discover-idp parameters: - description: OIDC issuer URL to fetch the discovery document for explode: false in: query name: issuer schema: description: OIDC issuer URL to fetch the discovery document for type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/DiscoverOutputBody' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Discover an OIDC issuer's metadata tags: - Org Config /dependencies/external-resources: get: operationId: list-external-resources responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/ExternalResourceDTO' type: array nullable: true description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List the org's external-resource catalog tags: - Dependencies post: operationId: register-external-resource requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterExternalResourceRequest' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/ExternalResourceDTO' description: Created Registered External resource (envCells populated; secrets never echoed) '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Missing required field, empty env value, or invalid resource-docs row '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Logical name already exists (Registered or Project External) default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Register a Registered External resource tags: - Dependencies /dependencies/external-resources/{name}: put: operationId: update-external-resource parameters: - description: External resource name in: path name: name required: true schema: description: External resource name type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterExternalResourceRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/ExternalResourceDTO' description: Updated Registered External resource (envCells populated; secrets never echoed) '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Key mutation, unset secret with empty value, missing required field, empty non-secret env value, or invalid resource-docs row '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Name is not in the catalog '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Name is a Project External resource (no org value plane) default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Update a Registered External resource tags: - Dependencies delete: operationId: delete-external-resource parameters: - description: External resource name in: path name: name required: true schema: description: External resource name type: string responses: '204': description: No Content default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Delete an external-resource catalog entry (409 if in use) tags: - Dependencies /dependencies/platform-resource-types: get: operationId: list-platform-resource-types responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/PlatformResourceTypeDTO' type: array nullable: true description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List the platform-provisioned resource types available on the cluster tags: - Dependencies /dependencies/org-endpoints: get: operationId: list-org-endpoints responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/OrgEndpointDTO' type: array nullable: true description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List Marketplace Endpoints (namespace-visible org-service APIs) tags: - Dependencies /dependencies/environments: get: operationId: list-org-environments responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/EnvironmentDTO' type: array nullable: true description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List OpenChoreo Environments for Registered External env-value cells tags: - Dependencies /organizations: get: operationId: list-organizations responses: '200': content: application/json: schema: $ref: '#/components/schemas/OrganizationList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List organizations tags: - Organizations /projects: get: operationId: list-projects parameters: - description: Opaque pagination cursor explode: false in: query name: cursor schema: description: Opaque pagination cursor type: string - description: Case-insensitive substring match on name and displayName explode: false in: query name: search schema: description: Case-insensitive substring match on name and displayName type: string - description: Maximum number of items to return (server default when absent) explode: false in: query name: limit schema: description: Maximum number of items to return (server default when absent) type: integer responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProjectList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List projects tags: - Projects post: operationId: create-project requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateProjectRequest' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/Project' description: Created default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Create a project tags: - Projects /projects/{projectName}: delete: operationId: delete-project parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '204': description: No Content default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Delete a project tags: - Projects get: operationId: get-project parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/Project' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get a project tags: - Projects /projects/{projectName}/build: post: operationId: build-project parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/BuildRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/BuildResponse' description: OK '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: >- The requested `version` name is already in use, or a build is already running for this project, or (`publisher_credentials_missing`) the organization has no build credentials: "Reconnect GitHub to set up this organization's build credentials". Nothing was cut. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Trigger a project build tags: - Projects /projects/{projectName}/build/preflight: get: operationId: get-build-preflight parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/BuildPreflight' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Compute the build dependency-drawer preflight tags: - Projects /projects/{projectName}/builds: get: description: The version ledger — one entry per built spec version tag, newest first, each carrying the state of the newest milestone run that has worked it. DB-only (no GitHub, no cluster), so the console may fetch it on demand and poll it while a run is live. Task counts are deliberately absent; the console renders them from the list-tasks response it already holds. operationId: list-project-builds parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/BuildList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List project builds tags: - Projects /projects/{projectName}/builds/{tag}/runs: get: description: The version's whole run story, straight from the platform's own tables — every milestone run that has worked this version (a spec build, then any incident adoption into the same milestone), newest first, each with its cycle records in dispatch order. DB-only, so the console may poll it while a run is live without spending GitHub rate. The validation verdict is a RUN property and is read here; there is no separate validation endpoint. operationId: list-build-runs parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Spec version tag — the name the user gave the version, resolved to a milestone number through the run rows — never by matching titles against GitHub. in: path name: tag required: true schema: description: >- Spec version tag — the name the user gave the version. The pattern is the character set; the server applies the same full rule it applies when a version is created, which additionally refuses a leading `-` or `.`, a trailing `.` or `.lock`, and `..` anywhere. A name that could never have been created is refused here too. pattern: ^[A-Za-z0-9._-]+$ type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/BuildRunList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List a version's milestone runs and their cycles tags: - Runs /projects/{projectName}/builds/{tag}/progress: get: operationId: stream-build-progress parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Spec version tag — the name the user gave the version, resolved to a milestone number through the run rows — never by matching titles against GitHub. in: path name: tag required: true schema: description: >- Spec version tag — the name the user gave the version. The pattern is the character set; the server applies the same full rule it applies when a version is created, which additionally refuses a leading `-` or `.`, a trailing `.` or `.lock`, and `..` anywhere. A name that could never have been created is refused here too. pattern: ^[A-Za-z0-9._-]+$ type: string responses: '200': content: text/event-stream: schema: $ref: '#/components/schemas/BuildProgressEvent' description: 'ONE SSE stream stitching every cycle of every run that has worked this version, in chronological run order, so a version reads as one narrative rather than as several executions. The frames are stream-run-progress''s, plus a `run` object on each naming the run the cycle belongs to and its KIND (`dev` | `task` | `validation`) — the section marker the console renders. `line.cycleIndex` stays the cycle''s position WITHIN ITS RUN, so `(run.id, cycleIndex)` is the section key and no cycle is renumbered by being read here. One `data:` JSON frame per event (a BuildProgressEvent discriminated by `type`), each stamped `id: `; `: keep-alive` comments pace idle waits. The stream holds open while ANY run on the version''s milestone is live and settles with a `done` frame carrying `reason: no_live_run`, `data: [DONE]` and a server close when none is — which is NOT a statement that the version is finished, because a later validation or task run may be admitted on the same milestone; the console reopens the stream when its run-list poll shows one. Reconnects are idempotent — the client upserts cycles by id and dedups lines by cycleId+seq.' default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Stream a version's per-cycle agent progress across every run, as SSE tags: - Runs /projects/{projectName}/builds/{tag}/revalidate: post: description: >- Ask a version's validation criteria again, against the system already deployed. It starts a fresh run over that version's milestone which ENTERS THE LOOP AT VALIDATION rather than at the working set — nothing is rebuilt to answer the question. What happens after the verdict is the run loop's ordinary behaviour, selected by `validationAttempts`: with 1, the run reports and settles, so a failure files no work and rebuilds nothing. With the default, a `failed` verdict files one issue per failed criterion, an ordinary coding cycle fixes them, the components build and deploy, and the version is validated again. The newest run on a milestone owns that version's verdict, so a revalidate's answer becomes the version's answer. 409 when a run is already live on the milestone (nothing to hand off to — its verdict may be hours away or may never come) or when the milestone still has open work (the loop would work that first, which is a build resume, not a revalidation). 422 when the version has no validation criteria, refused rather than run so a `skipped` verdict cannot overwrite a real one. operationId: revalidate-build parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Spec version tag — the name the user gave the version, resolved to a milestone number through the run rows — never by matching titles against GitHub. in: path name: tag required: true schema: description: >- Spec version tag — the name the user gave the version. The pattern is the character set; the server applies the same full rule it applies when a version is created, which additionally refuses a leading `-` or `.`, a trailing `.` or `.lock`, and `..` anywhere. A name that could never have been created is refused here too. pattern: ^[A-Za-z0-9._-]+$ type: string requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/RevalidateRequest' responses: '202': content: application/json: schema: $ref: '#/components/schemas/RevalidateAccepted' description: Revalidation started default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Validate a deployed version again tags: - Runs /projects/{projectName}/builds/{tag}/cycles/{cycleId}/builds: get: description: The builds one cycle's merge fanned out to, DERIVED from OpenChoreo and never stored — per-component build state has exactly one source of truth, and a stored copy could desynchronise from the cluster. Deliberately NOT folded into list-build-runs, which is DB-only so the console can poll it cheaply — this read costs a cluster call, so the console fetches it only for a cycle that has a merge SHA. A cycle without one returns an empty list. operationId: list-cycle-builds parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Spec version tag — the name the user gave the version, resolved to a milestone number through the run rows. in: path name: tag required: true schema: description: >- Spec version tag — the name the user gave the version. The pattern is the character set; the server applies the same full rule it applies when a version is created, which additionally refuses a leading `-` or `.`, a trailing `.` or `.lock`, and `..` anywhere. A name that could never have been created is refused here too. pattern: ^[A-Za-z0-9._-]+$ type: string - description: Cycle id, as carried by RunCycleView.id on the run read. in: path name: cycleId required: true schema: description: Cycle id type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/CycleBuildList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List the builds a cycle's merge produced tags: - Runs /projects/{projectName}/components: get: operationId: list-components parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ComponentList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List components tags: - Components /projects/{projectName}/components/{componentName}: get: operationId: get-component parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component name (DNS-label slug) in: path name: componentName required: true schema: description: Component name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/Component' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get a component tags: - Components /projects/{projectName}/components/{componentName}/builds: get: operationId: list-builds parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component name (DNS-label slug) in: path name: componentName required: true schema: description: Component name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/WorkflowRunList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List component builds tags: - Components post: operationId: trigger-build parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component name (DNS-label slug) in: path name: componentName required: true schema: description: Component name (DNS-label slug) type: string responses: '201': content: application/json: schema: $ref: '#/components/schemas/WorkflowRun' description: Created default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Trigger a component build tags: - Components /projects/{projectName}/components/{componentName}/builds/{buildName}/logs: get: operationId: get-build-logs parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component name (DNS-label slug) in: path name: componentName required: true schema: description: Component name (DNS-label slug) type: string - description: Build WorkflowRun name (DNS-label slug) in: path name: buildName required: true schema: description: Build WorkflowRun name (DNS-label slug) type: string - description: Return only entries stamped AFTER this cursor — feed back the previous response's `nextCursor` verbatim. Absent reads from the beginning. Opaque to the client. in: query name: cursor required: false schema: description: Opaque cursor from a previous response's `nextCursor` type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/BuildLogs' description: OK '410': content: application/json: schema: $ref: '#/components/schemas/Error' description: The build is not on the cluster, so there is no log to read; code `build_expired`. OpenChoreo deletes a build's WorkflowRun, and its log with it, a while after the build finishes (the builder workflow's `ttlAfterCompletion`). A name that never named a build reads the same, since the two cannot be told apart. '503': content: application/json: schema: $ref: '#/components/schemas/Error' description: OpenChoreo cannot serve the log right now; code `log_source_unavailable`. A retry may succeed. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get build logs tags: - Components /projects/{projectName}/components/{componentName}/configs: get: operationId: get-component-config parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component name (DNS-label slug) in: path name: componentName required: true schema: description: Component name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ComponentConfig' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get component config tags: - Config put: operationId: update-component-config parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component name (DNS-label slug) in: path name: componentName required: true schema: description: Component name (DNS-label slug) type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateConfigBody' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/ComponentConfig' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Update component config tags: - Config /projects/{projectName}/components/{componentName}/dependencies/{depName}/access-request: post: operationId: request-org-service-access parameters: - description: Consumer project name (DNS-label slug) in: path name: projectName required: true schema: description: Consumer project name (DNS-label slug) type: string - description: Consumer component name in: path name: componentName required: true schema: description: Consumer component name type: string - description: org-service dependency name (the provider component) in: path name: depName required: true schema: description: org-service dependency name (the provider component) type: string responses: '201': content: application/json: schema: $ref: '#/components/schemas/AccessRequest' description: Created default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Request access to a cross-project org-service dependency tags: - Dependencies /projects/{projectName}/components/{componentName}/dependencies/{depName}/provision: post: operationId: provision-platform-resource parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component the drawer opened on (context only) in: path name: componentName required: true schema: description: Component the drawer opened on (context only) type: string - description: Platform-resource dependency name in: path name: depName required: true schema: description: Platform-resource dependency name type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ProvisionBody' responses: '202': content: application/json: schema: $ref: '#/components/schemas/StatusMsg' description: Accepted default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Provision a platform-resource dependency (async) tags: - Dependencies /projects/{projectName}/components/{componentName}/dependencies/{depName}/status: get: operationId: get-dependency-status parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component the drawer opened on (context only) in: path name: componentName required: true schema: description: Component the drawer opened on (context only) type: string - description: Dependency name in: path name: depName required: true schema: description: Dependency name type: string - description: 'Environment (defaults to "default")' explode: false in: query name: environment schema: description: 'Environment (defaults to "default")' type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/DependencyStatus' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get a dependency's provisioning status (outputs masked to names) tags: - Dependencies /projects/{projectName}/components/{componentName}/deployments: get: operationId: list-deployments parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component name (DNS-label slug) in: path name: componentName required: true schema: description: Component name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/DeploymentList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List component deployments tags: - Components /projects/{projectName}/components/{componentName}/openapi: get: operationId: get-component-openapi parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Component name (DNS-label slug) in: path name: componentName required: true schema: description: Component name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ComponentOpenAPI' description: OK '409': content: application/json: schema: $ref: '#/components/schemas/ComponentOpenAPI' description: The component is not an API-exposing service; the body carries componentType for the typed empty state. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get a component's OpenAPI spec tags: - Components /projects/{projectName}/dependencies/access-requests: get: operationId: list-access-requests parameters: - description: Consumer project name (DNS-label slug) in: path name: projectName required: true schema: description: Consumer project name (DNS-label slug) type: string responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/AccessRequest' type: array nullable: true description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List a consumer project's access requests tags: - Dependencies /projects/{projectName}/dependencies/readiness: get: operationId: get-project-dependency-readiness parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: type: string - description: 'Environment (defaults to "default")' in: query name: environment schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProjectDependencyReadiness' description: Aggregate external dependency value state default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get project external-dependency configuration readiness tags: - Dependencies /projects/{projectName}/dependencies/external-resources/{name}/values: post: operationId: collect-external-resource-values parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: External resource (dependency) name in: path name: name required: true schema: description: External resource (dependency) name type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SaveValuesBody' responses: '200': content: application/json: schema: $ref: '#/components/schemas/StatusMsg' description: OK '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Name is a Registered External resource (values live on the org record) default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Collect an external dependency's values and provision it tags: - Dependencies /projects/{projectName}/dependencies/external-resources/{name}/promote: post: operationId: promote-external-resource parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: The project's own external resource (dependency) name in: path name: name required: true schema: description: The project's own external resource (dependency) name type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PromoteExternalResourceRequest' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/ExternalResourceDTO' description: The organization now holds the record; the project's dependency file was rewritten as a copy of it '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Missing instructions, a key without a value in some environment and nothing to carry over, or a project resource with no provider or keys '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: The project has no such external dependency '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: The dependency already reuses a record, or the organization already registered this name default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Promote a project's own external resource to the organization's registry tags: - Dependencies /projects/{projectName}/dependencies/{depName}/contract: post: operationId: provide-dependency-contract parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: External dependency name (its directory under specs/design/dependencies) in: path name: depName required: true schema: description: External dependency name (its directory under specs/design/dependencies) type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/DependencyContractBody' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/DependencyContractResponse' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Provide an external dependency's contract — a URL to fetch or the document itself — committed into the dependency's directory tags: - Dependencies /projects/{projectName}/dependencies/{depName}/assumption: post: operationId: accept-dependency-assumption parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: External dependency name (its directory under specs/design/dependencies) in: path name: depName required: true schema: description: External dependency name (its directory under specs/design/dependencies) type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AcceptAssumptionBody' responses: '200': content: application/json: schema: $ref: '#/components/schemas/StatusMsg' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Accept the contract the design agent wrote from research for this dependency — the user's permission to build against an assumption tags: - Dependencies /projects/{projectName}/design/dependencies: get: operationId: list-design-dependencies parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/ComponentDependencies' type: array nullable: true description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List every component's dependencies with read-time computed status/reason tags: - Dependencies /projects/{projectName}/workload-dependencies: get: operationId: list-workload-dependencies parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/WorkloadDependencyDTO' type: array nullable: true description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: list deployed-workload dependencies for the project Overview (deduped rows) tags: - Dependencies /projects/{projectName}/issues: get: operationId: list-issues summary: List/search GitHub issues on a project's repo tags: - Issues security: - userJWT: [] parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: type: string - description: Comma-separated GitHub labels to filter by in: query name: labels schema: type: string - description: Keyword search over issue title/body, ranked by distinct-term overlap (title weighted double), capped at 25. Recall-biased — used to surface related issues before filing a new one. in: query name: q schema: type: string responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/IssueInfo' type: array nullable: true description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error post: operationId: create-issue summary: Create a GitHub issue on a project's repo tags: - Issues security: - userJWT: [] parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateIssueRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/IssueResult' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error /projects/{projectName}/references: post: description: Store the reference documents attached on the create view. References are TRANSIENT TURN INPUTS, not spec artifacts (console ADR-0017) — they are never committed and never reach GitHub. Bytes live in a per-project directory on the shared workspace volume for the project's lifetime and are overlaid into each turn's snapshot at `specs/requirements/references/`, which is also scaffolded into the repo's `.gitignore`. Deliberately outside the `specs/`-scoped spec files the AE Studio pod serves — those are committed to the repo, and this is the opposite. multipart carries raw bytes, so the per-file limit is checked on real bytes with no base64 inflation. Replaces the whole upload for the project — a second call overwrites the stored set. operationId: put-project-references parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string requestBody: content: multipart/form-data: encoding: files: contentType: application/octet-stream schema: properties: files: description: > Reference documents. Two groups, both readable by the models: binary read natively as file parts (`.pdf`, `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`), and text read as workspace files (`.md`, `.txt`, `.csv`, `.tsv`, `.json`, `.yaml`, `.yml`, `.xml`, `.html`, `.rst`). At most 10 documents, each at most 5 MiB measured on the raw bytes. Office documents (`.docx`, `.xlsx`, `.pptx`) are converted to markdown on upload — the models do not read them natively — and stored as `.md`: a Word document's headings, paragraphs and tables, a workbook's sheets as tables, a deck's slides. One that cannot be read is refused with 400. items: format: binary type: string maxItems: 10 type: array required: - files type: object required: true responses: '204': description: References stored '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Rejected — unsupported type, a document over 5 MiB, more than 10 documents, an unusable name, or two names that reduce to one stored name. Nothing is stored; the previous set is left intact. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Store a project's reference documents tags: - Projects /projects/{projectName}/seed: post: description: >- Seed a project's repository from a spec bundle: an `.aespecs` archive a developer skill (`code-to-spec`) wrote from a product's existing code, holding `manifest.json` and the `specs/` tree the first design derives from (the requirements with their coverage files, `specs/design/domain-model.md`, and the upstream dependency definitions with their contracts). The platform opens the archive under fixed bounds, admits only the spec paths it knows, validates every file with its own parsers, refuses anything that looks like a credential, then commits the files and the bundle's provenance (a `[recreate]` table in the project descriptor) in ONE commit through the org's AE Studio. A seeded project never runs the `/start` kickoff: its first design is `/recreate`, started from the console. Seeding again before any turn ran overwrites the seeded files and drops those the new bundle no longer holds; after a turn it is refused. operationId: seed-project parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string requestBody: content: multipart/form-data: encoding: bundle: contentType: application/octet-stream schema: properties: bundle: description: >- The `.aespecs` archive, at most 5 MiB on the raw bytes. A zip whose root holds `manifest.json` (`format: aespecs/1`, the producer, the product, the source repository and commit) and `specs/requirements/**`, `specs/design/domain-model.md` and `specs/design/dependencies//` files; at most 256 entries and 8 MiB unpacked, every file UTF-8 text. format: binary type: string required: - bundle type: object required: true responses: '204': description: Seeded — the files and the provenance are committed; the kickoff stays held. '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: >- Rejected (`bundle_rejected`) — the message names the entry and the rule: not a zip, over a bound, a path outside the allowed set, a file that is not UTF-8 text, a manifest field that does not validate, a requirements or dependency file the platform's parsers refuse, or a value that looks like a credential. Nothing is committed. '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: The project has already run an agent turn (`already_started`); a seed would overwrite work the agent or the user did. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Seed a project's specs from an .aespecs bundle tags: - Projects /projects/{projectName}/roles: get: description: The project's Security panel read. `roles` is the WHOLE directory catalog, not just this project's roles — roles are shared at the identity provider's scope, so the panel has to show which existing role a design reuses rather than implying the project owns one. `testUsers` is this project's references only. `directoryAvailable` is false when the identity provider could not be reached — the store-derived fields are still returned, and the console must render "unknown" rather than reading an absent directory row as "does not exist". operationId: get-project-roles parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProjectRolesView' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Read the shared role catalog and this project's test users tags: - Identity /projects/{projectName}/roles/test-users/{username}/reveal: post: description: Disclose a platform-owned test account's password. A POST, deliberately, even though it reads. A password in a GET would land in the request URL, and from there in the browser's history, the proxy access log, and any referrer — none of which the platform can redact. Only an account this project references AND the platform owns (it holds a sealed password for it) can be revealed; anything else is 404, so one project cannot read a shared account another project provisioned. operationId: reveal-test-user-password parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Test-user username in: path name: username required: true schema: description: Test-user username type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/TestUserPassword' description: The account's current password '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: The project does not reference this username, or the platform does not own the account default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Reveal a test user's password tags: - Identity /projects/{projectName}/roles/test-users/{username}/rotate: post: description: Replace a platform-owned test account's password and return the new one. The identity provider is written FIRST and the sealed copy second; if the seal fails after the directory accepted the change the response is a 500 saying the password was changed but not recorded, and the caller must rotate again. Same fence as reveal — the project must reference the username and the platform must own the account. operationId: rotate-test-user-password parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Test-user username in: path name: username required: true schema: description: Test-user username type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/TestUserPassword' description: The account's new password '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: The project does not reference this username, or the platform does not own the account default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Rotate a test user's password tags: - Identity /projects/{projectName}/roles/test-users/{username}: delete: description: Delete a platform-owned test account from the identity provider and forget the platform's record of it. The ROLE is left standing — roles are shared, and deleting one because a single test account went away would take it from every other project naming it. The account is shared too, so a delete while other projects still reference it is logged as a warning and reported in the response status. Same fence as reveal and rotate. operationId: delete-test-user parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Test-user username in: path name: username required: true schema: description: Test-user username type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/StatusMsg' description: Deleted; status names any other projects still referencing the account '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: The project does not reference this username, or the platform does not own the account default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Delete a test user tags: - Identity /projects/{projectName}/runs/{runId}/cancel: post: description: Abandon an increment. Cancel is the only expiry the run's unbounded wait state has. It is delivered as a SIGNAL rather than a workflow cancellation, so the run settles its own row and closes its own cycle on the ordinary path. 202 means the signal was sent; the run row flips to `cancelled` when the supervisor acts on it. 503 when the workflow engine is unreachable — nothing was cancelled and the caller may retry. operationId: cancel-run parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Milestone run id in: path name: runId required: true schema: description: Milestone run id type: string responses: '202': description: Cancel signalled default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Cancel a milestone run tags: - Runs /projects/{projectName}/runs/{runId}/progress: get: operationId: stream-run-progress parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Milestone run id in: path name: runId required: true schema: description: Milestone run id type: string responses: '200': content: text/event-stream: schema: $ref: '#/components/schemas/RunProgressEvent' description: >- ONE SSE stream stitching every cycle of the run, one `data:` JSON frame per RunProgressEvent (discriminated by `type`), each stamped `id: ` and carrying `serverTime`. The frame types split FACTS from STATE, and a client relies on the split. `event` frames are facts: one RunEvent each, keyed by (cycleId, attempt, seq), append-only and never retracted, so a client folds them and never has to drop one later. `cycle` frames are state: the whole cycle record, re-sent each time anything on it changes (its pull request, its `recording`, its startup `boot`); the newest wins. `tick` frames carry nothing but `serverTime`, sent when the stream has been quiet for 15 seconds, so a client can tell a quiet run on a live connection from a dead connection. `done` is the terminal run state: ONLY a terminal run sends it, after its whole history, followed by `data: [DONE]` and a server close. A live run's stream stays open indefinitely. Reconnects replay from the start and are idempotent: the client upserts cycles by id and dedups events by (cycleId, attempt, seq). `line` frames (v1 RunProgressLine) remain for the compatibility window and carry their own cycle attribution. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Stream a milestone run's per-cycle agent progress as SSE tags: - Runs /projects/{projectName}/spec/state: get: description: What the spec workspace needs that its documents do not say (N5). The documents themselves are the collab room; the features, their stages, the ID index and Next up are worked out from them in the console. This serves the rest — each designed feature's basis (what its last design read, by the same reading the build gate uses, so the console can say a design is out of date as the spec is edited) and the source documents the user attached. operationId: get-spec-state parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/SpecState' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get the spec workspace's state tags: - Projects /projects/{projectName}/status: get: operationId: get-project-status parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProjectStatus' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get a project's SDLC status tags: - Projects /projects/{projectName}/tags: get: operationId: list-project-tags parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/TagList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List spec version tags tags: - Projects /projects/{projectName}/versions: get: description: What each version built (B5) — the features it carried, each with its lines as they were at the version's tag, and the product-wide requirements it carried — oldest first. The console compares a feature's live lines with the version that last built it to say what changed since. Only versions cut as a selection are listed; one cut before builds were selections names nothing it built. A version's contents never change, so a reader refetches only when a build starts. operationId: list-project-versions parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/SpecVersionList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List what each spec version built tags: - Projects /projects/{projectName}/tasks: get: operationId: list-tasks parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Which Tasks to return (default open) explode: false in: query name: state schema: description: Which Tasks to return (default open) enum: - open - closed - all type: string - description: Filter to the Tasks of one spec/build version tag (e.g. m1). The tag is resolved to a milestone number through the platform's run rows and the filter is milestone MEMBERSHIP — never a title match against GitHub. Empty returns every version. explode: false in: query name: tag schema: description: Filter to the Tasks of one spec/build version tag (e.g. m1), by milestone membership. Empty returns every version. type: string - description: Include each issue's newest comments (defaults true). Honoured only on a `tag`-scoped read — the comment fetch is anchored on the milestone, so a read spanning versions has no bounded set to ask for. Pass false to skip the GitHub round trip when the caller does not render them. explode: false in: query name: comments schema: # Keep an explicit pointer under the global prefer-skip-optional-pointer: # the handler must distinguish 'absent' (default true) from an explicit false. x-go-type-skip-optional-pointer: false default: true description: Include each issue's newest comments (defaults true). Honoured only on a `tag`-scoped read. type: boolean responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/TaskView' type: array nullable: true description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List a project's issues (live from GitHub), optionally scoped to one spec/build version tag by milestone membership. Every row carries the label-derived `executorClass` the console sections on — agent work, a dispatch gate, or a bare human ledger issue — plus the finer `kind` (development | bug | conflict | validation | provision) for the row's own chip. The validation task is excluded (it is a phase of the run, surfaced with the run's verdict on the deployment surface); get-task still serves it by number. Ledger issues carry no label to query by, so they are only discoverable through milestone membership and appear only on a `tag`-scoped read. tags: - Tasks /projects/{projectName}/tasks/{issueNumber}: get: operationId: get-task parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: GitHub issue number of the Task in: path name: issueNumber required: true schema: description: GitHub issue number of the Task format: int64 type: integer responses: '200': content: application/json: schema: $ref: '#/components/schemas/TaskDetail' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get one Task with its full Execution history tags: - Tasks /projects/{projectName}/tasks/{issueNumber}/log: get: operationId: stream-task-log parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: GitHub issue number of the Task in: path name: issueNumber required: true schema: description: GitHub issue number of the Task format: int64 type: integer responses: '200': content: text/event-stream: schema: $ref: '#/components/schemas/TaskStreamEvent' description: 'SSE stream of the Task''s entire live state — status, executions, and a unified timeline across all attempts. One `data:` JSON frame per event (a TaskStreamEvent discriminated by `type`: task | execution | line | done), each stamped `id: `; `: keep-alive` comments pace idle waits. A settled Task streams its full history then ends with `data: [DONE]` and the server closes the connection. A Task with no log of its own ends the same way at once, once it has no execution rows: only a `provision` gate still gains rows (the gate run, possibly after the stream opened, so it is waited for); coding work (`development`, `bug`, `conflict`) is logged on its milestone run''s feed (stream-run-progress) and a validation on the version''s validation. Reconnects are idempotent: the client upserts task/execution by id and dedups lines, so state re-emitted on reconnect is safe. There are deliberately no server-side filters (executionId/kind) — every line carries its own attribution and the console groups by attempt client-side.' default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Stream a Task's live state (status + executions + unified timeline) as SSE tags: - Tasks /projects/{projectName}/tasks/{issueNumber}/promote-from-issue: post: operationId: promote-task-from-issue summary: Turn an ad-hoc GitHub issue into a coding Task and dispatch it (async) tags: - Tasks security: - userJWT: [] parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: type: string - description: GitHub issue number to promote and dispatch in: path name: issueNumber required: true schema: format: int64 type: integer requestBody: content: application/json: schema: $ref: '#/components/schemas/PromoteFromIssueRequest' required: true responses: '202': description: Accepted — the funnel dispatches out-of-band. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error /usage/projects: get: description: Org-wide agent usage (#291), one card per project. Every LIVE project is carded — idle ones (no agent has run) as a real $0 — plus any since-deleted project that still carries recorded usage (shown as a deleted card). Figures are lifetime sums of persisted per-row records; costUsd sums the amounts stamped at capture time (ADR-0011 as amended) and is null when no row carries a stamp. operationId: list-project-usage responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProjectUsageList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List per-project agent usage tags: - Projects /rca-agent/reports: get: operationId: list-rca-agent-reports parameters: - description: Opaque pagination cursor explode: false in: query name: cursor schema: description: Opaque pagination cursor type: string - description: Maximum number of items to return (server default when absent) explode: false in: query name: limit schema: description: Maximum number of items to return (server default when absent) type: integer responses: '200': content: application/json: schema: $ref: '#/components/schemas/RcaAgentReportList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List RCA-agent alert reports across the caller's org, newest first tags: - RcaAgentReports /rca-agent/reports/{reportId}: get: operationId: get-rca-agent-report parameters: - description: RCA report id in: path name: reportId required: true schema: description: RCA report id type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/RcaAgentReport' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get a single RCA-agent alert report tags: - RcaAgentReports /skills: get: operationId: list-skills responses: '200': content: application/json: schema: $ref: '#/components/schemas/SkillSummaryList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List skills tags: - Skills post: operationId: create-skill requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateSkillInput' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/SkillDetailBody' description: Created default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Create a custom skill tags: - Skills /skills/import: post: operationId: import-skill requestBody: content: multipart/form-data: encoding: file: contentType: application/octet-stream schema: properties: file: description: Gzip-compressed AgentSkills tarball format: binary type: string required: - file type: object responses: '201': content: application/json: schema: $ref: '#/components/schemas/ImportResult' description: Created default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Import an AgentSkills tarball tags: - Skills /skills/sync: post: operationId: sync-skills responses: '200': content: application/json: schema: $ref: '#/components/schemas/SkillSyncOutput' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Sync built-in skills (creates the org's skills repo if missing) tags: - Skills /skills/updates: get: operationId: list-skill-updates responses: '200': content: application/json: schema: $ref: '#/components/schemas/SkillUpdateList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List available built-in skill updates tags: - Skills /skills/{name}: delete: operationId: delete-skill parameters: - description: Skill name (slug) in: path name: name required: true schema: description: Skill name (slug) type: string responses: '200': content: application/json: schema: additionalProperties: {} type: object description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Delete a custom or imported skill tags: - Skills get: operationId: get-skill parameters: - description: Skill name (slug) in: path name: name required: true schema: description: Skill name (slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/SkillDetailBody' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Get a skill tags: - Skills patch: operationId: set-skill-enabled parameters: - description: Skill name (slug) in: path name: name required: true schema: description: Skill name (slug) type: string requestBody: content: application/json: schema: additionalProperties: false properties: enabled: type: boolean required: - enabled type: object required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/SkillDetailBody' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Enable or disable a skill tags: - Skills put: operationId: update-skill parameters: - description: Skill name (slug) in: path name: name required: true schema: description: Skill name (slug) type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateSkillInput' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/SkillDetailBody' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: Update a custom skill tags: - Skills /projects/{projectName}/validations: get: description: >- The validation ledger — one entry per spec version that has been worked, newest first, carrying that version's validation state and the timing of its latest validation attempt. It is a sibling of list-project-builds rather than a field on it: the two pages ask different questions of the same rows, and folding validation into the build ledger would make every builds poll load each milestone's validation cycles to answer a question that page never asks. DB-only, so the console may poll it while a run is live. operationId: list-validations parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ValidationList' description: OK default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: List every version's validation state tags: - Validation /projects/{projectName}/validations/{tag}: get: description: >- One version's validation history — every run that attempted it, newest first, each carrying its VALIDATION cycles only. Coding, fix and conflict cycles are filtered out here rather than by the client: which cycles ask the criteria is the platform's answer, and a client re-deriving it is a second place for that rule to drift from the supervisor. `live` and `deployed` are the two conditions the console gates its trigger on; every other refusal belongs to revalidate-build, which owns them. operationId: get-validation parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Spec version tag — the name the user gave the version, resolved to a milestone number through the run rows — never by matching titles against GitHub. in: path name: tag required: true schema: description: >- Spec version tag — the name the user gave the version. The pattern is the character set; the server applies the same full rule it applies when a version is created, which additionally refuses a leading `-` or `.`, a trailing `.` or `.lock`, and `..` anywhere. A name that could never have been created is refused here too. pattern: ^[A-Za-z0-9._-]+$ type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ValidationDetail' description: OK '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: No run has ever worked this version. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: One version's validation runs and attempts tags: - Validation /projects/{projectName}/validations/{tag}/cycles/{cycleId}/report: get: description: >- One attempt's report AND the acceptance criteria it was judged against, read at the SAME commit. Reading them together is the point. The report lives at one fixed path that every run and every attempt overwrites, so it is addressable only by the cycle's own merge commit; the criteria drift independently in the branch. Pairing a historical report with the criteria as they are NOW reports scenarios written since as unanswered, which is a defect of the pairing and not a fact about the run. A single snapshot makes that pairing impossible to get wrong. Three cases, by the cycle's own record. A MERGED cycle answers at its merge SHA. A cycle still RUNNING has no commit yet, so the criteria come from HEAD — which is genuinely what the runner is driving, since it reads them at HEAD when it executes — and `report` is null. A cycle that ended WITHOUT merging never landed a report and is a 404: it is a different fact from an empty report and the two read as different sentences. operationId: get-validation-report parameters: - description: Project name (DNS-label slug) in: path name: projectName required: true schema: description: Project name (DNS-label slug) type: string - description: Spec version tag the cycle belongs to. in: path name: tag required: true schema: pattern: ^[A-Za-z0-9._-]+$ type: string - description: The validation cycle whose attempt is being read. in: path name: cycleId required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ValidationSnapshot' description: OK '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: No such cycle on this version, or the attempt ended without landing a report. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Error security: - userJWT: [] summary: One attempt's report and the criteria it was judged against tags: - Validation components: schemas: AeStudio: additionalProperties: false properties: state: description: absent (no GitHub token yet), provisioning, ready, or failed. enum: - absent - provisioning - ready - failed type: string reason: description: >- Why AE Studio failed; set only when the state is failed. timeout: it is still starting past the bound; the platform cannot see why (commonly too little room in the cluster), it keeps trying, and a later read may answer ready. error: any other failure (not configured, a failed install, a release OpenChoreo cannot render, own or apply). enum: - timeout - error type: string urls: $ref: '#/components/schemas/AeStudioUrls' # A pointer under the global prefer-skip-optional-pointer: absent must # omit the key, which omitempty cannot do for a struct value. x-go-type-skip-optional-pointer: false required: - state type: object AeStudioUrls: additionalProperties: false description: Public URLs of a ready AE Studio's three services; set only when ready. properties: collab: description: The collaboration WebSocket origin (ws or wss). format: uri type: string designAgent: format: uri type: string tools: format: uri type: string required: - designAgent - collab - tools type: object AccessRequest: additionalProperties: false properties: consumerComponentName: type: string consumerProjectId: type: string createdAt: format: date-time type: string id: type: string orgServiceName: type: string providerComponentName: type: string providerIssueNumber: format: int64 type: integer providerIssueUrl: type: string providerProjectId: type: string providerTaskId: type: string status: type: string updatedAt: format: date-time type: string required: - id - consumerProjectId - consumerComponentName - orgServiceName - status - createdAt - updatedAt type: object AgentStatus: description: >- How an agent, or a backgrounded task an agent owns, ended — as the runtime itself reported it. `running` is the only non-terminal value and exists so a consumer can repaint a row without waiting for the end; `completed` is a clean finish; `failed` is one the runtime called an error; `stopped` is a cancellation or a kill from outside, which is NOT a failure — the work did not go wrong, it was taken away, and a run a user stopped must not be shown as broken. Carried by RunEvent's `agent_settled` and `task_settled`, which are the only places a status is authoritative. A settle event that never arrives means the platform never learned how the agent ended; it does not mean the agent is still running. enum: - running - completed - failed - stopped type: string # x-enum-varnames are UNPREFIXED: aep-api codegen sets always-prefix-enum-values, which adds the type name (AgentStatusRunning). x-enum-varnames: - Running - Completed - Failed - Stopped AgentRuntime: description: >- Which coding-agent runtime an organization's builds run on. The values are the same two RunEvent.runtime records, and deliberately so: what an org SELECTS and what a finished run REPORTS have to be the same vocabulary or a reader cannot line them up. The lifetimes differ — this is a setting that can change, that one is a fact about an attempt that cannot. Both runtimes run on the organization's model connection. `claude-code` speaks only the Anthropic format, so an OpenAI-compatible connection needs `opencode` (`agents_runtime_requires_anthropic_format`). Only `claude-code` can bill a Claude subscription instead, so choosing `opencode` deletes a stored subscription (ADR-0028, ADR-0036). enum: - claude-code - opencode type: string x-enum-varnames: - ClaudeCode - Opencode AgentsProjection: x-go-type: orgconfig.AgentsProjection x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig description: >- How an organization's agents run: the coding agent's runtime and the Claude subscription coding bills to instead of the connection's key. The model is part of the connection (`llm.model`). ALWAYS present: every org has an effective runtime whether or not anyone has chosen it, so the section carries the platform's default until someone does. `updatedAt`/`updatedBy` are null exactly when nobody has — which is what tells "the platform's default" apart from "somebody chose the same value". A coding run copies the runtime (and the connection) when it is dispatched, so a run in flight keeps what it was launched with. additionalProperties: false properties: runtime: $ref: '#/components/schemas/AgentRuntime' availableRuntimes: description: >- The runtimes this installation can run, and so the only ones an organization may choose. Claude Code, the default, is always listed; OpenCode only when the platform is deployed with its runner image. `runtime` can name one missing here (an organization that chose OpenCode on an installation that later lost its image); every coding dispatch then fails until the organization chooses an available runtime. items: $ref: '#/components/schemas/AgentRuntime' type: array subscription: allOf: - $ref: '#/components/schemas/SubscriptionProjection' description: >- The stored Claude subscription, masked, or null when coding bills the connection's key. Only possible while the connection has `capabilities.claudeSubscription` and the runtime is `claude-code`. Present whenever the subscription exists, also when its token was never recorded (`tokenMissing`, set only on an active subscription): coding dispatch reads the same fact. nullable: true updatedAt: format: date-time nullable: true type: string updatedBy: nullable: true type: string required: - runtime - availableRuntimes - subscription - updatedAt - updatedBy type: object SubscriptionProjection: x-go-type: orgconfig.SubscriptionProjection x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false description: >- A stored Claude subscription token: the section says it is set, and no character of it is projected (it lives only in the vault). It bills the coding agent's runs to a Claude plan instead of the organization's API key, and only Claude Code can present it. properties: kind: enum: - claude type: string status: type: string connectedAt: format: date-time type: string lastValidatedAt: format: date-time type: string validationError: type: string tokenMissing: description: >- True only for an active subscription whose token was never recorded in the vault (saved before the vault held it). Coding then bills the connection's API key until the token is saved again; removing the subscription (`agents.subscription: null`) clears the flag. Absent while the token is recorded, and on a subscription that is not active (dispatch refuses it; its `status` and `validationError` say why). type: boolean required: - kind - status - connectedAt type: object BuildInputItem: additionalProperties: false properties: approved: type: boolean component: description: Owning component name type: string dependency: description: Dependency name type: string kind: enum: - external-config - external-spec - platform-resource - org-service type: string parameters: additionalProperties: {} type: object specContent: type: string specUrl: type: string values: items: $ref: '#/components/schemas/ConfigValue' type: array nullable: true required: - component - dependency - kind type: object BuildList: additionalProperties: false description: list-project-builds response — the version ledger, one entry per built spec version tag, newest first. properties: builds: items: $ref: '#/components/schemas/BuildSummary' type: array nullable: true required: - builds type: object BuildLogEntry: additionalProperties: false properties: log: type: string timestamp: type: string required: - log type: object BuildLogs: additionalProperties: false description: One read of a build's log, live from the build's pods on the workflow plane. A build that is still running returns an incomplete response and the client re-reads from `nextCursor`; a terminal build returns everything it has in one call. properties: complete: description: True when the build is terminal and this response carries everything there will ever be — the client stops polling. False means re-read from `nextCursor`. type: boolean logs: items: $ref: '#/components/schemas/BuildLogEntry' type: array nullable: true nextCursor: description: Pass back as `cursor` on the next read. Absent when nothing was returned, in which case the previous cursor stands. type: string required: - logs - complete type: object BuildChange: additionalProperties: false description: One thing this version changes, compared with the newest version — the row the Start build dialog lists. Every row names something that EXISTS once the version is built, which is why the requirements are not one of them — they are the input, not the output. `removed` is a statement rather than an action — a build deprovisions nothing, so a removed dependency's resource stays. properties: kind: description: What the name belongs to, and the group the dialog lists it under. The two dependency kinds carry opposite obligations — an `external` needs a provider and its keys from the user, a `platform-resource` is provisioned by the build — so they are never one group. enum: - component - external - platform-resource type: string name: description: The component, dependency or resource name, as the design writes it. type: string state: enum: - new - changed - removed type: string required: - name - kind - state type: object BuildPreflight: additionalProperties: false properties: changes: description: What this version changes against the newest one, computed from the diff between that version's tag and HEAD. Empty when specUnchanged, and every row is `new` when the project has no version yet. items: $ref: '#/components/schemas/BuildChange' type: array nullable: true currentVersion: description: The newest version's tag name, or empty when the project has never been built. Ordered by tag creation time, not by any number in the name. type: string items: items: $ref: '#/components/schemas/PreflightItem' type: array nullable: true needsInput: description: Whether preflight emitted any item at all. Kept as the broad "there is something to show" flag; it does NOT gate Build, because an external dependency's values are collected on the Builds page while the coding agent runs and are enforced at the deploy gate instead. type: boolean needsResolution: description: Whether any emitted item blocks the version cut — a dependency the design itself cannot resolve (unresolved, missing spec, or an org service awaiting access). This is the ONLY flag a client may block Build on. type: boolean specUnchanged: description: Whether the `specs/` tree at HEAD matches the newest version's, so a build reuses that version and reopens its milestone instead of cutting a new one. The client locks the version field and says Rebuild. type: boolean suggestedVersion: description: What the version field is prefilled with — `v`, incremented until the name is free. A suggestion only; the user may replace it. type: string required: - needsInput - needsResolution - items type: object BuildRequest: additionalProperties: false properties: inputs: items: $ref: '#/components/schemas/BuildInputItem' type: array nullable: true repair: allOf: - $ref: '#/components/schemas/BuildRepair' x-go-type-skip-optional-pointer: false selection: $ref: '#/components/schemas/BuildSelection' version: description: The tag name to cut for this version. Empty takes the suggested one. Must be a valid tag name; a name already in use is a 409. Ignored when the spec tree is unchanged, because that build reuses the existing version. type: string type: object BuildRepair: additionalProperties: false description: > A repair build (B4), "Fix" on a version whose validation failed. It cuts `.` ("v1.1") at the fixed version's commit, so it builds the same features from the same specs; the scenarios the fixed version's final validation failed become its work as repair issues, and nothing is planned. selection, version and inputs are ignored. A version with no failing scenario refuses with 409. properties: of: description: The version to fix ("v1"). A repair of a repair fixes the version it fixed. type: string required: - of type: object BuildSelection: additionalProperties: false description: > What this version builds (B1): the features the user picked, and any product-wide requirement added since the last build that they picked on its own. The server plans the rest — every unbuilt feature a picked one needs, every unbuilt product-wide requirement that reaches one — and holds back a story that needs a feature neither built nor in this build. A feature whose design is out of date, that waits on an open dependency, or that has not been interviewed cannot be built; picking one (or one a pick needs) refuses the build with a FEATURE_NOT_BUILDABLE row naming why. Absent, the build carries every feature that can be designed. properties: features: items: pattern: ^F[0-9]+$ type: string type: array productWide: items: pattern: ^P[0-9]+$ type: string type: array required: - features type: object BuildResponse: additionalProperties: false properties: failures: items: $ref: '#/components/schemas/InputFailure' type: array nullable: true tag: type: string type: object BuildStage: additionalProperties: false description: Build-stage aggregate on ProjectStatus (#184) — the version the newest milestone run is working, and how that run is doing. Deliberately count-free - the only honest source of a per-version task tally is the version's milestone on GitHub, and this endpoint is polled at 5s. The console renders counts from the list-tasks response it already holds, on the surface that already pays for it. properties: status: description: idle (never built), running, failed, cancelled, succeeded. `cancelled` is its own value for the same reason it is on BuildSummary — a person abandoning an increment is a different fact from the platform failing to deliver one, and the project badge read "Build failed" over a build somebody had deliberately stopped. enum: - idle - running - failed - cancelled - succeeded type: string x-go-type: string version: description: Spec tag the current/last build built; "" if never built. type: string failureCode: description: Why the build failed, as RunFailure.code, when status is `failed` and the platform recorded a failure — so the overview's track can say what went wrong in the same words as the build page. Empty otherwise. type: string required: - version - status type: object BuildProgressEvent: additionalProperties: false description: 'One SSE frame on the VERSION progress stream, which spans every run that has worked the version. `type` discriminates the payload: `cycle` carries a RunCycleView (client upserts by id), `line` one RunProgressLine, and `done` says why the stream ended (the server then closes it). `cycle` and `line` frames also carry `run` — a version''s story spans several executions, so a cycle is only identified once you know which run opened it.' properties: cycle: $ref: '#/components/schemas/RunCycleView' line: $ref: '#/components/schemas/RunProgressLine' reason: description: 'Why the stream ended — present only on the `done` frame, and deliberately NOT a run state. `no_live_run` means no run on the version''s milestone is currently live, so there is nothing further to report RIGHT NOW. It is not a verdict on the version: a later validation or task run may be admitted on the same milestone, and the console reopens the stream when its run-list poll shows one.' enum: - no_live_run type: string x-enum-varnames: - NoLiveRun run: $ref: '#/components/schemas/BuildProgressRun' type: enum: - cycle - line - done type: string x-enum-varnames: - Cycle - Line - Done required: - type type: object BuildProgressRun: additionalProperties: false description: Which run a frame's cycle belongs to. The version's narrative spans several runs, so the run is the SECTION and the cycle is a step inside it — `RunProgressLine.cycleIndex` stays run-relative and is only unique when paired with `run.id`. properties: id: description: Milestone run id — the same id list-build-runs reports and cancel-run takes. type: string index: description: 1-based chronological position of this run among the version's runs, so the console can label a section without holding the whole run list — the same reason `cycleIndex` exists, one level up. Two runs of one kind are ordinary (a version can be repaired more than once), so the kind alone does not name a section. format: int64 type: integer kind: description: What the run DOES, and the section marker the console renders — `dev` delivered the version, `task` worked a defect inside it, `validation` re-judged it. Same vocabulary as MilestoneRunView.kind. enum: - dev - task - validation type: string required: - id - kind - index type: object BuildRunList: additionalProperties: false description: A version's milestone runs. `milestoneNumber` is the platform key the tag resolved to through the run rows; a tag with no run rows is a 404, not an empty list. properties: milestoneNumber: format: int64 type: integer runs: description: Newest run first. A milestone sees SEQUENTIAL runs across its life — the spec build that created the version, then any later incident adoption into it. items: $ref: '#/components/schemas/MilestoneRunView' type: array tag: type: string required: - tag - milestoneNumber - runs type: object BuildSummary: additionalProperties: false description: One entry of the version ledger — a spec version tag and the state of the newest milestone run that has worked it. A ledger read has no live workflow query, so "started" never occurs here. properties: completedAt: format: date-time type: string nullable: true x-go-type: '*time.Time' milestoneNumber: description: The GitHub milestone this version's work lives in — the platform key the tag resolves to, and the handle list-build-runs is read by. format: int64 type: integer failureCode: description: The failure class of a failed version, as RunFailure.code, when the platform recorded one (empty otherwise). Finer than `reason` — `plan-failed` says which phase, this says what went wrong in it — and cheap for the ledger, which is built from the run row that holds it. type: string regressions: description: How many scenarios the version's latest validation failed that passed in the previous validated version (B4). Absent when none. type: integer reason: description: The run's terminal reason for a failed version (empty otherwise), surfaced beside the Failed badge in the console. A cancelled version carries none — a person abandoning an increment is not a fault with a cause to report. type: string startedAt: format: date-time type: string status: description: >- What became of this version. `cancelled` is its own value rather than a flavour of `failed`, because the two are different facts and a reader acts on them differently — a failure is the platform reporting it could not deliver the increment, while a cancel is a person deciding not to. Folding them lost that; a build somebody deliberately stopped rendered as Failed, with no reason beside it to say why, while the same page's run row said Cancelled two lines below. A validation run that ended on judging the version — `validation-failed`, `validation-unreported`, or `agent-start-failed` (its validation agent never started) — does not fail the version's row: the version was built and deployed, so the row reads `completed` with no reason, and the validation board carries the failure. A dev run's row keeps its own ending. enum: - started - in_progress - completed - failed - cancelled type: string tag: type: string waitingReason: description: Why an in-progress version is waiting rather than moving. Empty for the ordinary between-cycles park, which needs no explanation. `external-values` is the deploy gate — the run is built and ready to deploy, and every remaining blocker is a value only a human can supply. It is carried here so a ledger row can say the version is waiting on the reader instead of reading as a run an agent is still working; the dependency NAMES stay on MilestoneRunView, where the run read that has them is already being made. enum: - external-values type: string required: - tag - milestoneNumber - status - startedAt type: object Component: additionalProperties: false properties: autoBuild: type: boolean autoDeploy: type: boolean createdAt: type: string description: type: string displayName: type: string endpointUrl: description: Public URL of the running dev deployment. Populated for web applications only; absent until deployed. type: string name: type: string projectName: type: string status: type: string type: description: Component kind in AEP's design vocabulary — "web-application" or "service" (matching design.json's componentType). OpenChoreo's prefixed ComponentType names (deployment/*) never appear on this API. type: string uid: type: string required: - name type: object ComponentConfig: nullable: true additionalProperties: false properties: componentName: type: string createdAt: format: date-time type: string envVars: items: $ref: '#/components/schemas/EnvVar' type: array nullable: true id: type: string projectName: type: string updatedAt: format: date-time type: string required: - id - projectName - componentName - envVars - createdAt - updatedAt type: object ComponentDependencies: description: One component's dependencies with read-time computed status/reason (list-design-dependencies) — the console's single dependency-status read model. additionalProperties: false properties: componentName: type: string dependencies: items: $ref: '#/components/schemas/Dependency' type: array nullable: true required: - componentName - dependencies type: object WorkloadDependencyDTO: additionalProperties: false properties: kind: enum: - resource - org-service type: string ref: description: Resource type (resource rows) type: string tag: enum: - platform - external type: string name: type: string project: description: Provider project (org-service rows) type: string component: description: Provider component (org-service rows) type: string required: - kind type: object ComponentList: additionalProperties: false properties: items: items: $ref: '#/components/schemas/Component' type: array nullable: true required: - items type: object ComponentOpenAPI: additionalProperties: false properties: componentName: type: string componentType: type: string spec: type: string required: - componentName - componentType - spec type: object ConfigKey: x-go-type: contracts.ConfigKey x-go-type-import: path: github.com/wso2/aep/aep-api/internal/contracts additionalProperties: false properties: defaultValue: type: string description: type: string key: type: string secret: type: boolean required: - key type: object ConfigKeyDTO: additionalProperties: false properties: defaultValue: type: string description: type: string key: type: string secret: type: boolean required: - key type: object ConfigKeyView: additionalProperties: false properties: defaultValue: type: string description: type: string key: type: string secret: type: boolean required: - key type: object ConfigPatch: x-go-type: orgconfig.ConfigPatch x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false properties: agents: description: >- How the organization's agents run. Every field is optional: an absent field keeps what is stored, so a client changes the runtime without re-sending the stored token. `subscription` is three-state: absent keeps it, an object sets or replaces it, `null` deletes it. A subscription needs the `claude-code` runtime and a connection with `capabilities.claudeSubscription` (Anthropic's own API), judged on the state the patch leaves: choosing `opencode`, or moving the connection off Anthropic's API, deletes the stored token in the same write. A new token the end state cannot use is refused: `agents_subscription_requires_claude_code` (runtime), `agents_subscription_requires_anthropic_host` (connection lacks `claudeSubscription`), `agents_subscription_requires_connection` (no connection). `claude-code` with an OpenAI-compatible connection is refused (`agents_runtime_requires_anthropic_format`); send `runtime: opencode` in the same patch that switches the format. A `runtime` this installation cannot run (absent from the projection's `availableRuntimes`) is refused (`agents_runtime_unavailable`). `null` on the section resets it to the platform's default and deletes the subscription — a real state, not the same as never having set it; the projection's `updatedBy` tells them apart. additionalProperties: false properties: runtime: $ref: '#/components/schemas/AgentRuntime' subscription: additionalProperties: false description: >- A long-lived token from `claude setup-token` (`sk-ant-oat…`). Write-only: probed against Anthropic, never echoed. properties: kind: enum: - claude type: string token: type: string writeOnly: true minLength: 1 maxLength: 512 required: - kind - token type: object nullable: true type: object nullable: true gitProvider: additionalProperties: false properties: githubLogin: type: string kind: enum: - github type: string mode: enum: - pat type: string pat: type: string required: - kind - mode - pat type: object nullable: true idp: additionalProperties: false description: >- The organization's identity provider, replaced wholesale. `platform` takes the cluster's issuer and JWKS URL whatever is sent. Any other kind needs a non-blank `issuer`: protected APIs pin token validation to it, so a patch without one answers 400 `validation_failed` at `body.idp` and writes no section. properties: issuer: type: string jwksUrl: type: string kind: enum: - platform - asgardeo - custom type: string required: - kind type: object nullable: true llm: allOf: - $ref: '#/components/schemas/LLMPatch' description: >- The organization's model connection, patched field by field: an absent field keeps what is stored. A patch carrying `apiKey` is probed with it before anything in the patch is written; the probe's result rides the response's `llmCheck`. The key is written only to the vault; a failed vault write fails the save with nothing saved, and an installation with no secret store answers 503 `secrets_delivery_unavailable`. `null` disconnects: the connection, its key and the Claude subscription go, and `llmDisconnectedAt` is set. First connect needs `kind` and `apiKey`; `baseURL` and `model` default from `llmFormats`, so `{kind: anthropic, apiKey}` connects to Anthropic's API with the default model. A connection edit (a change of `kind` or `baseURL`) needs the `apiKey` in the same patch (`llm_key_required`): no stored key is reused. A patch that changes only `model` needs no key and is saved without a probe. Refusal codes, each on `body.llm` (400 unless noted): `llm_field_required` (first connect without `kind` or `apiKey`, or without `baseURL` on a format with no default), `llm_base_url_invalid` (not https, or carries userinfo, a query or a fragment), `llm_host_refused` (the host resolves to a non-public address), `llm_key_required`, `llm_key_too_short` (under 12 characters), `llm_key_rejected` (the endpoint answered 401 or 403), `llm_unexpected_status` (any other 4xx, including a 429 without a rate-limit shape), `llm_unreachable` (network failure, timeout, or a redirect, which is never followed), `llm_upstream_error` (502: the endpoint answered 5xx), `llm_format_has_no_runtime` (no available runtime runs the format), `anthropic_oauth_token_coding_only` (a Claude subscription token as the key on Anthropic's API), `anthropic_key_invalid` (a key on Anthropic's API without the `sk-ant-` shape). nullable: true type: object ConfigProjection: x-go-type: orgconfig.ConfigProjection x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false properties: agents: $ref: '#/components/schemas/AgentsProjection' gitProvider: allOf: - $ref: '#/components/schemas/GitProviderProjection' nullable: true idp: $ref: '#/components/schemas/IDPProjection' llm: allOf: - $ref: '#/components/schemas/LLMProjection' description: The organization's model connection; null while it has none. nullable: true llmCheck: allOf: - $ref: '#/components/schemas/LLMCheck' description: >- Present only on the PATCH response of a save that probed the connection (the key, URL, format or model changed): what the probe found, including `modelListed` (an unlisted model is a warning, not a refusal) and `warning`. Never present on GET. llmDisconnectedAt: description: >- When the organization's model connection was last disconnected. Present only while `llm` is null, so a client can tell an org whose connection was disconnected from one that never set one. Cleared when a connection is saved again. format: date-time type: string llmFormats: description: >- The API formats a connection may speak, with the values a first connect fills in and the runtimes on this installation that run each. Read by the Settings card instead of hard-coding them. items: $ref: '#/components/schemas/LLMFormatOption' type: array required: - llm - llmFormats - agents - gitProvider - idp type: object ConfigValue: additionalProperties: false properties: key: type: string value: type: string required: - key - value type: object ConsumerDTO: additionalProperties: false properties: componentName: type: string projectId: type: string required: - projectId - componentName type: object CreateProjectRequest: additionalProperties: false properties: deploymentPipeline: type: string description: type: string displayName: type: string name: type: string prompt: description: 'The user''s initial requirement — what they want built. Persisted as the project''s requirement and kicks off spec derivation for the new project (issue #72). Projects created without a prompt keep today''s behavior.' type: string referencesPending: description: >- The caller will POST reference documents for this project next (`put-project-references`), so the platform must hold the `/start` kickoff (#562) until they land — they are the primary brief, and a kickoff dispatched before the upload interviews the user about a document the agent never saw. The kickoff then fires from the references call instead. Omitted/false fires it from this call. Nothing else waits on it: an abandoned upload simply leaves the project un-started, which the overview's spec card offers as a CTA. type: boolean repoName: description: 'Repository name for the project''s GitHub repo; defaults to the project name, the organization is fixed server-side (issue #71).' type: string required: - name type: object CreateSkillInput: additionalProperties: false properties: name: type: string references: additionalProperties: type: string type: object skillMd: type: string required: - name - skillMd type: object Dependency: description: A component's unified, kind-discriminated dependency entry. status/reason/flags are read-time computed by spec.ComputeDependencyStatus — never authored, never persisted (Design.json write-gate rejects them). An external dependency is HYDRATED from its own file, specs/design/dependencies//dependency.json — one dependency, one definition, holding a full `resource` block (a copy from the org registry when resourceRef is set, else one the project defined). style, contractAssumed and contractDerived are COMPUTED from the contract's type and origin; nothing here is stored as such. x-go-type: contracts.Dependency x-go-type-import: path: github.com/wso2/aep/aep-api/internal/contracts additionalProperties: false properties: kind: type: string name: type: string description: type: string status: type: string reason: type: string flags: description: Read-time qualifiers on a resolved external dependency — registered, assumed, derived, sdk-only, stale. items: type: string type: array nullable: true source: description: project (the resource block was defined here) or org (it was copied from a Registered External resource — resourceRef is set). Computed. type: string resourceRef: description: The registry name the resource block was copied from; empty for a Project External resource. type: string provider: description: The concrete system chosen; absent until the user chose one (suggestions may be open). type: string consumptionInstructions: description: The organization's instructions for a copied resource; never on a project-defined one. type: string style: description: rest-api | graphql | sdk — computed from contractType. type: string contractType: description: openapi | graphql | sdk — the contract object's type. type: string contractOrigin: description: registry | provider | derived | assumed — where the project's contract file came from. type: string contract: description: The contract file name in the dependency's directory, present only when the file is on disk (sdk contracts report it under sdk). type: string sdk: description: The SDK manifest file name (sdk.json), present only when it is on disk. type: string contractAssumed: description: The contract on disk was written by the design agent from research; it counts only once a user accepts it (assumed). type: boolean contractDerived: description: The contract on disk was written by the design agent from the provider's own developer reference, every operation cited; resolved and flagged derived, no authorization asked. type: boolean package: description: For an sdk dependency, the package for this component's language, from the manifest. type: string provenance: $ref: '#/components/schemas/ResourceProvenance' assumed: $ref: '#/components/schemas/DependencyAssumption' suggestions: items: $ref: '#/components/schemas/DependencySuggestion' type: array nullable: true config: items: $ref: '#/components/schemas/ConfigKey' type: array nullable: true resourceType: type: string parameters: additionalProperties: {} type: object nullable: true operations: description: Read-time computed resolution of every allow-listed operation an ai-agent component's `x-aep.tools.openapi[]` entry names against THIS dependency — populated only when this Dependency is the provider such an entry targets. Never authored, never persisted. items: $ref: '#/components/schemas/DependencyOperationStatus' type: array nullable: true required: - kind - name type: object DependencyContractBody: additionalProperties: false description: Exactly one of url (fetched by the platform, SSRF-hardened) or content (the document itself, pasted or uploaded). properties: url: type: string content: type: string type: object DependencyContractResponse: additionalProperties: false properties: contract: description: Repo-relative path of the committed contract file. type: string required: - contract type: object AcceptAssumptionBody: additionalProperties: false properties: note: description: Optional note recorded with the acceptance; defaults to the agent's own note of what it was unsure about. type: string type: object ResourceProvenance: description: Where a copy of a contract document came from, at either level — the internet address an org copy was fetched from, or the registry file a project copy was taken from — with the whole document's hash at the time and when it was read. x-go-type: contracts.ResourceProvenance x-go-type-import: path: github.com/wso2/aep/aep-api/internal/contracts additionalProperties: false properties: sourceUrl: type: string registry: description: The org-resource-docs path (/) a project copy was taken from. Never a URL. type: string sha256: type: string readOn: type: string type: object ResourceContract: description: The contract as held at one level — `{ type, path }`, the path relative to that level's store (the org docs repo for a registry record, the dependency directory for a project copy). No URL form exists. On a project copy, origin says where the file came from and accepted is the user's permission for an assumed one (platform-written). x-go-type: contracts.ResourceContract x-go-type-import: path: github.com/wso2/aep/aep-api/internal/contracts additionalProperties: false properties: type: $ref: '#/components/schemas/ResourceContractType' path: type: string origin: enum: - registry - provider - derived - assumed type: string accepted: $ref: '#/components/schemas/DependencyAssumption' required: - type - path type: object ResourceDefinition: description: An External resource in the one shape it has at both levels — the org registry record and a dependency's `resource` block. Values are never here. x-go-type: contracts.ResourceDefinition x-go-type-import: path: github.com/wso2/aep/aep-api/internal/contracts additionalProperties: false properties: ref: description: Project copy only — the registry name the block was copied from; equals the dependency name. type: string name: type: string description: type: string provider: type: string config: items: $ref: '#/components/schemas/ConfigKey' type: array nullable: true contract: $ref: '#/components/schemas/ResourceContract' consumptionInstructions: type: string provenance: $ref: '#/components/schemas/ResourceProvenance' required: - name type: object DependencyAssumption: description: The user's permission to build against a contract the agent wrote from research — who accepted, when, and the agent's note of what it was unsure about. x-go-type: contracts.DependencyAssumption x-go-type-import: path: github.com/wso2/aep/aep-api/internal/contracts additionalProperties: false properties: by: type: string at: type: string note: type: string required: - by - at type: object DependencySuggestion: description: A service the user might choose for an external dependency, named while no provider is chosen. x-go-type: contracts.DependencySuggestion x-go-type-import: path: github.com/wso2/aep/aep-api/internal/contracts additionalProperties: false properties: name: type: string style: type: string description: type: string required: - name type: object CycleBuild: additionalProperties: false description: One component's build at a cycle's merge SHA, derived from its OpenChoreo WorkflowRun. `status` and `completed` are that run's own pair, carried verbatim — OpenChoreo's status is a condition Reason string rather than a closed set, so `completed` is the terminal gate and `status` must never be parsed to decide anything. properties: attempt: description: 1 for the fan-out's build; 2 for the single automatic re-trigger a red build gets. Read off the run name's trailing ordinal, which is where the attempt count lives. format: int64 type: integer buildName: description: The WorkflowRun's name — pass verbatim to get-build-logs as `buildName`. type: string completed: type: boolean component: type: string startedAt: type: string status: description: The WorkflowRun's status, verbatim (`Pending`, `Running`, or the completion condition's Reason). type: string required: - component - buildName - status - completed - attempt type: object CycleBuildList: additionalProperties: false properties: expired: description: True when the merge's builds are no longer kept — no WorkflowRun of the merge is left and the merge is older than the builder workflow's `ttlAfterCompletion`. An empty list without it means the merge has not reached the cluster's builds yet. type: boolean items: items: $ref: '#/components/schemas/CycleBuild' type: array nullable: true required: - items type: object DependencyStatus: additionalProperties: false properties: outputs: items: type: string type: array nullable: true ready: type: boolean status: type: string valueState: $ref: '#/components/schemas/ExternalDependencyValueState' required: - status - ready - outputs type: object ExternalDependencyReadiness: additionalProperties: false properties: missingKeys: items: type: string type: array name: type: string state: $ref: '#/components/schemas/ExternalDependencyValueState' required: - name - state - missingKeys type: object ExternalDependencyValueState: enum: - not-provisioned - unset - configured type: string ProjectDependencyReadiness: additionalProperties: false properties: configured: type: boolean dependencies: items: $ref: '#/components/schemas/ExternalDependencyReadiness' type: array required: - configured - dependencies type: object DeployStage: additionalProperties: false description: Deploy-stage aggregate on ProjectStatus (#184) — what's live in dev and rollout progress. properties: components: additionalProperties: false description: Component rollout progress for the current deploy. properties: ready: format: int64 type: integer total: format: int64 type: integer required: - total - ready type: object status: enum: - none - deploying - deployed - failed type: string x-go-type: string validation: description: >- Where the deployed version's validation stands, in the shared ValidationState vocabulary. The report path and the per-attempt detail behind it live on the version's run story (list-build-runs) and its validation history (get-validation). allOf: - $ref: '#/components/schemas/ValidationState' version: description: Spec tag live in dev; "" if nothing deployed. type: string required: - version - status - components - validation type: object DeploymentGuardrail: additionalProperties: false description: >- One declared guardrail and what the deploy did with it. `applied` is on the agent's traffic; `partial` is applied without its reply-side check, which the gateway does not enforce on streamed replies; `unavailable` names a policy this environment's gateway does not offer; `invalid` params failed the policy's schema; `conflict` means a guardrail of the same policy was added in Agent Manager by hand and was left alone; `failed` could not be written; `unsupported` needs an Anthropic-format model connection. properties: policy: type: string reason: type: string status: enum: [applied, partial, unavailable, invalid, conflict, failed, unsupported] type: string x-enum-varnames: - GuardrailApplied - GuardrailPartial - GuardrailUnavailable - GuardrailInvalid - GuardrailConflict - GuardrailFailed - GuardrailUnsupported required: [policy, status] type: object Deployment: additionalProperties: false properties: agentManagerUrl: description: >- The agent's page in the Agent Manager console that governs this environment. Present only for an ai-agent whose environment is governed by Agent Manager and whose registration exists there; absent otherwise, including when the environment names no console. type: string guardrails: description: >- What became of each guardrail the agent's spec declares (x-aep.guardrails), as the last deploy to this environment left it. Present only for an ai-agent governed by Agent Manager that declares guardrails or once did; absent otherwise. items: $ref: '#/components/schemas/DeploymentGuardrail' type: array componentName: type: string createdAt: type: string endpointUrl: type: string environment: type: string name: type: string releaseName: type: string status: type: string type: object DeploymentList: additionalProperties: false properties: items: items: $ref: '#/components/schemas/Deployment' type: array nullable: true required: - items type: object DisconnectOutputBody: additionalProperties: false properties: status: type: string required: - status type: object DiscoverOutputBody: additionalProperties: false properties: issuer: type: string jwksUrl: type: string required: - issuer - jwksUrl type: object EnvVar: # Hand-written in models/ (the gorm-persisted EnvVarSlice embeds it); # gen aliases this type to keep the models↔gen dependency one-way. additionalProperties: false properties: key: type: string value: type: string required: - key - value type: object Error: description: Flat error envelope returned by every non-2xx response. type: object additionalProperties: false properties: code: description: Machine-readable error code (stable slug). type: string example: validation_failed message: description: Human-readable error message. type: string example: request body is invalid details: description: Field-level details for validation errors. type: array items: $ref: '#/components/schemas/ErrorDetail' required: - code - message ErrorDetail: description: One field-level validation error. type: object additionalProperties: false properties: field: description: Location of the offending field (e.g. body.name). type: string message: description: What is wrong with the field. type: string required: - field - message ExecutionView: additionalProperties: false properties: createdAt: format: date-time type: string endedAt: format: date-time type: string nullable: true x-go-type: '*time.Time' id: type: string kind: type: string reason: type: string runName: type: string startedAt: format: date-time type: string nullable: true x-go-type: '*time.Time' status: type: string required: - id - kind - status - createdAt type: object EnvValueCellDTO: additionalProperties: false description: One org-held env cell. Secrets never include value. properties: environment: type: string key: type: string status: enum: - configured - unset type: string value: type: string required: - environment - key - status type: object ResourceDocPointerDTO: additionalProperties: false description: Org resource docs pointer (type + URL or repo path), not file bodies. properties: path: type: string type: enum: - documentation - openapi - graphql - asyncapi - protobuf type: string url: type: string required: - type type: object ResourceDocWriteDTO: additionalProperties: false description: > One resource-docs write row on register/update. Exactly one of {type,url} | {type,path} | {type,fileName,content}. List/GET never use this schema. properties: type: enum: - documentation - openapi - graphql - asyncapi - protobuf type: string x-enum-varnames: - Documentation - Openapi - Graphql - Asyncapi - Protobuf url: type: string path: type: string fileName: type: string content: type: string description: UTF-8 text of a new or replacement file; never returned on GET. required: - type type: object ResourceInstanceDTO: additionalProperties: false properties: environment: type: string project: type: string status: type: string required: - project - environment - status type: object EnvironmentDTO: additionalProperties: false description: >- One environment in the org's deployment pipeline, in promotion order. `name` is the OpenChoreo Environment's immutable identity; everything else is presentation or flow. `validation` says whether this environment runs a validation step; it is always present in the response, because an Environment whose annotation is missing or unrecognised is served as "off". properties: name: type: string description: Immutable OpenChoreo Environment name. Bindings and cell namespaces reference it. displayName: type: string description: From the openchoreo.dev/display-name annotation; falls back to a titlecased name. isProduction: type: boolean description: From Environment.spec.isProduction. Never inferred from the name. validation: type: string enum: [on, off] description: >- From the aep.wso2.com/validation annotation. Always present in the response: when the annotation is missing or unrecognised on the Environment, the server serves "off". position: type: integer format: int32 description: 0-based index in promotion order. The array is already ordered; this is a convenience. promotesTo: type: string description: The next environment's name. Omitted on the last environment, which has no promote step. required: - name - displayName - isProduction - validation - position type: object RegisterExternalResourceRequest: additionalProperties: false properties: config: items: $ref: '#/components/schemas/ConfigKeyDTO' type: array consumptionInstructions: type: string contract: allOf: - $ref: '#/components/schemas/ResourceContractWriteDTO' x-go-type-skip-optional-pointer: false description: type: string envValues: items: $ref: '#/components/schemas/EnvValueWriteDTO' type: array name: type: string provider: description: The concrete system this resource is ("Open Exchange Rates"). type: string resourceDocs: items: $ref: '#/components/schemas/ResourceDocWriteDTO' nullable: true type: array required: - name - description - provider - consumptionInstructions - config - envValues type: object EnvValueWriteDTO: additionalProperties: false description: One value of one config key in one environment, as written by a form. properties: environment: type: string key: type: string value: type: string required: - environment - key - value type: object PromoteExternalResourceRequest: additionalProperties: false description: > What the organization adds when it takes over a project's own resource: how its consumers should use it and a value for every key in every environment. Name, provider, keys, description and contract come from the project's copy. An environment left out of envValues is carried over from the project's own values when it has them. properties: consumptionInstructions: type: string description: description: Replaces the project's description when set. type: string envValues: items: $ref: '#/components/schemas/EnvValueWriteDTO' type: array required: - consumptionInstructions type: object ResourceContractType: description: The kind of document a resource's contract is. enum: - openapi - graphql - sdk - asyncapi - protobuf - documentation type: string ResourceContractWriteDTO: additionalProperties: false description: > The resource's contract document on register/update. Exactly one of url (fetched by the platform, hashed and committed to the org docs repo — the URL is kept only as provenance) or fileName+content (uploaded). At most 5 MiB. Accepted shapes, enforced by the server (any other is a 400 naming the rule): `{type, url}` or `{type, fileName, content}` — never both forms, never type alone. The pair is not expressed as a JSON-Schema oneOf on purpose: the generators this contract feeds turn it into an unusable union (a `json.RawMessage` union field in Go, `unknown` in TypeScript) that hides the three plain fields callers actually set. properties: type: $ref: '#/components/schemas/ResourceContractType' url: type: string fileName: type: string content: type: string required: - type type: object ExternalResourceDTO: additionalProperties: false properties: config: items: $ref: '#/components/schemas/ConfigKeyDTO' type: array nullable: true consumers: items: $ref: '#/components/schemas/ConsumerDTO' type: array nullable: true consumptionInstructions: type: string description: type: string envCells: description: > Org value plane. Present with one cell per config key × OpenChoreo Environment on a Registered External resource. Omitted or empty on a Project External resource. Secrets never include value. items: $ref: '#/components/schemas/EnvValueCellDTO' nullable: true type: array instances: items: $ref: '#/components/schemas/ResourceInstanceDTO' nullable: true type: array name: type: string provider: type: string contract: allOf: - $ref: '#/components/schemas/ResourceContract' x-go-type-skip-optional-pointer: false provenance: allOf: - $ref: '#/components/schemas/ResourceProvenance' x-go-type-skip-optional-pointer: false scope: description: > org — a Registered External resource, held by the organization; project — a project's own resource, listed with its project so the organization can promote it. Org-only readers (the design agent's catalog, Register's uniqueness check) never see project rows. enum: - org - project type: string project: description: The project that holds this resource; set on scope project only. type: string resourceDocs: items: $ref: '#/components/schemas/ResourceDocPointerDTO' nullable: true type: array required: - name - config - consumers type: object OrgEndpointDTO: additionalProperties: false description: One Marketplace Endpoint — thin list_org_endpoints item, not the MCP {endpoints:[…]} wrapper. properties: name: description: org-service dependency name = provider component name type: string project: type: string endpoint: type: string type: enum: - HTTP - gRPC - GraphQL - Websocket - TCP - UDP type: string namespaceVisible: description: always true on this operation type: boolean required: - name - project - endpoint - type - namespaceVisible type: object GitProviderProjection: x-go-type: orgconfig.GitProviderProjection x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false properties: connectedAt: format: date-time type: string githubLogin: type: string identityChangedAt: format: date-time type: string identityEmail: type: string identityLogin: type: string identityName: type: string installationId: format: int64 type: integer kind: enum: - github type: string lastValidatedAt: format: date-time type: string mode: enum: - app - pat type: string prevIdentityLogin: type: string selectedRepos: items: type: string type: array nullable: true status: type: string required: - kind - mode - status - connectedAt type: object IDPProjection: x-go-type: orgconfig.IDPProjection x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false properties: hasClientSecret: description: Whether the org's publisher client secret is recorded (its ae-publisher-client reference exists). The secret itself lives only in vault. type: boolean issuer: type: string jwksUrl: type: string kind: enum: - platform - asgardeo - custom type: string publisherClientId: type: string required: - kind - issuer - jwksUrl - publisherClientId - hasClientSecret type: object ImportResult: additionalProperties: false properties: compatibility: type: string kind: type: string license: type: string name: type: string warnings: items: type: string type: array nullable: true required: - name - kind - warnings type: object InputFailure: additionalProperties: false properties: component: type: string dependency: type: string kind: type: string reason: type: string required: - dependency - reason type: object CreateIssueRequest: additionalProperties: false description: Issue to file on the project's repo. dedupeKey makes creation idempotent per open issue (label-encoded), for concurrent alert handlers. componentName and actionStatuses carry the SRE incident handoff context; they do not declare issue-create outcomes. properties: actionStatuses: description: Ordered per-action statuses from the incident handoff. A null entry is meaningful and preserves the action's position when it has no status. items: type: string nullable: true type: array nullable: true title: type: string body: type: string componentName: description: Component affected by the incident. type: string labels: items: type: string type: array nullable: true dedupeKey: type: string required: - title - body type: object IssueComment: additionalProperties: false description: One comment on an issue, exactly as GitHub holds it. The platform stores none of this — it is read live on every request, so GitHub stays the only copy. The platform's notes TO THE AGENT are excluded (a resolved-dependency block, a provisioning note, a closing line — written for a reader that is not a person); what remains is what a human wrote, what an agent said, and what the platform observed of a run. Author cannot separate them and is not meant to — the platform comments through the org's own credential and the coding runner is handed that same credential, so all three arrive under one login. `observed` is what separates a machine's report of a tool call from somebody's judgement about the work. properties: author: description: The commenter's GitHub login. Empty when the account is gone — GitHub answers a null author for a deleted user, which is a fact about the comment, not a read failure. type: string body: type: string createdAt: format: date-time type: string id: description: GitHub's own node id — stable across reads, and the list key a consumer should render on. type: string observed: description: True when the PLATFORM wrote this line from what it saw the run do, rather than an agent or a person writing it. A validation run's harness, exploration, spec runs and report are reported this way — inferred from tool calls the run had to make, never declared by it — so a reader can tell a mechanical observation from a judgement. Absent means somebody wrote it. type: boolean url: type: string required: - id - author - body - createdAt - url type: object IssueResult: additionalProperties: false description: Server-derived issue-create outcome. deduped=true means an open issue with the same dedupeKey already existed — number/url refer to it. Callers never supply classification, suppression, reopening, adoption, or recurrence outcomes. properties: adoptionError: description: Server-derived reason adoption did not complete, when present. type: string nullable: true adopted: description: True when the server adopted the incident into an existing issue. type: boolean classification: description: Server-derived incident classification. type: string number: format: int64 type: integer url: type: string nodeId: type: string deduped: type: boolean reopened: description: True when the server reopened a matching closed issue. type: boolean recurrenceCount: description: Server-derived count of recorded recurrences for this incident. format: int64 type: integer suppressed: description: True when the server suppressed creation for this incident. type: boolean required: - number - url - nodeId type: object IssueInfo: additionalProperties: false description: 'One issue from list/search. Field names are CAPITALIZED on the wire (a historical shape the SRE handoff''s search tool answers too, and the SRE agent''s skill reads — do not "fix" without changing both).' properties: Number: format: int64 type: integer Title: type: string Body: type: string URL: type: string State: type: string Labels: items: type: string type: array nullable: true StateReason: description: Provider-supplied reason for the issue state, when available. type: string nullable: true attentionReason: description: Console attention state. Omitted when the issue needs no attention. enum: - unverified_fix - no_change_verdict - escalated type: string milestoneNumber: description: >- The number of the issue's milestone, if any (handing an issue over puts it in the deployed version's and arms it with the `aep` label). Omitted when the issue is in none. format: int64 type: integer required: - Number - Title - Body - URL - State - Labels type: object LLMCapabilities: x-go-type: orgconfig.LLMCapabilities x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false description: >- What a connection supports, computed by the platform from its format, host and probe, so the console holds no host rules of its own. properties: claudeSubscription: description: A Claude subscription may bill coding runs (Anthropic's own API only). type: boolean generatedAgents: description: >- Generated AI agents, Agent Manager and build evaluation can run on this connection. True on every format. type: boolean imageInput: description: >- Whether the model reads images: `yes` on Anthropic's API and where the probe learned it, `no` where the probe learned it does not (attachments are refused), `unknown` elsewhere (sent; the provider's error names the problem). enum: - 'yes' - 'no' - unknown type: string nativePdf: description: PDFs go to the model natively; otherwise they are sent as extracted text. type: boolean webSearch: description: >- How agents search the web on this connection: Anthropic's server tool, Ollama's web search API, or `none` (web search is off). enum: - anthropic-server-tool - ollama-api - none type: string required: - claudeSubscription - webSearch - imageInput - nativePdf - generatedAgents type: object LLMCheck: x-go-type: orgconfig.LLMCheck x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false description: >- What probing a connection found: the connection as it would be saved, whether the endpoint lists the model, and what it supports. The card draws its info box and Claude Code tile from `capabilities` and `priced` here before a save, and from the projection after. properties: baseURL: description: >- The URL as it is (or would be) saved. An Anthropic-format URL with no path gains `/v1`, because the SDKs append `/messages` to it. type: string capabilities: $ref: '#/components/schemas/LLMCapabilities' kind: enum: - anthropic - openai-compatible type: string model: type: string modelListed: description: >- `yes` when the endpoint's model listing names the model, `no` when it lists models but not this one (a warning: some endpoints serve models they do not list, and the save goes through), `unknown` when the endpoint has no listing. enum: - 'yes' - 'no' - unknown type: string priced: description: >- The platform holds a rate for this host and model, so usage shows a dollar figure; otherwise usage shows tokens only. type: boolean warning: description: >- `provider_limit`: the endpoint answered with a rate limit, which proves the key; agents will wait on (or be blocked by) the provider's limit until it resets. enum: - provider_limit type: string required: - kind - baseURL - model - modelListed - priced - capabilities type: object LLMFormatOption: x-go-type: orgconfig.LLMFormatOption x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false description: One API format a connection may speak. properties: defaultBaseURL: description: >- The URL a first connect fills in when none is sent; null when the format has no default host and `baseURL` is required. nullable: true type: string defaultModel: description: >- The model a first connect fills in when none is sent (`glm-5.3` is Ollama's model ID; model IDs must match the endpoint's exactly). type: string kind: enum: - anthropic - openai-compatible type: string runtimes: description: >- The runtimes on this installation that run this format (a subset of `agents.availableRuntimes`). Empty means no runtime here can run it, and a save is refused (`llm_format_has_no_runtime`). items: $ref: '#/components/schemas/AgentRuntime' type: array required: - kind - defaultBaseURL - defaultModel - runtimes type: object LLMPatch: x-go-type: orgconfig.LLMPatch x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false description: >- A model connection, field by field: an absent field keeps the saved value (or, on first connect, the format's default). Any public https endpoint speaking one of the formats; private, cluster and plain-http hosts are refused. properties: apiKey: description: >- Write-only; never echoed. At least 12 characters. Required on first connect and whenever the host changes. maxLength: 512 minLength: 1 type: string writeOnly: true baseURL: description: >- The API root, ending in its version segment (e.g. `https://ollama.com/v1`). An Anthropic-format URL with no path gains `/v1`, because the SDKs append `/messages` to it. maxLength: 2048 minLength: 1 type: string kind: enum: - anthropic - openai-compatible type: string model: description: The model ID exactly as the endpoint names it. maxLength: 256 minLength: 1 type: string type: object LLMProjection: x-go-type: orgconfig.LLMProjection x-go-type-import: path: github.com/wso2/aep/aep-api/internal/platform/orgconfig additionalProperties: false description: >- The organization's model connection, as every agent uses it. Its key is write-only and lives only in the vault: the section's presence says the key is set, and no character of it is projected. The section is null while the key's vault reference is not recorded. A stored connection is usable by construction: a save that changes the connection is refused unless its probe passes. properties: baseURL: type: string capabilities: $ref: '#/components/schemas/LLMCapabilities' connectedAt: description: When a key was first connected on this connection's host. format: date-time type: string kind: enum: - anthropic - openai-compatible type: string model: type: string priced: description: >- The platform holds a rate for this host and model, so usage shows a dollar figure; otherwise usage shows tokens only. type: boolean updatedAt: format: date-time type: string updatedBy: description: Who last saved the connection; null for one carried over by a migration. nullable: true type: string required: - kind - baseURL - model - connectedAt - updatedAt - updatedBy - priced - capabilities type: object Lineage: additionalProperties: false properties: designTag: type: string specTag: type: string type: object MilestoneRunView: additionalProperties: false description: One run of the milestone loop, with the cycle records that make up its timeline. Loop POSITION is deliberately absent — it renders from the latest cycle, because fix and conflict cycles re-enter earlier phases and a stored phase enum would lie mid-loop. properties: budgets: $ref: '#/components/schemas/RunBudgets' createdAt: format: date-time type: string cycles: description: Oldest first — one record per dispatch. items: $ref: '#/components/schemas/RunCycleView' type: array endedAt: format: date-time nullable: true type: string x-go-type: '*time.Time' id: type: string kind: description: What this run DOES, and the value every platform predicate is written on. `dev` delivers a version — it plans its own milestone, and is the only kind that takes the one-active-build-per-project mutex. `task` works a defect inside a version already delivered; task runs execute concurrently on their own milestones. `validation` asks a shipped version's validation criteria again — it has no working set, builds nothing, and is outside the mutex so it never holds up the next build. enum: - dev - task - validation type: string milestoneNumber: format: int64 type: integer milestoneTitle: description: The milestone's GitHub title at creation. Display only — the number is the key, and the version this run builds is the list's tag. type: string origin: description: Where this run was started from. A label on the trigger — the behaviour is the run's kind. enum: - spec-build - incident-adoption - revalidate type: string startedAt: format: date-time nullable: true type: string x-go-type: '*time.Time' state: description: planning is the fill window — the version's milestone is still being written (gates minted, then issues planned in). waiting is the unbounded wait between cycles, where something outside the platform is needed. blocked is terminal and is NOT a failure — the org has no agent concurrency slot left, so the cycle was never launched (see terminalReason agent-quota-blocked), or the model provider's usage limit stopped the coding agent (terminalReason model-provider-limit); either way a person starts the run again. enum: - planning - waiting - running - succeeded - failed - cancelled - blocked type: string terminalReason: description: Why a non-succeeded run stopped. Each value names exactly one failure class; empty while the run is non-terminal and on a succeeded run. agent-quota-blocked, publisher-credentials-missing and model-provider-limit explain state=blocked. no-write-target is a failed run whose project's deployment pipeline names no environment to deploy into, met at coding-agent dispatch or at any deploy step (the gate, the version read, a promote or a readiness poll); it files no fix work and dispatches no agent. agent-start-failed is a failed run whose agent never started (its pod did not reach Running within the startup grace, e.g. no room in the cluster); nothing ran, no pull request was opened, and the cycle's Job was suspended. type: string waitingReason: description: Why a `waiting` run is waiting. Empty for the ordinary between-cycles park, which needs no explanation. `external-values` is the deploy gate — the run is built and ready to deploy, and every remaining blocker is a value only a human can supply. That park is unbounded and only cancellation or the values arriving exits it, so a client that renders `waiting` without this reads a working run as a hung one. enum: - external-values type: string blockingDependencies: description: The external dependency names a `waiting` run is blocked on, so a client can name them and link straight to their configuration. Empty unless waitingReason is set. items: type: string type: array failure: allOf: - $ref: '#/components/schemas/RunFailure' description: The fault this run is failing, or failed, on. Absent when it met none. x-go-type-skip-optional-pointer: false validation: $ref: '#/components/schemas/RunValidation' required: - id - kind - milestoneNumber - milestoneTitle - origin - state - budgets - validation - cycles - createdAt type: object OrganizationList: additionalProperties: false properties: items: items: $ref: '#/components/schemas/OrganizationView' type: array nullable: true required: - items type: object OrganizationView: additionalProperties: false properties: createdAt: format: date-time type: string description: type: string displayName: type: string name: type: string status: type: string uuid: type: string x-go-type: uuid.UUID x-go-type-import: path: github.com/google/uuid required: - uuid - name - createdAt type: object PlatformResourceTypeDTO: additionalProperties: false properties: consumers: items: $ref: '#/components/schemas/ConsumerDTO' type: array nullable: true description: type: string name: type: string outputs: items: type: string type: array nullable: true parameters: additionalProperties: {} type: object required: - name type: object PreflightItem: additionalProperties: false properties: component: description: Owning component name type: string config: items: $ref: '#/components/schemas/ConfigKeyView' type: array nullable: true dependency: description: Dependency name type: string description: type: string kind: enum: - external-config - external-spec - external-unresolved - platform-resource - org-service type: string parameters: additionalProperties: {} type: object resourceType: type: string required: - component - dependency - kind - description type: object ProgressEvent: additionalProperties: false properties: branch: type: string command: type: string completedAt: type: string durationMs: description: '`tool_result` only: how long the call took, measured by the runner between the call and its outcome, so it includes model turnaround.' format: int64 type: integer emitter: description: Who produced the line — `subagent` for work the main agent fanned out with the Task tool, absent for the main agent itself. Absence is a positive fact, not an unknown. enum: - main - subagent type: string emitterId: description: Which subagent, for the cycles that fan out to several at once — the id of the fan-out tool call, stable for that subagent's whole life. Absent on main-agent lines. type: string emitterLabel: description: The description the main agent gave that subagent ("Implement todo-api service (issue #3)"). Absent on main-agent lines, and on a fan-out that carried no description. type: string error: type: string exitCode: description: '`tool_result` only: the process status of a failed shell call, parsed from the SDK''s own `Exit code N` first line. Absent when the tool was not a shell — those report a `` with no code — so read absence as "no code was reported", never as "exited 0".' format: int64 type: integer files: format: int64 type: integer itemId: description: '`progress_item` only: WHICH named unit of work the line is about — the key a consumer folds on, since many lines describe the same item and a reader wants one row repainted rather than many rows printed. Validation binds items to acceptance criteria ("AC-003-a"), which `cycleKind` already implies, so this never repeats it. The status itself rides on `status`, scoped by `kind`: planned | exploring | authoring | running | healing | pass | fail.' type: string kind: type: string level: type: string linesAdded: description: A fanned-out subagent's total lines added, off the SDK's own report on its fan-out call's result. Present only there; nothing in the feed can reconstruct it. format: int64 type: integer linesRemoved: description: A fanned-out subagent's total lines removed, from the same report. format: int64 type: integer message: type: string ok: description: '`tool_result` only: whether the call succeeded. Absent on every other kind — so read absence as "not a tool result", never as success.' type: boolean phase: type: string schemaVersion: format: int64 type: integer seq: format: int64 type: integer sha: type: string startedAt: type: string status: type: string step: type: string summary: type: string tool: type: string toolCount: description: A fanned-out subagent's total tool calls, off the SDK's own report on its fan-out call's result. Present only there. format: int64 type: integer toolUseId: description: The tool call this line is about. A `tool_result` carries the id of the `tool_use` it answers, which is what pairs a call with its outcome once several subagents interleave the feed. type: string ts: type: string required: - schemaVersion - ts - seq - kind type: object PromoteFromIssueRequest: additionalProperties: false properties: componentName: description: Component this issue is about type: string required: - componentName type: object Project: additionalProperties: false properties: createdAt: type: string deploymentPipeline: type: string description: type: string displayName: type: string name: type: string namespaceName: type: string repoUrl: description: Clone URL of the project's Git repository; absent when no repo is provisioned (issue type: string status: type: string uid: type: string required: - name type: object ProjectList: additionalProperties: false properties: items: items: $ref: '#/components/schemas/Project' type: array nullable: true nextCursor: description: Cursor for the next page; absent on the last page. type: string required: - items type: object ProjectRole: additionalProperties: false description: One role THIS project owns on the identity provider. A different kind of object from ProjectRoleState, which is a SHARED org group. A project role is named `/`, exactly one project creates it, and that project's builds converge it and its delete removes it. properties: assignedTo: description: The GROUPS holding the role, in binding order. EMPTY is meaningful, not missing data - it is the normal shape for a self-service role (which carries no assignTo, and whose test logins hold it as user principals instead) and for a service role (an application principal holds it). items: $ref: '#/components/schemas/ProjectRoleAssignment' type: array nullable: true directoryName: description: The name the directory carries - `/`. The prefix is the platform's ownership device; render `name`, not this. type: string name: description: The role as the design declares it (`Approver`), which is what a test user reference names and what the console renders. type: string resourceServer: description: The resource server identifier every grant of this role is on. Every role of one project carries the same value, so a reader that wants the project's answer - and wants it before any role exists - reads `resourceServer` on the view instead. type: string scopes: description: The catalog handles the role grants, read from the identity provider and sorted. Empty when the directory could not be asked - "unknown", not "grants nothing". items: type: string type: array nullable: true required: - name - resourceServer type: object ProjectRoleAssignment: additionalProperties: false description: One group a project role is assigned to, with how load-bearing that group already is. The count travels with the assignment because "assigned to Finance" and "assigned to Finance, which holds roles in two projects" are different facts to somebody deciding whether to reuse a group. properties: group: description: The group name, verbatim from the design's `assignTo`. type: string projects: description: How many DISTINCT projects on this directory assign any role to the group. A group only this project binds reads 1. type: integer required: - group - projects type: object ProjectRoleState: additionalProperties: false description: One role as it exists on the identity provider right now, joined against the platform's own record. Roles are shared at the provider's scope, so a row here is not owned by the project reading it. properties: description: description: The group description on the directory. Seeded at create and never rewritten (a shared role may have been described by whoever declared it first). type: string memberCount: description: How many accounts currently hold the role. Best-effort — a per-role read failure leaves it 0 rather than failing the whole panel. type: integer name: description: The role name verbatim; it is the identity, and it is what reaches an app as a groups claim. type: string platformCreated: description: True when the platform created this role and may therefore enrol test users into it. A hand-made group reads false and the platform leaves it alone. It is also the new-or-reused answer a role card renders - there is no separate directory status. type: boolean projects: description: How many DISTINCT projects on this directory assign a role to this group - the "reused, holds roles in n projects" a role card shows. A group nobody has bound a role to yet reads 0. type: integer required: - name - platformCreated type: object ProjectSignIn: additionalProperties: false description: How a client outside a project's own components signs in to it - the issuer to sign in AT and the public OAuth client to sign in AS. Both are public. Absent from a view when the project declares no sign-in resource or its binding has not resolved yet. properties: issuer: type: string clientId: type: string required: [issuer, clientId] type: object ProjectRolesView: additionalProperties: false description: The Security panel's read model. properties: directoryAvailable: description: False when the identity provider could not be reached. The store-derived fields are still populated; the console must say "unknown" for the live ones instead of rendering absence as "does not exist". type: boolean roles: description: The WHOLE directory catalog, name-ordered — not just this project's roles. Roles are shared, so the panel shows which existing role a design reuses. Empty when directoryAvailable is false. items: $ref: '#/components/schemas/ProjectRoleState' type: array nullable: true projectRoles: description: The roles THIS project owns, which `roles` above deliberately does not contain - the two are different kinds of object with different ownership rules, and one list would make "which existing group does this design reuse" unanswerable. Derived from the platform's own records, so they survive a directory outage with everything but their scopes. items: $ref: '#/components/schemas/ProjectRole' type: array nullable: true resourceServer: description: The resource server this project's grants are on - the access token's `aud`, the audience the gateway checks and the `resource` a scoped token is asked for. Read from the platform's record, or derived from (org, project) when no build has written one, so it answers before the first build too. Absent only when the panel could not be scoped to an environment at all, which is the same condition that empties every other field. type: string signIn: allOf: - $ref: '#/components/schemas/ProjectSignIn' description: Absent when the project declares no sign-in resource or its binding has not resolved yet. x-go-type-skip-optional-pointer: false testUsers: description: The test accounts THIS project's design references, role-ordered. items: $ref: '#/components/schemas/ProjectTestUserState' type: array nullable: true required: - directoryAvailable type: object ProjectTestUserState: additionalProperties: false description: One test account this project references. The account itself is shared at the identity provider's scope; only the reference is the project's. properties: exists: description: True when the account is present on the identity provider. Meaningless when directoryAvailable is false. type: boolean owned: description: True when the platform holds a sealed password for this account and may therefore reveal, rotate or delete it. False means the username belongs to somebody else and every mutation is refused. type: boolean referencingCount: description: How many projects reference this account IN TOTAL, across every org. A bare count with no names — the minimum disclosure that makes "others may still be using this" a true statement before a delete. type: integer referencingProjects: description: THIS ORG's projects that reference the account. Never another org's — a project name is one org's data, and the shared directory does not license disclosing it. items: type: string type: array nullable: true roles: description: Every project role this login holds - the one the account exists FOR first, then any other role of this project whose group the account is also a member of, read from the identity provider. Empty only when the account references no role at all. items: type: string type: array nullable: true scopes: description: The union of those roles' grants, sorted - the catalog handles this login's access token will carry. Empty when the directory could not be asked, which is "unknown" rather than "none". items: type: string type: array nullable: true rotatedAt: description: When the password was last replaced; null when never. format: date-time type: string nullable: true x-go-type: '*time.Time' supplied: description: True when the design named no test user for the role and the platform generated the username. type: boolean username: type: string required: - username - supplied - exists - owned type: object ProjectStatus: additionalProperties: false description: Computed SDLC phase and artifact states. properties: build: $ref: '#/components/schemas/BuildStage' deploy: $ref: '#/components/schemas/DeployStage' hasDesign: type: boolean hasSpec: type: boolean hasTasks: type: boolean phase: description: >- Repo and artifact rungs only: no-repo, repo-cloning, repo-error, prompt (no spec), spec (spec, no design), tasks (both). "tasks" is terminal — delivery state lives in the build and deploy aggregates, which is what a caller should render past the spec. "" on a ready repo whose spec facts are unavailable (spec.availability). type: string repoErrorMessage: description: Set when phase is repo-error. type: string repoStatus: description: '"", pending, cloning, ready, error' type: string repoUrl: type: string spec: $ref: '#/components/schemas/SpecStage' specStatus: description: '"", draft, approved' type: string required: - phase - repoStatus - repoUrl - hasSpec - hasDesign - hasTasks - specStatus - spec - build - deploy type: object ProjectUsageCard: additionalProperties: false description: One project's lifetime agent usage (#291). Identity comes from the usage rows' stored project slug, so a card survives its project's deletion. properties: deleted: description: True when no live project matches the slug — rendered as a greyed card. type: boolean displayName: description: The live project's display name; falls back to the slug for deleted projects. type: string projectName: description: Project name (DNS-label slug) as stored on the usage rows. type: string usage: $ref: "#/components/schemas/Usage" description: Lifetime totals; costUsd sums write-time stamps and is null when no row is stamped. phases: $ref: "#/components/schemas/PhaseUsage" description: The same lifetime spend split across the three SDLC phases (#291) — shown as a secondary line in the card's breakdown expand. Always all three phases; a phase the project never ran is a zero card. required: - projectName - displayName - deleted - usage - phases type: object PhaseUsage: additionalProperties: false description: A project's usage split by SDLC phase (#291). spec covers the spec/design agent turns; build covers the build + coding executions; validation covers the validation executions. Each is a full Usage so a phase can degrade to tokens when its rows are unstamped. properties: spec: $ref: "#/components/schemas/Usage" description: Spec/design agent turns. build: $ref: "#/components/schemas/Usage" description: Build + coding executions. validation: $ref: "#/components/schemas/Usage" description: Validation executions. required: - spec - build - validation type: object ProjectUsageList: additionalProperties: false description: Org-wide usage roll-up (#291), tiered — stamped-cost projects first (costUsd desc), then projects with usage the platform could not price (by tokens), then idle $0 projects last. properties: projects: items: $ref: "#/components/schemas/ProjectUsageCard" type: array required: - projects type: object ProvisionBody: additionalProperties: false properties: environments: description: 'Environments to provision (defaults to ["default"])' items: type: string type: array nullable: true params: additionalProperties: {} description: Provisioning parameters (override the design defaults) type: object type: object RcaAgentReport: additionalProperties: false description: An RCA report from the OpenChoreo SRE/RCA-agent handoff (console issues properties: classification: description: code-level, config-level, mixed, or none — set by the handoff agent type: string component: type: string createdAt: type: string format: date-time deployed: description: Whether the resulting fix has been deployed (Verify Fix threshold, not merely PR-merged) type: boolean deployedAt: type: string format: date-time x-go-type: '*time.Time' diagnosis: description: Full RCA diagnosis + remediation content (markdown) type: string dispatched: description: Whether the coding agent has been dispatched for the linked issue (false in issue-only/manual-dispatch mode until a human dispatches) type: boolean id: type: string issueExcerpt: description: Short excerpt of the linked GitHub issue; absent when no issue was created type: string issueNumber: description: GitHub issue number created by the handoff; also the Task key (see /projects/{projectName}/tasks/{issueNumber}); absent when the handoff was config-only format: int64 type: integer x-go-type: '*int64' issueTitle: type: string issueUrl: type: string project: type: string summary: description: Short RCA summary; the console truncates this further for list rows type: string title: type: string required: - id - project - createdAt - title - summary - classification - diagnosis - dispatched - deployed type: object RcaAgentReportList: additionalProperties: false properties: items: items: $ref: '#/components/schemas/RcaAgentReport' type: array nullable: true nextCursor: description: Cursor for the next page; absent on the last page. type: string required: - items type: object RevalidateAccepted: additionalProperties: false description: The run that will answer the question. Its cycles stream on the ordinary run progress endpoint, and its verdict becomes the version's once it settles. properties: milestoneNumber: format: int64 type: integer runId: type: string required: - runId - milestoneNumber type: object RevalidateRequest: additionalProperties: false description: Optional knobs on the revalidation run. Both are snapshotted onto the run at start, so a later config change cannot retroactively alter a run already in flight. properties: cycleCeiling: description: Total-cycle ceiling for this run. Omit for the platform default. Only meaningful when the run may repair — a run that validates once uses a single cycle. format: int64 type: integer validationAttempts: description: >- How many times this run may validate before it accepts the answer it keeps getting. Omit for the platform default. Set 1 for a pure re-check: the run reports its verdict and settles, filing no repair work and rebuilding nothing, because the attempt allowance is spent before the loop reaches the point where it would mint issues. format: int64 type: integer type: object RunBudgets: additionalProperties: false description: The run's budget counters as the supervisor wrote them out. Read-model bookkeeping — the loop counts its own budgets and never reads these back. properties: buildRetriggers: description: Run-wide tally of automatic build re-triggers. The authoritative one-per-component-per-SHA guard is derived at the trigger site, not from this number. format: int64 type: integer conflictCycles: format: int64 type: integer cycleCeiling: description: Snapshotted at start, so a config change cannot retroactively fail a live run. format: int64 type: integer cyclesTotal: format: int64 type: integer fixCycles: format: int64 type: integer validationCycles: description: Validation ATTEMPTS this run has opened. A run repairs and re-validates while this is under its allowance, so more than one means the run self-healed (or tried to). format: int64 type: integer required: - cyclesTotal - cycleCeiling - fixCycles - conflictCycles - buildRetriggers - validationCycles type: object RunCycleView: additionalProperties: false description: One dispatch within a run. Branch, pull request (number and URL) and merge SHA are LEARNED FROM WEBHOOKS — the agent derives its own branch identity — so they stay empty on a cycle whose agent died before opening a pull request. properties: advances: description: >- The version's build issue this cycle's pull request advanced (`Advances #N`): it finished some of the build's items, not all, so the merge lands them and the issue stays open with those items ticked. Kept apart from `resolves`, which the merge closes. Empty until a pull request is seen. items: format: int64 type: integer type: array agentReason: description: >- Why this cycle's agent stopped without opening a pull request, as the platform's pod-truth watcher classified it — `timed_out` (the run deadline), `agent_failed[:]` (a non-zero exit or a killed container), `startup_failed:: ` (the runner never started: image pull, scheduling, a secret that had not materialised, or `not_applied`, a Job the platform never applied for the attempt; the cycle's Job is then suspended, so its pod cannot start later, and the run settles `agent-start-failed`) or `job_not_found` (the runner's workload disappeared). Absent on every cycle that opened a pull request: there the pull request is the outcome. type: string attempts: description: Dispatches of THIS cycle (the per-cycle re-dispatch budget, which resets at every cycle boundary). format: int64 type: integer boot: allOf: - $ref: '#/components/schemas/RunCycleBoot' description: >- Where this open cycle's current attempt is in starting its runner, before the agent's first event. Absent once that event arrives, and on an ended cycle. STATE, not history: the progress stream re-sends the cycle frame each time it changes, and a client shows the newest and keeps none of the earlier ones. It replaces the negative-seq `runner_*` notices the stream used to send as events. It is sent on the run progress stream's cycle frames, read from the pod with the feed; run reads and the version build-progress stream, which read no pod, leave it absent. x-go-type-skip-optional-pointer: false branch: type: string createdAt: format: date-time type: string endedAt: format: date-time nullable: true type: string x-go-type: '*time.Time' id: type: string jobRef: description: The dispatched runner Job for the current attempt; replaced on re-dispatch. type: string kind: enum: - coding - conflict - fix - validation type: string mergeReason: description: >- The merge policy's own words for `mergeVerdict` — the auto-merge decision's reason, or the host's refusal. Written for a reader, not parsed. type: string mergeSha: type: string mergeVerdict: description: >- Why this cycle's pull request did NOT merge, when something decided so: `declined` is the auto-merge policy saying the pull request is not this run's work, `refused` is the host declining an open pull request (a conflict — a conflict issue is minted and the next cycle works it). Absent on a cycle whose merge was never decided against, which includes every cycle that merged: a merge is recorded by `mergeSha`, and each fresh decision overwrites this field, so a declined pull request that later merges does not keep the verdict. enum: - declined - refused type: string prDraft: description: >- Is the recorded pull request still a draft? A draft is the agent saying it is not finished, so nothing merges while this is true — recorded because a cycle sitting behind a draft is otherwise indistinguishable from one whose agent never opened a pull request. type: boolean prNumber: format: int64 type: integer prUrl: description: >- The pull request's own page on the host, as the webhook reported it — never composed from a repo URL and a number, so a console link either is the host's own or is absent. Empty until a pull request is seen. type: string recording: description: >- What the platform can serve of this cycle's RunEvent feed — a different question from what the cycle did, and one a client has to ask before it presents a feed as the story of the cycle. Derived from the cycle row alone; no log is read to answer it. `live` — the cycle is running: its feed is read from the pod's log and a reader should expect it to grow. `kept` — the cycle is over and its feed is still readable: from the pod's log while the pod exists, then from the observability plane by the cycle's Component UID. `expired` — the platform no longer keeps this cycle's log: it ended longer ago than the observability plane's log retention, or it predates Component UID capture. `unavailable` — the log should exist but cannot be read right now (no observability plane, or the last read of it failed). Losses inside a feed are not a state: each hole is a `notice` with `code: gap` at the point it happened. enum: - live - kept - expired - unavailable type: string x-enum-varnames: - Live - Kept - Expired - Unavailable resolves: description: >- The milestone agent-work issues this cycle's pull request claims — the merge policy's matched set, which is what the merge closes. Recorded so a cycle's working set survives its issues being closed; empty until a pull request is seen. items: format: int64 type: integer type: array startupWait: allOf: - $ref: '#/components/schemas/RunCycleStartupWait' description: >- Why this open cycle's agent has not started yet. Absent while nothing holds it up, and on an ended cycle. x-go-type-skip-optional-pointer: false validationIssue: description: >- The validation issue this cycle was dispatched at. Set on validation cycles only, and recorded per cycle rather than only on the run so a repeated validation stays navigable to the issue that framed each attempt. format: int64 type: integer validationVerdict: description: >- What THIS validation attempt concluded, from the report at its own `mergeSha`. Set on validation cycles only, and only once the attempt settles. The run carries the latest attempt's verdict; this is how a self-healed run shows that an earlier attempt failed. enum: - passed - partial - failed - inconclusive - unreported - skipped type: string required: - id - kind - attempts - createdAt type: object RunCycleStartupWait: additionalProperties: false description: >- Why an OPEN cycle's agent has not started yet: the platform has not applied its Job yet, or its pod is stuck before Running, as the platform's pod-truth watcher last saw it. Present only while the cycle is open and its current attempt waits so; absent once the pod runs or is merely starting, and once the cycle has ended (an agent that never started then ends the cycle with an `agentReason` of `startup_failed:`, `startup_failed:not_applied` when the Job was never applied). Derived from the cycle record alone; no cluster read answers it. properties: failsAt: description: >- When the platform gives up on this attempt if the pod has still not started: the startup grace (10 min) from when the attempt's Job or pod was first seen to exist, or, while the Job has not been applied, the apply cap (30 min) from the attempt's dispatch. The cycle then closes `startup_failed:`, its Job is suspended, and the run fails `agent-start-failed`. format: date-time type: string reason: description: >- `NotYetApplied` (the platform's own: its Job has not been applied yet, so there is no pod), or else the pod's own waiting reason, verbatim from Kubernetes: `Unschedulable` (the cluster has no room for the pod), `ImagePullBackOff` / `ErrImagePull` (the image does not pull), `CreateContainerConfigError` (a secret or config the pod needs is not there yet), or another kubelet reason. A client maps the ones it knows to plain words and shows any other as is. type: string since: description: >- When the watcher first saw this attempt waiting: its Job not yet applied, or its pod stuck. Kept when one wait turns into another within the attempt. format: date-time type: string required: - reason - since - failsAt type: object RunCycleBoot: additionalProperties: false description: >- One open cycle's runner on its way up, as the platform last read the attempt's pod: the dark zone between dispatch and the agent's first event, which is the slowest stretch of a run and the one a reader is most likely to be watching. Read from the pod on the same read that serves the cycle's feed, so it is as fresh as the feed. It answers "where is startup", and `startupWait` answers "is startup stuck, and until when does the platform wait". Both can be present: an attempt whose pod cannot be scheduled has `boot.code` `runner_unschedulable` and a `startupWait` with its `failsAt`. The runner's own two pre-session conditions (`workspace_provisioning`, `workspace_ready`) are not here: the runner emits them, so they are events with real seqs, and their arrival ends `boot`. properties: attempt: description: Which dispatch of the cycle this describes (RunProgressEvent.attempt). type: integer code: description: >- Which startup state, in the vocabulary of the `notice` codes it replaces. `runner_scheduling` the Job exists and no pod has a node yet; `runner_unschedulable` the cluster has no room for the pod; `runner_pulling_image` the image is being fetched and the container prepared; `runner_image_pull_backoff` that fetch is failing and retrying; `runner_config_error` the container cannot start because a secret or config it mounts is not there; `runner_starting` the container is running and the agent has not spoken yet. A client renders the sentence `@aep/progress-view` owns for the code, and shows a code it does not know as is. enum: - runner_scheduling - runner_unschedulable - runner_pulling_image - runner_image_pull_backoff - runner_config_error - runner_starting type: string x-enum-varnames: - RunnerScheduling - RunnerUnschedulable - RunnerPullingImage - RunnerImagePullBackOff - RunnerConfigError - RunnerStarting detail: description: >- The cluster's own words for the state, capped and scrubbed: the scheduler's reason there is no room, the pull error being retried. Absent when the code says everything. maxLength: 500 type: string since: description: >- When the pod entered this state (its condition's transition time), so a client can say how long startup has been in it. Kept across reads; a new code takes a new time. format: date-time type: string required: - attempt - code - since type: object RunEvent: additionalProperties: false description: >- One event on a run's live feed, envelope version 2. It replaces RunProgressLine, which stays for the compatibility window while v1 cycles are still in flight. The difference that matters is attribution: a RunProgressLine is stamped `main` or `subagent`, which cannot describe a run that fans out to a dozen agents at three depths, whereas every RunEvent names the agent that produced it and (for an agent's own lifecycle events) the agent that spawned it. That is what lets a reader rebuild the tree from the feed alone. It is ONE flat object with a `kind` discriminator and optional per-kind fields, NOT a oneOf. Both generators that consume this document handle a flat object cleanly, every consumer already switches on a kind, and RunProgressLine established the shape. Which fields a kind uses is stated on each field, so a reader of the generated type never has to open the design to learn that `phrase` belongs to `agent_progress` and `report` to `agent_settled`. `additionalProperties: false` holds: a producer that invents a field is rejected rather than having it silently dropped on the floor. properties: agentId: description: >- Which agent produced this event. `lead` is the session's top-level agent; any other value is the runtime's own stable id for a spawned agent, stable for that agent's whole life, which is what lets a consumer fold many concurrent agents into one row each. Every kind carries it — a tool call, a commit and a heartbeat all belong to somebody. type: string background: description: >- `agent_started` only: was this agent spawned detached from its parent's turn? Absence is not `false` — it means the runtime did not say, and a consumer must not read silence as either answer. `true` is the ordinary case for a builder: the platform does NOT constrain the shape of fan-out, the skill does, and it tells a lead to dispatch a whole wave in the background and wait on it. `false` means the parent is blocked inside this agent's call until it returns, which is what lets a reader be shown the lead as *waiting on* a named child rather than idle. (An earlier platform forced every fan-out into the foreground because a backgrounded subagent forwarded none of its messages. That was measured on an older runtime and no longer holds; the forcing is gone.) type: boolean x-go-type-skip-optional-pointer: false branch: description: '`git_push` and `gh_action`: the branch pushed to, or the branch the workflow run is on.' type: string code: description: >- `notice`, and `run_settled`'s one code below: WHICH condition, as a closed set. Closed on purpose, twice over — a consumer can react to one condition without parsing prose, and no free text (a prompt, a credential, a path) can ride a notice into a user-visible build log. It is also where the WORDING comes from: a surface renders a code's own sentence (`@aep/progress-view` owns those), so the same condition cannot read one way in the console and another in the playground, which is exactly what happened while each producer wrote its own prose. Nine conditions the RUN can hit. `api_retry` a retryable model failure the runtime is re-attempting; `compaction` the session's context being compacted; `refusal` the model declining to answer; `rate_limit` the provider throttling (raised at `warn` or `error`, and only when calls are actually held back: a window that reports it is still allowed is not a notice); `permission_denied` a tool call the harness refused; `terminated` the run being killed from outside; `workspace_guard` a write denied outside the workspace; `gap` the feed itself losing events (a hole in the producer's seqs, or a log the platform can no longer read); `artifact_failed` something the run produced that could not be stored. Eight more describe the stretch BEFORE the first model turn — the dark zone, which is the slowest part of a run and used to show as a dead "waiting…". Six are the platform's reading of pod truth: `runner_scheduling` no runner has a node yet; `runner_unschedulable` the cluster has no room for one; `runner_pulling_image` the image is being fetched and the container prepared; `runner_image_pull_backoff` that fetch is failing and retrying; `runner_config_error` the container cannot start because its configuration or secrets are wrong; `runner_starting` the container is up and the agent is booting. Two are the runner's own, once it has a process but no session: `workspace_provisioning` it is cloning the repo, mirroring skills and installing credentials; `workspace_ready` that finished and the agent is about to start. They are notices rather than agent events for the same reason throughout: a pod that has not started is not an agent, and there is no session to report a phrase about. The six pod-truth codes are STATE, and they are RunCycleView.boot now. They stay in this set for the compatibility window, while an older aep-api may still send them as negative-seq notices; a client treats such a notice as the cycle's startup state, never as a row. `run_settled` carries one code of its own: `provider_limit`, the model provider refused the run's calls with HTTP 429 for longer than a wait (a `retry-after` of five minutes or more, or five minutes of 429 retries in total). The run stopped rather than retry until its deadline; `host` and, when the provider gave one, `resetAt` say whose limit and until when. No other code appears on `run_settled`, and `provider_limit` appears nowhere else. enum: - api_retry - compaction - refusal - rate_limit - permission_denied - terminated - workspace_guard - gap - artifact_failed - runner_scheduling - runner_unschedulable - runner_pulling_image - runner_image_pull_backoff - runner_config_error - runner_starting - workspace_provisioning - workspace_ready - provider_limit type: string x-enum-varnames: - APIRetry - Compaction - Refusal - RateLimit - PermissionDenied - Terminated - WorkspaceGuard - Gap - ArtifactFailed - RunnerScheduling - RunnerUnschedulable - RunnerPullingImage - RunnerImagePullBackOff - RunnerConfigError - RunnerStarting - WorkspaceProvisioning - WorkspaceReady - ProviderLimit command: description: >- `tool_use`, `tool_result` and the `git_*` kinds: the command line that ran, as the producer scrubbed it. The producer is the only layer that can scrub it — by the time it reaches a consumer it is already on a user-visible feed — so a producer that cannot redact a command omits this rather than sending it. type: string depth: description: >- `agent_started`, `agent_progress` and `agent_settled`: how far from the lead this agent sits. 1 is spawned by the lead itself. Absent on the lead's own events. Recorded rather than derived because a consumer that joined the stream late never saw the parents, and it is what lets a console indent a tree it did not watch being built. type: integer detail: description: >- `notice` only: the human-readable half, capped and scrubbed. `code` is what a consumer branches on and what the reader's SENTENCE is looked up from; this is the specifics that sentence cannot carry — the scheduler's own explanation of why there is no room, the error the retry is retrying. Absent when the condition has nothing to add beyond its code. A notice carrying detail and NO code is the one case where the prose stands alone: a scrubbed line the run itself printed, which no closed set could name. maxLength: 500 type: string durationMs: description: >- `agent_settled` (the agent's whole life) and `tool_result` (that one call), measured by the producer between the start and the outcome — so a tool's number includes model turnaround, not just execution. format: int64 type: integer elapsedMs: description: >- `heartbeat` only: how long the run has already been waiting on `ref`. Sent as an elapsed time rather than a start timestamp because a consumer that joined the stream late has nothing to subtract from. format: int64 type: integer error: description: >- `turn_ended` and `run_settled`: why it failed, in the producer's own words, capped and scrubbed. Absent on a `success` outcome, and absent on `cancelled` — nothing failed there, so a message would invent one. maxLength: 500 type: string exitCode: description: >- `tool_result` only: the process status of a shell call. A pointer, because a tool that is not a shell reports no code at all — read absence as "no code was reported", never as "exited 0". type: integer x-go-type-skip-optional-pointer: false files: description: '`git_commit` only: how many files the commit touched.' type: integer host: description: >- `run_settled` with `code: provider_limit` only: the host of the model endpoint whose limit stopped the run (`ollama.com`), as the run's connection named it. It is what the reader's sentence names — whose plan is spent — and it is display only: nothing prices or routes on a producer's host. type: string itemId: description: >- `work_item` only: WHICH named unit of work this event is about — the key a consumer folds on, since one item's status changes several times over a run and a reader wants one row repainted rather than five rows printed. A criterion id ("AC-003-a") when `source` is `criterion`, the runtime's own task id when it is `plan`. type: string itemStatus: description: >- `work_item` only: where that item now stands. The enum is the union of both sources and `source` says which half applies. `planned | exploring | authoring | running | healing | pass | fail` is a validation criterion moving through the method in ADR-0009; `pending | in_progress | completed | deleted` is an entry of an agent's own plan, in the vocabulary the runtime's task-list tool uses. They are not interchangeable: `completed` says a plan entry was ticked off, `pass` says a criterion was asserted and held. enum: - planned - exploring - authoring - running - healing - pass - fail - pending - in_progress - completed - deleted type: string x-enum-varnames: - Planned - Exploring - Authoring - Running - Healing - Pass - Fail - Pending - InProgress - Completed - Deleted kind: allOf: - $ref: '#/components/schemas/RunEventKind' description: >- What this event reports; it decides which of the optional fields above are meaningful. Wrapped in a single-member `allOf` rather than written as a bare `$ref` because OpenAPI 3.0 discards a `$ref`'s siblings, and a property with no description at all reaches the generated types as an unexplained field. label: description: >- `agent_started`, `agent_progress` and `agent_settled`: the description the parent gave this agent when it spawned it ("Implement todo-api service (issue #3)"). It is the only human name an agent has — `agentId` is the runtime's opaque handle — so a console with no label has nothing to title the row with. Absent when the parent gave none. maxLength: 200 type: string level: description: >- `notice` only: how loudly to render it. `error` is a notice about something that has already gone wrong, `warn` about something that may, `info` about something that merely happened (a compaction). It says nothing about the run's fate — that is `run_settled`'s `outcome`, and a run can end successfully having emitted several `error` notices. enum: - info - warn - error type: string x-enum-varnames: - Info - Warn - Error linesAdded: description: >- `agent_settled` only: lines added by that agent's work, off the runtime's own report on the agent's result. Present only there — nothing else on this feed can reconstruct it, because a spawned agent's individual edits need not reach the feed at all. type: integer linesRemoved: description: '`agent_settled` only: lines removed by that agent''s work, from the same report as `linesAdded`.' type: integer model: description: >- `run_started`: the model the lead runs on. `agent_started`: repeated ONLY when this agent runs on a different model from the lead's, so absence there means "the same as the run's" rather than "unknown". type: string ok: description: >- `tool_result`, the `git_*` kinds and `gh_action`: did it succeed? A pointer, because absence means the producer did not say — read it as unknown, never as success. type: boolean x-go-type-skip-optional-pointer: false outcome: description: >- `turn_ended` and `run_settled`: how it ended. `cancelled` is deliberately not a `failure`: the work was taken away rather than going wrong, and a run someone stopped on purpose must not be reported as broken. enum: - success - failure - cancelled type: string x-enum-varnames: - Success - Failure - Cancelled outputBytes: description: >- `task_settled` only: how much the backgrounded command wrote. The output itself is never on the feed — it can be a build log of any size — so this is what tells a reader whether there is anything worth going to fetch. format: int64 type: integer ownerAgentId: description: >- `work_item` with `source: plan` only: which agent owns the plan entry. Absent means the lead owns it, which is the common case; a plan item the lead handed to a spawned agent names that agent here. type: string parentAgentId: description: >- `agent_started`, `agent_progress` and `agent_settled`: the agent that spawned this one. Absent on a depth-1 agent, whose parent is the lead by definition, and on the lead's own events — so absence means "the lead", not "unknown". type: string phrase: description: >- `agent_progress` only: what the agent says it is doing right now, in its own words, capped and scrubbed. It is a state, not a log line — a new phrase REPLACES the previous one on that agent's row rather than appending, which is the whole reason the kind exists separately from `notice`. In the same READER form as `summary`: one line, with the commands and paths it quotes shortened the way the agent's rows shorten them. maxLength: 200 type: string providerDetail: description: >- `run_settled` with `code: provider_limit` only: the provider's own words on the last 429 the runtime reported (its retry message, or its status and error class), capped and scrubbed. It is evidence for the operator, who learns each provider's limit shape from it; the platform logs it and neither stores nor shows it, because it is a third party's text. maxLength: 300 type: string ref: description: >- `heartbeat` only: WHAT is being waited on — the `toolUseId` when `waitingOn` is `tool`, the `agentId` when it is `agent`. Absent when `waitingOn` is `model`, because the wait is then the emitting agent's own turn and `agentId` already names it. type: string report: description: >- `agent_settled` only: the agent's closing summary of what it did, capped and scrubbed. Treat it as the only copy — a spawned agent's transcript does not reach this feed and dies with the pod — so an agent that settles without one leaves a reader nothing but counters. maxLength: 500 type: string resetAt: description: >- `run_settled` with `code: provider_limit` only: when the provider said its limit resets — the runtime's retry delay behind a `retry-after` of five minutes or more. Absent when the provider stated no reset, which is the case the five-minute fallback exists for: a reader is told to try again later rather than given a time nobody promised. format: date-time type: string x-go-type-skip-optional-pointer: false role: description: >- `agent_started`: what KIND of agent this is, in the runtime's own vocabulary (`subagent_type` under claude-code, the agent name under opencode). Distinct from `label`: `role` is the reusable definition somebody configured, `label` is this one instance's job. type: string runtime: description: >- `run_started` only: which coding runtime executed this attempt. Recorded on the event rather than looked up from the run, because a feed is read back long after the org's runtime setting may have moved on, and the two runtimes emit different agent ids, model names and tool names — a reader that guesses wrong misreads all three. enum: - claude-code - opencode type: string x-enum-varnames: - ClaudeCode - Opencode seq: description: >- Position of this event within its attempt, monotonic from the attempt's first event. It is the producer's own number, so the same event carries the same `seq` whichever source the platform read it from (the pod's log or the observability plane), and a client that reconnects and replays receives the same `seq` again and dedupes it. A notice the PLATFORM adds for a position in the feed (a `gap`) takes a negative seq, stable for the position it describes. Platform STATE never rides an event: startup is RunCycleView.boot, and whether the log can be read is RunCycleView.recording. It is NOT unique across a cycle — a re-dispatch starts a new attempt at the beginning — so anything that orders or dedupes needs RunProgressEvent.attempt alongside it. format: int64 type: integer sha: description: '`git_commit` and `git_push`: the commit.' type: string source: description: >- `work_item` only: which kind of thing the item is. `criterion` is a validation criterion the platform put in front of the run; `plan` is an entry of an agent's own plan, from the runtime's task-list tool. One kind serves both because both are "a named thing whose status changes over the run", which is what a console folds on — but only `plan` items carry `title` and `ownerAgentId`. enum: - criterion - plan type: string x-enum-varnames: - Criterion - Plan status: allOf: - $ref: '#/components/schemas/AgentStatus' description: >- `agent_settled` and `task_settled` only: how the agent, or the backgrounded task it owned, ended. See AgentStatus — in particular that `stopped` is a cancellation and not a failure. summary: description: >- `tool_use`, `tool_result`, the `git_*` kinds, `gh_action`, `task_started` and `task_settled`: one line describing the call, composed by the producer for a reader — a file path, a search term, a workflow name. Capped, and never the raw arguments, which is what keeps a feed readable when an agent passes a whole file as a parameter. Always in READER form: one line, paths relative to the workspace, and the same form on every kind it appears on. A `task_started` summarises its command exactly as the `tool_use` that launched it did, never as the raw command line. A `task_settled` carries the SAME summary its `task_started` did. Without it the only thing left to name a finished background command is its `taskId`, and a row reading `background bql1cn6sh · failed` cannot be matched by eye to the command that failed. maxLength: 200 type: string taskId: description: >- `task_started` and `task_settled`: the backgrounded command's id, which is what pairs the two. Distinct from `toolUseId` on purpose — the tool call that STARTS a background task settles immediately while the task runs on, so `toolUseId` cannot join a task's start to its end. type: string taskKind: description: >- `run_started` only: what this run was dispatched to do — write code (`implementation`) or verify an already-deployed system (`validation`). The two emit different work items and reach for different skills, so a reader holding nothing but the feed still needs to be able to tell them apart. enum: - implementation - validation type: string x-enum-varnames: - Implementation - Validation title: description: >- `work_item` with `source: plan` only: the plan entry's own text. A criterion carries no title here — its `itemId` resolves against the criteria the platform already holds, and repeating the text would let the two copies drift. maxLength: 200 type: string tokens: description: >- `agent_settled` only: total tokens that agent's work consumed, for the row's badge. The priced, per-model breakdown of a whole turn is `usage` on `turn_ended`; this is a single number about one agent, and the two are not summable into each other. format: int64 type: integer tool: description: >- `tool_use` and `tool_result`: the tool's name as the runtime calls it ("Bash", "Edit", "Agent"). Deliberately NOT normalised across runtimes — their tool sets differ, and a normalised name would hide which tool actually ran. type: string toolCount: description: >- `agent_settled` only: how many tool calls that agent made, from the runtime's report on it. A spawned agent's individual calls need not reach this feed, so this is often the only measure of how much work it did. type: integer toolUseId: description: >- The tool call this event is about, and the join key of the whole feed: a `tool_result` carries the id of the `tool_use` it answers, and `git_commit`, `git_push` and `gh_action` carry the id of the shell call that caused them. `task_started` and `task_settled` carry it too, where the runtime named the call that launched the task. That is what lets a surface draw ONE row for a backgrounded command — the action, marked background, later gaining its outcome — instead of an action row and an unattached settle row repeating the same command line. `taskId` still joins a task's start to its end; this joins both of them to the call that started it, which `taskId` cannot do. Absent on every other kind, and absent on a task whose launching call the runtime did not name. type: string ts: description: >- When the producer emitted the event, from the producer's own clock. Ordering within an attempt is `seq`'s job, not this field's — two events can share a timestamp, and a producer's clock is not the platform's. format: date-time type: string usage: allOf: - $ref: '#/components/schemas/TurnUsage' description: >- `turn_ended` and `run_settled`: the token usage of what just settled, with its per-model split. See TurnUsage for the two facts a reader gets wrong otherwise — `model: ""` is a mixed-model aggregate rather than an unknown one, and the figure is CUMULATIVE across the session's turns, so `turn_ended`'s number must never be summed and `run_settled` carries the last of them. The tokens and the models are the persisted truth; the cost is stamped at capture time. An explicit pointer under this contract's prefer-skip-optional-pointer default, because a value type would put a zero usage on EVERY event and "the producer reported no usage" has to stay distinguishable from "this turn cost nothing". x-go-type-skip-optional-pointer: false v: description: >- Envelope version, always 2. It is what lets a reader tell a v2 event from the v1 RunProgressLine records that share the store during the compatibility window, and it is the field a future incompatible change bumps — rather than that change being smuggled in as a new meaning for an existing field, which is what makes a stored feed unreadable years later. enum: - 2 type: integer x-enum-varnames: - Two waitingOn: description: >- `heartbeat` only: what the run is blocked on while it emits nothing else — a `tool` still executing, the `model` still producing a turn, or a spawned `agent` still running. The kind exists because bare silence is indistinguishable from a stall; this field is what makes the silence explainable. enum: - tool - model - agent type: string x-enum-varnames: - Tool - Model - Agent required: - v - seq - ts - kind - agentId type: object RunEventKind: description: >- What a RunEvent reports. It selects which of the event's optional fields are meaningful, and each of those fields names the kinds it belongs to. `run_started` opens an attempt and states its runtime, model and task kind. `agent_started`, `agent_progress` and `agent_settled` are one agent's life — the lead's or a spawned one's — carrying its label, role, depth and parent, then its live phrase, then its status, report and counters. `tool_use` and `tool_result` pair a call with its outcome through `toolUseId`. `task_started` and `task_settled` are a backgrounded shell command, which outlives the tool call that started it and so needs its own `taskId`. `git_commit`, `git_push` and `gh_action` are the run's effects on the repository and its host. `work_item` is a named unit of work whose status changed — a validation criterion, or an entry of an agent's own plan. `heartbeat` says the run is alive and what it is waiting on, so silence is never ambiguous. `notice` is an out-of-band condition (a retry, a refusal, a denied write) under a closed `code`. `turn_ended` closes one model turn with its outcome and usage, and `run_settled` closes the attempt. enum: - run_started - agent_started - agent_progress - agent_settled - tool_use - tool_result - task_started - task_settled - git_commit - git_push - gh_action - work_item - heartbeat - notice - turn_ended - run_settled type: string x-enum-varnames: - RunStarted - AgentStarted - AgentProgress - AgentSettled - ToolUse - ToolResult - TaskStarted - TaskSettled - GitCommit - GitPush - GhAction - WorkItem - Heartbeat - Notice - TurnEnded - RunSettled RunProgressEvent: additionalProperties: false description: >- One SSE frame on the run progress stream. `type` discriminates the payload: `cycle` carries a RunCycleView (state: the client upserts by id and the newest wins), `event` one RunEvent — the v2 feed, a fact — stamped with the cycle and attempt that produced it, `line` one RunProgressLine attributed to its own cycle, `tick` nothing but the server's clock on a quiet stream, and `done` the terminal run state, after which the server closes the stream. Every frame carries `serverTime`. `event` and `line` are the same feed in two envelope versions and a single stream can carry both: a run whose earlier cycles were dispatched before the v2 cutover replays them as `line` frames and its later ones as `event` frames. A consumer must therefore handle whichever it is given rather than choosing one, for as long as the compatibility window lasts. properties: attempt: description: >- Which dispatch of `cycleId` produced the frame's `event`. Stamped by aep-api on `event` frames. RunEvent.seq is monotonic only WITHIN one attempt — a re-dispatch starts again at the beginning — so anything that orders or dedupes events needs this alongside it. type: integer cycle: $ref: '#/components/schemas/RunCycleView' cycleId: description: >- Which cycle produced the frame's `event`. Stamped by aep-api as it relays, because a runner knows what it is doing but not which cycle of which run it turned out to be. Present on `event` frames only — a `line` frame carries its own cycle attribution inside RunProgressLine. type: string event: $ref: '#/components/schemas/RunEvent' line: $ref: '#/components/schemas/RunProgressLine' serverTime: description: >- When aep-api wrote this frame, by the platform's clock. On every frame. Event `ts` values are stamped in the cluster and a reader's "quiet for 40s" is measured against them, so a client estimates its own clock's offset from this rather than trusting the browser's; and the newest `serverTime` received says the connection is alive while the run itself is quiet. format: date-time type: string state: description: Terminal run state — present only on the `done` frame. type: string type: enum: - cycle - line - event - tick - done type: string x-enum-varnames: - Cycle - Line - Event - Tick - Done required: - type type: object RunProgressLine: additionalProperties: false description: 'One line of a cycle''s agent log: the runner''s progress envelope (phase | tool_use | activity | tool_result | git_commit | git_push | gh_action | log | progress_item | result) plus the attribution the console groups on — which cycle produced it, and whether the main agent or one of its Task subagents did.' properties: branch: type: string command: type: string cycleId: description: Id of the cycle this line belongs to — the accordion section key. type: string cycleIndex: description: 1-based position of that cycle in the run, so the console can label a section without holding the whole cycle list. format: int64 type: integer cycleKind: description: Kind of that cycle (coding | conflict | fix | validation) — the section label. type: string durationMs: description: '`tool_result` only: how long the call took, measured by the runner between the call and its outcome, so it includes model turnaround.' format: int64 type: integer emitter: description: Who produced the line. The runner stamps `subagent` only on lines forwarded from inside a Task tool call; everything else is the main agent. enum: - main - subagent type: string x-enum-varnames: - Main - Subagent emitterId: description: Which subagent, for the cycles that fan out to several at once — the id of the fan-out tool call, stable for that subagent's whole life. Absent on main-agent lines. type: string emitterLabel: description: The description the main agent gave that subagent ("Implement todo-api service (issue #3)"). Absent on main-agent lines, and on a fan-out that carried no description. type: string error: type: string exitCode: description: '`tool_result` only: the process status of a failed shell call, parsed from the SDK''s own `Exit code N` first line. Absent when the tool was not a shell — those report a `` with no code — so read absence as "no code was reported", never as "exited 0".' format: int64 type: integer files: format: int64 type: integer itemId: description: '`progress_item` only: WHICH named unit of work the line is about — the key a consumer folds on, since many lines describe the same item and a reader wants one row repainted rather than many rows printed. Validation binds items to acceptance criteria ("AC-003-a"), which `cycleKind` already implies, so this never repeats it. The status itself rides on `status`, scoped by `kind`: planned | exploring | authoring | running | healing | pass | fail.' type: string kind: type: string level: type: string linesAdded: description: A fanned-out subagent's total lines added, off the SDK's own report on its fan-out call's result. Present only there; nothing in the feed can reconstruct it. format: int64 type: integer linesRemoved: description: A fanned-out subagent's total lines removed, from the same report. format: int64 type: integer ok: description: '`tool_result` only: whether the call succeeded. Absent on every other kind — so read absence as "not a tool result", never as success.' type: boolean phase: type: string schemaVersion: format: int64 type: integer seq: format: int64 type: integer sha: type: string status: type: string summary: type: string tool: type: string toolCount: description: A fanned-out subagent's total tool calls, off the SDK's own report on its fan-out call's result. Present only there. format: int64 type: integer toolUseId: description: The tool call this line is about. A `tool_result` carries the id of the `tool_use` it answers, which is what pairs a call with its outcome once several subagents interleave the feed. type: string ts: type: string required: - cycleId - cycleKind - cycleIndex - kind - emitter type: object RunFailure: additionalProperties: false description: >- The platform's own record of why a run is failing — the facts that used to survive only as one aep-api log line once the run settled. Present on a run that has met a fault: while the run is still non-terminal it is the fault being RETRIED (read `attempts` against `maxAttempts`); on a failed run it is the terminal fault `terminalReason` names. Absent on a run that met none, on a cancelled run (a person stopping an increment is not a fault), and on every run failed before this record existed — a consumer renders the terminal reason alone and says the platform recorded no further details. `code` is a closed set and the console owns each code's sentence, the rule RunEvent.notice established; `detail` is the platform's recorded error text — never model output or a request body — scrubbed and capped by the producer, for a reader who wants the platform's exact words. properties: code: description: >- Which failure class. `dependency-unprovisionable` a dependency the platform cannot author however often it tries (a schema the ResourceType builder refuses, a ClusterResourceType nobody installed, a Resource that never cuts a release) — the design has to change; `dependency-provision-failed` provisioning failed for a reason the platform could not call permanent, and the bounded retry is being or has been spent; `plan-turn-failed` the planning turn errored (an LLM or transport error, retried); `repository-unavailable` the run's repository, issue or credential is gone; `model-provider-limit` the model provider's usage limit stopped the coding agent — the run is `blocked`, not failed, and `host` and `resetAt` say whose limit and until when; `no-write-target` the project's deployment pipeline names no environment to deploy into (none referenced, or one that is missing, empty, cyclic or rooted at a name over 11 characters), met at coding-agent dispatch (`phase` coding) or at a deploy step: the gate, the version read, a promote or a readiness poll (`phase` deploying); the run fails with `terminalReason` no-write-target, no fix work and no agent dispatched, and `detail` names the pipeline fault. enum: - dependency-unprovisionable - dependency-provision-failed - plan-turn-failed - repository-unavailable - model-provider-limit - no-write-target type: string x-go-type: string phase: description: The run phase the fault was met in. type: string component: description: The component that declared the failing dependency, when the fault has one. type: string dependency: description: The dependency the platform could not provision, when the fault has one. type: string permanent: description: Repeating cannot change the answer. The producer's own classification — the one that also decided the retry policy — so "retrying cannot fix this" and the single attempt it took are two readings of one fact. type: boolean attempts: description: Attempts that have hit this fault so far. format: int64 type: integer maxAttempts: description: The activity's retry bound; 0 when unbounded. format: int64 type: integer firstAt: format: date-time type: string lastAt: format: date-time type: string detail: description: The platform's recorded error text, scrubbed and capped at the producer. type: string host: description: '`model-provider-limit` only: the host of the model endpoint whose limit was reached.' type: string resetAt: description: '`model-provider-limit` only: when the provider said its limit resets. Absent when it stated no reset.' format: date-time type: string x-go-type-skip-optional-pointer: false workflowId: description: The run's workflow id — the handle an operator reads history by. Derived at read time, never stored. type: string required: - code - phase - permanent - attempts - maxAttempts - firstAt - lastAt type: object RunValidation: additionalProperties: false description: The run's validation outcome. The verdict is a RUN property, not a per-issue one, and this is where the deployment surface reads it. properties: issue: description: The validation issue this run worked, so a SETTLED run stays navigable to the criteria behind its verdict. 0 before the validation cycle mints it, and on incident runs. format: int64 type: integer reportPath: description: Repository path of the validation runner's committed report. Present when a report can actually be there, and ABSENT for `skipped` and `unreported` — the first never ran a validation cycle and the second is precisely the verdict meaning nothing was committed, so advertising a path for either would send the client to a 404 and make a known-absent report look like a read failure. Read it from the AE Studio pod's `/v1` file read with `ref` set to the validation cycle's mergeSha (RunCycleView.mergeSha) — the report lives at a fixed path that every run overwrites, so reading it at the branch tip returns the NEWEST run's results whichever run you asked about. type: string verdict: description: >- What the run learned about the deployed system. Empty until the validation cycle settles. passed (every criterion was automated and passed), partial (some passed, none failed, and some were never covered — so `passed` would claim a result for criteria nobody checked), failed (a criterion asserted and lost), inconclusive (no test results at all), unreported (no usable report at the cycle's merge commit), skipped (no validation criteria, and incident runs, which get no validation cycle at all). `failed` and `unreported` fail the run ONCE ITS VALIDATION ATTEMPTS ARE SPENT, under terminal reasons validation-failed and validation-unreported respectively; while attempts remain the run repairs and validates again, so this field can hold a fatal verdict on a run that is still live and about to try once more. A client rendering it as the run's answer therefore needs the lifecycle too — that is DeployStage.validation, which reports awaiting-fix for exactly that state. The rest settle succeeded. enum: - passed - partial - failed - inconclusive - unreported - skipped type: string type: object SaveValuesBody: additionalProperties: false properties: environments: additionalProperties: additionalProperties: type: string type: object description: 'Per-environment { configKey: value } maps. Secret keys are routed to the secret manager by the registered schema.' type: object required: - environments type: object SkillDetailBody: additionalProperties: false properties: binaryReferences: description: |- Sorted paths of aux files whose content is NOT valid UTF-8 (e.g. images, other binaries). Their bytes are never inlined into `references` — encoding/json silently replaces invalid UTF-8 with U+FFFD rather than erroring, so inlining would corrupt the file content without any visible failure. The console renders these entries name-only. items: type: string type: array compatibility: type: string contentSha: type: string deletable: type: boolean description: type: string editable: type: boolean enabled: type: boolean kind: type: string license: type: string name: type: string orgId: type: string references: additionalProperties: type: string type: object skillMd: type: string updatedAt: format: date-time type: string required: description: >- True when the runner reads this skill as a run's workflow and cannot start without it: `aep` for a coding run, `validation-task` for a validation run. The mirror only copies enabled skills, so disabling one of these would take the procedure away from every build in the org — `PATCH /skills/{name}` refuses it with 409. The console renders the availability toggle as unavailable rather than letting the call fail. type: boolean required: - editable - deletable - enabled - orgId - name - kind - description - skillMd - references - binaryReferences - contentSha - updatedAt - required type: object SkillSummary: additionalProperties: false properties: contentSha: type: string deletable: type: boolean description: type: string editable: type: boolean enabled: type: boolean kind: type: string name: type: string required: description: >- True when the runner reads this skill as a run's workflow and cannot start without it: `aep` for a coding run, `validation-task` for a validation run. The mirror only copies enabled skills, so disabling one of these would take the procedure away from every build in the org — `PATCH /skills/{name}` refuses it with 409. The console renders the availability toggle as unavailable rather than letting the call fail. type: boolean required: - name - kind - description - contentSha - editable - deletable - enabled - required type: object SkillSummaryList: additionalProperties: false properties: repoUrl: description: HTML URL of the org skills repo backing the catalogue. type: string skills: items: $ref: '#/components/schemas/SkillSummary' type: array nullable: true required: - skills - repoUrl type: object SkillSyncOutput: additionalProperties: false properties: status: type: string updated: format: int64 type: integer required: - status - updated type: object SkillUpdate: additionalProperties: false description: | One platform-shipped skill whose state differs from the org's baseline: state "update" = org copy clean, platform shipped new content (sync will refresh); "overridden" = org modified its copy (sync will never touch it); "conflict" = both moved since the baseline (review required). properties: name: type: string state: enum: - update - overridden - conflict type: string required: - name - state type: object SkillUpdateList: additionalProperties: false properties: count: format: int64 type: integer updates: items: $ref: '#/components/schemas/SkillUpdate' type: array nullable: true required: - updates - count type: object SpecStage: additionalProperties: false description: Spec-stage aggregate on ProjectStatus (#184). Approved/draft is derived, not stored — version set and not dirty = approved (vN); dirty = draft changes (vN+); no version = unpublished draft; exists false = no spec yet. properties: agent: description: >- How the project's agent history stands (#562), derived from the newest finished main-chat `agent_turns` row (the finished-turn ledger; the Issues chats' turns are excluded). `never-started` — no turn has EVER run for this project; `""` — a turn has run and the newest one completed; `failed` — the newest turn ended in failure and none has finished since. `never-started` is distinct from `""` because the two need opposite treatment: one means the journey has not begun and the user needs a way to begin it, the other means it is under way between turns and offering to restart it would supersede a live interview. Whether a turn is running right now is the org's AE Studio pod's to say (its active-turn read), not this field's. type: string availability: description: >- Whether the git-derived facts below could be read. `unavailable` — the org's AE Studio could not answer for the repository (GitHub not connected, AE Studio restarting or misconfigured): exists, version, dirty, design and designOutdated are then zero values that say nothing, and the flat hasSpec / hasDesign / specStatus / phase fields are left unset. The build and deploy stages and `agent` are unaffected, and the poll still answers 200. The console renders the spec leg as "Spec status unavailable". enum: - available - unavailable type: string unavailableReason: description: >- Why the spec facts are unavailable; present only when `availability` is `unavailable`, and named after the edge's error codes. `github_not_connected` — the org has no GitHub connection (a person connects it in Settings → Credentials); `ae_studio_unavailable` — AE Studio is coming up or rolling and the poll recovers on its own; `ae_studio_misconfigured` — aep-api's own AE Studio client is refused (an operator fixes it). enum: - github_not_connected - ae_studio_unavailable - ae_studio_misconfigured type: string design: description: Design files exist for the spec (gates the Spec view's design button). type: boolean designOutdated: description: >- The requirements have changed since the design was last derived from them (#575), so the design may no longer describe what the user asked for. Derived by comparing the requirements as they stand now against the requirements as they stood in the snapshot the newest successful `/design` turn read — no stored fingerprint, so there is nothing to fall out of sync and it answers for projects that predate the field. Coarse ON PURPOSE: it reports that the requirements moved, never which components are affected. The two failures are not symmetric — over-marking costs one re-derivation the agent mostly no-ops through, while under-marking ships a design the user has already changed their mind about to the coding agents. False while a project has no design or no successful design turn: there is nothing to be behind. type: boolean dirty: description: specs/ moved on GitHub past the latest tag. type: boolean exists: description: Any spec file created; false renders the Generate-spec CTA. type: boolean recreate: allOf: - $ref: '#/components/schemas/RecreateProvenance' description: Present only on a project seeded from an `.aespecs` bundle (`seed-project`). x-go-type-skip-optional-pointer: false version: description: The newest spec version's name; "" if never published. type: string required: - exists - version - dirty - design - agent - availability type: object RecreateProvenance: additionalProperties: false description: >- Present when the project's specs were seeded from an `.aespecs` bundle (`seed-project`): the bundle's provenance as the project descriptor records it. A seeded project never runs the `/start` kickoff; while it is present and `design` is false (no design exists yet), the console offers `/recreate`, the first design of a product recreated from its code, in place of the ordinary design run. Absent for every other project. properties: producer: description: The tool that wrote the bundle ("code-to-spec"). type: string producerVersion: description: That tool's version as the manifest states it ("1.0"). type: string product: description: The product's name as the manifest states it. type: string sourceRepository: description: The product's repository the specs were derived from, or "local checkout". type: string sourceCommit: description: The commit of that repository the specs were read at (7 to 40 hex). type: string seededAt: description: When the platform committed the bundle (RFC 3339). format: date-time type: string required: - producer - producerVersion - product - sourceRepository - sourceCommit - seededAt type: object StatusMsg: additionalProperties: false properties: status: type: string required: - status type: object TagList: additionalProperties: false properties: latest: description: Newest spec version tag (e.g. v3); absent when nothing is tagged. type: string specDirty: description: True when specs/ changed after latest was tagged. type: boolean tags: description: Spec version tags, newest first. A version carries the name the user gave it at build time (`v` when they kept the suggestion), and "newest" is the tags' creation order, not any number in the name. items: type: string type: array nullable: true required: - tags type: object SpecState: additionalProperties: false properties: designedFrom: additionalProperties: type: string description: Each designed feature by ID, and the basis its last design read — its file's lines by their words, then the product-wide items that reach it (reqspec.Basis, held to the shared fixture's basis.json). A feature no design run covered is absent. type: object artifactRevisions: additionalProperties: type: integer minimum: 1 description: Each design artifact a run has changed, keyed as specs/design/review.json keys it (repo-relative; a prototype by its prototype.json), and its revision number — how many completed agent turns changed it, so the design run that first writes it makes revision 1. An artifact no run has changed is absent. Display only. type: object documents: description: The source documents the user attached, by name. items: $ref: '#/components/schemas/SourceDocument' type: array required: - designedFrom - artifactRevisions - documents type: object SourceDocument: additionalProperties: false properties: id: type: string title: type: string pages: description: How many pages it has; 0 when unknown. type: integer rows: description: What it says, page by page, and where each point landed in the spec (S5); empty until its coverage is worked out. items: $ref: '#/components/schemas/SourceDocumentRow' type: array required: - id - title - pages - rows type: object SourceDocumentRow: additionalProperties: false properties: page: type: string says: type: string landedIn: description: The spec line ID it landed in ("F2.4"), or null when it landed nowhere. type: string nullable: true x-go-type: '*string' required: - page - says - landedIn type: object SpecVersionList: additionalProperties: false properties: versions: description: Oldest first. items: $ref: '#/components/schemas/SpecVersion' type: array required: - versions type: object SpecVersion: additionalProperties: false description: What one version built. properties: name: description: The version's name, the tag the build cut ("v2"). type: string features: description: Every feature the version carried, picked or pulled in, in ID order. items: $ref: '#/components/schemas/VersionFeature' type: array productWide: description: The product-wide requirements it carried ("P1"). items: type: string type: array heldBack: description: Stories of carried features it did not build, as each waits on a feature neither built nor in the version ("F1.3"). items: type: string type: array fixes: description: A repair build names the version it fixes ("v1.1" fixes "v1"); it builds the same features. Absent for a version of its own. type: string required: - name - features - productWide - heldBack type: object VersionFeature: additionalProperties: false description: A feature as a version built it. properties: id: type: string name: type: string lines: description: The feature's lines at the version's tag, in file order, headings left out. items: $ref: '#/components/schemas/VersionLine' type: array required: - id - name - lines type: object VersionLine: additionalProperties: false description: One line of a feature's file. A line with its own ID ("F2.4") is followed by it, so rewording it is an edit; one without (a decision) is known only by its words. Sources, Needs/Applies-to clauses and the closing assumed/blocking tag are not words. properties: id: type: string words: type: string required: - words type: object TaskDetail: additionalProperties: false properties: blockedBy: description: Names of the dependencies this task is waiting on; present when derivedStatus is on_hold. items: type: string type: array nullable: true attention: items: type: string type: array nullable: true body: type: string comments: description: The issue's newest comments, OLDEST FIRST, capped, with the platform's own machine comments excluded — the same population the list read serves, read here for ONE issue because a detail page names its issue and needs no milestone to bound the fetch. Always attempted on this read; absence covers every empty case (nothing there, nothing left after the machine comments were dropped), and the field is never an empty array. The newest comment's first line is an agent's current status on this issue. items: $ref: '#/components/schemas/IssueComment' minItems: 1 type: array component: type: string dependsOn: items: type: string type: array nullable: true derivedStatus: type: string executionHistory: items: $ref: '#/components/schemas/ExecutionView' type: array nullable: true executions: additionalProperties: $ref: '#/components/schemas/ExecutionView' type: object executorClass: description: >- WHO works this issue, derived from its labels: `coding` for anything a coding agent is dispatched at (planned work, a bug, a merge conflict — all armed with the `aep` label), `provision` for a dispatch gate the platform resolves, `validation` for the version's validation task, `ledger` for a bare human issue that joined the milestone unarmed. Deliberately coarser than `kind`: the three coding kinds are dispatched identically, so they are one class here and are told apart by `kind`. Nothing here is parsed out of the body — issue bodies are prose the platform writes for the agent and never reads back. enum: - coding - provision - validation - ledger type: string kind: description: >- The issue's raw label kind: `development` for planned work minted from the spec, `bug` for a defect, `conflict` for a pull request that will not merge, `validation` for the version's validation task, `provision` for a dispatch gate. Absent when the issue carries no kind label (a ledger issue, or one a human armed without classifying); a consumer that does not recognise a kind should render the row untagged rather than guess. type: string hold: type: boolean issueNumber: format: int64 type: integer issueUrl: type: string lineage: $ref: '#/components/schemas/Lineage' operation: type: string origin: type: string rationale: type: string title: type: string required: - executionHistory - issueNumber - title - issueUrl - executorClass - dependsOn - lineage - derivedStatus - hold - attention - executions type: object TaskStreamEvent: additionalProperties: false description: 'One SSE frame on the task-log stream. `type` discriminates the payload: `task` carries the full TaskView (client upserts by issue), `execution` one ExecutionView (client upserts by id), `line` one TimelineEvent (client appends, deduped by executionId+seq), and `done` the settled derivedStatus (the server then closes the stream).' properties: derivedStatus: description: Settled derived status — present only on the `done` frame. type: string execution: $ref: '#/components/schemas/ExecutionView' line: $ref: '#/components/schemas/TimelineEvent' task: $ref: '#/components/schemas/TaskView' type: enum: - task - execution - line - done type: string x-enum-varnames: - Task - Execution - Line - Done required: - type type: object TaskView: additionalProperties: false properties: attention: items: type: string type: array nullable: true blockedBy: description: Names of the dependencies this task is waiting on; present when derivedStatus is on_hold. items: type: string type: array body: type: string comments: description: The issue's newest comments, OLDEST FIRST, capped per issue, with the platform's own machine comments excluded. Present only on a `tag`-scoped read taken with `comments=true` (the default); a read spanning versions omits it, for the same reason ledger issues are invisible there — the fetch is anchored on one milestone and a cross-version read has no bounded set to ask for. Absence covers every empty case (not asked for, nothing there, nothing left after the machine comments were dropped); the field is never an empty array. items: $ref: '#/components/schemas/IssueComment' minItems: 1 type: array component: type: string dependsOn: items: type: string type: array nullable: true derivedStatus: type: string executions: additionalProperties: $ref: '#/components/schemas/ExecutionView' type: object executorClass: description: >- WHO works this issue, derived from its labels: `coding` for anything a coding agent is dispatched at (planned work, a bug, a merge conflict — all armed with the `aep` label), `provision` for a dispatch gate the platform resolves, `validation` for the version's validation task, `ledger` for a bare human issue that joined the milestone unarmed. Deliberately coarser than `kind`: the three coding kinds are dispatched identically, so they are one class here and are told apart by `kind`. Nothing here is parsed out of the body — issue bodies are prose the platform writes for the agent and never reads back. enum: - coding - provision - validation - ledger type: string kind: description: >- The issue's raw label kind: `development` for planned work minted from the spec, `bug` for a defect, `conflict` for a pull request that will not merge, `validation` for the version's validation task, `provision` for a dispatch gate. Absent when the issue carries no kind label (a ledger issue, or one a human armed without classifying); a consumer that does not recognise a kind should render the row untagged rather than guess. type: string hold: type: boolean issueNumber: format: int64 type: integer issueUrl: type: string lineage: $ref: '#/components/schemas/Lineage' operation: type: string origin: type: string rationale: type: string title: type: string usage: $ref: "#/components/schemas/Usage" description: Aggregate actual usage across the task's executions (#245); absent for tasks that predate usage capture. required: - issueNumber - title - issueUrl - executorClass - dependsOn - lineage - derivedStatus - hold - attention - executions type: object TestUserPassword: additionalProperties: false description: A test account's password, disclosed deliberately by reveal or rotate. It is never returned by any read. properties: password: type: string rotatedAt: description: When the password was last replaced; null when it is the one minted at create. format: date-time type: string nullable: true x-go-type: '*time.Time' username: type: string required: - username - password type: object TimelineEvent: additionalProperties: false description: 'A unified-timeline entry: today''s ProgressEvent (phase | tool_use | activity | tool_result | git_commit | git_push | gh_action | build_step | log | progress_item | result) plus its attribution — which execution attempt it came from. This is the per-row shape the console renders; the FE groups rows by executionId/kind.' properties: branch: type: string command: type: string completedAt: type: string durationMs: description: '`tool_result` only: how long the call took, measured by the runner between the call and its outcome, so it includes model turnaround.' format: int64 type: integer emitter: description: Who produced the line — `subagent` for work the main agent fanned out with the Task tool, absent for the main agent itself. Absence is a positive fact, not an unknown. enum: - main - subagent type: string emitterId: description: Which subagent, for the cycles that fan out to several at once — the id of the fan-out tool call, stable for that subagent's whole life. Absent on main-agent lines. type: string emitterLabel: description: The description the main agent gave that subagent ("Implement todo-api service (issue #3)"). Absent on main-agent lines, and on a fan-out that carried no description. type: string error: type: string exitCode: description: '`tool_result` only: the process status of a failed shell call, parsed from the SDK''s own `Exit code N` first line. Absent when the tool was not a shell — those report a `` with no code — so read absence as "no code was reported", never as "exited 0".' format: int64 type: integer executionId: description: Id of the execution attempt this line belongs to. type: string executionKind: description: Kind of that attempt (coding | build | ops) — client-side grouping/section labels. type: string files: format: int64 type: integer itemId: description: '`progress_item` only: WHICH named unit of work the line is about — the key a consumer folds on, since many lines describe the same item and a reader wants one row repainted rather than many rows printed. Validation binds items to acceptance criteria ("AC-003-a"), which `cycleKind` already implies, so this never repeats it. The status itself rides on `status`, scoped by `kind`: planned | exploring | authoring | running | healing | pass | fail.' type: string kind: type: string level: type: string linesAdded: description: A fanned-out subagent's total lines added, off the SDK's own report on its fan-out call's result. Present only there; nothing in the feed can reconstruct it. format: int64 type: integer linesRemoved: description: A fanned-out subagent's total lines removed, from the same report. format: int64 type: integer message: type: string ok: description: '`tool_result` only: whether the call succeeded. Absent on every other kind — so read absence as "not a tool result", never as success.' type: boolean phase: type: string schemaVersion: format: int64 type: integer seq: format: int64 type: integer sha: type: string startedAt: type: string status: type: string step: type: string summary: type: string tool: type: string toolCount: description: A fanned-out subagent's total tool calls, off the SDK's own report on its fan-out call's result. Present only there. format: int64 type: integer toolUseId: description: The tool call this line is about. A `tool_result` carries the id of the `tool_use` it answers, which is what pairs a call with its outcome once several subagents interleave the feed. type: string ts: type: string required: - schemaVersion - ts - seq - kind - executionId - executionKind type: object TurnUsage: additionalProperties: false description: >- The token usage RunEvent carries: the folded aggregate every reader already consumes, plus the per-model split the platform prices against its rate table. It is Usage with one field added, rather than Usage itself, because `models` is meaningful only on a producer's own report of what it just spent — the project and cycle roll-ups that Usage serves sum already-stamped rows and have nothing to break down. The split is not a nicety. Cost is stamped per model, from that model's own rate row, so an aggregate whose `model` is "" (see below) cannot be priced at all — and a real coding run regularly touches a second model, both because the runtime reaches for small-model helpers of its own and because a lead is expected to pick the model for the job. Without `models` those runs are simply unpriceable, which is the defect this schema exists to close (#291). TWO facts a consumer will otherwise get wrong. First, `model: ""` means a MIXED-MODEL aggregate, never "unknown" — the producer folded several models into one total and refuses to name one of them as the run's; `models` is where the answer is. Second, the runtime reports usage CUMULATIVELY across a session, so `turn_ended.usage` is the run's total AS OF that turn rather than that turn's own spend: summing several of them multiplies the bill. `run_settled` carries the last and largest one, and that is the figure to price. (Measured: a two-turn session reports 20 input tokens on its first result and 48 — 20 + 28 — on its second.) properties: cacheCreationTokens: format: int64 type: integer cacheReadTokens: format: int64 type: integer costUsd: description: >- Write-time-stamped USD, and null from a producer: the platform stamps cost at capture from the rates then in force (ADR-0011 as amended), and a runner that priced its own run would be a second answer to what the run cost. format: double type: number nullable: true x-go-type: '*float64' inputTokens: format: int64 type: integer model: description: Model id the work ran on; "" on a mixed-model aggregate — see this schema's description, and read `models` for the breakdown. type: string models: description: >- One entry per model that actually spent tokens, each with its own `model` id, so the platform can price each slice against that model's rate row. Entries carry canonical model ids — two dated releases of one model are ONE entry, since they share a rate. Absent or empty from a producer that predates the split, and the reader then falls back to pricing the aggregate by its single `model`. Its tokens sum to the aggregate above; it is a breakdown, not extra spend. items: $ref: '#/components/schemas/Usage' type: array nullable: true outputTokens: format: int64 type: integer required: - inputTokens - outputTokens - cacheReadTokens - cacheCreationTokens - model - costUsd type: object UpdateConfigBody: additionalProperties: false properties: envVars: items: $ref: '#/components/schemas/EnvVar' type: array nullable: true required: - envVars type: object UpdateSkillInput: additionalProperties: false properties: references: additionalProperties: type: string type: object skillMd: type: string required: - skillMd type: object Usage: additionalProperties: false description: Actual token usage for one unit of agent work or an aggregate (#245, #291). Tokens + model are the persisted truth; costUsd is stamped at capture time from the model rates then in force (ADR-0011 as amended) and null when the row predates stamping or its model had no rate. Aggregates sum stamps and never reprice. properties: cacheCreationTokens: format: int64 type: integer cacheReadTokens: format: int64 type: integer costUsd: description: Write-time-stamped USD (sum, for aggregates); null when no stamp exists. format: double type: number nullable: true x-go-type: '*float64' host: description: >- The model endpoint's host the work was billed by (e.g. `api.anthropic.com`, `ollama.com`); "" or absent on an aggregate that mixes hosts or a row that predates stamping. Stamped by the platform, never by a producer. With a null `costUsd`, the console reads "not priced, billed by ". type: string inputTokens: format: int64 type: integer model: description: Model id the work ran on; "" on mixed-model aggregates. type: string outputTokens: format: int64 type: integer required: - inputTokens - outputTokens - cacheReadTokens - cacheCreationTokens - model - costUsd type: object AcceptanceCriteriaFile: additionalProperties: false description: One acceptance criteria file as it stood at the snapshot's commit. properties: content: description: The file's Gherkin source, verbatim. type: string path: description: Repository path, e.g. specs/validation/acceptance/checkout.feature. type: string required: - path - content type: object ValidationDetail: additionalProperties: false description: >- One version's validation history, already filtered to what asks the question. `runs` holds only runs that ATTEMPTED validation — ones holding at least one VALIDATION cycle, which is the fact rather than the kind: a task run never holds one, and a run that did ask the criteria is listed whatever its kind says it was for. Each run's `cycles` holds only its VALIDATION cycles. Both filters are applied here rather than by the client: they are the platform's own rules, and the surface that re-derived them read a newer non-validating run as the version's answer and hid a real verdict. The views are the same MilestoneRunView and RunCycleView the run story serves, so one projection describes a cycle everywhere. properties: deployed: description: >- This version is the one currently deployed — the only version a revalidation can honestly judge. A revalidation drives whatever is serving RIGHT NOW: the runner's endpoint URLs are resolved from OpenChoreo at request time and its criteria come from the branch tip, neither pinned to the version the run is filed under. So asking an older version's criteria judges code that version never shipped, records the verdict on its milestone, and — with the default attempt budget — files one repair issue per failed scenario there too. revalidate-build refuses it; this flag is what lets the console stop offering it, rather than letting a reader discover the refusal by clicking. type: boolean live: description: >- A run is in flight on this milestone. With `deployed` it makes the two conditions the console gates the validation trigger on; the remaining refusals (open work, no criteria) belong to revalidate-build, which owns them and says so in its error. It also decides whether an unvalidated version reads as "a verdict is coming" or "nothing will come unless you ask", which must not disagree with whether the trigger is offered. type: boolean milestoneNumber: format: int64 type: integer runs: description: Newest run first, validating kinds only, each carrying its validation cycles in dispatch order. items: $ref: '#/components/schemas/MilestoneRunView' type: array state: $ref: '#/components/schemas/ValidationState' tag: type: string required: - tag - milestoneNumber - state - live - deployed - runs type: object ValidationList: additionalProperties: false description: The validation ledger — one entry per worked spec version, newest first. properties: validations: items: $ref: '#/components/schemas/ValidationSummary' type: array required: - validations type: object ValidationSummary: additionalProperties: false description: >- One row of the validation ledger: a spec version and where its validation stands. Every version that has been worked appears, including ones never validated — an absent row and a never-validated one are indistinguishable to a reader, and "never validated" is the most actionable state this page shows. properties: endedAt: description: >- When the LATEST validation attempt finished. Null while one is in flight, which is the case the column renders as an em-dash rather than a blank: a running attempt has no end and never will until it settles. format: date-time type: string nullable: true x-go-type: '*time.Time' milestoneNumber: description: The GitHub milestone this version's work lives in — the platform key the tag resolves to, and the handle get-validation is read by. format: int64 type: integer startedAt: description: >- When the LATEST validation attempt began — the CYCLE's clock, not the run's. Paired with endedAt it is the attempt's duration, which counts up while the attempt is open and is the only thing on this page that moves; a run's wall clock would fold in the coding, build and deploy time between attempts and say nothing about a hung one. Null when the version has never been validated. format: date-time type: string nullable: true x-go-type: '*time.Time' state: $ref: '#/components/schemas/ValidationState' tag: type: string required: - tag - milestoneNumber - state type: object ValidationVersionScope: additionalProperties: false description: What a version validates (B4) — every feature built in it or an earlier version, minus the stories no version has built yet. Absent for a version cut before builds were selections, which validates its whole oracle; a scenario outside the scope was not run and counts for nothing. properties: features: items: type: string type: array heldBack: items: type: string type: array required: - features - heldBack type: object ValidationBaseline: additionalProperties: false description: The previous validated version — the newest earlier version whose validation reached a verdict — at its final attempt, which "was passing" compares with (B4). properties: version: type: string commit: type: string required: - version - commit type: object ValidationSnapshot: additionalProperties: false description: >- One attempt's report and the criteria it was judged against, read at a single commit. properties: commit: description: >- The commit both halves were read at — the cycle's merge SHA, or empty when the attempt is still running and the criteria came from HEAD. type: string criteria: description: Every specs/validation/acceptance/*.feature file at that commit. The report annotates these; they are the spine the view renders and the report is the overlay. items: $ref: '#/components/schemas/AcceptanceCriteriaFile' type: array report: description: >- The raw tests/acceptance/report.json at that commit, verbatim, for the client's own parser to read. Null while the attempt is still running: it has not committed one yet, and an absent report is not the same fact as an empty one. type: string nullable: true x-go-type: '*string' scope: allOf: - $ref: '#/components/schemas/ValidationVersionScope' x-go-type-skip-optional-pointer: false baseline: allOf: - $ref: '#/components/schemas/ValidationBaseline' x-go-type-skip-optional-pointer: false regressions: description: The failed scenarios that passed in the baseline, by key — the feature's ID, the rule and the scenario, joined with " / " ("F2 / A manager sees pending claims / The queue"). Empty when none, or with no baseline. items: type: string type: array stillFailing: description: The failed scenarios that failed in the baseline too, keyed as regressions. items: type: string type: array required: - commit - criteria type: object ValidationState: description: >- Where a version's validation stands — the one vocabulary every surface renders it with. This MIRRORS the run's verdict rather than folding it, so the chip says what the run concluded: a fold would have to discard `partial`, `inconclusive` and `unreported` at exactly the surface that needs them, and `completed` never said whether anything passed. Four LIFECYCLE values. none is PENDING, never settled: a verdict is expected and has not arrived, because a run is live or a dev run filed the version's validation task and nothing has started it yet. A client must not read it as "there is no verdict to wait for" — that is what skipped and inconclusive say. running is a validation CYCLE in flight, not merely a live run with no verdict yet. awaiting-fix is validation having failed with the run repairing it — the work in flight is a CODING cycle, which is why the state names the implementation rather than validation. cancelled is a person STOPPING the judging: a validation run settled cancelled before recording a verdict, so nothing will answer for this version unless somebody re-asks. The rest are the verdict verbatim. They are mutually exclusive in time, so nothing is hidden behind another. passed (every criterion was automated and passed), partial (some passed, none failed, some were never covered), failed (a criterion asserted and lost), inconclusive (no test results at all), unreported (no usable report at the validation cycle's merge commit), skipped (no validation criteria, and incident runs, which get no validation cycle). failed and unreported fail the run only once its validation attempts are spent: while attempts remain the run repairs and re-validates, and reads awaiting-fix in the meantime. enum: - none - running - awaiting-fix - cancelled - passed - partial - failed - inconclusive - unreported - skipped # Without these the generated Go constants are bare words — None, Failed, # Passed — at package scope in gen, where any later top-level enum sharing # a value would collide and break codegen. Inline enums get their parent's # name for free; a named schema has to ask. x-enum-varnames: - None - Running - AwaitingFix - Cancelled - Passed - Partial - Failed - Inconclusive - Unreported - Skipped type: string WorkflowRun: additionalProperties: false properties: completed: type: boolean componentName: type: string name: type: string projectName: type: string startedAt: type: string status: type: string tasks: items: $ref: '#/components/schemas/WorkflowRunTask' type: array nullable: true type: object WorkflowRunList: additionalProperties: false properties: items: items: $ref: '#/components/schemas/WorkflowRun' type: array nullable: true required: - items type: object WorkflowRunTask: additionalProperties: false properties: completedAt: type: string message: type: string name: type: string phase: type: string startedAt: type: string required: - name type: object DependencyOperationStatus: description: One `x-aep.tools.openapi[].allow` entry's read-time computed resolution against the dependency it targets — status/reason are computed by spec.ComputeAgentToolStatus, never authored, never persisted. x-go-type: contracts.DependencyOperationStatus x-go-type-import: path: github.com/wso2/aep/aep-api/internal/contracts additionalProperties: false properties: operation: type: string status: type: string reason: type: string required: - operation - status type: object securitySchemes: userJWT: bearerFormat: JWT description: Thunder end-user JWT (RS256, JWKS-verified) scheme: bearer type: http