Skip to content

Code-local decisions

Decision headers: 612.

This is an inventory of decisions recorded in leading source-file headers. It is not an index of every issue mention: implementation comments, tests and fixture prose after the leading header are deliberately outside the inventory. Each qualifying file appears exactly once, with every issue cited by that header.

File Issues First complete decision sentence
packages/core/src/__tests__/command-constructs.test.ts #534, #544 The judge’s unreadable scope (#544): what bash would expand, and the constructs that hide a program in it — each pinned on the cases the corpus report (#534) turned up.
packages/core/src/__tests__/config.test.ts #59, #421 The config loading contract (#59, #421): a file that is there parses or fails CLOSED — every non-conforming input comes back unreadable, never as a silently-empty config — and no file is the defaults.
packages/core/src/__tests__/git.test.ts #453 #453: git read in a thread’s cwd, against real repositories built in a temporary directory — every baseline rule, the states a working tree can be in, and the settings that keep a read from writing or running anything the repository configures.
packages/core/src/__tests__/judge.test.ts #469 The command judge’s node half (#469): what must never cross to a backend, and what a command runs, read off disk for the judge.
packages/core/src/__tests__/log-process.test.ts #132 The file a user hands us (#132), end to end through the real configurator: what a line looks like, what never reaches it, what every line under a route carries — and the knob.
packages/core/src/__tests__/log-stats.test.ts #144 The day, derived (#144 slice 4): every number a fold over records that already exist, joined by the ids they carry and never by adjacency in a file three processes interleave.
packages/core/src/__tests__/log-tail.test.ts #144 The reader’s question and the tail’s answer (#144 slice 2): what a filter admits, and what a poll over a growing, rotating file hands back.
packages/core/src/__tests__/model-roles.test.ts #904 Roles (#904): what a role resolves to against the models on offer — clamped, fallen back with a notice, or refused with a reason, never a silent substitute — and what a branch records it ran.
packages/core/src/__tests__/no-duplicate-paths.test.ts #59, #256 The anti-duplication anchor for path resolution (#59) — Daniel: “this should live in core and prevent duplicate code again.”
packages/core/src/__tests__/no-duplicate-shapes.test.ts #255 Anchors for the reason this package exists: one place for every shape, reachable by one search.
packages/core/src/__tests__/permission-policy.test.ts #474 #474: the policy as Settings shows and edits it.
packages/core/src/__tests__/permission-rules.test.ts #446, #496 #446, #496: the permission engine reads its policy from one path under the agent dir.
packages/core/src/__tests__/pi-manifest.test.ts #221 pi’s manifest-resource layout, now owned in one place (#221 — it was implemented three times: the terminal launcher, the postinstall linker, and the server’s assertVendorLinks).
packages/core/src/__tests__/project-config.test.ts #753, #754 A project’s threads by tier (#754): local > shared > user > default, each key’s whole value from one tier, the project’s own files read only when it is trusted — and only as the operator approved them (#753): a file changed after its approval, by whatever route, is not what applies.
packages/core/src/__tests__/prompt-library.test.ts #443 #443: a library prompt is a markdown file with a closed frontmatter block.
packages/core/src/__tests__/provider-refusal.test.ts #340 A provider’s refusal, read the way pi’s providers write it (#340): the status pi puts in front, the class word a person glances at, and the provider’s own sentence out of its JSON.
packages/core/src/__tests__/run-context.test.ts #435 #435: the run-context entry is a wire crossing — pi’s log holds whatever was appended — so a reader takes only the declared shape, and only under its own customType.
packages/core/src/__tests__/runtime-entries.test.ts #557 The one module in core that names the runtime’s stored entry shape (#557).
packages/core/src/__tests__/secrets.test.ts #89 #89: secrets stay out of the environment the model’s tools inherit.
packages/core/src/__tests__/session-eval.test.ts #441 #441: the session eval over fixtures.
packages/core/src/__tests__/snapshot-store.test.ts #551 The per-thread snapshot store (#551 slice 1), on real git.
packages/core/src/__tests__/supported-pi-versions.test.ts #217, #953 The pi version range both ends refuse outside (#217, #953): the terminal launcher before it spawns the pi on PATH, and the harness’s guard against the pi it runs in.
packages/core/src/__tests__/text-patch.test.ts #753 The diff the project page asks an approval over (#753), in git’s hunk format: what it shows must be every change, a dropped final newline included, or a change is approved unseen.
packages/core/src/__tests__/thread-inspection.test.ts #86, #100 The row formats are shared by the ?debug drawer and enso-thread.ts (PR #100 review: one definition, after the #86 pair had drifted).
packages/core/src/__tests__/thread-timeline.test.ts #144 One thread, one ordering (#144 slice 3): the two tails and the log, by time, with the arrival order kept inside a tie and an unreadable stamp kept rather than dropped.
packages/core/src/__tests__/thread-tree.test.ts #578 #578: what a tree costs on disk, as du counts it — allocated blocks, a hard link once, a symlink never followed — and never a 0 for what was not counted.
packages/core/src/__tests__/tree-setup.test.ts #754 Preparing a new tree (#754): the project’s gitignored files copied in, its setup commands run in the tree, in order, bounded in time and output, redacted.
packages/core/src/__tests__/web-fetch-allowlist.test.ts #924 Settings’ allowlist editor (#924): what a typed host becomes, and that a change to the user’s file changes webFetch.allowedHosts and nothing else.
packages/core/src/__tests__/web-search-settings.test.ts #932 Settings › Web tools › Searching (#932): a change to the user’s file changes the touched webSearch key and nothing else, and the Tavily key is set, replaced and removed in the secrets file without touching its other lines or ever being repeated in a refusal.
packages/core/src/ask-user.ts #12 The agent’s ask_user tool (#12): what the model writes when it has a question only the user can answer.
packages/core/src/claude-code.ts #925 The Claude Code identity Enso presents on a Claude login (#925): the version in the claude-cli/<version> user-agent that every request made with a Claude Code OAuth credential carries, the conversation’s (pi’s) and the web search’s (Enso’s) alike.
packages/core/src/closed-schema.ts #904 The shapes the #904 wire schemas (providers.ts, model-roles.ts) are built from: an object that holds its listed keys and no other, and a string that is never empty.
packages/core/src/command-constructs.ts #469, #544 The command judge’s unreadable scope (#469, #544): the constructs that hide a program from the guards’ spelling checks, read off a command’s LIVE text — what bash would actually expand.
packages/core/src/command-judge.ts #189, #469, #535 The command judge (#469, phase 6 of #189): a second sensor on bash, behind one seam with several backends.
packages/core/src/config.ts #59, #421 Enso’s config (#59): the USER’s config.json in ENSO_HOME (~/.enso/config.json, #421).
packages/core/src/dialog.ts #12, #27, #112 pi’s blocking extension dialogs, as data (#27, #112).
packages/core/src/follow.ts #112 The server↔browser wire (#112): a thread’s feed, as the follow route serves it.
packages/core/src/git-state.ts #453 What git says about a thread’s cwd (#453): the repository, the branch, what it pushes to, the commit the last push left on the remote, and the work that is not there yet.
packages/core/src/git.ts #435, #452, #453, #461, #901 git, read (#453) — THE one way Enso runs git: the run-context recorder’s revision probe (#435) and the web server’s GET /api/threads/:threadId/git both come through {@link runGitIn}.
packages/core/src/incident-report.ts #189, #467 The agent’s incident report (#467, phase 4 of #189): after a halting incident opens, the harness puts the agent through one bounded report turn with one tool, file_incident_report, answering #189’s nine questions — the uncharitable read included.
packages/core/src/judge.ts #397, #469 The command judge’s node half (#469): what a command runs, read from disk, and every string the judge is sent, redacted.
packages/core/src/log-bundle.ts #132 The bundle (#132 item 5): ONE plaintext file a user attaches to an issue, built from things that already exist — the day’s records, the live threads’ inspections, the versions, and what the browser logged — with a manifest of what was redacted so the reader knows what is missing rather than wondering.
packages/core/src/log-process.ts #132 A process’s sink (#132 item 2): ONE log for the harness — .enso/logs/enso-YYYY-MM-DD.jsonl, every process appending to the same day’s file, every record redacted by field name before it is written, and — for a terminal — a pretty console sink beside it at its own level.
packages/core/src/log-stats.ts #132, #144 The day, derived (#144 slice 4): cost per thread and per model, how long each run took to its first token and to settle, how long each tool took, which guard rule refused what, and who wrote to today’s file — all of it from the records, none of it from a counter.
packages/core/src/log-tail.ts #144 The reader’s question, and the tail’s answer (#144 slice 2).
packages/core/src/log.ts #132 The harness’s log record (#132): one shape for every process, so a bundle a user hands us reads the same whichever layer wrote the line.
packages/core/src/loopback.ts #556 Whether something is listening on port on loopback: the check a launcher makes before it starts a stack on the dev ports, so a stack already there (serving someone’s own home) is refused by name rather than half-reused.
packages/core/src/model-roles.ts #904 Models as the person sets them up (#904): favorite models, providers hidden from the picker, ROLES — a name for a model and an effort, with fallbacks in order — and PRESETS, a named snapshot of every role and the default effort.
packages/core/src/paths.ts #58, #59 The workspace path helpers (#59) — THE one place that walks the filesystem for roots.
packages/core/src/permission-mode.ts #84, #162 The permission mode’s shape on the wire (#84; #162 workstream 4, L3): what a run starts in and what it may switch to.
packages/core/src/permission-modes.ts #496, #499, #744 Enso’s permission modes (#496): what each mode means, and how a session records which one it is in.
packages/core/src/permission-policy.ts #474, #517, #744 The user’s permission policy as Settings shows and edits it (#474): ENSO_HOME/permissions.json, in the engine’s format — a permission map of surface → a decision, or pattern → decision (last match wins) — plus the knobs the same file carries.
packages/core/src/permission-rules.ts #446, #496 The permission policy pi runs under (#446, #496): ENSO_HOME/permissions.json, in @gotgenes/pi-permission-system’s format, never a copy of another tool’s settings.
packages/core/src/pi-manifest.ts #211, #221 What a pi package’s manifest declares, and where pi will look for it (#221) — THE one place that knows pi’s manifest-resource layout.
packages/core/src/process-marker.ts #385 A marker per running process, reconciled at the next start (#385).
packages/core/src/project-config.ts #753, #754, #873 A project’s own config tiers (#754) — its threads settings read by tier, written by the project page — and what protects them (#753): the contents the operator APPROVED.
packages/core/src/project-settings.ts #752, #753, #754 A project’s settings in tiers (#752, slice #754), as Claude Code tiers its own: the user’s ~/.enso/config.json for every project, the project’s shared <project>/.enso/config.json (committed with it), and the project-local <project>/.enso/config.local.json (gitignored: one person’s overrides for one project).
packages/core/src/project.ts #24, #395, #866 Projects (#395): the local directories one Enso server runs threads in.
packages/core/src/projects-settings.ts #934 Settings › Projects & threads’ wire (#934): config.json’s user-only projects (the roots fence) and the user tier of threads (a new thread’s tree), read and written by the page; and pi’s defaultProjectTrust in the agent dir’s settings.json — the trust of a project nobody decided.
packages/core/src/prompt-library.ts #443, #470 The prompt library (#443): markdown files a person writes once and starts sessions with.
packages/core/src/prompt-runs.ts #551, #553 The Diff Viewer’s wire (#553): a thread’s prompt runs, each with the snapshots of its tree (#551) as it began and as the next one began, and what differs between two of them.
packages/core/src/provider-refusal.ts #340, #384 A model provider refused a request (#340): the fact the page and the log were missing.
packages/core/src/providers.ts #904 Providers in Settings (#904): which providers pi knows that you can use or have set up, logging in and out of them from the page, and hiding one from the model picker.
packages/core/src/run-context.ts #126, #435, #436, #445, #496, #551, #555 The run conditions pi does not record (#435, Lineage #126 receipt steps 3 and 5), and the fork point a thread’s manifest assembles from them.
packages/core/src/runtime-entries.ts #555, #557 The runtime’s stored session entries → the transcript of ours (#557, after #555’s rule 4).
packages/core/src/secrets.ts #7, #89, #98 Secrets stay OUT of the environment the model’s tools inherit (#89).
packages/core/src/security-settings.ts #933 Settings › Security’s wire (#933): config.json’s user-only security section, read and written by the page, and whether the command judge’s key is in the secrets file — never its value.
packages/core/src/session-eval.ts #381, #407, #441, #464, #928 A thread’s session eval (#441): a mechanical event timeline and a scorecard, computed from what the session recorded and nothing else.
packages/core/src/session-incident.ts #24, #189, #397, #466, #526 A session’s security incidents (#466, phase 3 of #189): what reaching incident opens, what it suspends, and a human’s resolution of it.
packages/core/src/session-risk.ts #189, #464, #466, #468, #753 A session’s security risk (#464, phase 1 of #189): the refusals it met and what the agent did next, folded into observed signals and a level.
packages/core/src/snapshot-store.ts #146, #551, #555, #566, #570, #573, #739 The per-thread snapshot store (#551 slice 1, after #146’s source reads): a bare git repository beside the thread’s session that records what its tree looked like when each run began.
packages/core/src/supported-pi-versions.ts #217, #953 The pi versions the guard was pinned against, and the check both ends of Enso make against them.
packages/core/src/text-patch.ts #753 A unified diff of two texts, in git’s hunk format (#753): what the project page draws when it asks the operator to approve a config tier, with the reader the Diff view already uses (diff-rows.ts parsePatch), so a change to approve reads as a thread’s changes do.
packages/core/src/thread-context.ts #361 One thread’s context, request by request (#361): what GET /api/threads/:threadId/context answers and the Context view draws — dsh-context’s composition and trend, over pi.
packages/core/src/thread-inspection.ts #86 What a live thread’s session ACTUALLY contains, as the server reports it (#86).
packages/core/src/thread-pages.ts #551, #619, #713 GET /api/threads/:threadId/tree (#619): where the thread works, and the pages a person can open from there.
packages/core/src/thread-runtime.ts #69, #162, #165 The thread runtime: the contract the host implements for one thread, and the shapes that cross it (docs/glossary.md → Thread, Control).
packages/core/src/thread-stats.ts #45, #359 One thread, analysed (#45 phase 2): what GET /api/threads/:threadId/stats answers and the chat’s stats drawer renders — per prompt, per turn, per tool.
packages/core/src/thread-status-words.ts #648, #914 The words the thread’s status bar says, which something reading the page relies on (#648).
packages/core/src/thread-timeline.ts #132, #144 One thread, one ordering (#144 slice 3).
packages/core/src/thread-tree-record.ts #551 A thread’s own tree (#551 slice 2), as its session log records it: where the thread works and what it was minted at.
packages/core/src/thread-tree.ts #551, #564, #566 A thread’s own tree (#551 slice 2): the directory a thread works in, not the user’s checkout.
packages/core/src/tool-input.ts #361 A tool call’s one-line subject — ls -la, src/x.ts, TODO — shared by the transcript’s step row (selected-message-part.tsx) and the Context view’s brief (host/branch-context.ts, #361), so a call reads the same in both.
packages/core/src/tool-result-kinds.ts #18, #920 The descriptor kinds Enso itself emits (#920), each with the shape of its props — the renderers the web registers for them read props through these checks, because a descriptor crosses the wire as Record<string, unknown> and a stored one may be from any version.
packages/core/src/tool-result.ts #16, #17, #18 The tool-result payload contract (#18), as a TypeBox schema.
packages/core/src/transcript.ts #162 The transcript (#162 workstream 4, leak L2’s persistence side): a thread’s branch, root to leaf, as entries of OURS.
packages/core/src/tree-setup.ts #749, #753, #754 Preparing a new thread’s tree (#754): what a git worktree does not hold — the checkout’s gitignored files (copy) and what its install step makes (setup) — so a build, a test or the project’s pre-commit hook can run in it (#749).
packages/core/src/ui-events.ts #737 UI events (#737): the page announces its own state changes as DOM CustomEvents on document, dispatched by the component that renders the state, at the moment it renders it.
packages/core/src/user-config-write.ts #924, #932 One key of the user’s ENSO_HOME/config.json, changed from Settings (#924, #932) instead of by hand.
packages/core/src/web-fetch-allowlist.ts #924 The user’s webFetch.allowedHosts, changed from Settings › Web tools (#924) instead of by hand.
packages/core/src/web-fetch.ts #9, #54, #59, #421 The web_fetch tool’s shapes and policy constants (#54).
packages/core/src/web-search-settings.ts #932 The user’s webSearch, changed from Settings › Web tools › Searching (#932) instead of by hand: webSearch.backend, webSearch.tavily.includeDomains, webSearch.tavily.excludeDomains.
packages/core/src/web-search.ts #63 The web_search tool’s shapes and config section (#63).
packages/harness/core/__tests__/environment-dump.test.ts #89 #89’s depth layer: the bash environment-dump deny.
packages/harness/core/__tests__/guard-session.test.ts #861 The guard session through its port alone (#861): what a second runtime’s glue relies on and the pi suite (extensions/guards/__tests__) cannot see, since it drives the session through pi’s glue.
packages/harness/core/__tests__/html-text.test.ts #927 An HTML page as web_fetch hands it to the model (#927).
packages/harness/core/__tests__/paths.test.ts #53 ⚠ FAIL CLOSED (#53 S3): no roots means nothing is inside — a misconfigured policy with an empty root list must deny, not allow, every write.
packages/harness/core/__tests__/session-config.test.ts #145, #421, #509, #753 #421: the session’s config — the user’s, and over it a trusted project’s .enso/config.json, as the operator approved it (#753).
packages/harness/core/__tests__/shell-fixtures.ts #261, #289 Shell-shaped literals the scanner tests write, in one place (#261, PR #289 review).
packages/harness/core/__tests__/shell-secret-paths.test.ts #204 The bash/powershell secret-path deny (#204).
packages/harness/core/__tests__/shell-segments.test.ts #9, #89, #261 The tokenizer’s own contract (#261) — the parsing floor under the network deny (#9) and the environment-dump deny (#89), pinned directly instead of transitively.
packages/harness/core/__tests__/web-fetch-policy.test.ts #54, #55 web_fetch’s pure policy (#54).
packages/harness/core/__tests__/web-search-model-providers.test.ts #63 The google and openai providers (#63) against synthetic wire fixtures.
packages/harness/core/__tests__/web-search-support.test.ts #63 The web_search support layer (#63): source hygiene, citation appliers, auth, Tavily.
packages/harness/core/__tests__/web-search-wire.test.ts #63 The Anthropic WIRE (#63) against synthetic SSE fixtures — the wire serves both the anthropic and deepseek providers, so these fixtures are the shared spine.
packages/harness/core/deadline.ts #174 Run work under a deadline AND the caller’s abort signal, as one signal (#174; the shape web_fetch and web_search each carried).
packages/harness/core/environment-dump.ts #89, #206 The bash environment-dump deny (#89) — DEPTH, not the fix.
packages/harness/core/guard-denials.ts #861 The guard’s refusals (#861): the policy’s tool names, a refusal’s shape and its ask line, and the denies that read no session state — an incident’s suspension and the shell route’s five.
packages/harness/core/guard-session.ts #4, #9, #10, #11, #20, #21, #69, #496, #861 The tier-0 guard, runtime free (#861): one session per thread, which any runtime’s tool hooks call.
packages/harness/core/html-text.ts #927 An HTML page as the text a reader sees (#927) — what web_fetch hands the model for a text/html response instead of the markup.
packages/harness/core/index.ts #173, #263 The harness’s own core — path resolution, guard state, and the web-search seam’s vocabulary.
packages/harness/core/network-egress.ts #9, #54, #57, #206 The bash network deny (#9) — a BAR, deliberately not a boundary.
packages/harness/core/project-trust.ts #145, #421, #509 The terminal’s project-trust question (#421), in pi’s words, over pi’s OWN store (#509).
packages/harness/core/read-tracker.ts #10, #11, #57 Session-scoped record of files whose content this session has seen (#10), and of the on-disk state they had when it saw them (#11).
packages/harness/core/session-config.ts #421, #753 The config one session runs under (#421): the user’s ENSO_HOME/config.json, and over it the project’s own <cwd>/.enso/config.json — read ONLY once the project is trusted, by pi’s own trust store and rules (injected, project-trust.ts), so one answer covers the project’s .pi/ and .enso/; and ONLY AS THE OPERATOR APPROVED IT (#753, @enso/core/project-config): a file changed since its approval leaves the approved version applying, one never approved applies nothing, and the session is told which.
packages/harness/core/session-security.ts #861 The session’s security, beside the guard (#861): the risk and incident folds over every call and refusal, and the command judge’s record.
packages/harness/core/shell-secret-paths.ts #9, #89, #204 The bash/powershell secret-path deny (#204) — the read gate’s own policy, on the shell route.
packages/harness/core/shell-segments.ts #9, #814 Conservative shell command segmenter — the parsing floor under the bash network deny (#9).
packages/harness/core/tool-identity.ts #4 Canonical tool identity (#4, gap 2).
packages/harness/core/web-fetch-policy.ts #54, #55, #924 web_fetch’s pure policy (#54) — every decision that needs no IO.
packages/harness/core/web-search/anthropic-wire.ts #63 The Anthropic Messages WIRE — one streaming /messages call with the native web_search server tool, parsed into the outcome union.
packages/harness/core/web-search/auth.ts #63 Model-routed auth (#63): resolve one model’s credentials THROUGH PI’s model registry — the same identity the conversation bills, including the OAuth path — with the provider-env fallback pi 0.80.1+ made necessary.
packages/harness/core/web-search/citations.ts #63 Citation markers (#63): turn a provider’s citation records into [n] markers inside the answer text plus the numbered source list those markers point at.
packages/harness/core/web-search/dispatch.ts #174 How every provider sends its request (#174): a JSON POST, and the two ways it fails — the request never left (requestDispatched: false, so the extension may fall through to the next provider) or the API answered but not OK (requestDispatched: true, the body quoted).
packages/harness/core/web-search/providers/anthropic.ts #63 The anthropic provider (#63): current-model routing onto the Anthropic Messages native web_search server tool (ANTHROPIC_WEB_SEARCH_TOOL_TYPE in anthropic-wire.ts).
packages/harness/core/web-search/providers/deepseek.ts #63 The deepseek provider (#63): the DEDICATED search backend, dsh’s shape (dsh-web-search-deepseek, MIT — the spec this follows).
packages/harness/core/web-search/providers/google.ts #63 The google provider (#63): Gemini “Grounding with Google Search” over the streamGenerateContent SSE endpoint.
packages/harness/core/web-search/providers/openai.ts #63 The openai provider (#63): the Responses API web_search tool, serving three model APIs — openai-responses, azure-openai-responses, and openai-codex-responses (including GitHub Copilot credentials, whose resolved endpoint rides the credential object).
packages/harness/core/web-search/providers/tavily.ts #63, #89 The tavily provider (#63): the FALLBACK — a dedicated retrieval API, not a model.
packages/harness/core/web-search/sources.ts #63 Source hygiene for provider results (#63): URL normalization, junk filtering, and order-preserving dedupe.
packages/harness/core/web-search/sse.ts #63, #268 A minimal SSE reader for the provider streams (#63).
packages/harness/core/web-search/vocabulary.ts #56, #63 The web_search vocabulary (#63): provider ids, the outcome union, and the request shapes every provider module accepts.
packages/harness/core/web-search/wire-json.ts #63 Tiny helpers every provider wire shares (#63): narrowing for unknown JSON wire payloads, and base-URL hygiene.
packages/harness/extensions/__tests__/project-trust.test.ts #509 #509: the terminal’s trust question for a project’s .enso/config.json reads and writes pi’s OWN store (ProjectTrustStore) and default (SettingsManager#getDefaultProjectTrust), handed in by the extensions through sessionConfigEnvironment — the wiring they use, with pi’s real classes, a real ENSO_HOME and project.
packages/harness/extensions/__tests__/tool-call-participants.test.ts #4, #20, #62, #496 THE #4 TRIPWIRE — the arbiter trigger, made structural.
packages/harness/extensions/ask-user/__tests__/ask-user.test.ts #12 The ask_user extension (#12) against a scripted UI: which way it asks on which surface, and what the plain-prompt path does with each answer — the path every surface can render, and the one a terminal user answers with the keyboard.
packages/harness/extensions/ask-user/index.ts #12 The agent’s ask_user tool (#12): the model asks the user one to four questions, and the answers come back as the tool’s result.
packages/harness/extensions/guards/__tests__/cc-safety-net-contract.test.ts #4, #9, #238 The cc-safety-net CONTRACT TEST (#9) — the condition #4’s comments set for adopting a vendor as a library: exact pin + a fixed command set asserted verdict-by-verdict, so a vendor bump that shifts the boundary goes red here instead of silently moving it.
packages/harness/extensions/guards/__tests__/judge-backends.test.ts #469, #535 The command judge’s backends (#469, #535) over fake transports: where the text goes, what is asked, and that every failure is an unjudged outcome — never a throw, never a clean judgement.
packages/harness/extensions/guards/index.ts #861 Tier 0 guards — see docs/concepts/pi-immediate-needs.md.
packages/harness/extensions/guards/judge-backends.ts #189, #469, #532, #535 The command judge’s backends (#469, #535), on pi’s classifier runtime: the #189 spike’s tuned questions as typed questions over the state — bool for risk, unresolved and same_as_denied, a four-level score for obscured — asked of TypeSafe’s Jev (jev) or of a llama.cpp model on this machine (local, #532).
packages/harness/extensions/incident-report/index.ts #189, #467 The incident report (#467, phase 4 of #189): when a halting incident opens, the agent is put through one bounded report turn with one tool, file_incident_report.
packages/harness/extensions/logging/__tests__/logging.test.ts #132 The extension’s two branches (#132): pi as a CHILD configures its own sink; pi IN-PROCESS leaves the server’s alone.
packages/harness/extensions/logging/index.ts #132, #144, #167 The extension process’s logging (#132), and the one record only an extension can write: the provider’s own request id (#144).
packages/harness/extensions/permission-modes/__tests__/permission-modes.test.ts #496 #496’s permission-modes extension through its factory: pi reduced to what the extension registers with and writes through, the engine’s service map and the classifier model faked.
packages/harness/extensions/permission-modes/index.ts #443, #464, #496 Enso’s permission modes over the permission engine (#496).
packages/harness/extensions/run-context/__tests__/run-context.test.ts #435, #438 #435’s recorder over its dependency seam (PR #438 review): the branches the review rounds added, each where a real run would take it — git and the config faked, pi reduced to the on it registers with and the appendEntry it writes through.
packages/harness/extensions/run-context/index.ts #126, #435, #436, #445, #496 The run-context recorder (#435, Lineage #126): at every prompt’s run start, what the run starts under — git revision and dirty state, the resolved config’s hash and files, the skills, the context files’ hashes, the permission mode’s rule-set hash — appended to pi’s log as an enso-run-context entry (@enso/core run-context.ts) ONLY when a field differs from the last one on the branch.
packages/harness/extensions/system-prompt/__tests__/system-prompt.test.ts #443 #443’s extension over pi’s surface reduced to what it touches — the on it registers with, the branch it reads, the notice it may give.
packages/harness/extensions/system-prompt/index.ts #436, #443 A thread’s library system prompt, applied on EVERY surface (#443): at each prompt’s run start, the branch’s last enso-system-prompt entry is put into the run’s prompt options — a system prompt as pi’s custom preamble, an append prompt after whatever pi appends — so a thread started with a prompt in the web and resumed in the terminal (bun run enso, then /resume) runs the text it started with, not pi’s default.
packages/harness/extensions/web-fetch/__tests__/one-trust-question.test.ts #421 #421, found live: the trust question for a project’s .enso/config.json must be asked ONCE per session, though two tools (web_fetch, web_search) read the config.
packages/harness/extensions/web-fetch/__tests__/web-fetch.test.ts #54 The web_fetch extension (#54), against injected IO seams — no test here touches the network, DNS, or the user’s config file.
packages/harness/extensions/web-fetch/index.ts #9, #54, #59, #421, #927 The web_fetch tool (#54) — the sanctioned web access that replaces the ad-hoc network clients #9 denies in bash.
packages/harness/extensions/web-search/__tests__/claude-code-version.test.ts #145, #925 #925: the Claude Code version a Claude login (OAuth) claims, on the web search (Enso’s request) and on the conversation (pi’s request, through the extension’s before_provider_headers).
packages/harness/extensions/web-search/__tests__/web-search.test.ts #63 The web_search extension (#63) against injected seams — the SELECTION and FALLBACK policy, and the ACCURATE rendering contract.
packages/harness/extensions/web-search/index.ts #54, #63, #89, #132, #421 The web_search tool (#63) — provider-native search with a Tavily fallback, consumed from pi-web-search 1.4.0 (© ttttmr, MIT) and retyped behind enso’s seams.
packages/harness/extensions/write-receipt/__tests__/write-receipt.test.ts #920 The write receipt (#920) over a stand-in pi and a real folder: the file is looked for when the call starts — in a parallel batch, before any call of the batch runs — and the answer rides the result, never a failed write’s.
packages/harness/extensions/write-receipt/index.ts #18, #920 The write receipt (#920): whether a write made a new file or overwrote one, which the tool card says beside the path.
packages/test-support/src/flow-trace.ts #132, #482 A flow’s sequence as one test observed it (#482): the diagram on a docs/flows/ page is this recorder’s output, held by toMatchSnapshot, never drawn by hand.
packages/test-support/src/log-recorder.ts #132, #178, #951 The tests’ sink (#132), one for every package (#178): every enso record, at every level, into memory — a guard’s verdict, an audit line or a route’s problem is asserted as the record it is, the way a bundle reader would read it, not as a line on stderr.
packages/test-support/src/observation-kinds.ts #53, #951 The oracle both “every observation” sweeps compare against (#53 S1.4): every kind literal the EnsoObservation union declares, sorted.
packages/web/e2e/chat.e2e.ts #27, #71, #486, #501 The browser suite (#71, #486): drive the real chat surface in Chromium.
packages/web/e2e/e2e-home.ts #486, #735 The browser suite’s own ENSO_HOME (#486): a throwaway home the dev stack is started over, with threads already stored in it, so the suite has long transcripts to scroll and switch between with no model, and never reads or writes the operator’s real home.
packages/web/e2e/playwright.config.ts #71, #486, #501 Playwright config for the browser suite (#71, #486).
packages/web/e2e/thread-status.ts #472, #693, #737 The browser suite listens for the page’s own announcements (#737): every thread’s status bar dispatches enso:thread-status (core’s ENSO_UI_EVENTS, EnsoThreadStatusEvent) on mount and at each change, after the commit, so a wait that returns on the event finds the page already saying what the event says.
packages/web/src/EnsoToolResult.tsx #18 The web renderer for a enso tool result — the React half of #18’s contract.
packages/web/src/__tests__/browser-logging.test.ts #132 The page’s logging (#132 slice 3): the ring the drawer reads, the shipper to the server, and the ?log= knob — driven through a real configure, asserted at the sinks.
packages/web/src/__tests__/chat-screen.test.tsx #27, #49 #49, first pass: the dialog components had live receipts (#27, the e2e smoke) and no unit render, so chat-screen.tsx sat at ~14% lines.
packages/web/src/__tests__/command-palette.test.tsx #338 ⚠ A DOM before react-dom/client evaluates, and again if another mounting file has already released the one this module registered; dom-environment.ts has the measurement.
packages/web/src/__tests__/commands-connection.test.ts #338 The palette’s read (#338): the route’s answer validated, a non-2xx said with its status and body, a payload the schema refuses said as such.
packages/web/src/__tests__/context-activity.test.tsx #361 #361 phase 4: where Context Events and File Activity send the reader — an event to the first request it reached, an operation to its tool result in the request after its turn, and either to the next request when the branch has none that far yet.
packages/web/src/__tests__/context-browser.test.tsx #361 #361 phase 3: the Context Browser, mounted — it reads the request it is asked for, and a focus (a brief’s line) opens that element’s category and picks its row, whose content the element view beside the list shows.
packages/web/src/__tests__/context-dialog.test.tsx #361 #361 phase 5: /context’s dialog, mounted — it reads nothing while closed, and once open shows the composition and the browser, not the tab’s other cards (those stay on the Context tab).
packages/web/src/__tests__/context-trend.test.tsx #361, #362 #361: the trend’s pick is the page’s — the Context Browser opens it and File Activity counts up to it — including when a change of granularity moves it to another request (#362 review).
packages/web/src/__tests__/custom-event-router.test.ts #53, #90, #162 #53 S1.3: the CUSTOM-chunk router was an inline closure no test reached — renaming a chunk, dropping the notify-type allowlist, or swapping the two apply* calls all left the suite green.
packages/web/src/__tests__/diff-highlight.test.ts #461 #461: a changed file’s syntax, in the theme’s own tokens.
packages/web/src/__tests__/diff-rows.test.ts #452 #452: git’s unified diff, read the way git writes it, and laid out side by side the way a reader pairs an edit — each removed run beside the added run after it.
packages/web/src/__tests__/disk-usage.test.ts #578 #578: decimal units, one place below 10 of a unit, whole from 10 up — and a value that rounds up to the next unit is said in it, never as 1000 kB or 10.0 MB.
packages/web/src/__tests__/dom-environment.ts #118 A browser DOM for the tests that MOUNT React (#118) — the mounted-pane tests, which need effects, useSyncExternalStore subscriptions and TanStack’s useChat to actually run.
packages/web/src/__tests__/file-tree.test.ts #452 #452: the changed files as a tree — directories first, names sorted, totals per directory, and a chain of single-directory levels folded into one row.
packages/web/src/__tests__/fixture-conversation.test.ts #27, #218 The compatibility probe that used to live in a PR body (#218).
packages/web/src/__tests__/follow-budget.test.ts #272 The page’s follow budget (#272).
packages/web/src/__tests__/follow-connection.test.ts #112 The adapter is the ONLY place AG-UI is made (#112).
packages/web/src/__tests__/fonts.test.ts #407 #407 item 6: a font per role, kept in this browser, over the theme’s; and the families’ faces declared from their own stylesheets, unbundled.
packages/web/src/__tests__/fork-thread.test.ts #433 #433: the fork route takes a pi entry id, and a prompt this page sent carries the id the composer minted, not its entry’s.
packages/web/src/__tests__/incident-card.test.tsx #466 The incident card (#466), mounted over a real follow connection whose fetch is scripted: what it shows is the opening’s record in three separate sections, and what it posts is the resolve route’s body — refused client-side by the same check the route runs, and the server’s reason shown when the route refuses.
packages/web/src/__tests__/live-request.test.ts #913 #913: a write or an edit the run has in hand and has not applied — read off arguments cut anywhere while they stream, and off the transcript once the call is whole.
packages/web/src/__tests__/mode-lines.test.ts #29, #90 #29’s remaining half: a mode change becomes a visible transcript line.
packages/web/src/__tests__/model-picker.test.ts #338, #880 The model picker’s rules (#880), over plain options: the Recent group, the provider groups and their order, the order within a provider, and the search (#338 slice 3).
packages/web/src/__tests__/notifications.test.tsx #29, #90 #29’s browser half: notify messages become visible transcript lines.
packages/web/src/__tests__/page-scoped-stores.test.ts #103, #125 The anchor for #125 item 3 / #103 invariant 2 (switching threads leaks no state): every store that holds a THREAD’s state is created inside createThreadStores (thread-stores.ts), so a second thread on the page gets its own.
packages/web/src/__tests__/permission-mode.test.tsx #84, #90 #84’s browser half: the CURRENT permission mode as state, and the control that changes it.
packages/web/src/__tests__/projects-settings-section.test.tsx #934 Settings › Projects & threads (#934) over a scripted server: what a Save sends is what lands in the user’s config.json, so a key written to the wrong place, a cleared list left behind, a root the server would not start with posted, or a project’s own mode lost would each show up here as the body the server received; and the trust default goes to its own route, never the file.
packages/web/src/__tests__/prompt-editor-state.test.ts #443 #443: the prompt manager’s editor as data — what is unsaved, what may be saved, what a copy of pi’s default holds, and a rename’s order: the new file first, then the old one removed.
packages/web/src/__tests__/prompt-input.test.ts #141 ⚠ Upstream reported a refusal only when the WHOLE batch failed; a mixed drop lost files silently (PR #141 review).
packages/web/src/__tests__/prompt-library-connection.test.ts #443, #877 #443: the launch panel’s library reads never throw (#877) — a failure is words the dialog shows beside the field, and pi’s default still starts.
packages/web/src/__tests__/questionnaire-card.test.tsx #12 The ask_user card (#12), mounted: what it sends is what the server holds to the question and the tool reads back as the user’s words — one answer per question, in order — and it sends nothing until every question has one.
packages/web/src/__tests__/radix-preload.ts #338 bun test preload (bunfig.toml): evaluate the modules that DECIDE BY document AT MODULE EVALUATION while a document exists, then take the document away again (#338).
packages/web/src/__tests__/run-states-connection.test.ts #911, #995 The page’s run-states watch on its own (#911, PR #995 review), over its fetch seam: what it does with a refusal, a frame off its schema, and a stream that ends.
packages/web/src/__tests__/scripted-server.ts #112, #118 A scripted server behind fetch (#112, #118): one follow body the test writes SSE frames into, and unary routes the test scripts the answers of.
packages/web/src/__tests__/security-section.test.tsx #933 Settings › Security (#933) over a scripted server: what a Save sends is what lands in the file, so a field written to the wrong key, a hidden local field left behind, a loosening saved without being said, or a bad value posted would each show up here as the body the server received.
packages/web/src/__tests__/security-settings.test.ts #933 Settings › Security (#933) says plainly, before Save, every way a save protects less.
packages/web/src/__tests__/static-markup.ts #236, #877, #878 What a setting chip (#877, #878) in a renderToStaticMarkup string says, read through a DOM (#236).
packages/web/src/__tests__/stored-threads.test.ts #103 #103 receipt, step 8: the dev proxy answered a dead API with Bun’s whole HTML error page, and quoting it filled the rail.
packages/web/src/__tests__/thread-changes-expand.test.tsx #461 #461: the Diff view mounted — a N unchanged lines count opens those lines, numbered on both sides, from the file read whole; a file too large to send stays unexpandable and says so; and a file that changed after its patch is never shown under the patch’s numbers, nor a deleted file’s lines as unchanged ones.
packages/web/src/__tests__/thread-changes.test.tsx #452 #452: the Diff view as a static render — every state said as what it is, the tree, and the first file’s diff side by side.
packages/web/src/__tests__/thread-context.test.tsx #361 #361: the Context view — its derivations as pure functions, and a static render of what it says it estimated, what the provider counted, and what it does not know.
packages/web/src/__tests__/thread-debug-drawer.test.tsx #435, #440 The drawer, mounted, reading its fork point (#435).
packages/web/src/__tests__/thread-debug.test.tsx #86 #86: the drawer’s one job is to NAME a disagreement between what the browser believes and what pi’s session holds.
packages/web/src/__tests__/thread-eval.test.tsx #441 #441’s Stats-tab panel: a static render of what the eval says it counted, what it could not, and the timeline’s two counters — never a verdict.
packages/web/src/__tests__/thread-git.test.tsx #453 #453: the status bar’s git readout — the pure view in every state git can be in, the read of its route in every way it can go, and the count whose change asks again.
packages/web/src/__tests__/thread-panes.test.tsx #938 Threads side by side (#938): what the panes’ moves make of the layout, the split menu offers, and the tabs say.
packages/web/src/__tests__/thread-prompt-run-diffs.test.tsx #553 #553: the Diff Viewer never draws a diff it has no two snapshots for — an idle prompt run, a missing snapshot and a result not yet captured are each said as what they are — and says which two snapshots a diff compares, a fork’s inherited one by name.
packages/web/src/__tests__/thread-stats.test.tsx #45 #45 phase 2: the stats drawer, livecraft’s session analysis over our wire — its derivations as pure functions, and a static render of what it says it measured and what it could not.
packages/web/src/__tests__/thread-status.test.tsx #45, #90, #914 #90 PR 1: the always-on status bar.
packages/web/src/__tests__/thread-url.test.ts #142 The URL is the source of truth for the active thread (#142): what it names, and what it cannot.
packages/web/src/__tests__/threads-rail.test.tsx #90 #90 PR 3: the sessions rail and the page’s thread list behind it.
packages/web/src/__tests__/transcript-reveal.test.ts #359 #359: a stats target → the transcript row it names.
packages/web/src/__tests__/transcript-selection.test.ts #739 The transcript’s selection, kept between chunks (#739).
packages/web/src/add-project.tsx #395, #866, #872, #873 The Add project page (#395 slice 3, #866, a page since #872): choose a folder — browse from the home folder, or from the roots when the user’s config declares any (ENSO_HOME/config.json), or type its path — then confirm what pi can reach there and the name Enso shows it by.
packages/web/src/browser-logging.ts #86, #132 The browser’s logging (#132 slice 3).
packages/web/src/changed-file.ts #461 One changed file whole, for the Diff view (#461): GET …/changes/file read, then what the view makes of it — the lines it expands the unchanged runs between hunks from, and each side’s syntax.
packages/web/src/chat-layout.tsx #90, #361, #877 A thread’s layout (#90, #361): the views’ box with the transcript laid out under every view, the composer under the box, the ?debug column beside it, and the status bar under both.
packages/web/src/chat-screen.tsx #90, #142, #869, #938 The page (#90, #142): the header, the threads rail and one mounted pane per live thread, and the navigation that keeps the URL, history and the panes on screen in step — up to three of them side by side, from any projects (#938) — and the pages beside the threads (#869), drawn over the panes.
packages/web/src/command-palette.tsx #31, #86, #338, #361, #484, #877 The / command palette (#338, slice 1): Claude Code’s / button in VS Code, as a popup over the composer — a filter box, rows grouped by where the command came from, a description on each row.
packages/web/src/commands-connection.ts #144, #338, #484 The / palette’s one read (#338, slice 1): GET /api/threads/:id/commands — the slash commands the thread’s session registers, grouped by the server into extension commands, prompt templates and skills, with a source that says whose list it is (live: this thread’s session; catalogue: the host’s own rows over pi’s models and credentials, for a thread with no live session — never ran, or ran and idled out; the server cannot tell — read with nothing built, #484).
packages/web/src/composer.tsx #75, #90, #116, #338, #877, #878 A thread’s composer (#90): the prompt form, its chips (model, effort, mode, the locked system prompt — #878), the / palette (#338), stop (#116), and pi’s queue above it (#75) — and, before its session starts, the launch panel’s form (#877): the settings chips, the prompt, and Start session.
packages/web/src/context-activity.tsx #361 The Context view’s side cards (#361 phase 4), in the design direction’s row language — dsh-context’s Context Events (when and why the window changed) and File Activity (what pi’s file tools did, up to the trend’s picked request).
packages/web/src/context-browser.tsx #361 The Context Browser (#361 phase 3) — dsh-context’s “open the box of any request”, in the design direction’s two columns: pick the next request or any past one (the picker, or a step either way), and see what it was assembled from — six categories, each expanding into one row per element with its estimate — beside the element picked: a prompt section, a tool’s schema, a message, a reply’s parts, a tool result beside its call’s arguments.
packages/web/src/context-labels.tsx #443 The thread’s system prompt, for the Context view’s labels (#443): a custom prompt is visible in the evidence — the system-prompt row says which prompt it is, and the section the prompt wrote says so — not only in the dialog that chose it.
packages/web/src/context-parts.tsx #361 The Context view’s shared pieces (#361): its number formats, and the six-category bar and legend — drawn by the Now card and the Context Browser alike.
packages/web/src/custom-event-router.ts #103 The one chunk that is neither an observation nor a frame: the follow ended without this page leaving it (#103 receipt) — the server closed, restarted, or dropped the connection.
packages/web/src/debug/__tests__/log-tail-connection.test.ts #144 The log tail client (#144 slice 2), driven over a scripted body: SSE text the test writes, read as the page reads it.
packages/web/src/debug/__tests__/log-tail-screen.test.tsx #118 ⚠ Loaded by a DYNAMIC import, and that is the one place this repo needs one: react-dom/client probes the DOM when its module evaluates ("oninput" in document), and bun evaluates node_modules imports before a local side-effect import can register happy-dom — statically imported it sits in an IE-era polyfill mode where onChange never fires.
packages/web/src/debug/day-stats-screen.tsx #31, #144 The day’s stats and the processes view (#144 slice 4): what today cost, per thread and per model; how long each run waited for its first token and for the prompt to settle; how long each tool took; which guard rule refused what; who has written to today’s file; and which threads the server holds live right now — on the debug page at debug.html?stats.
packages/web/src/debug/debug-screen.tsx #144 The debug page, by its URL (#144 slices 3–4): debug.html is the day’s tail, debug.html?thread=<id> is that thread’s timeline, and debug.html?stats is the day’s stats and processes view.
packages/web/src/debug/log-row.tsx #144 One log record, one rendering (#144 slice 3) — shared by the day’s tail and a thread’s timeline, so a record reads IDENTICALLY on both pages and a reader who follows a thread id from the tail into the timeline finds the same row, not a second dialect of it.
packages/web/src/debug/log-tail-connection.ts #144 The browser’s connection to GET /api/logs/tail (#144 slice 2): the day’s file, filtered by the server, arriving as SSE frames.
packages/web/src/debug/log-tail-screen.tsx #144 The debug log page (#144 slice 2): the day’s records, as the file has them, in a browser.
packages/web/src/debug/log-tail-view.tsx #352 What the two tail-fed pages — the day’s log (log-tail-screen.tsx) and one thread’s timeline (thread-timeline-screen.tsx) — share, held once (#352): the view the frames build, the hook that keeps one tail open and resumable, and the pinned, virtualized list both render into.
packages/web/src/debug/thread-timeline-screen.tsx #144 One thread’s timeline (#144 slice 3): what the host emitted, what the server sent, and what was logged, as ONE list ordered by time — on the debug page at debug.html?thread=<id>.
packages/web/src/delete-thread-dialog.tsx #571, #578, #879 A thread’s Delete (#571), behind a confirmation that says what goes before it is confirmed: opening it reads the server’s delete preview (delete-thread.ts), and the words come from that — the conversation, the thread’s tree by path, branch and size on disk (#578) when it has one, and whether forks keep its snapshots (they stay while a live fork needs them).
packages/web/src/delete-thread.ts #578 The thread a delete is for, and the fetch that reaches its server: a pane’s, or Settings’ (#578).
packages/web/src/dialog-card.tsx #12, #27, #49, #112, #118 pi’s blocking dialogs — select, confirm, input, editor — answered from the page (#27, #112).
packages/web/src/diff-highlight.ts #461 Syntax highlighting for the Diff view (#461): a changed file’s text, both sides, tokenised by Shiki (MIT) and coloured with THE THEME’S OWN TOKENS — every role a text-chart-*, text-muted-foreground, text-ok, text-refuse or text-evidence class, so a highlighted line follows the theme Settings picks, and no colour of Shiki’s own reaches the page.
packages/web/src/diff-rows.ts #452, #461 A unified diff as the Diff view draws it (#452): git’s patch for one file, parsed into hunks, and each hunk laid out side by side — the old file on the left, the new on the right.
packages/web/src/file-tree.ts #452 The Diff view’s file tree (#452): the changed files, by directory, the way a reader scans a change — directories first, then files, each sorted by name, and each directory carrying the lines added and removed under it.
packages/web/src/fixture-conversation.ts #27, #31, #75, #404, #877 The styling dev loop (#31): a scripted conversation streamed through the REAL useChat pipeline as local AG-UI events — no server, no pi.
packages/web/src/follow-connection.ts #112, #272, #274 The browser’s connection to a thread (#112): TanStack’s SubscribeConnectionAdapter over the prompt/follow split.
packages/web/src/fonts.ts #407 The page’s fonts (#407 item 6): the families it ships, the per-role choice in Settings, and how both reach the page.
packages/web/src/fork-thread.ts #433 Forking from the page (#433): a user message’s fork action and the palette’s /fork both land here, and the page opens what the fork route answers.
packages/web/src/host/__tests__/agent-loop-contract.test.ts #130 A CONTRACT TEST on the runtime’s loop, the shape of cc-safety-net-contract.test.ts: the wire shape of a refused tool call is the vendor’s doing — a guard’s { block, reason } becomes an error result with the reason as its content, isError: true — and map-events.ts relies on it (the tool_execution_end case, “isError is the only signal a refused call has”).
packages/web/src/host/__tests__/branch-context.test.ts #361 #361: a thread’s context, request by request, off pi’s own entries — built here with pi’s real session manager, so the entries read are the ones pi writes and the assembly is pi’s own (buildContextEntries, compaction included).
packages/web/src/host/__tests__/branch-judge-cases.test.ts #469 ⚠ #469: the replay’s cases are what leaves the machine.
packages/web/src/host/__tests__/branch-stats.test.ts #45 #45 phase 2: the branch, analysed off pi’s own entries — built here with pi’s real session manager, so the shapes read are the ones pi writes.
packages/web/src/host/__tests__/context-history.test.ts #361 #361 phase 4: Context Events and File Activity, off pi’s own entries — built with pi’s real session manager, so every entry kind is one pi writes.
packages/web/src/host/__tests__/continuation.test.ts #436 continuationLead (#436): whether a torn thread can be continued from its stored state, and what closes it first.
packages/web/src/host/__tests__/event-tail.test.ts #97 #97’s tail is a debugging surface: what it must not do is lie by omission.
packages/web/src/host/__tests__/extension-ui-context.test.ts #69 The ExtensionUIContext the host binds (#69), driven directly: the blocking methods become extension_ui_request records and resolve on an answer, a cancel, an abort signal or a timeout; the fire-and-forget methods emit and return; the terminal-only surface is inert — pi’s rpc mode’s behaviour, which extensions already tolerate.
packages/web/src/host/__tests__/host-flows.test.ts #338 The flow decisions (#338 slice 3), as the fake and the real host share them: what /login and /logout offer, what a run must name, and the words the flow says.
packages/web/src/host/__tests__/notice-sender.test.ts #387 #387 gap 2: who said a notice.
packages/web/src/host/__tests__/permission-policy-file.test.ts #945, #970 Enso’s record and the policy written together (#945, PR #970 review): the record first, then the policy, and the record put back when the policy’s write fails.
packages/web/src/host/__tests__/project-trust.test.ts #502 #502: the host’s trust decision, against real directories and pi’s real trust.json store.
packages/web/src/host/__tests__/projects-config-file.test.ts #934 Settings › Projects & threads’ files (#934): a save rewrites config.json whole, so it must never lose a key the page does not show, nor write a root the server would refuse to start with; a project’s own mode is keyed as the resolver matches it; and the trust default lands in pi’s file beside pi’s other keys.
packages/web/src/host/__tests__/security-config-file.test.ts #933 Settings › Security’s files (#933): a save rewrites config.json whole, so what it must never do is lose a key the page does not show, write over a file every consumer already refuses, or leave one they would; and the judge’s key must land in secrets.env beside the other lines, 0600, without the read ever handing it back.
packages/web/src/host/__tests__/session-events.test.ts #69 The replica of pi’s unexported toJsonEvent (#69): what map-events.ts consumes must be byte-for-byte the rpc wire shape.
packages/web/src/host/__tests__/session-models.test.ts #904 #904: which runtime Settings reads and logs in through once threads come and go.
packages/web/src/host/__tests__/session-risk-replay.test.ts #464, #557 #464, then #557: one branch, ONE reader.
packages/web/src/host/__tests__/session-usage.test.ts #45 #45: which session events make the host re-read pi’s totals.
packages/web/src/host/__tests__/stored-session.ts #95, #486 A stored thread, written the way pi writes one (#95, #486): a session created under the thread’s id and whole turns appended, each a user message and pi’s reply.
packages/web/src/host/__tests__/system-prompt-preview.test.ts #443 #443: the preview splits pi’s rendering — the preamble, then each section inside its tags, joined by blank lines — and refuses a rendering that does not fit what the host knows of it.
packages/web/src/host/__tests__/thread-prompt-run-reads-fault.test.ts #553 The Diff Viewer’s changes read (#553) refuses git’s failure alone: a snapshot read that fails for any other reason is a fault, and throws.
packages/web/src/host/__tests__/thread-prompt-runs.test.ts #553 The Diff Viewer’s prompt runs (#553), off a branch: which two snapshots each prompt run compares, what a fork compares with, and which prompt runs have nothing to compare — never a diff made up for them.
packages/web/src/host/__tests__/thread-trees.test.ts #551, #555 The host’s reads for #551: which snapshot a turn began with, which tree a thread runs on, which project a tree belongs to.
packages/web/src/host/__tests__/tree-setup.test.ts #754 What a branch says its tree’s setup did (#754): the record after its last tree record.
packages/web/src/host/agent-host.ts #69, #73, #89, #351, #446, #496 pi, hosted IN THIS PROCESS (#69): the web server’s threads, built and served by one host instead of a pi --mode rpc per prompt.
packages/web/src/host/atomic-file.ts #474, #924, #933 The file plumbing Settings’ saves share — the permission policy (#474), config.json and secrets.env (#933): a file’s bytes and ETag, and whether it is still what the page read.
packages/web/src/host/branch-context.ts #361 A thread’s context, request by request (#361) — the host half of EnsoThreadContext and of EnsoContextRequestDetail, read off pi’s own entries for a live session and a stored file alike.
packages/web/src/host/branch-eval.ts #441 The branch as the session eval reads it (#441): the transcript as ours (leak L2) and the turns’ usage from the same walk the stats drawer uses.
packages/web/src/host/branch-incident-history.ts #468, #557 The branch’s incident history (#468), for bun run incidents: each incident’s record with the custom entries it rests on as our transcript records them, and the branch replayed under thresholds.
packages/web/src/host/branch-judge-cases.ts #469 The branch’s judge cases (#469), for bun run judge: each call the judge would be asked about — core’s selection, the live one’s — with the REDACTED state a backend would be sent, built by the same judgeStateOf the guard uses.
packages/web/src/host/branch-stats.ts #45, #359, #928 A thread’s branch, analysed (#45 phase 2): per prompt, per turn, per tool — the session half of EnsoThreadStats.
packages/web/src/host/config-file.ts #904, #933, #934 The user’s config.json as Settings’ sections read and save it (Security #933, Projects & threads #934, the models section of Providers and Roles #904).
packages/web/src/host/context-elements.ts #361, #443 A request’s context as ELEMENTS (#361) — dsh-context’s browser rows: a prompt section, a tool definition, a message, a tool result — and the prices the makeup sums, so the trend’s bars and the browser’s rows are one computation, not two that could drift.
packages/web/src/host/context-history.ts #361 What happened to a thread’s context, and to its files (#361 phase 4) — dsh-context’s Context Events and File Activity, read off pi’s own entries along the branch.
packages/web/src/host/continuation.ts #436 What a Continue sends ahead of the model’s next request (#436): the decision whether a torn thread can be continued from exactly its stored state, and what closes it first.
packages/web/src/host/event-channel.ts #97, #162, #801 A live thread’s event fan-out (#801): subscribers receive OBSERVATIONS (L2, #162 workstream 4) — the runtime’s event is mapped here, at delivery, and its shape never leaves the host.
packages/web/src/host/event-tail.ts #69, #84, #86, #88, #97 A thread’s event tail (#97): the last N events through one funnel, with provenance.
packages/web/src/host/fork-point.ts #433, #434, #435, #443 A thread’s fork point (#435), assembled from its branch alone — the same walk for a live session’s memory and a stored file, so the manifest of a thread reads one way whether it is running.
packages/web/src/host/host-commands.ts #338, #341, #484, #880 The host command source (#338 slice 2) — the rows the host appends to listCommands() and the decision behind runHostCommand, as PURE functions over a model state and a model list.
packages/web/src/host/host-flow-runs.ts #338, #801 A live thread’s host flows run (#338 slices 3–4): /login, /logout and /compact, started and followed on the thread’s feed — host-flows.ts has the decisions and the words.
packages/web/src/host/host-flows.ts #338 The flow host commands (#338 slice 3): /login and /logout, as PURE decisions over what the model runtime reports — the rows the host appends to listCommands(), the check a run passes before anything starts, and the sentences the flow says as it goes.
packages/web/src/host/hosted-thread.ts #27, #69, #338, #433, #434, #435, #436, #445 One live thread (#69): pi built on the thread’s log — one createAgentSessionServices and one createAgentSessionFromServices, the harness package loaded through the same loader path the CLI’s -e <dir> uses, and our ExtensionUIContext bound so dialogs reach the browser (#27) and the extensions’ hasUI is true — its events mapped to observations, and the ThreadRuntime the server drives it through.
packages/web/src/host/live-thread.ts #69, #801 What a live thread hands the server (#69, #801): the run contract (ThreadRuntime) and the host’s read-only view beside it.
packages/web/src/host/log-entry.ts #811 A log’s entries as the host’s branch readers take them (#811): the stored entry’s envelope and the fields the readers read, in a type of ours, so no reader names the runtime’s types.
packages/web/src/host/map-events.ts #24 pi rpc events → the observations a surface renders (#24).
packages/web/src/host/multi-account-seed.ts #69, #341, #877 The agent dir’s multi-account config (provider-failover.json), seeded before the first session so one process can host many threads (#341).
packages/web/src/host/notice-sender.ts #387 Who said a notice (#387 gap 2).
packages/web/src/host/permission-call-questions.ts #474, #881 “Try a command” (#474, #881): a thread’s verdict on a value, asked of the layers a call meets in the order it meets them — the guards, then the permission engine — and of the code each of them runs: the guard’s own decision, asked over the session’s bus, and the engine’s own query.
packages/web/src/host/permission-mode-adapter.ts #84, #162, #496 The permission mode, as the host reads and sets it (#84, #496; below the seam since #162 workstream 4, L3).
packages/web/src/host/permission-policy-file.ts #474, #945 The user’s permission policy on disk, as Settings reads and writes it (#474): ENSO_HOME/permissions.json, which the engine reads through a link from its own config path.
packages/web/src/host/permission-policy.ts #474 Whether a permission policy is one the engine will run as written (#474), judged by the engine’s OWN schema (@gotgenes/pi-permission-system/schemas/permissions.schema.json), compiled once.
packages/web/src/host/project-trust.ts #502 Whether a hosted session may read its project’s own configuration (#502): decided HERE, before pi builds anything.
packages/web/src/host/projects-config-file.ts #934 Settings › Projects & threads’ files (#934): the user’s config.json projects (the roots fence, user-only) and threads (the user tier of a new thread’s tree), and pi’s defaultProjectTrust.
packages/web/src/host/provider-settings.ts #904 The host’s providers, for Settings (#904): what pi knows about each one, and logging in and out of it outside any thread.
packages/web/src/host/questionnaire-dialog.ts #12 The agent’s ask_user questionnaire, lifted to a dialog the web card asks as one (#12).
packages/web/src/host/restore-note.ts #436, #652 What pi is told after a restore (#652).
packages/web/src/host/runtime-event.ts #69, #162 The runtime’s event, as the host receives it — BELOW the thread-runtime seam since #162 workstream 4 (L2).
packages/web/src/host/security-config-file.ts #933 Settings › Security’s files (#933): the security section of the user’s config.json, and the command judge’s key in secrets.env.
packages/web/src/host/session-events.ts #69, #915 AgentSessionEvent → the rpc WIRE shape (#69).
packages/web/src/host/session-files.ts #739 pi’s session files, found and summarized without parsing every file per question (#739).
packages/web/src/host/session-models.ts #484, #688, #811, #877 The models a thread with no session is offered (#688): a SESSION’s list, never a bare runtime’s.
packages/web/src/host/session-usage.ts #45, #86 A thread’s spend and context, as pi reckons them (#45) — the two halves of EnsoSessionUsage.
packages/web/src/host/stored-threads.ts #86, #95, #739, #801 A host’s stored threads (#95, #739): the runtime’s logs on disk in the directories it serves, listed, located by id, and read cold — one open, nothing built (#86).
packages/web/src/host/system-prompt-preview.ts #443 A system prompt before it is sent (#443): what a thread’s next request would carry with a given library prompt — or pi’s default — section by section, priced as the Context tab prices it.
packages/web/src/host/system-prompt.ts #390, #443, #877 A session’s system prompt from the library (#443), handed to pi through pi’s OWN mechanism.
packages/web/src/host/thread-announcements.ts #45, #338, #496, #801 What a live thread says about itself as the host’s own events (#45, #338 slice 2, #496): its model and thinking level, its spend and context, its permission mode — each read NOW, and each said once per change.
packages/web/src/host/thread-delete.ts #571, #573, #578, #801 Deleting a thread (#571): its tree through the inventory, its store and the project’s object store collected (#573), its files last; what a delete would do, as the dialog says it; and what thread trees cost on disk, by the same inventory (#578).
packages/web/src/host/thread-fork.ts #433, #466, #551, #801 A fork (#433), taken from the source’s file outside any runtime: the log forked before the chosen prompt (thread-log.ts), its own tree minted at the source’s snapshot when the source has one or new threads get one (#551), and the source’s open incident opened again on it (#466 decision 5).
packages/web/src/host/thread-log-edits.ts #551, #565, #650, #670, #801 What changes a thread in place, live or stored (#551, #565, #670): its name, and its tree put back to a snapshot — written through the live log when the thread is built, else through its file, never through a second log beside the live one (control plane, invariant 4).
packages/web/src/host/thread-log.ts #86, #102, #433, #801, #811 A thread’s log (#801): the runtime’s durable record of one thread, read and written in our terms, and the store that opens, creates and forks it.
packages/web/src/host/thread-on-tree.ts #551, #801 A new thread that moves onto its own tree when it first runs (#551): see treeOnFirstRun.
packages/web/src/host/thread-prompt-run-reads.ts #86, #553 The Diff Viewer’s reads (#553), live or stored: the thread’s prompt runs off its branch, and two of its snapshots compared in its store.
packages/web/src/host/thread-prompt-runs.ts #445, #551, #553 A thread’s prompt runs as the Diff Viewer steps through them (#553), from its branch alone: #551’s snapshots, never a second store, never the live tree.
packages/web/src/host/thread-tree-making.ts #753 A project’s new-tree settings, and its own tiers that are not the version approved (#753).
packages/web/src/host/thread-trees.ts #551, #555 The host’s side of #551’s thread trees: where a thread’s tree and its snapshot store go, which project a thread’s cwd belongs to, and what its branch records about its tree.
packages/web/src/host/transcript.ts #18, #162, #381, #434, #557 The runtime’s session branch → the transcript of ours (#162 workstream 4, L2’s persistence side).
packages/web/src/host/tree-setup.ts #753, #754 The host’s side of #754: a project’s tree settings resolved by tier under pi’s trust for the project and the operator’s approval of its files (#753), and the setup outcome a thread’s branch records.
packages/web/src/incident-card.tsx #466, #468 A session’s incident as the thread shows it (#466): what was OBSERVED, what the risk fold INFERRED from it, and what that SUSPENDED — three sections, never one sentence, because the signals are evidence, the level is an uncalibrated inference over them (#468), and the suspension is policy (security.incidents.halt).
packages/web/src/launch-model.tsx #391, #877, #880, #904 The launch panel’s Model chip (#877) and the picker it opens (model-picker.tsx, #880, #904): the roles, the favorites, the models the session may start on, Recent, then by provider, the chosen one marked.
packages/web/src/launch-panel.tsx #877 A new thread’s launch panel (#877): the main pane before its session starts.
packages/web/src/launch-prompts.tsx #443, #470, #877 The launch panel’s two library chips (#443, #877): the session’s System prompt — pi’s default, or a system / append prompt, fixed for the session’s life — and a Saved prompt that fills the composer with a session prompt’s text.
packages/web/src/launch-settings.tsx #391, #443, #484, #877, #904 The settings a new thread’s session starts with (#391, #877): the model, the effort, the mode and the system prompt (#443), chosen on the launch panel’s chips, and Start session, which applies them and sends the first prompt.
packages/web/src/lib/utils.ts #417 tailwind-merge knows Tailwind’s own scales, not the ones styles/global.css names: without these, text-detail reads as a COLOUR (so a later text-refuse drops it) and shadow-pop never replaces a primitive’s shadow-md — both kept, the stylesheet’s order deciding (#417).
packages/web/src/listing-store.ts #29, #86, #95, #395 A list the server hands the page and the rail shows — stored threads (#95), projects (#395).
packages/web/src/live-request.ts #692, #913 The model request in flight, as the views say it (#913).
packages/web/src/live-view-check.ts #914, #919 A thread’s live view lost, followed up from the page (#914): the status bar says “not receiving updates — reconnecting…” from the moment a follow goes silent or ends (FollowConnection.liveView), and this check decides when that becomes “Reload to catch up”.
packages/web/src/menu-chrome.ts #417 The prototype’s chrome (#417) for the controls it draws the same everywhere.
packages/web/src/message-row.tsx #280 One transcript row (#280): a message’s bubble, its prompt’s actions, and the incident cards and lines that follow it.
packages/web/src/mode-lines.ts #29, #69, #88, #162 Permission-mode lines in the transcript (#29, the remaining half).
packages/web/src/model-picker.tsx #338, #871, #877, #880, #904 The model picker (#880, #904), one for the launch panel’s Model chip (#877) and the started composer’s (the chip and the palette’s /model, #338): Roles on top, then Favorites, then Recent, then one group per provider under its readable name — each model row with the effort levels it offers and a star.
packages/web/src/model-state.tsx #44, #90, #338, #341, #434, #484 The model the thread runs and how hard it thinks, as STATE — and the two composer controls that change them (#338 slice 2; the control half of #44).
packages/web/src/models-settings.ts #904 The user’s models section (#904) — favorites, hidden providers, roles, presets — as the page holds it: ONE page-level store, read by the model picker, the launch panel and Settings, so a star in the picker shows in Settings at once and a role saved in Settings is offered in the next picker without a reload.
packages/web/src/notifications.tsx #29, #84, #94, #96, #382 pi’s notify messages, rendered (#29).
packages/web/src/option-select.tsx #45 A closed vocabulary as a control (#45 phase 2 folded the log level’s and the stats drawer’s copies): a native <select> — keyboard- and screen-reader-complete without a dependency, the reasoning the permission-mode control gives — that only ever hands back one of its options.
packages/web/src/page-behind-check.ts #919 The page checked against the server, from OUTSIDE the event pipeline (#919): whatever broke between the wire and the screen, the server’s listing still says what the thread did.
packages/web/src/page-clock.ts #278 The page’s clock as a store (#278): the one value that changes with no input.
packages/web/src/page-fault.tsx #919 What a page that may be out of date shows (#919): the one banner with Reload, and the error boundary each pane draws inside — page-health.ts has the triggers.
packages/web/src/page-header.tsx #90, #361, #869, #879 The page’s header (#90): the active thread’s title — renamed in place (#879) — with what it runs with under it, the view tabs (#361), the prompt manager, and the thread menu (#879): Rename, Fork thread, ?debug’s pane, and Delete thread… or Discard draft.
packages/web/src/page-health.ts #914, #915, #919 Whether this page can still be believed (#919): it has fallen behind the server, or part of it failed, while the rest keeps running.
packages/web/src/page-leaving.ts #664 Whether this page is going away (#664): a reload, a navigation, a closed tab.
packages/web/src/page-listings.ts #95, #395 The page’s listings (#95, #395): the server’s stored sessions and its projects, one store each per page, and the hook that fetches them.
packages/web/src/page-mode.ts #31, #86, #404 The page’s URL switches (#31, #86): ?fixture and ?debug, read once at load, and the two ways a thread enters the page, both through the page’s network (#404).
packages/web/src/page-reload.ts #919 Reload, keeping what is being written (#919).
packages/web/src/page-styles.ts #417 The routed pages’ shared pieces (#417) — Projects, a project’s page, Add project, Settings — as the 2026-10-12 prototype draws them: one class string per piece, so every page draws a button, a field or a card the same way.
packages/web/src/pane-context.ts #90 What the widgets in a thread’s pane read through (#90): TanStack’s chat contexts, shared by every thread’s factory, and the pane’s view and debug switches.
packages/web/src/pane-layout.ts #707, #938 Threads side by side (#938): up to three panes on the page, from any projects, one of them focused.
packages/web/src/permission-mode.tsx #73, #84, #90 The CURRENT permission mode, as state — and the control that changes it (#84).
packages/web/src/permissions-behaviour.tsx #514, #935 Settings › Permissions’ Behaviour part (#935): every key of permissions.json beside the rules, one control each, edited on the section’s draft and saved with the rules — one Save for the file, under the same ETag.
packages/web/src/permissions-connection.ts #474 The permission policy’s routes (#474), as Settings’ Permissions section calls them: read the user’s ENSO_HOME/permissions.json, write it whole under the ETag read, reset it to Enso’s, and ask a live thread’s engine for its verdict on a value.
packages/web/src/permissions-draft.ts #474 The Permissions section’s edits and reading aids (#474), on a draft of the file’s permission block: the edits the core helpers do not make (an action changed in place, a pattern renamed in place), a drafted group added whole, and a reset’s diff.
packages/web/src/permissions-record.ts #945 Switching rules and rule groups off and on (#945), on a draft of the policy’s permission block and Enso’s record beside it (ENSO_HOME/permissions.disabled.json).
packages/web/src/permissions-settings.tsx #474, #502, #881 Settings’ Permissions section (#474): the rules pi runs under, from ENSO_HOME/permissions.json in the engine’s own format — shown in the engine’s order, per mode, edited on a draft and saved whole under the ETag read, reset to Enso’s with the diff shown first, and checked against the open thread’s live engine.
packages/web/src/project-config-approval.tsx #753 A project page’s review of its own config files (#753), over its tabs: each of .enso/config.json and .enso/config.local.json that is not the version approved, as the diff from that version to the file now, with Approve.
packages/web/src/project-list.ts #395 The projects the rail groups threads under (#395): the launch directory first, then the ones registered under the install’s roots, as GET /api/projects lists them.
packages/web/src/project-page.tsx #753, #871, #873, #937 A project’s page (#871): ?page=project&project=<id>&tab=threads|worktrees|web-tools|storage, opened from a Projects card, the rail’s ⋯ and Settings › Storage.
packages/web/src/project-status.tsx #870, #876 What a project is, as the Projects page’s cards (#870) and the rail’s project switcher (#876) both say it: its folder missing, and whether it is trusted — read from each project’s GET /api/projects/:id/settings.
packages/web/src/project-switcher.tsx #417, #876 The rail’s project switcher (#876), a muted line under the brand at the rail’s top (#417): which project is current — the one New thread starts in and the rail keeps open — and a menu to pick another.
packages/web/src/project-trust-dialog.tsx #873 Project trust’s confirmations (#873), on the project page and after Add project: trusting names what it turns on — each of the project’s own files that is there and the setup commands it declares, as written, or “none” — read from the server when the dialog opens, so they are the files as they are now.
packages/web/src/project-web-tools.tsx #937 A project page’s Web tools tab (#937): the project’s own webFetch hosts and webSearch settings, in its shared .enso/config.json — the one project tier a session merges, so the only one this tab writes (.enso/config.local.json is never read for web tools).
packages/web/src/project-worktrees.tsx #754, #871 A project page’s Worktrees tab (#754, a page since #871): how a new thread’s tree is made in it.
packages/web/src/projects-page.tsx #870 The Projects page (#870): every project as a card — its name and what it is (current, started here, not trusted, folder missing), its path, its threads and when one was last active, what it takes on disk, and how its new threads’ trees are made — with the way into its threads, its settings, and, for any but the launch folder, its removal.
packages/web/src/projects-settings-connection.ts #934 Settings › Projects & threads’ routes (#934), as the section calls them: read the user’s projects and threads, save them whole under the ETag read, and set the trust an undecided project gets.
packages/web/src/projects-settings.tsx #934 Settings › Projects & threads (#934): your defaults for every project.
packages/web/src/prompt-editor-state.ts #443 The prompt manager’s editor, as data (#443): the draft on screen, the file it was opened from, and the rules a save follows — kept apart from the React so each is tested as the value it is.
packages/web/src/prompt-library-connection.ts #443, #877 The prompt library’s reads (#443): GET /api/prompts and GET /api/prompts/:id, validated with the wire’s own schemas, as commands-connection.ts reads the palette’s list.
packages/web/src/prompt-manager.tsx #443, #470 The prompt manager (#443): one place to read, write and organise the prompts a session runs with — the header’s scroll button, beside Settings, because the library is the user’s, not a thread’s.
packages/web/src/prompt-size.tsx #443 What a prompt costs, always in view while it is written (#443): the file’s bytes, exact; the body’s tokens, ≈ — estimateTextTokens, the function the Context tab prices system text with — and, once pi has rendered it, its share of the model’s window.
packages/web/src/providers-settings.tsx #904 Settings’ Providers (#904): each provider pi knows that is set up or registered — logged in or not, how, whether it is an account slot — with its models to star, Log in (pi’s own flow, a subscription or an API key), Log out of a credential pi stored, and Hide from the model picker.
packages/web/src/questionnaire-card.tsx #12 The agent’s ask_user questionnaire as one card (#12): a tab per question, each option a row with its label and what choosing it means, an “Other” row for an answer in the user’s own words, and one “Submit answers” once every question has one.
packages/web/src/rail-layout.ts #875 How a project’s section of the rail lays its threads out (#875): under Today, Yesterday and Earlier by last activity, in the browser’s local day, and inside each, the threads that share a title folded into one row with a count.
packages/web/src/read-on-usage.ts #739 The pace of the status bar’s reads that walk the project’s tree, /git and /tree (#739): at most one per 5 s per pane.
packages/web/src/refused-attempt.tsx #387 Who refused, as a reader names them (#387): pi’s display name for the provider (Anthropic), else its id; undefined when the refusal names no provider.
packages/web/src/roles-settings.tsx #904 Settings’ Roles (#904): a role is a name for a model and its effort, with fallbacks in order — the first available runs when the model is not; none available, the role is refused, never quietly replaced.
packages/web/src/route-read.ts #45 One GET of a JSON route whose answer has a schema, in the three ways it can go — a failure is words, never a throw (#45 phase 2 folded the thread timeline’s and the stats drawer’s copies).
packages/web/src/routed-page.tsx #869 The pages beside the threads (#869): what the URL’s ?page= names (thread-url.ts), drawn in the box a thread’s pane fills, with the header and status strip a page has in place of a thread’s.
packages/web/src/run-states-connection.ts #911, #914 The page’s watch of every thread’s run (#911): GET /api/run-states, read until the caller leaves, reconnected when it ends.
packages/web/src/run-status.ts #914, #919 What the run and the page are doing, in one of five states (#914), each asking something different of the person: lost the page is not receiving the thread’s updates — reload; working pi is at a named step, for so long — watch; waiting pi waits on the person’s answer — answer (over everything but a lost view); stuck pi works and nothing has come from it for minutes — consider stopping; stopped the run finished, was stopped, or failed, and how — read it; until the next prompt.
packages/web/src/security-connection.ts #933 Settings › Security’s routes (#933), as the section calls them: read the user’s security, save it whole under the ETag read, and store or remove the judge’s key.
packages/web/src/security-settings.tsx #933 Settings › Security (#933): config.json’s user-only security section — whether an incident halts, the risk thresholds, the command judge — one control per key, each named by its file, key and default and checked when you leave it, with one Save for the file.
packages/web/src/server/__tests__/bun-plugin-strict-binding-workaround.test.ts #237 The dev bundle’s one source rewrite, executed (#237).
packages/web/src/server/__tests__/day-file-fold.test.ts #739 #739: a day file folded from the offset it reached — appended records join the kept fold, a writer’s half-written last line waits for its newline, and a file that is no longer the one folded (truncated, rotated, gone) is folded again from its start.
packages/web/src/server/__tests__/dev-proxy.test.ts #160 #160: the web surface (5178) forwards /api/* to the Enso server (5179), whose admission check refuses a request from a non-loopback page.
packages/web/src/server/__tests__/fake-hosted-thread.ts #178 The one fake of the thread-runtime seam (#178; docs/seams/thread-runtime.md): a ThreadRuntime from plain closures that records every call, so the server, the registry and the routes are driven over it and asserted through what it recorded.
packages/web/src/server/__tests__/follow-page.test.ts #915 A page following a run, end to end (#915): the real follow route over a real socket, read by the page’s own follow adapter and applied by TanStack’s real chat client with the page’s own router — the path a tab stopped on, silently, after a 68 KB write, while the run went on for 20 minutes.
packages/web/src/server/__tests__/follow-reader.test.ts #231 The double’s own contract (#231).
packages/web/src/server/__tests__/follow-reader.ts #231 A follow as a test reads it: frames and keepalive comments as they arrive, awaited by count — never by a guessed delay.
packages/web/src/server/__tests__/follow.test.ts #109, #112 The wire, measured (#109’s receipt, kept as the contract — #112).
packages/web/src/server/__tests__/font-files.test.ts #407 #407 item 6: the page’s fonts are served unbundled from the installed @fontsource packages.
packages/web/src/server/__tests__/live-or-stored.test.ts #45, #361 The analysis routes’ one read rule (#45, #361), the rule thread-read.ts reads by: peek, read the file if not live, re-peek.
packages/web/src/server/__tests__/logs-route.test.ts #132 POST /api/logs (#132 slice 3): the browser’s batch into this process’s logger, under the browser’s own category, at its level, marked as the browser’s — or a 4xx that is never a record of its own.
packages/web/src/server/__tests__/logs-stats-route.test.ts #144, #336, #739 The stats route’s own facts (#144 slice 4, PR #336 review, #739): WHICH file it folds is the clock’s local day, a day nobody has written is an empty answer and not a failure, a line that is not a record is counted rather than folded, and a record appended since the last request is in the next.
packages/web/src/server/__tests__/logs-tail-route.test.ts #97, #144 GET /api/logs/tail (#144 slice 2), over real HTTP: the day’s file, filtered server-side, as frames the browser’s schema takes — and NO record of its own, which is the rule the whole debug surface rests on (#144, #97).
packages/web/src/server/__tests__/models-routes.test.ts #904 The models routes (#904) over the fake host: the models section of the user’s config, Settings’ providers and their logins, and a …/configure that names a role.
packages/web/src/server/__tests__/observation-log.test.ts #144 The tier an observation lands at, and the one record that is not an observation at all: the run’s time to first token (#144).
packages/web/src/server/__tests__/projects.test.ts #395 The project boundary (#395), decided in projects.ts: which directories a page may make projects of, and where a new thread is built.
packages/web/src/server/__tests__/run-timing.test.ts #144 Time to first token, once per run (#144).
packages/web/src/server/__tests__/thread-context-route.test.ts #361 #361: one thread’s context — pi’s branch and pi’s meter, from memory for a live thread and from the file otherwise, building nothing to answer.
packages/web/src/server/__tests__/thread-eval-route.test.ts #441 #441: one thread’s eval — the branch from pi, the log’s queued admissions and aborts from the day files the branch spans.
packages/web/src/server/__tests__/thread-git-route.test.ts #452, #453 #453: one thread’s git state — asked in the live thread’s cwd, or the stored thread’s, building nothing to answer, and never in a directory the server does not serve.
packages/web/src/server/__tests__/thread-stats-route.test.ts #45 #45 phase 2: one thread’s stats — pi’s session for the numbers, the day files for the times.
packages/web/src/server/__tests__/transcript-to-messages.test.ts #95, #162 #95: a stored branch mounts as the messages a live run would have left behind.
packages/web/src/server/__tests__/vendor-links.test.ts #160 ⚠ The precondition that was missing when a real run failed.
packages/web/src/server/bundle-route.ts #132, #137 GET /api/logs/bundle[?thread=<id or prefix>] (#132 item 5): the day’s records, the live threads’ inspections, and the versions, as ONE markdown file with the records fenced as JSONL — bun run logs --file reads it back.
packages/web/src/server/day-file-fold.ts #739 A day file’s fold, kept and extended from the byte offset it reached (#739).
packages/web/src/server/dev-proxy.ts #34, #38, #160 The web surface’s /api/* hop to the Enso server (dev-web.ts), streaming both directions.
packages/web/src/server/dev-web.ts #9, #36 Dev entry point for the web surface — Bun’s fullstack dev server, replacing vite (#36).
packages/web/src/server/dev.ts #9, #132, #395, #421 Dev entry point for the enso server.
packages/web/src/server/follow.ts #75, #109, #112, #116, #162, #436, #618 The prompt/follow split (#112) — the server↔browser wire.
packages/web/src/server/font-files.ts #407 The page’s fonts, served as files rather than bundled (#407 item 6).
packages/web/src/server/index.ts #9, #24, #112, #395 The dev backend: the thread routes the browser’s FollowConnection talks to (#112), and the inspection routes beside them.
packages/web/src/server/literal-routes.ts #144, #174, #810 The literal routes (#810): the ones whose path is a constant rather than a thread’s id — the fresh thread’s mode, the live and stored thread listings, the trees, the about card, and the log routes (#144).
packages/web/src/server/live-or-stored.ts #45, #86, #361 A thread’s answer from pi’s memory when it is live, from its file when it is not (#45, #361) — READ THE WAY thread-read.ts READS: peek, read the file if not live, re-peek.
packages/web/src/server/logs-route.ts #132 POST /api/logs (#132 slice 3): the browser’s records, into the one file.
packages/web/src/server/logs-stats-route.ts #97, #144, #739 GET /api/logs/stats (#144 slice 4): the day, derived — dayStats’s fold of today’s file, as JSON, for the debug page’s stats view.
packages/web/src/server/logs-tail-route.ts #97, #132, #144 GET /api/logs/tail (#144 slice 2): the day’s file, filtered server-side, as SSE — what the debug page reads instead of a terminal.
packages/web/src/server/models-routes.ts #174, #904 The models routes (#904): the user’s models section of ENSO_HOME/config.json — favorites, hidden providers, roles, presets — read and written whole; the providers pi knows, for Settings; a login and a logout from Settings; and the role a …/configure names, resolved.
packages/web/src/server/observation-log.ts #97, #132 Every observation the server publishes becomes a record (#132, “trace everything”) — at the tier it belongs to, with the ids that join it to the transcript, the event tail (#97) and the other layers’ lines about the same moment.
packages/web/src/server/permission-routes.ts #174, #474, #810 The permission routes (#474, #810): the policy file read, saved and reset — Settings’ permissions page — and a thread’s verdict for one call, its “Try a command”.
packages/web/src/server/project-routes.ts #174, #395, #753, #754, #810, #873, #939 The project routes (#395, #810): the projects listed, registered, browsed, renamed (#939) and removed, a project’s settings (#754), its trust (#873) and its config approval (#753).
packages/web/src/server/project-settings-route.ts #717, #753, #754 GET and PUT /api/projects/<projectId>/settings (#754): the project page’s Worktrees section — a new tree’s mode, files to copy and setup commands, each with the tier it resolves from — and its edits, written to the tier the operator chooses: the project’s shared or local file.
packages/web/src/server/project-trust-route.ts #717, #873 GET and PUT /api/projects/<projectId>/trust (#873): a project’s trust, read and set from its page — pi’s trust.json, the store a thread’s “Trust project” answer writes and every new session reads (hostedProjectTrust), with the agent dir they read it from.
packages/web/src/server/projects.ts #24, #395, #397, #717, #866 The projects one server runs threads in (#395, #866).
packages/web/src/server/prompt-library.ts #443, #470 The prompt library on disk (#443): ENSO_HOME/prompts/<id>.md, read on every request — the files are the record, so an edit made in another editor is what the next list shows.
packages/web/src/server/prompt-routes.ts #443, #470, #810 The prompt routes (#443, #810): the library’s own routes (/api/prompts…), and the thread routes that read a library — the system-prompt preview and its draft, the project’s prompts (#470).
packages/web/src/server/request-plumbing.ts #810 The request plumbing every route group shares (#810): reading a body under its cap, the write preconditions, answering JSON or a refusal, decoding a thread id, and the answer-or-fail rule for a handler that awaits.
packages/web/src/server/run-states-route.ts #876, #911 GET /api/run-states (#911): every thread’s run, as it moves — what a page needs to stop saying a thread it has NOT opened runs, at the moment the server releases it.
packages/web/src/server/run-timing.ts #144, #160 When a run was admitted, so its FIRST delta can be recorded as a latency (#144 slice 1).
packages/web/src/server/settings-routes.ts #174, #933, #934 Settings’ server-side files, user only — there is no project form of any of them: - Security (#933): the user’s config.json security section, read and saved whole under its ETag, and the command judge’s key stored in secrets.env — never answered.
packages/web/src/server/sse.ts #109 The SSE plumbing every streaming route shares: the response headers and the keepalive.
packages/web/src/server/thread-context-route.ts #86, #361 GET /api/threads/:threadId/context (#361): the thread’s context, request by request — the Context view reads it.
packages/web/src/server/thread-control-routes.ts #810 The thread controls (#810): a prompt, an abort, a continue, a delete, and the small JSON control routes — a dialog answer, a mode change, a host command, a configuration, an incident’s resolution, a fork, a restore and its undo, a name.
packages/web/src/server/thread-eval-route.ts #441 GET /api/threads/:threadId/eval (#441): one thread’s session eval — the mechanical timeline and scorecard session-eval.ts computes.
packages/web/src/server/thread-git-route.ts #86, #452, #453 GET /api/threads/:threadId/git (#453): git’s state in the thread’s cwd — the repository, the branch, the last-push baseline and the work not yet pushed (@enso/core/git).
packages/web/src/server/thread-incidents-route.ts #86, #468, #469 The thread’s security reads (#468, #469), live or cold as live-or-stored.ts reads; each writes no record and builds nothing (#86).
packages/web/src/server/thread-log-days.ts #45, #441 A thread’s records in the day files (#45, #441): which days are on disk, which local day a moment falls on, and one day’s lines for one thread.
packages/web/src/server/thread-manifest-route.ts #86, #435 GET /api/threads/:threadId/manifest (#435): the thread’s fork point — its identity, then the conditions it runs under (recorded model and level, mode, cwd, the latest enso-run-context) — off the branch the host walks (host/fork-point.ts).
packages/web/src/server/thread-preview-route.ts #395, #551, #619, #713, #717 What a thread built, reachable from the page (#619).
packages/web/src/server/thread-read-routes.ts #86, #810 The thread reads (#810): a thread’s events, history, commands, inspection and delete preview, and its analyses — stats, context, manifest, eval, git, changes, incidents, judge cases, pages.
packages/web/src/server/thread-read.ts #214 THE LIVE-OR-COLD READ, ONCE (#214).
packages/web/src/server/thread-registry.ts #43, #69, #113, #116 One pi session per chat THREAD, held across runs (#69 PR 2 — closes #43).
packages/web/src/server/thread-routes.ts #174, #810 The thread routes (#174, #810): every /api/threads/<threadId>/… path and the one table that dispatches them.
packages/web/src/server/thread-stats-route.ts #45, #359, #739 GET /api/threads/:threadId/stats (#45 phase 2): one thread, analysed — the chat’s stats drawer reads it.
packages/web/src/server/transcript-to-messages.ts #93, #95, #162, #220 The transcript → TanStack UIMessages (#95): the history a resumed thread mounts with.
packages/web/src/server/web-tools-routes.ts #717, #753, #924, #932, #937, #1001 Settings › Web tools (#924, #932): the web_fetch allowlist, read, changed and checked from the page instead of by hand in ENSO_HOME/config.json; and web_search’s backend, its Tavily domain lists, and the TAVILY_API_KEY secret in ENSO_HOME/secrets.env — set, replaced or removed, its value never answered back or logged.
packages/web/src/setting-chip.tsx #877, #878 A session setting as a chip in the composer (#877): its name dim, its value, a chevron, and what it opens.
packages/web/src/settings-file-connection.ts #933, #934 How Settings’ config.json sections call their routes (Security #933, Projects & threads #934): read the section with the file’s ETag, and save it whole under that ETag.
packages/web/src/settings-listing.ts #578, #904 A listing a Settings section reads from the server — Storage’s trees (#578), Providers’ (#904): still out, read, or why not.
packages/web/src/settings-page.tsx #407, #474, #578, #869, #904, #924, #932, #933, #934 Settings, a page (#869; the header’s dialog before it), in sections, each its own route.
packages/web/src/settings-rows.tsx #933, #934 What Settings’ config.json sections draw alike (Security #933, Projects & threads #934): a key’s row and where it stands in its file, the one Save for the file, and what a read or save that failed says.
packages/web/src/stats-table.tsx #45, #144 The table and the number formats the two stats surfaces share (#45 phase 2): the day’s (debug/day-stats-screen.tsx, #144) and one thread’s (thread-stats.tsx).
packages/web/src/step-pill.ts #417 A transcript state pill’s ring and type (#417, the prototype’s .pill): mono 11px in a rounded border of the text’s own colour, so the caller’s role colour (text-ok, text-refuse, text-evidence) tints the word and its ring together.
packages/web/src/store.ts #90 The smallest external store React can subscribe to: one value, replaced whole, and a listener set.
packages/web/src/stored-threads.ts #95, #395, #911 The sessions a user can come back to (#95): pi’s session files in this server’s projects, as the server lists them — the rail’s rows under each project (#395).
packages/web/src/thread-changes.tsx #452, #453, #461, #650 The Diff view (#452): every file in the thread’s project that differs from the last push, as a tree, and the chosen file’s diff side by side — the old file on the left, the new on the right.
packages/web/src/thread-context-analysis.ts #361 What the Context view derives from EnsoThreadContext before it draws (#361): the category order and names, totals, the prompt-granularity roll-up and the delta series — dsh-context’s categories.ts, headline.ts and trend aggregation, over our wire.
packages/web/src/thread-context.tsx #361 The Context view (#361) — dsh-context’s Context tab over pi, in the design direction’s layout (Enso-Design-Direction, the Context view): Now (what the next request is made of, beside the provider’s count for the last one), Trend (every request’s makeup, and the picked one’s brief), then the Context Browser with Context Events and File Activity beside it on a wide view.
packages/web/src/thread-eval.tsx #359, #441, #726, #727 The session eval on the Stats tab (#441, the follow-up its issue named): the scorecard, the agent-side signals and the timeline GET /api/threads/:threadId/eval answers, under the stats drawer.
packages/web/src/thread-git.tsx #453, #484, #620 The status bar’s git readout (#453): the branch, how far it is ahead of and behind the last push, and the work in the tree — off GET /api/threads/:threadId/git, whose tooltip names the baseline and the rule that chose it (@enso/core git-state.ts).
packages/web/src/thread-not-found.tsx #869, #879 The pane when a thread asked for is not on the server (#879): a rail row, a fork or a project’s thread the listing still named, whose session is gone.
packages/web/src/thread-pane.tsx #938 Where the page places a pane of several (#938): its index left to right, how many are open, whether they are side by side (else tabs, one on screen), and how it is focused and closed.
packages/web/src/thread-panes.tsx #938 The panes’ own chrome (#938): the header of a pane beside the focused one, its composer’s stand-in, and the tabs the panes become when the window is too narrow for them side by side.
packages/web/src/thread-prompt-run-diffs.tsx #452, #551, #553 The Diff Viewer (#553): a thread’s prompt runs, stepped through one at a time, and the files each changed — off #551’s snapshots (GET …/prompt-runs), two of them compared in the thread’s store (GET …/prompt-runs/changes).
packages/web/src/thread-stats-analysis.ts #45, #387, #407, #523, #928 What the stats drawer derives from EnsoThreadStats before it draws (#45 phase 2): the averages, the per-tool totals and the two rankings — pi-livecraft’s analyzeSession and SessionAnalysisWidget rankings (.inspiration/pi-extensions/pi-livecraft), ported to our wire.
packages/web/src/thread-stats.tsx #45, #359, #692 The thread’s stats drawer (#45 phase 2) — pi-livecraft’s session analysis widget (.inspiration/pi-extensions/pi-livecraft/src/features/session-analysis/), section for section, over our wire: summary cards, context and tokens per turn, cost per turn, cumulative usage by tool, costliest calls, distribution, costliest prompts.
packages/web/src/thread-status.tsx #45, #84, #90, #103, #914 The status bar (#90 PR 1): the always-on line that says what this session is doing and what it has cost, so the answer to “is anything happening?”
packages/web/src/thread-stores.ts #90, #272, #938 Everything the browser knows about one thread beyond its messages (#90 PR 3).
packages/web/src/thread-tree-pages.tsx #551, #619, #713, #717, #754 What a thread built, reachable from the page (#619).
packages/web/src/thread-url.ts #95, #142 The thread a page URL names (#142): ?thread=<id>.
packages/web/src/threads-rail.tsx #90, #95, #114, #278, #395, #433, #869, #870, #875, #876 The threads rail (#90 PR 3, #395): which conversation am I in, in which project, what else is there, how do I start another.
packages/web/src/to-agui.ts #18, #24, #112 EnsoObservation → AG-UI StreamChunk (#24, #112).
packages/web/src/tool-refusal.tsx #387, #407, #523 A refusal as the design draws it (Enso-Design-Direction .guard, #407 item 1): the tool, the verdict in the refusal colour, what was asked, why it was refused, and who refused it.
packages/web/src/tool-views.tsx #920 Each tool’s card as a person reads it (#920): the call’s arguments and its result in the tool’s own terms — bash as the command, edit as the change, ask_user as question → answer — instead of the model’s JSON.
packages/web/src/transcript-reveal.ts #359, #921 From a point or a row in the stats drawer to the transcript row it describes (#359) — pi-livecraft’s onNavigate({ kind: 'turn' | 'message' | 'tool' }), over our transcript.
packages/web/src/transcript-selection.ts #280, #739 THE TRANSCRIPT’S SELECTION, KEPT RATHER THAN REBUILT (#739).
packages/web/src/transcript-window.ts #739 The windowed transcript’s pixel numbers (#739), kept out of the page code.
packages/web/src/transcript.tsx #280, #739 A thread’s transcript (#280, #739): selected once per pane, windowed, with pi’s lines and the incident cards placed where they happened.
packages/web/src/tree-setup-report.tsx #753, #754 What preparing a thread’s tree did (#754), in the “What this thread built” panel: the files copied in, the ones missing, and each setup command with its output on demand.
packages/web/src/trees-settings.tsx #578 Settings’ Storage (#578): what thread trees cost on disk, per project — each tree’s size, whether it holds work, and its project’s snapshot store — so a person can see what to delete and delete it here, through the same dialog as the header’s.
packages/web/src/ui-events.ts #737 The page’s side of UI events (#737, core’s ui-events.ts): a component announces a state it renders by dispatching a CustomEvent on document, named from ENSO_UI_EVENTS and carrying the detail core types for that name.
packages/web/src/view-parts.tsx #361 The analysis views’ building blocks — the Context and Stats tabs (#361), in the design direction’s card language (Enso-Design-Direction, .card, .seg, .filter, .kind): a card with a head (title, a muted line saying how to read it, its controls on the right) over its body, a segmented choice, a small button, a filter pill and a row’s kind label.
packages/web/src/web-search-settings.tsx #932 Settings › Web tools › Searching (#932): web_search’s backend and its Tavily domain lists, in ENSO_HOME/config.json, and the TAVILY_API_KEY that arms the Tavily fallback, in ENSO_HOME/secrets.env.
packages/web/src/web-tools-settings.tsx #924, #930, #932 Settings › Web tools (#924, #930): what web_fetch and web_search may reach, for every project.
packages/web/src/web-tools-shared.tsx #924, #932 What Settings › Web tools’ two groups share (#924, #932): the section’s props, the read-and-write of one settings answer from the server, the line saying when a change applies, and the card a trusted project’s own settings are shown in, read only.
scripts/__tests__/check-crap.test.ts #844 Gate step crap (#844): what fails it.
scripts/__tests__/corpus-shapes.test.ts #534 The corpus report’s measurements (#534): the judge’s scope, and what followed a refusal — each pinned on the cases the corpus turned up.
scripts/__tests__/coverage-istanbul.test.ts #826 The LCOV → Istanbul mapping fallow scores CRAP from (#826).
scripts/__tests__/enso-eval.test.ts #441 bun run eval (#441): the flags, and the three renderings over one payload — the markdown’s running counters, the row that a header names column for column, the comparison table.
scripts/__tests__/enso-incidents.test.ts #468 bun run incidents (#468): the commands and their flags, the export’s three files — the entries exactly as stored, the report for reading, the resolutions — and the history and replay summaries.
scripts/__tests__/enso-judge.test.ts #469 bun run judge (#469): replay refuses to send without being told to, the dry run shows the exact bodies replay would send, and the score’s precision and recall are the labels’ own.
scripts/__tests__/enso-launch.test.ts #221, #953 The terminal launcher’s decisions (docs/flows/boot-and-launchers.md).
scripts/__tests__/enso-logs.test.ts #132 The reader’s own logic (#132, bun run logs): the flags, and what a line must be to print.
scripts/__tests__/enso-plugin.test.ts #838 The enso plugin’s own rules in-process (#838): oxc parses each case into the ESTree oxlint hands a JS plugin, and the rule’s visitors run here, so coverage sees them.
scripts/__tests__/feature-model.test.ts #437 The scripted model the Features screenshots run against (#437), driven over Requests: which thread’s queue a request takes from, what an auxiliary call and a request past the script get, the Anthropic stream a reply is framed as, and the cache usage derived from the requests.
scripts/__tests__/feature-screenshots.test.ts #437, #838 bun run docs:screenshots (#437), the parts that need no browser (#838): the command line, which features a run captures, a region shot’s crop, what a mark is called, which shots the session takes at each stop, and the throwaway home and project it runs in.
scripts/__tests__/health-full.test.ts #825, #838 bun run health:full (#825) reads fallow’s JSON checked: a changed shape throws rather than reporting a zero, and the CRAP line counts only real scores at or over the threshold (#838).
scripts/__tests__/judge-corpus.test.ts #469, #534 The transcript corpora as replay cases (#469, #534): Claude Code’s and omp’s refusals become the judge’s after-refusal cases, omp’s own format is otherwise read as it is, and the ACME tree is never opened.
scripts/__tests__/pi-version-parity.test.ts #69, #217 THE TWO PI RESOLUTIONS, HELD TOGETHER (#217).
scripts/__tests__/refresh-fences.test.ts #168, #838 bun scripts/docs/refresh-fences.ts <page> (#168): the repair tool for the docs gate’s sourced fences and generated blocks.
scripts/__tests__/review-pr.test.ts #981 The workflow’s job if: and its scope step, as one rule (#981).
scripts/__tests__/review-worker.test.ts #981 ⚠ THE POLL REVIEWS WHAT CHANGED, NOT WHAT IS OPEN (#981).
scripts/__tests__/review-workflow-config.test.ts #981 ⚠ THE LOCAL REVIEWER IS CONFIGURED BY THE REAL WORKFLOW (#981).
scripts/__tests__/site-content.test.ts #188, #838 bun scripts/docs/site-content.ts (#188) over a tree of the test’s own (#838): what the site’s content directory holds after a projection — every page, titled from its H1; a README as its section’s index; a derived index for a section without one; the images and nothing else; the repository README; the landing’s feature map — and nothing left from before.
scripts/check-coverage.ts #49, #118, #234, #838 The TOTAL coverage floor — the gate that bunfig.toml cannot express.
scripts/check-crap.ts #826, #844 Gate step crap (#844): no function at CRAP ≥ 30 outside its pin.
scripts/corpus-shapes.ts #534, #544 The corpus report’s measurements (#534), as pure functions over bash commands and branches, so bun run corpus prints them and a test holds the constructs they name to the bypass shapes the guards know.
scripts/coverage-istanbul.ts #826, #838 Bun’s line coverage as an Istanbul coverage map, so fallow scores CRAP from measured coverage (#826).
scripts/docs/build-docs.ts #482 Builds every docs page that is BUILD OUTPUT (#482): the reference pages each generator prints and the flow pages flow-pages.ts assembles.
scripts/docs/core-exports.ts #170 Generates docs/reference/core-exports.md (#170): the public core barrel and the node-only logging subpath, with their defining declarations and production importers.
scripts/docs/decisions.ts #170 Generates docs/reference/decisions.md (#170): one row for each owned source file whose first comment/header block cites an issue.
scripts/docs/env-and-config.ts #170 Generates docs/reference/env-and-config.md (#170): the explicit environment boundary, the composed EnsoConfig shape, every .enso/ path assembled by core, and the harness manifest resources.
scripts/docs/extract-declaration.ts #168 The docs gate’s one primitive (#168): a top-level declaration, by name, whole.
scripts/docs/feature-model.ts #437 A stand-in for Anthropic’s Messages API that plays a scripted conversation (#437).
scripts/docs/feature-pages.ts #482 Builds docs/features/<id>.md for every feature spec (#482): BUILD OUTPUT, gitignored, written by bun run docs:build and the site build.
scripts/docs/feature-screenshots.ts #404, #437, #482 Captures the Features screenshots (#437) into docs/features/images/.
scripts/docs/feature-session.ts #437 The session the Features screenshots are taken from (#437): a small project, four prompts, and what the model answers to each.
scripts/docs/features/index.ts #482 Every Features page, each built from its spec (#482).
scripts/docs/features/landing.ts #504 The feature map on the site’s landing page (site/src/pages/index.astro, #504): four groups, each an editorial heading over the Features pages it links, in reading order.
scripts/docs/features/permission-modes.ts #496 The extension that sets the mode and answers auto’s asks (#496).
scripts/docs/features/questions-and-dialogs.ts #114 Questions and dialogs (#114): the demo session’s questionnaire, then the permission engine’s prompt, each while pi waits.
scripts/docs/features/spec.ts #482 A Features page as data (#482): the words, next to the capture steps that prove them.
scripts/docs/features/thread-trees.ts #551, #571, #573, #578 Thread trees (#551, #571, #573, #578): the demo thread runs in its own worktree, as every new thread does by default.
scripts/docs/flow-diagrams.ts #188 Generates docs/reference/flows.md (#188): the control plane and the observation pipeline as Mermaid, drawn from the SAME discovery the reference tables use.
scripts/docs/flow-pages.ts #482 Builds a docs/flows/<id>.md page for every @flow in source (#482).
scripts/docs/flow-tags.ts #482 What a flow page is built from (#482): tags in source comments and the diagrams tests record.
scripts/docs/gate-source.ts #170, #262 Reading a declared constant back out of a gate’s source (#170, split out on #262).
scripts/docs/generator-support.ts #174 What every generator under scripts/docs/ shares (#174): the exhaustiveness check that makes a metadata table refuse to be stale, and the one way a generator runs — its page to stdout, or one name: reason line to stderr and a non-zero exit, never a partial page.
scripts/docs/inventory/env-and-config.ts #170, #593 The checked metadata scripts/docs/env-and-config.ts renders (#170): the prose source cannot supply (purpose, default, phase, writer, lifetime) for every environment read, config field and runtime path its detectors find.
scripts/docs/ported-provenance.ts #168 Generates docs/seams/ported-provenance.md (#168): one row per file under components/ai-elements/ — the upstream path and commit its header names, and the Modified — line that follows.
scripts/docs/refresh-fences.ts #162, #168 Refreshes every sourced fence in a page from the source it names (#168): the authoring and repair tool for test/docs-gate.test.ts.
scripts/docs/seams-table.ts #162, #167, #213 Generates the seams table (#162 workstream 11, #167 item 4) — the block docs/architecture.md embeds between <!-- generated-block: … --> markers.
scripts/docs/site-base.ts #188, #506 The path the documentation site is served under — ONE value, read by three readers (#188).
scripts/docs/site-content.ts #188, #213 Projects docs/ into the Starlight site’s content collection (#188).
scripts/docs/site-links.ts #188 Every internal link in the BUILT site resolves to something the site serves (#188).
scripts/docs/source-citations.ts #482 SOURCE CITATIONS IN THE HAND-WRITTEN DOCS (#482): path#Name in a code span, never a line number.
scripts/docs/source-comments.ts #482 Every comment in a source file, with what it is about, taken from the TypeScript syntax tree (#482): the docs builders read comments the way the compiler does, never by matching text.
scripts/docs/source-constants.ts #482 A top-level constant’s VALUE, read out of a source file with the TypeScript parser (#482).
scripts/docs/touched-comments.ts #482 The comments a pull request has to answer for (#482): every comment whose own lines it changed, and every comment on a declaration it changed, found from git diff and the TypeScript syntax tree (source-comments.ts).
scripts/docs/verification-inventory.ts #170, #262 Generates docs/reference/verification-inventory.md (#170): enforcement gates, the numeric and count ratchets they carry, and the deliberately reusable test doubles.
scripts/enso-corpus.ts #534 The transcript corpus report (#534): the bash commands the user’s own agents ran — Claude Code’s transcripts and omp’s sessions, read from disk — by shape, by the constructs that hide a program, by what followed a refusal, and by the bypass shapes a spelling check could catch.
scripts/enso-eval.ts #441 A thread’s session eval (#441), from the running server’s GET /api/threads/:id/eval.
scripts/enso-incidents.ts #189, #468, #557 The security incidents (#468, phase 5 of #189), from the running server’s GET /api/threads/:id/incidents.
scripts/enso-judge.ts #469 The command judge’s real-session replay (#469): from the running server’s GET /api/threads/:id/judge-cases, or from the user’s own Claude Code / omp transcripts on disk (--from claude|omp, judge-corpus.ts).
scripts/enso-launch.ts #221, #953 The terminal launcher’s decisions, apart from the launch (enso.ts spawns; this decides): the isolation triple as pi’s arguments and the print-run trigger.
scripts/enso-logs.ts #132 See the log (#132): the day’s file, rendered the way the terminal renders it live.
scripts/enso-thread.ts #86, #97 Inspect the live web server’s threads from a shell — the agent’s half of #86.
scripts/enso.ts #20, #217, #446, #496 Launch a VANILLA pi with only Enso loaded.
scripts/gate.ts #188, #208, #257, #263, #342, #482, #593, #594, #595, #745, #747, #826, #844 Ported from slop-factory’s bun example (examples/bun/scripts/gate.ts) — the shape is deliberately identical so improvements travel in either direction.
scripts/health-full.ts #825, #838 Fallow with its exemptions off: the whole picture, for reading, never a gate (#825).
scripts/judge-corpus.ts #469, #534 The user’s own agent transcripts as the command judge’s replay corpus (#469, and #534’s data): Claude Code’s (~/.claude/projects) and omp’s (~/.omp/agent/sessions), read from disk, built into cases by core’s own selection and state builder — the live guard’s.
scripts/link-vendor-packages.ts #30 Ensure the vendor pi packages exist inside the harness package’s own node_modules.
scripts/lint/enso-plugin.ts #592 This repository’s oxlint plugin, registered in oxlint.config.ts as enso.
scripts/lint/process-environment.ts #89 The environment boundary (#89): every file allowed to read the real process environment.
scripts/print-harness.ts #9, #13, #20, #496 The PRINT-MODE harness variant (#20, #496): the Enso package minus the permission engine (@gotgenes/pi-permission-system).
scripts/review/app-token.ts #981, #989 The identity the local reviewer posts as: a GitHub App the owner created for it (#981), instead of the owner’s own gh login.
scripts/review/review-notify.ts #981 Tells the local review worker a pull request has something new to review (#981).
scripts/review/review-paths.ts #981, #993 Where the local reviewer keeps its state (#981), named once.
scripts/review/review-pr.ts #981, #989 The PR review, run on this machine instead of on GitHub’s runners (#981), configured by the workflow that runs it on GitHub (.github/workflows/claude-pr-review.yml, read by workflow-config.ts), so the two reviews are one review.
scripts/review/review-queue.ts #981 The local review queue (#981): a directory with one empty file per pull request number waiting for review.
scripts/review/review-status.ts #981 What the local review worker is doing, in one look (#981).
scripts/review/review-worker.ts #981 The local review worker (#981): reviews pull requests as they change, one at a time, with review-pr.ts, until stopped.
scripts/review/tool-grant-hook.ts #981 The PR reviewer’s tool grant, enforced as a Claude Code PreToolUse hook (#981).
scripts/review/workflow-config.ts #981 The PR reviewer’s configuration, read from the one place it is written: the GitHub workflow .github/workflows/claude-pr-review.yml (#981).
scripts/server-cli.ts #468, #469, #832, #838 What the CLIs that read the running server share (bun run incidents, #468; bun run judge, #469): a usage error the caller turns into exit 2, the whole-number flag every threshold and count takes, a route’s JSON, the stored-thread listing a CLI reads when no thread is named, the output a CLI’s run writes to (#832), and the one catch incidents and judge run under (#838).
scripts/source-tree.ts #162, #174 The one walk over the source tree (#174, #162 workstream 6: one walker per gate family).
test/api-group-gate.test.ts #188 THE API PAGE IS ORGANISED BY SEAM, AND THAT ORGANISATION IS HELD (#188).
test/browser-bundle-gate.test.ts #211 The browser zone must bundle for the browser (#211).
test/check-coverage.test.ts #53 The coverage GATE’s own arithmetic (#53 S2).
test/code-offenders.test.ts #162 The allowlist is the leak inventory (#162 workstream 4): a row hides a file’s matches, and a row for a file with no matches is drift and is reported.
test/complexity-ratchet.test.ts #264 Re-measures the cognitive-complexity pins, per FUNCTION (#264).
test/decisions.test.ts #170, #832 WHAT COUNTS AS A DECISION HEADER, AND WHICH SENTENCE IS THE DECISION (#170, #832).
test/dependency-gate.test.ts #218, #223 What the dependency manifests claim, held against what the code actually imports (#218, #223).
test/docs-gate.test.ts #162, #167, #168, #258 The docs cannot drift (#168, goals §3.3): a page either quotes source and is checked against it, or is generated from source and is diffed against it.
test/duplicate-shapes-gate.test.ts #53, #174, #255 One place for every shape: no TypeBox schema is declared outside @enso/core (#53, #255) — no exception.
test/e2e-selectors.test.ts #116, #277 THE E2E SELECTOR CONTRACT (#277).
test/fallow-config.test.ts #163 fallow’s entry list cannot drift from the harness manifest (#163).
test/feature-pages.test.ts #482 A FEATURES PAGE IS BUILT ONLY FROM FACTS ITS SPEC STILL MATCHES (#482).
test/features-gate.test.ts #277, #437, #482 THE FEATURES PAGES DESCRIBE A UI THAT EXISTS (#437).
test/flow-pages.test.ts #482 FLOW PAGES ARE BUILT FROM TAGS, AND THE TAGS MUST AGREE (#482).
test/gate-abort.test.ts #157 The gate’s blind spot, closed (#157): a tool that dies mid-run and still exits 0.
test/gate-support.ts #150, #162, #165, #174 What the source-tree gates share (#165, #162 workstream 6): the word-splitter, the sequence matcher, the comment skip, over the one walker (scripts/source-tree.ts, #174).
test/glossary-doc.test.ts #161, #164, #165, #245 The glossary keeps its own three rules (#161, PR #164 review; #245).
test/glossary-gate.test.ts #165, #241, #257, #287 The glossary’s Retired table, applied to the source tree (#165, docs/glossary.md → Retired).
test/harness-barrel-gate.test.ts #173, #251, #263 THE HARNESS BARREL IS ITS CONSUMPTION, AND THAT IS CHECKED (#263).
test/logging-gate.test.ts #132, #162, #254 Every record goes through the one logger (#132), and the substrate stays behind it.
test/mermaid-gate.test.ts #188 EVERY DIAGRAM IN THE DOCS PARSES (#188).
test/naming-gate.test.ts #82, #83, #250, #592 The naming gate’s exemption for externally-fixed KEYS (#82, PR #83 review), and the severity that decides whether a tier blocks (#250) or merely mentions.
test/no-lint-suppressions.test.ts #82 The gate may not be talked out of, one line at a time.
test/observations.test.ts #162, #832 WHAT THE OBSERVATION INVENTORY SAYS THE ADAPTER EMITS (#162 workstream 5, #832).
test/presentation-gate.test.ts #31, #121, #174, #253, #747 Presentation stays presentation (#121 item 4, #31).
test/real-host-gate.test.ts #474, #513, #518 Only agent-host.test.ts builds real hosts (#518).
test/scratch-gate.test.ts #546 The temporary directories a test run makes are gone when it ends (#546).
test/scratch-preload.ts #546, #549, #551, #586, #790, #912 One scratch directory per test run, removed when the run ends (#546).
test/scripts-extensions.test.ts #269, #308 scripts/ is TypeScript, with nothing left to except (#269, #308).
test/secret-scan-gate.test.ts #209 The range .github/workflows/secret-scan.yml hands gitleaks is the coverage of the only gate that stops a committed secret, so it is asserted here rather than read (#209).
test/site-gate.test.ts #188, #213 THE SITE IS A PROJECTION OF docs/, AND THE PROJECTION IS TOTAL (#188).
test/source-citation-gate.test.ts #482 A HAND-WRITTEN PAGE POINTS AT CODE BY DECLARATION, AND EVERY POINTER HOLDS (#482).
test/source-comments.test.ts #482, #488 WHICH DECLARATION A COMMENT IS ABOUT, FROM THE SYNTAX TREE (#482, PR #488 review).
test/source-constants.test.ts #482 A docs page quotes a constant another zone owns by reading its source (#482).
test/touched-comments.test.ts #482 WHICH COMMENTS A DIFF PUTS AT RISK (#482).
test/vendor-gate.test.ts #69, #145, #150, #165, #173, #215 The seam has an owner: only the host and the pi extensions may name the vendor (#145).
test/verification-inventory.test.ts #174, #832 THE INVENTORY’S READERS, ON THE SHAPES THE REPOSITORY DOES NOT HOLD TODAY (#174, #832).

Parser limit. The parser considers the first block or contiguous line comment beginning within the first 80 lines of TypeScript/JavaScript source under packages/, scripts/, and test/. It skips generated type output, dependencies, coverage output, and vendored web components. Sentence reduction uses the first ., !, or ?, optionally followed by closing quotes/brackets and then whitespace or the end of the header; a qualifying header that does not fit that current source shape is emitted as UNCLASSIFIED and makes generation fail.