Deliverable Specs API: schemas

The request and response bodies of the operations in this API.

ArtifactVersioningMode

Default ArtifactVersioningMode the harvester uses when emitting instances of this spec. null = no spec-level default; the producer-kind fallback in WorkflowArtifactEmitter applies. Workflow YAMLs can override per-job via with.versioning.

Type: one of "append", "new", "replace"

CreateDeliverableSpecDto

PropertyTypeRequiredDescription
categorystringyes
complexitystringno
contentstring or nullnoAuthoritative body for JSON_SCHEMA (JSON text), STRUCTURED_JSON (JSON text), CUSTOM, or RESPONSE_ONLY. Rejected for MARKDOWN_DOCUMENT, whose HOW guidance is selected by templateBinding.
descriptionstring or nullno
fetchSpecobject or nullnoEndpoint-fetch declaration. Required when kind=ENDPOINT_FETCH. Shape: { schemaVersion: 1, entries: EndpointFetchEntry[], maxConcurrency: number|null, timeoutMs: number }.
forkedFromIdstringnoId of the spec this row was forked from (biome/system origin). Set once at fork time. Lets the platform detect upgrade conflicts when the source biome re-seeds, and lets the UI render a "forked from" breadcrumb on org/project copies.
kindone of "MARKDOWN_DOCUMENT", "JSON_SCHEMA", "ENDPOINT_FETCH", "STRUCTURED_JSON", "CUSTOM", "RESPONSE_ONLY"yes
minArtifactCountnumberno
multiPagebooleanno
pagesarray of SpecPageDtono
phasesarray of stringno
rulesobject or nullnoRules bag (shared with the validator). Optional; defaults come from the kind-specific validator.
slugstringyes
tagsarray of stringno
targetSlotTargetSlotDtonoSlot the deliverable lands in after harvest. Defaults to deliverables/. Set kind: Repos + repo: <slug> for code-changing specs that should land in repos/<slug>/. Validated against project bound-repos at apply time.
templateBindingobjectnoExplicit owner-qualified Template revision selection for HOW guidance. No project/org/biome fallback is inferred.
titlestringyes
versionstringyes
versioningModeArtifactVersioningModenoDefault ArtifactVersioningMode the harvester uses when emitting instances of this spec. Omit to inherit the producer-kind default at emit time. Workflow YAMLs can still override per-job via with.versioning.
workTypesarray of stringno

DeliverableCandidateDto

PropertyTypeRequiredDescription
filesarray of DeliverableCandidateFileDtoyes
responsestringnoThe agent final response, for response-only deliverables. JSON text when the spec declares a schema.

DeliverableCandidateFileDto

PropertyTypeRequiredDescription
contentstringyesUTF-8 file content.
contentKindone of "json", "markdown", "text"yes
pathstringyes

DeliverableContentKind

How the harvester decodes the file: json runs JSON.parse + spec content-shape validation, markdown/text reads raw bytes and uploads as a single-page artifact.

Type: one of "json", "markdown", "text"

DeliverableOutputContractDto

PropertyTypeRequiredDescription
filesarray of DeliverableOutputContractFileDtono
modeDeliverableOutputContractModeyes
multiPageDeliverableOutputContractMultiPageDtono
notesstringno
targetSlotDeliverableTargetSlotDescriptorDtonoRequired when mode='workspace-files'; absent for other modes. Structured pointer to the workspace slot the deliverable lands in.
titlestringyes

DeliverableOutputContractFileDto

PropertyTypeRequiredDescription
canonicalPathstringyes
contentKindDeliverableContentKindyesHow the harvester decodes the file: json runs JSON.parse + spec content-shape validation, markdown/text reads raw bytes and uploads as a single-page artifact.
fallbackPathsarray of stringno
purposestringyes
requiredbooleanyes
schemaRefstringno

DeliverableOutputContractMode

Type: one of "workspace-files", "response-only", "endpoint-fetch", "no-output"

DeliverableOutputContractMultiPageDto

PropertyTypeRequiredDescription
manifestPathstringyes
pagePathTemplatestringyes
pagesarray of DeliverableOutputContractMultiPagePageDtoyes

DeliverableOutputContractMultiPagePageDto

