internal/

directory
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2026 License: Apache-2.0

Directories

Path Synopsis
Package approval is the consent policy for the v3 session agent: one pure function from a tool call to allow, prompt or deny.
Package approval is the consent policy for the v3 session agent: one pure function from a tool call to allow, prompt or deny.
Package buildinfo names the source and moment that produced this codeaf.
Package buildinfo names the source and moment that produced this codeaf.
Package cachedir owns the one directory under codeaf's state root that holds nothing but caches: ~/.codeaf/cache, where every task worker's toolchain caches live (internal/exec's sweCacheRoot puts go-mod, go-build, cargo, npm and pip under it).
Package cachedir owns the one directory under codeaf's state root that holds nothing but caches: ~/.codeaf/cache, where every task worker's toolchain caches live (internal/exec's sweCacheRoot puts go-mod, go-build, cargo, npm and pip under it).
Package calllog is codeaf's always-on record of the model calls it makes.
Package calllog is codeaf's always-on record of the model calls it makes.
Package callrows reads the model-call log this build always writes (`~/.codeaf/logs/calls.jsonl`, internal/calllog) back into rows.
Package callrows reads the model-call log this build always writes (`~/.codeaf/logs/calls.jsonl`, internal/calllog) back into rows.
Package cas stores immutable blobs by their SHA-256 digest.
Package cas stores immutable blobs by their SHA-256 digest.
Package catalog owns OpenRouter model discovery across every modality.
Package catalog owns OpenRouter model discovery across every modality.
ci
Package ci holds the laws about the repository's own gate — the tests that read .github and the Makefile rather than the product, and refuse the shapes that let dev go red unseen on 2026-09-02 (#372).
Package ci holds the laws about the repository's own gate — the tests that read .github and the Makefile rather than the product, and refuse the shapes that let dev go red unseen on 2026-09-02 (#372).
cmd/testreport command
testreport
Package testreport turns go test's JSON event stream into a durable timing report.
Package testreport turns go test's JSON event stream into a durable timing report.
Package config holds the harness's process-wide defaults.
Package config holds the harness's process-wide defaults.
Package connect is the accounts layer: it holds the keys that let codeaf act on a person's own SaaS accounts — their mail, their calendar — and hands the rest of the program one ready, self-refreshing http.Client per account.
Package connect is the accounts layer: it holds the keys that let codeaf act on a person's own SaaS accounts — their mail, their calendar — and hands the rest of the program one ready, self-refreshing http.Client per account.
ampcatalog
Package ampcatalog is codeaf's own copy of the parts of the amp-labs provider catalog that this program reads.
Package ampcatalog is codeaf's own copy of the parts of the amp-labs provider catalog that this program reads.
ampcatalog/gen command
Command gen writes internal/connect/ampcatalog/providers.json from the amp-labs catalog.
Command gen writes internal/connect/ampcatalog/providers.json from the amp-labs catalog.
Package consent is the price before the purchase.
Package consent is the price before the purchase.
Package craft is codeaf's learned know-how: workflows, skills, verifiers, and exemplars, versioned in a git repository the resident owns.
Package craft is codeaf's learned know-how: workflows, skills, verifiers, and exemplars, versioned in a git repository the resident owns.
Package crewpick picks one model per seat for a three-seat crew by reading the pareto front of expected task bill against crew quality.
Package crewpick picks one model per seat for a three-seat crew by reading the pareto front of expected task bill against crew quality.
Package ctxbudget is the one place that turns a model's context window into byte and token budgets.
Package ctxbudget is the one place that turns a model's context window into byte and token budgets.
Package effort is the reasoning-depth ladder: five named rungs, one resolver, and nothing else.
Package effort is the reasoning-depth ladder: five named rungs, one resolver, and nothing else.
Package enginehost is the process that keeps a conversation alive between connections.
Package enginehost is the process that keeps a conversation alive between connections.
Package env is the one door for environment variables owned by codeaf.
Package env is the one door for environment variables owned by codeaf.
Package exec runs the leaves of a plan.
Package exec runs the leaves of a plan.
bare
Package bare — edit matching logic, pinned to pi's edit-diff.js.
Package bare — edit matching logic, pinned to pi's edit-diff.js.
Package filedoor is the loopback door: a 127.0.0.1 HTTP listener, owned by one chat surface, that turns files on the FAR machine into things this machine's own programs can open — a browser tab, cmd+click on an OSC 8 link, the platform opener.
Package filedoor is the loopback door: a 127.0.0.1 HTTP listener, owned by one chat surface, that turns files on the FAR machine into things this machine's own programs can open — a browser tab, cmd+click on an OSC 8 link, the platform opener.
Package filememo is the one answer to "a file read at most once per change".
Package filememo is the one answer to "a file read at most once per change".
Package furrow is codeaf's seam onto `furrow`, a separate program codeaf carries inside itself (Agent-Field, Apache-2.0, https://github.com/Agent-Field/furrow).
Package furrow is codeaf's seam onto `furrow`, a separate program codeaf carries inside itself (Agent-Field, Apache-2.0, https://github.com/Agent-Field/furrow).
Package furrowbin carries furrow inside codeaf and puts it on disk the first time anything wants it.
Package furrowbin carries furrow inside codeaf and puts it on disk the first time anything wants it.
cmd/fetch command
Command fetch puts the pinned furrow release where `go:embed` will find it.
Command fetch puts the pinned furrow release where `go:embed` will find it.
Package fuzzy is the one quick-search scorer for every picker on the chat surface: fzf's FuzzyMatchV2 — a modified Smith-Waterman local alignment — with the corrections helix's nucleo documents for the same algorithm.
Package fuzzy is the one quick-search scorer for every picker on the chat surface: fzf's FuzzyMatchV2 — a modified Smith-Waterman local alignment — with the corrections helix's nucleo documents for the same algorithm.
Package guard is the one place a panic stops being fatal.
Package guard is the one place a panic stops being fatal.
Package head turns durable thread messages into immediate conversational replies and asynchronous graph commands.
Package head turns durable thread messages into immediate conversational replies and asynchronous graph commands.
Package history is the input-history store: the lines the person typed, kept across sessions so a surface can walk them back with the up arrow.
Package history is the input-history store: the lines the person typed, kept across sessions so a surface can walk them back with the up arrow.
Package home resolves the one directory codeaf owns: its state root.
Package home resolves the one directory codeaf owns: its state root.
Package jsrun is THE JavaScript runtime for subharnesses — one generic Go runner parameterized by a bundle.
Package jsrun is THE JavaScript runtime for subharnesses — one generic Go runner parameterized by a bundle.
Package lane is what this build believes about the machines behind a model.
Package lane is what this build believes about the machines behind a model.
control
Package control decides WHEN a wait has gone on long enough to act on, and it is the only thing in this build that decides that.
Package control decides WHEN a wait has gone on long enough to act on, and it is the only thing in this build that decides that.
lanestub
Package lanestub is a fake router with lanes of a scripted speed: the shared measuring instrument for everything in `internal/lane`.
Package lanestub is a fake router with lanes of a scripted speed: the shared measuring instrument for everything in `internal/lane`.
Package lease elects the one process currently serving as a resident for a durable codeaf store.
Package lease elects the one process currently serving as a resident for a durable codeaf store.
Package leave is the one road out of a process somebody outside it asked to stop.
Package leave is the one road out of a process somebody outside it asked to stop.
Package manual is what codeaf knows about itself, embedded in the binary.
Package manual is what codeaf knows about itself, embedded in the binary.
asked
Package asked is the questions a STRANGER asks, and the page each one is about.
Package asked is the questions a STRANGER asks, and the page each one is about.
Package modelsource describes the places models come from without reading the machine or opening the network.
Package modelsource describes the places models come from without reading the machine or opening the network.
sourcestub
Package sourcestub provides a small OpenAI-shaped service for source-routing tests.
Package sourcestub provides a small OpenAI-shaped service for source-routing tests.
Package offpath holds the two shapes of work that must happen but must not happen HERE — on the path a person is waiting on.
Package offpath holds the two shapes of work that must happen but must not happen HERE — on the path a person is waiting on.
Package openrouterauth connects a local codeaf profile to OpenRouter without asking the person to make and copy an API key by hand.
Package openrouterauth connects a local codeaf profile to OpenRouter without asking the person to make and copy an API key by hand.
Package orchestrate is the adaptive runner: a planner model and a frontier scheduler, married.
Package orchestrate is the adaptive runner: a planner model and a frontier scheduler, married.
Package orientation builds a compact repo digest that a leaf's first prompt carries so orientation costs zero turns: a bounded directory tree, code-file declaration/signature outlines (NOT bodies), test-file names, and — when the run already knows it — the failing-test summary.
Package orientation builds a compact repo digest that a leaf's first prompt carries so orientation costs zero turns: a bounded directory tree, code-file declaration/signature outlines (NOT bodies), test-file names, and — when the run already knows it — the failing-test summary.
Package packed ships a folder of embedded text compressed, and unpacks it on the first read.
Package packed ships a folder of embedded text compressed, and unpacks it on the first read.
cmd/pack command
Command pack writes the archive a packed corpus ships as.
Command pack writes the archive a packed corpus ships as.
Package pair is how two machines come to trust each other without ssh, and the encrypted tunnel they talk through afterwards.
Package pair is how two machines come to trust each other without ssh, and the encrypted tunnel they talk through afterwards.
cpace
Package cpace implements the CPace password authenticated key exchange (PAKE) instantiated with the ristretto255 group.
Package cpace implements the CPace password authenticated key exchange (PAKE) instantiated with the ristretto255 group.
Package patch is the exact-match text editor behind `codeaf patch`: one old text in, the file with its single occurrence replaced out.
Package patch is the exact-match text editor behind `codeaf patch`: one old text in, the file with its single occurrence replaced out.
Package paymentrefusal recognises the narrow response shape that proves a key authenticated but its account cannot fund a request.
Package paymentrefusal recognises the narrow response shape that proves a key authenticated but its account cannot fund a request.
Package pdfx is the LOCAL RUNG of the document ladder: PDF text, extracted in this process, out of this binary, with no service to call and nothing to install.
Package pdfx is the LOCAL RUNG of the document ladder: PDF text, extracted in this process, out of this binary, with no service to call and nothing to install.
Package plan builds and revises the task graph for a goal.
Package plan builds and revises the task graph for a goal.
pool
index
Package index reads a schema-versioned JSON document of per-model measurements into a value every reader in a process can share.
Package index reads a schema-versioned JSON document of per-model measurements into a value every reader in a process can share.
index/cmd/seedgen command
Command seedgen regenerates the seed index the binary carries from the live relay.
Command seedgen regenerates the seed index the binary carries from the live relay.
judge
Package judge scores a finished run seat by seat, independently of the crew that produced it.
Package judge scores a finished run seat by seat, independently of the crew that produced it.
outbox
Package outbox keeps small measurement rows in a local append-only file and hands them to a destination: an HTTP endpoint that takes newline-delimited JSON, or another file.
Package outbox keeps small measurement rows in a local append-only file and hands them to a destination: an HTTP endpoint that takes newline-delimited JSON, or another file.
poolcfg
Package poolcfg resolves how the measurement pool behaves from two stored settings — the mode word and the trusted key — and an environment handed in as a function.
Package poolcfg resolves how the measurement pool behaves from two stored settings — the mode word and the trusted key — and an environment handed in as a function.
poolkey
Package poolkey is the one place the binary's trusted pool key lives.
Package poolkey is the one place the binary's trusted pool key lives.
pull
Package pull fetches a signed JSON document, checks its signature against keys it was handed, and keeps the last good copy on disk so that the next run has something to work with when the fetch does not go through.
Package pull fetches a signed JSON document, checks its signature against keys it was handed, and keeps the last good copy on disk so that the next run has something to work with when the fetch does not go through.
record
Package record turns a judge's seat scores into the two records an install keeps of them: additive cells in a tally sheet on disk, and one row per score in an outbox.
Package record turns a judge's seat scores into the two records an install keeps of them: additive cells in a tally sheet on disk, and one row per score in an outbox.
tally
Package tally keeps additive sufficient statistics for observations so that two sheets recorded on different machines can be merged by addition, in any order, and give the same answer as one sheet that saw everything.
Package tally keeps additive sufficient statistics for observations so that two sheets recorded on different machines can be merged by addition, in any order, and give the same answer as one sheet that saw everything.
Package profile records what tasks actually cost this model, and uses it to recalibrate the ruler the planner sizes tasks with.
Package profile records what tasks actually cost this model, and uses it to recalibrate the ruler the planner sizes tasks with.
Package provider is codeaf's model adapter: the one place in the process that speaks to an OpenAI-compatible endpoint.
Package provider is codeaf's model adapter: the one place in the process that speaks to an OpenAI-compatible endpoint.
pool
Package pool is the surface's provider seam: the model-switchable client a slot holds, the per-model clients a pinned job is served by, and the billing that makes every structuring call land on the same rail its leaves land on.
Package pool is the surface's provider seam: the model-switchable client a slot holds, the per-model clients a pinned job is served by, and the billing that makes every structuring call land on the same rail its leaves land on.
Package redact takes the SHAPE of a secret out of text before anything keeps it, shows it, or sends it to a model.
Package redact takes the SHAPE of a secret out of text before anything keeps it, shows it, or sends it to a model.
Package reflex is the per-turn tier's client: the small structured calls a conversation makes AROUND an exchange rather than in it.
Package reflex is the per-turn tier's client: the small structured calls a conversation makes AROUND an exchange rather than in it.
Package registry is the one command registry established by the August 2026 chat-rebuild audit's 5.22 (no longer in the tree; "Discoverability: no typed-only actions"): every action lives on a visible object, and typing is an accelerator, never the only door.
Package registry is the one command registry established by the August 2026 chat-rebuild audit's 5.22 (no longer in the tree; "Discoverability: no typed-only actions"): every action lives on a visible object, and typing is an accelerator, never the only door.
Package relay is the blind pipe between a machine that runs codeaf and a machine somebody is sitting at.
Package relay is the blind pipe between a machine that runs codeaf and a machine somebody is sitting at.
Package release tests the release workflow and installer as one public distribution surface.
Package release tests the release workflow and installer as one public distribution surface.
Package remote is the wire between a surface on one machine and an engine on another.
Package remote is the wire between a surface on one machine and an engine on another.
Banking: what an attempt that died on the clock hands to the one that takes over from it.
Banking: what an attempt that died on the clock hands to the one that takes over from it.
Package revision is the engine half of a job's second thoughts: the gate that decides whether a deliverable is done, the citation invariant that decides whether a named gap may buy more work, the judgements that decide who takes a retry and whether an exhausted leaf left anything behind, and the sentinel pass that edits a job's remaining plan in light of what just landed.
Package revision is the engine half of a job's second thoughts: the gate that decides whether a deliverable is done, the citation invariant that decides whether a named gap may buy more work, the judgements that decide who takes a retry and whether an exhausted leaf left anything behind, and the sentinel pass that edits a job's remaining plan in light of what just landed.
Package roles is the model-role registry: one name for every auxiliary LLM call the surface makes, and one rule for which model answers it.
Package roles is the model-role registry: one name for every auxiliary LLM call the surface makes, and one rule for which model answers it.
Package router turns one model into a panel of them.
Package router turns one model into a panel of them.
Package rtk puts a compressor between a leaf's shell and the work model's context.
Package rtk puts a compressor between a leaf's shell and the work model's context.
Package run is the run: one supervisor that launches every ready task of a plan store and owns the lifecycle from first dispatch to the root's completion.
Package run is the run: one supervisor that launches every ready task of a plan store and owns the lifecycle from first dispatch to the root's completion.
Package sanitize is the one output chokepoint for terminal-unsafe text (the August 2026 chat-rebuild audit, no longer in the tree, Part 10.2 items 6-7).
Package sanitize is the one output chokepoint for terminal-unsafe text (the August 2026 chat-rebuild audit, no longer in the tree, Part 10.2 items 6-7).
Package search is the web-search layer the v3 session agent calls through: one Provider that answers a query with a list of links, one Fetcher that turns a link into readable text, and an OPEN registry that decides which implementation of each the surface actually gets.
Package search is the web-search layer the v3 session agent calls through: one Provider that answers a query with a list of links, one Fetcher that turns a link into readable text, and an OPEN registry that decides which implementation of each the surface actually gets.
artifacts.go is the global deliverables index (docs/CHAT-V3.md, Decision 26): one append-only JSONL file under the v3 home, one row per thing the harness produced FOR the person — a generated image, an export, a finished document.
artifacts.go is the global deliverables index (docs/CHAT-V3.md, Decision 26): one append-only JSONL file under the v3 home, one row per thing the harness produced FOR the person — a generated image, an export, a finished document.
Package shaped is the one place the harness asks a model for an answer of a stated shape and reads what comes back.
Package shaped is the one place the harness asks a model for an answer of a stated shape and reads what comes back.
Package splitgate is the enumeration evidence gate: does a piece of work name enough independent items for dividing it to beat one worker doing them in order?
Package splitgate is the enumeration evidence gate: does a piece of work name enough independent items for dividing it to beat one worker doing them in order?
Package standing is the ambient side of v3: the things a conversation leaves behind that keep working after the window is closed — a reminder, a watch, a rule, an overnight job — and the small, honest machinery that wakes them.
Package standing is the ambient side of v3: the things a conversation leaves behind that keep working after the window is closed — a reminder, a watch, a rule, an overnight job — and the small, honest machinery that wakes them.
Package store owns codeaf's durable, append-only task graph.
Package store owns codeaf's durable, append-only task graph.
Package subharness is the registry of node kinds a sub-harness is built from, and the durable home of the sub-harnesses themselves.
Package subharness is the registry of node kinds a sub-harness is built from, and the durable home of the sub-harnesses themselves.
prompts
Package prompts is where the designer's brief LIVES, as prose, so that the hardest writing in this system is edited as writing rather than as a builder full of Fprintf calls.
Package prompts is where the designer's brief LIVES, as prose, so that the hardest writing in this system is edited as writing rather than as a builder full of Fprintf calls.
Package substore is where subharness bundles live on disk.
Package substore is where subharness bundles live on disk.
Package taxonomy is the response boundary: the one place in this build that answers "what kind of failure was that?" and hands back what to do about it.
Package taxonomy is the response boundary: the one place in this build that answers "what kind of failure was that?" and hands back what to do about it.
Package telemetry implements codeaf's anonymous usage counting exactly as docs/TELEMETRY.md spells it: four typed events, an allowlisted property set, a local spool, and one deadline-bounded flush.
Package telemetry implements codeaf's anonymous usage counting exactly as docs/TELEMETRY.md spells it: four typed events, an allowlisted property set, a local spool, and one deadline-bounded flush.
Package thread owns the single door for durable conversation writes.
Package thread owns the single door for durable conversation writes.
Package trace is the record of everything one run did, kept only when somebody asked for it.
Package trace is the record of everything one run did, kept only when somebody asked for it.
tui2
modelui
Package modelui holds the words a model's name is spelled with.
Package modelui holds the words a model's name is spelled with.
prose
Package prose renders model-written markdown into styled terminal rows.
Package prose renders model-written markdown into styled terminal rows.
reltime
Package reltime is the one relative-time formatter in the product.
Package reltime is the one relative-time formatter in the product.
tokens
Package tokens is the shared token layer for the chat surfaces: the one place a colour, a glyph, or a formatted live cell is named.
Package tokens is the shared token layer for the chat surfaces: the one place a colour, a glyph, or a formatted live cell is named.
Package tui3 is the v3 chat surface in its first, linear form: a try-out door onto internal/session and nothing else.
Package tui3 is the v3 chat surface in its first, linear form: a try-out door onto internal/session and nothing else.
Package update finds, installs, and restarts onto codeaf releases.
Package update finds, installs, and restarts onto codeaf releases.
Package verify discovers the project-wide build and test entrypoints that form the session-end machine verification floor, runs one of them, and reads the failing test names out of what it printed.
Package verify discovers the project-wide build and test entrypoints that form the session-end machine verification floor, runs one of them, and reads the failing test names out of what it printed.
Package video is the LOCAL half of codeaf's video work: the things done to files that already exist, on this machine, with ffmpeg — as against the renders bought from a provider a clip at a time (internal/session/tools_video.go).
Package video is the LOCAL half of codeaf's video work: the things done to files that already exist, on this machine, with ffmpeg — as against the renders bought from a provider a clip at a time (internal/session/tools_video.go).
Package watchdog keeps standing watches available when no codeaf terminal is open.
Package watchdog keeps standing watches available when no codeaf terminal is open.
Package wirelog counts what the surface actually puts on the wire.
Package wirelog counts what the surface actually puts on the wire.
Package workspace retains logical organization independently of the records it groups.
Package workspace retains logical organization independently of the records it groups.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL