Skip to content

Hotspots

Counts are distinct files connected by an import, call or runtime dependency. A file many others depend on is expensive to change; a file that depends on many others is hard to test in isolation. Both are where refactoring pays off first (see the debt register).

File Dependents Layer Summary
src/harness/paths.ts 43 Mission Lifecycle and Artifact Store Canonical path builders for every .harness location: project.yaml, adapters, workflows, skills, specs, missions, runs, sandboxes, and audit logs.
src/schema/artifacts.ts 38 Artifact Schemas 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.
src/schema/mission.ts 36 Artifact Schemas 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.
src/schema/runtime-control.ts 29 Artifact Schemas Runtime control contracts: tool-guard fields/policy with protected paths, runtime limits, recovery policy, routes, stop codes, steer/cancel requests and Windows job results.
src/harness/run-id.ts 27 Mission Lifecycle and Artifact Store Per-run artifact directory plumbing (UH-82/UH-90): generates and validates run ids, maintains latest.json and runs/index.json, mirrors the latest runtime result and prunes old runs.
src/adapters/_artifact-context.ts 22 Runtime Adapters and In-Runtime Extensions Shared mission-artifact context for runtime adapters: resolves the per-run .harness/missions/<id>/runs/<run-id>/ paths with symlink and path-escape guards and provides the write helpers every adapter uses to persist prompts, sessions and events.
src/harness/artifact-paths.ts 19 Mission Lifecycle and Artifact Store Tiny helper that returns a relative artifact path with forward-slash separators, handling Windows absolute paths and cross-volume targets.
src/harness/mission.ts 19 Mission Lifecycle and Artifact Store Mission creation and shared mission guards: scaffolds mission.yaml with an optional design.md, and validates mission ids, initialized projects, workflow profiles, symlinks, and root containment.
src/schema/adapter-capabilities.ts 18 Artifact Schemas Zod schema for uh.adapter-capabilities.v0 manifests describing an adapter’s cost class, tool capabilities and sandbox support, with a validator.
src/harness/registry.ts 17 Mission Lifecycle and Artifact Store Runtime adapter registry that lists, loads and validates .harness/adapters/*.yaml manifests and dispatches availability checks to runtime-specific checkers, exposing a process-wide singleton.
apps/hermes-plugin/dashboard/src/sdk.ts 16 Hermes Dashboard Plugin Typed accessor for the Hermes plugin SDK globals and the UH backend: exposes SDK, UI, and fmt, and provides pluginFetch with a typed PluginFetchError, EventSource helpers, and shared response types.
src/harness/usage.ts 15 Runtime Execution and Supervision Token-usage capture for runtime events: estimates tokens from text, extracts real usage from OpenAI- and Anthropic-style usage objects, builds runtime.usage events, aggregates complete accounting facts across runs and prices usage against configured model pricing.
src/schema/runs.ts 14 Artifact Schemas Zod schemas for per-run artifact directories: the latest.json run pointer, run status enum and the append-only runs/index.json history.
src/harness/runtime-config-overrides.ts 13 Runtime Execution and Supervision Merges mission-level runtime_config_overrides with CLI-provided overrides (CLI wins) and parses the –runtime-config-overrides JSON flag with operator-friendly errors.
src/harness/dispatch-context.ts 12 Runtime Execution and Supervision Single shared builder for the pre-inlined mission dispatch prompt used by all runtime adapters, including the capped project brief, verified hive facts, workflow profile, and the final-message sentinel instruction.
File Depends on Layer Summary
src/cli.ts 58 CLI Entry, Build and Project Tooling Commander-based uh CLI dispatcher wiring every command (mission, run, verify, promote, team, queue, experiment, tui, etc.) to harness lifecycle modules and runtime adapter wirings.
src/adapters/oh-my-pi.ts 25 Runtime Adapters and In-Runtime Extensions oh-my-pi (omp) runtime adapter, the default executor: plans guarded runs with recovery and snapshots, streams live output, detects quota errors, and collects sessions with route verification.
src/adapters/command-code.ts 24 Runtime Adapters and In-Runtime Extensions Command Code (cmd) runtime adapter: probes the CLI version, plans guarded runs with prompt on stdin, and executes supervised attempts with recovery, settlement and runtime result persistence.
src/adapters/claude-code.ts 23 Runtime Adapters and In-Runtime Extensions Claude Code CLI runtime adapter that plans a guarded print-mode stream-json run (native write rules derived from the tool-guard policy), launches it under runtime supervision and recovery, and parses results and usage into UH artifacts.
src/harness/team-run.ts 20 Run Control and Team Coordination Team mission runtime (UH-72) that plans N adapter-bound workers in dedicated git worktrees, runs them under resource waves, integrates their branches through a leader worktree, verifies the integrated result, and persists canonical team state, salvage records and an integration report.
src/adapters/codex.ts 19 Runtime Adapters and In-Runtime Extensions Codex CLI runtime adapter with a strict runtime-config schema, CLI check, planner, streaming runner, JSONL event parsing, quota-error detection and session collection that maps exit codes and final result blocks to runtime-result status; optionally integrates Honcho memory.
src/adapters/hermes.ts 19 Runtime Adapters and In-Runtime Extensions Hermes Agent CLI runtime adapter: version gating, run planning with dispatch context and Honcho memory, subprocess execution and parsing of the final block into a runtime session.
src/adapters/acp.ts 17 Runtime Adapters and In-Runtime Extensions Agent-Client Protocol runtime adapter: a JSON-RPC 2.0 stdio client that launches any ACP-compliant agent server, answers its filesystem/permission requests, applies an environment policy, and runs a mission end-to-end into UH run artifacts.
src/adapters/pi.ts 17 Runtime Adapters and In-Runtime Extensions pi CLI runtime adapter: plans runs with dispatch context and Honcho memory, executes the pi subprocess, parses its output and detects quota errors.
src/adapters/anthropic.ts 16 Runtime Adapters and In-Runtime Extensions Experimental native Anthropic runtime adapter that plans and sends Messages API requests with the ANTHROPIC_API_KEY from the environment, checks connectivity, parses text and usage, and persists runtime sessions and results.
src/harness/verify.ts 16 Verification, Review and Promotion Mission verification pipeline: runs required checks and acceptance-criterion commands (optionally inside the mission’s sandbox) with timeouts, checks expected outputs, gathers diff, hive, independent-review and decision-receipt signals, optionally consults TypeSafe System One, and writes the verification result.
src/adapters/hermes-proxy.ts 16 Runtime Adapters and In-Runtime Extensions hermes-proxy runtime adapter: an OpenAI-compatible HTTP/SSE client to a local hermes proxy, with config schema, health check, planning, streaming parse and session collection.
src/adapters/openrouter.ts 16 Runtime Adapters and In-Runtime Extensions OpenRouter runtime adapter: an OpenAI-compatible pay-per-token HTTP/SSE client reading OPENROUTER_API_KEY from the environment, with check, plan, run and session collection.
src/harness/independent-review.ts 15 Verification, Review and Promotion Prepares self-contained independent-review missions that snapshot worker outputs with hashes, and collects and validates review reports for provenance and recommendation without ever approving or promoting work.
src/harness/mission-check.ts 13 Mission Lifecycle and Artifact Store Pre-launch mission packet checker that validates YAML, schema self-consistency, context files, runtime overrides, independent-review packets, expected outputs, change-only constraints, and grounding, rendering PASS/FAIL lines.
File Functions and classes Layer Summary
apps/hermes-plugin/dashboard/plugin_api.py 50 Hermes Dashboard Plugin FastAPI router mounted at /api/plugins/uh that bridges the Hermes dashboard to the uh CLI and on-disk .harness/ artifacts: status, missions, runs, SSE event tails, run start/cancel, run comparison, workflows, verification, and mission creation, with safe-id validation, subprocess timeouts, retention pruning, and a uniform JSON error shape.
src/harness/acceptance.ts 42 Verification, Review and Promotion Acceptance campaign runner: loads the acceptance registry, computes input digests for evidence freshness, runs each entry’s mission through the CLI with injected cancel/steer actions, evaluates guard/write invariants and exercised mechanisms, and writes and rebinds evidence reports.
src/harness/notifications.ts 36 Observability, Accounting and Reporting Settlement notification system that resolves user and project sinks (commands, webhooks, and presets such as Windows toasts), matches events to sinks, delivers with de-duplication, and reports what each attempt proved.
src/harness/hive.ts 30 Run Control and Team Coordination Shared hive knowledge store of items, hash-chained facts, and unproven claims, with evidence hashing, chain verification, fact selection, and safe rendering of verified facts into mission prompts.
src/harness/team-run.ts 29 Run Control and Team Coordination Team mission runtime (UH-72) that plans N adapter-bound workers in dedicated git worktrees, runs them under resource waves, integrates their branches through a leader worktree, verifies the integrated result, and persists canonical team state, salvage records and an integration report.
src/harness/live-runs.ts 24 Run Control and Team Coordination Project-root registry of in-flight runtime attempts under .harness/live-runs, combined with a bounded scan for runtime-control files to discover runs, compute liveness verdicts, list process trees, and back uh ps.
src/harness/interventions.ts 23 Run Control and Team Coordination Hash-chained intervention ledger recording every moment a run needed correction (steer, kill, review, settlement, replace), with landing, owner confirmation, predecessor import, summaries, and formatting.
src/harness/sandbox.ts 20 Runtime Execution and Supervision Sandbox lifecycle orchestrator: create, list, status, discard and repair sandboxes with a lock-serialized sandboxes index, exclusive file locks with stale-owner breaking, mission seeding and mission-root routing.
src/harness/land.ts 19 Verification, Review and Promotion Gated cherry-pick of verified worker branches into a target worktree, enforcing passed verification, clean independent reviews bound to the branch tip, forbidden-pattern scans, checks, and a hash-chained land decision index.
src/harness/paths.ts 19 Mission Lifecycle and Artifact Store Canonical path builders for every .harness location: project.yaml, adapters, workflows, skills, specs, missions, runs, sandboxes, and audit logs.
src/harness/tool-guard.ts 19 Runtime Execution and Supervision Runtime tool-call guard that classifies agent tool invocations (shell, write, read, agent-spawn tools) and denies writes outside the worker root, git mutations, deletes, package installs, network or agent clients, protected-root or hive access, guard tampering and containment escapes, parsing shell commands for redirections, cd changes, substitutions and variable assignments.
src/harness/runtime-supervision.ts 18 Runtime Execution and Supervision Runtime supervision over native events: terminal failure and budget-cap detection, route verification, Tool Guard evidence and denial accounting, protected-root shell mutation checks, and stall/deadline/thinking watchdogs.
src/adapters/oh-my-pi.ts 18 Runtime Adapters and In-Runtime Extensions oh-my-pi (omp) runtime adapter, the default executor: plans guarded runs with recovery and snapshots, streams live output, detects quota errors, and collects sessions with route verification.
src/harness/kill.ts 17 Run Control and Team Coordination Implements uh kill: resolves run selectors against live runs, stops controllers and owned process trees, settles orphaned runs, marks team state cancelled, and reports proof that native processes are gone.
src/harness/run-digest.ts 17 Observability, Accounting and Reporting Live run digest: an incremental, bounded projection of native runtime events (tool calls, denials, usage, activity, efficiency) persisted as run-digest.json, with path relativization and credential redaction.