PropertyTypeRequiredDescription
slugstringyes
titlestringyes

DeliverableSpecBundleFileDto

PropertyTypeRequiredDescription
bytesBase64stringyesFile contents, base64-encoded UTF-8.
relPathstringyesPath within the spec bundle.

DeliverableSpecBundleResponseDto

PropertyTypeRequiredDescription
filesarray of DeliverableSpecBundleFileDtoyes

DeliverableSpecBundleResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataDeliverableSpecBundleResponseDtoyes

DeliverableSpecFacetsDto

PropertyTypeRequiredDescription
categoriesarray of stringyesEvery distinct category present on active system specs.
complexitiesarray of stringyesEvery distinct complexity present on active system specs. Stable set today (simple, standard, complex, enterprise) but returned dynamically so the UI reflects reality.
phasesarray of stringyesEvery distinct phase key used in any active system spec phases[].
tagsarray of stringyesEvery distinct free-form tag used across active system specs. Returned as a suggestion pool; the create endpoint accepts any new tag not yet present.
workTypesarray of stringyesEvery distinct work-type key used in any active system spec workTypes[]. Mirrors RUN_TYPES in @xemahq/kernel-contracts/workflow in practice.

DeliverableSpecFacetsDtoDataEnvelope

PropertyTypeRequiredDescription
dataDeliverableSpecFacetsDtoyes

DeliverableSpecResponseDto

PropertyTypeRequiredDescription
assetsarray of object or nullno
biomeIdstring or nullnoBiome id when source='biome'.
canvasAnnotationsarray of object or nullnoSticky-note annotations overlaid on the spec canvas. Null when none have ever been saved; [] after the user has explicitly cleared every note. Same shape as WorkflowDefinitionVersionResponseDto.canvasAnnotations.
categorystringyes
complexitystringyes
contentstring or nullno
contentHashstringyesSHA-256 of the immutable validation contract.
contractVersionstringyesCompatibility label; not revision identity or live-selection authority.
createdAtstringyes
deliverableContractDeliverableOutputContractDtoyesRun-time output contract derived from the spec's kind handler — what the agent must produce, where, and which schema files to consult. Validated against DeliverableOutputContractSchema before being returned, so a misconfigured handler fails the GET request fast rather than confusing an agent at runtime. Composer + harvester read the contract by shape; new kinds plug in via a handler without touching either of them.
descriptionstring or nullno
editorStateRevisionnumber or nullno
fetchSpecobject or nullno
forceAppliedOverlayRefsarray of stringyesOverlay refs force-bound to this spec via DeliverableSpecOverlayBinding. Each ref is <overlay.source>/<overlay.slug>@<overlay.id-prefix> so the run-context renderer can resolve and apply the overlay deterministically. Tag-driven overlays (matched at render time on context.tags[]) are NOT included here — only explicit bindings — so the audit field reflects "operator-locked" composition, not the dynamic match list. Empty when no explicit bindings exist.
forkedFromIdstring or nullnoId of the spec this row was forked from (biome/system origin). Null when authored from scratch or when the origin has been deleted.
idstringyes
isSystembooleanyes
kindone of "MARKDOWN_DOCUMENT", "JSON_SCHEMA", "ENDPOINT_FETCH", "STRUCTURED_JSON", "CUSTOM", "RESPONSE_ONLY"yes
managedByResourceManagedBy or nullyesProvisioning ownership marker (iac/seeder/ui/system, or null when unmanaged). Lets a console badge an IaC-owned spec and offer "export as code". Declared specs are immutable (fork-first), so this stays iac for a reconciled spec.
multiPagebooleanyes
orgIdstring or nullno
pageAllocationHintsobject or nullno
pagesarray of object or nullno
phasesarray of stringyes
projectIdstring or nullno
publishedAtstringyes
reviewDimensionsarray of object or nullno
revisionIdstring (uuid)yes
revisionNumbernumberyes
rulesobject or nullno
scopeobject or nullno
sectionGuidanceobject or nullno
slugstringyes
sourceDeliverableSpecSpaceKindyesThe Space tier that owns this spec — five of the kernel's seven SpaceKind values. The backend currently PERSISTS only biome, org and project; the wider addressable set keeps the platform-wide ownership model uniform, but system and user never appear here today.
standardsarray of object or nullno
tagsarray of stringyes
targetSlotstringyesCanonical slot path the deliverable lands in. deliverables/ for default agent outputs; repos/<repo>/ for code-changing specs. Validated against the closed slot allowlist; repos/<repo>/ is further validated against the project bound repos at apply time.
templateBindingobject or nullnoExplicit owner-qualified Template revision selection for HOW guidance.
titlestringyes
topologySchemaobject or nullno
updatedAtstringyes
validatorDelegationValidatorDelegationyesWhether the delegations the current revision's validators run under are held: resolved (declares none, or every executeAs subject's delegation is held) or unresolved (a member must re-save the spec to originate it; until then its validators fail closed with validator-delegation-unresolved).
versionstringyes
versioningModeArtifactVersioningMode or nullnoDefault ArtifactVersioningMode the harvester uses when emitting instances of this spec. null = no spec-level default; the producer-kind fallback in WorkflowArtifactEmitter applies. Workflow YAMLs can override per-job via with.versioning.
workTypesarray of stringyes

