Artifact Schemas
Zod contracts for every persisted .harness artifact (project, adapter manifests and capabilities, missions, runs, runtime control, teams, queues, workflows, hive, interventions, decisions, prices, observatory) that all other layers validate against.
Depends on: none
Used by: Runtime Adapters and In-Runtime Extensions (66), Verification, Review and Promotion (31), Runtime Execution and Supervision (25), Observability, Accounting and Reporting (25), Run Control and Team Coordination (22), Mission Lifecycle and Artifact Store (11), CLI Entry, Build and Project Tooling (4), Mission Control TUI (2)
(Numbers are distinct file-to-file dependencies.)
| File | Summary | Key symbols |
|---|---|---|
src/schema/acceptance.ts |
Zod schemas for the acceptance registry and acceptance evidence: harness invariants, runner-injected cancel/steer actions, expected outcomes, mismatches and recorded evidence per scenario. | validateAcceptanceRegistry, validateAcceptanceEvidence |
src/schema/acp.ts |
Zod wire schemas for Agent-Client Protocol v1 (JSON-RPC 2.0 over stdio): requests, responses, notifications, initialize/session results, content blocks, session updates, MCP server config and the runtime config and environment policy for ACP adapters. | |
src/schema/adapter-capabilities.ts |
Zod schema for uh.adapter-capabilities.v0 manifests describing an adapter’s cost class, tool capabilities and sandbox support, with a validator. | validateAdapterCapabilities |
src/schema/adapter.ts |
Adapter manifest schema with two-step validation: parse the uh.adapter.v0 envelope, then strictly validate config.runtime_config against a per-runtime schema registered by each adapter module at import time. | registerRuntimeConfigSchema, _clearRuntimeConfigRegistry, getRuntimeConfigSchema, validateAdapter |
src/schema/artifacts.ts |
Core Zod contracts for persisted harness artifacts: skills and sandboxes indexes, verification results, promotions, runtime sessions and runtime results including usage, pricing and verdict records, plus their validators. | validateSkillsIndex, validateSkillFrontmatter, validateSandboxesIndex, validateVerificationResult, validatePromotion, validateRuntimeSession, validateRuntimeResult |
src/schema/decisions.ts |
Zod schema for uh.decision-receipt.v0 decision receipts: decision kinds and statuses, authorizers, typed recommendations (runtime selection, acceptance, scope change, review escalation, retry/stop), loop-watchdog signals and state transitions. | validateDecisionReceipt |
src/schema/delivery-observatory.ts |
Zod contract for the delivery observatory snapshot, a redacted read model of work items, agents, decisions, evidence, events and metrics whose values are explicitly known or unknown. | validateDeliveryObservatorySnapshot |
src/schema/experiment.ts |
Zod schema for uh.experiment.v0 experiments comparing configuration arms (session template, runtime overrides, attempts) over tasks with seeded or explicit held-out splits, a baseline and a budget. | validateExperiment |
src/schema/hive.ts |
Strict Zod schemas for the hive shared blackboard: items.yaml work items, hash-chained facts.ndjson entries citing controller evidence, and unproven claims.ndjson statements. | |
src/schema/independent-review.ts |
Zod schemas for the independent review flow: review binding, request, reviewer report with claims and observations, and the canonical assessment that preserves findings and per-claim summaries. | |
src/schema/index.ts |
Barrel module re-exporting the core persisted-contract Zod schemas (project, adapter, capabilities, workflow, delivery observatory, mission, team, artifacts). | |
src/schema/intervention.ts |
Zod schemas for the append-only intervention ledger (steer, kill, replace, review, stop, note) including source, trigger, cause and status-change records. | isStatusChange |
src/schema/mission.ts |
Central Zod schema for mission.yaml packets: issues, acceptance criteria, expected artifacts, team workers, runtime requirements, decision policy, runtime config and TDD defaults, plus validateMission. | resolveWorkerAdapter, validateMission |
src/schema/prices.ts |
Zod schemas for the operator-maintained .harness/prices.yaml USD-per-million token price table; the harness never ships its own prices. | |
src/schema/project.ts |
Zod schema for the project root config: fleet policy routes, land checks, and notification sinks (command, webhook, preset) with filters, plus validateProject. | validateProject |
src/schema/queue.ts |
Zod schemas for mission queue files and queue state, validating entry ids, after-dependencies and detecting dependency cycles up front. | detectAfterCycles, validateQueueFile, validateQueueState |
src/schema/run-digest.ts |
Zod schema for the run digest: a bounded live projection of a supervised attempt (current activity, recent calls, files written, denials, usage, loop signals) read by uh report. |
|
src/schema/runs.ts |
Zod schemas for per-run artifact directories: the latest.json run pointer, run status enum and the append-only runs/index.json history. | |
src/schema/runtime-control.ts |
Runtime control contracts: tool-guard fields/policy with protected paths, runtime limits, recovery policy, routes, stop codes, steer/cancel requests and Windows job results. | resolveToolGuardPolicy, policyFromArtifact |
src/schema/session-template.ts |
Zod schema for session templates (tier, containment, limits, recovery, guard fields) that parameterize mission runs, plus validateSessionTemplate. | validateSessionTemplate |
src/schema/team.ts |
Zod schemas for canonical team state: team, leader and worker status enums and records for multi-worker team runs, plus validateCanonicalTeamState. | validateCanonicalTeamState |
src/schema/workflow.ts |
Zod schema for workflow profiles: phases with agent roles and optional BMAD-inspired metadata, plus validateWorkflow. | validateWorkflow |