DeliverableSpecResponseDtoDataArrayEnvelope

PropertyTypeRequiredDescription
dataarray of DeliverableSpecResponseDtoyes

DeliverableSpecResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataDeliverableSpecResponseDtoyes

DeliverableSpecSpaceKind

The Space tier that owns this spec — five of the kernel's seven SpaceKind values. The backend currently PERSISTS only biome, org and project; the wider addressable set keeps the platform-wide ownership model uniform, but system and user never appear here today.

Type: one of "system", "biome", "org", "project", "user"

DeliverableTargetSlotDescriptorDto

PropertyTypeRequiredDescription
kindDeliverableTargetSlotKindyes
repoSlugstringnoRequired when kind='repos'; absent otherwise.

DeliverableTargetSlotKind

Type: one of "deliverables", "repos"

PreviewContentRequestDto

PropertyTypeRequiredDescription
contentstring or nullnoAuthoritative body for JSON_SCHEMA, STRUCTURED_JSON, CUSTOM, or RESPONSE_ONLY. Rejected for MARKDOWN_DOCUMENT.
fetchSpecobject or nullnoEndpoint-fetch declaration. Required when kind=ENDPOINT_FETCH.
kindone of "MARKDOWN_DOCUMENT", "JSON_SCHEMA", "ENDPOINT_FETCH", "STRUCTURED_JSON", "CUSTOM", "RESPONSE_ONLY"yes
multiPagebooleanno
pagesarray of SpecPageDtono
rulesobject or nullno

PreviewContentResponseDto

PropertyTypeRequiredDescription
issuesarray of ValidationIssueDtoyes
validbooleanyesTrue when the kind handler would accept the body at create time. Read alongside issues[] — a valid: false response always carries at least one issue describing why.

PreviewContentResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataPreviewContentResponseDtoyes

ProblemActionableBy

Who can act on this refusal: user (correct the input, sign in), org-admin (an administrator of the organisation), platform (the operators of this installation), none (nobody — it cannot succeed). ABSENT when not known; never guessed.

Type: one of "user", "org-admin", "platform", "none"

ProblemDetailsDto

RFC 9457 problem document. The declared members are the reserved core; extension members are TOP-LEVEL and OPEN, owned by the refusing plane.

PropertyTypeRequiredDescription
actionableByProblemActionableBynoWho can act on this refusal: user (correct the input, sign in), org-admin (an administrator of the organisation), platform (the operators of this installation), none (nobody — it cannot succeed). ABSENT when not known; never guessed.
codestringyesSCREAMING_SNAKE_CASE. The machine-branchable refusal, and the value a policy rule, a retry predicate and a UI branch all name.
detailstringnoHuman-readable and specific to THIS occurrence.
errorsarray of ProblemFieldIssueDtonoField-level issues, when the refusal is about the request body.
instancestringnoURI reference identifying the occurrence — a request path, a run, a row.
paramsmap of string or number or booleannoSafe i18n interpolation values for the message keyed by code — typed and allowlisted per code by its declaration. Never server-authored copy, never internal diagnostics.
retryProblemRetrynoWhat a retry can achieve: transient (later, unchanged), after-change (only after someone changes something), never (a defect until a fixed version ships). ABSENT when not known.
statusnumberyesThe HTTP status code, repeated in the body so a logged document is self-contained.
titlestringyesShort, human-readable, and STABLE for a given type. Never per-occurrence — that is detail.
traceIdstringnoW3C trace-context trace-id, present when the caller sent a traceparent. Omitted rather than invented when it did not.
typestringyesAbsolute URI identifying the refusal TYPE. Derived one-to-one from code, so a caller may branch on either and can never be told two different things. Never about:blank.

ProblemFieldIssueDto

PropertyTypeRequiredDescription
codestringnoSCREAMING_SNAKE_CASE code of THIS issue, for a frontend i18n key. Present when the issue was minted by a declared problem.
detailstringyesProse for logs and developers. A frontend localises from code + params instead.
paramsmap of string or number or booleannoSafe i18n interpolation values for this issue's code.
pointerstringyesRFC 6901 JSON Pointer into the request body. Root is "/".

ProblemRetry

What a retry can achieve: transient (later, unchanged), after-change (only after someone changes something), never (a defect until a fixed version ships). ABSENT when not known.

Type: one of "transient", "after-change", "never"

ResourceManagedBy

Provisioning ownership marker (iac/seeder/ui/system, or null when unmanaged). Lets a console badge an IaC-owned spec and offer "export as code". Declared specs are immutable (fork-first), so this stays iac for a reconciled spec.

Type: one of "ui", "iac", "seeder", "biome_contributed", "runtime_registered", "system", "deployment"

SpecCanvasAnnotationDto

PropertyTypeRequiredDescription
heightnumberyes
idstringyes
textstringyesFree-form text, capped to 4 KiB on write.
widthnumberyes
xnumberyes
ynumberyes

SpecPageDto

PropertyTypeRequiredDescription
parentSlugstring or nullno
slugstringyes
titlestringyes

TargetSlotDto

PropertyTypeRequiredDescription
kindone of "deliverables", "repos"yes
repostring or nullnoBound-repo slug. Required when kind === Repos; rejected otherwise.

UpdateSpecCanvasAnnotationsDto

PropertyTypeRequiredDescription
annotationsarray of SpecCanvasAnnotationDtoyes
versionstringyesVersion of the spec to update.

ValidateDeliverableRequestDto

PropertyTypeRequiredDescription
candidateDeliverableCandidateDtoyes
deliverableSpecRefstringyesSpec ref — <slug>[@<version>]. Resolved server-side (org override > system fallback).
jobRunIdstringnoJob run that issued the validation call (audit).
phaseone of "live", "checkpoint", "final"yeslive and checkpoint report missing required content as incomplete; final reports it as an error.
strictnessone of "lenient", "standard", "strict"noDowngrades errors to warnings at lenient; defaults to standard.
workflowRunIdstringnoWorkflow run that owns the validation call (audit).

ValidateDeliverableResponseDto

PropertyTypeRequiredDescription
checkedAtstringyes
issuesarray of ValidationIssueDtoyes
kindone of "MARKDOWN_DOCUMENT", "JSON_SCHEMA", "ENDPOINT_FETCH", "STRUCTURED_JSON", "CUSTOM", "RESPONSE_ONLY"yes
specVersionstringyes
statusone of "invalid", "incomplete", "complete", "pending"yes
validatorPinsarray of ValidatorPinDtoyesThe capability descriptor each declared validator that ran was pinned to for this validation. Empty when the spec declares no validator for the phase.

ValidateDeliverableResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataValidateDeliverableResponseDtoyes

ValidationIssueDto

PropertyTypeRequiredDescription
codestringyes
messagestringyes
pathstring or nullyes
severityone of "warning", "error"yes

ValidatorDelegation

Whether the delegations the current revision's validators run under are held: resolved (declares none, or every executeAs subject's delegation is held) or unresolved (a member must re-save the spec to originate it; until then its validators fail closed with validator-delegation-unresolved).

Type: one of "resolved", "unresolved"

ValidatorPinDto

PropertyTypeRequiredDescription
descriptorHashstringyesThe exact descriptor hash the validator was pinned to for this validation.
refstringyesThe validator capability.