nova

module
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT

README

Nova

A minimal, pi-and-crush-inspired agent harness in Go — built to be embedded in Go applications (her-go, polaris, ivy) or run standalone as a CLI/TUI.

Status: iterating. The initial build-out is finished: the agent loop, the core tools, sessions, compaction, config, the JSONL protocol, every mode (TUI, print, JSON, RPC, serve, the GitHub Action), the extension host and bundled extensions, two launch providers (OpenRouter and OpenCode Go), in-app login, release packaging, and nova update. Work now is making it better: bugs, TUI and UX polish, provider work, and hardening the framework. It is tracked as GitHub issues and done test-first (see Working on Nova).

What Nova is

One Go binary, nova, that is an agent harness. The same binary is:

  • an interactive coding agent in the terminal (a Bubble Tea TUI, modelled on crush);
  • a headless agent for scripts and CI (nova -p "…", --mode json);
  • a GitHub Action that reviews pull requests (nova action review);
  • a backend for a website or another program (--mode rpc on stdio, nova serve over HTTP);
  • a Go library another program can import.

Every one of those is a front door onto a single JSONL protocol (docs/PROTOCOL.md), so they share one implementation and one set of tests. The core stays small and grows by extension, in the spirit of pi: an extension is any program that speaks the protocol, installs from git, and can be written by Nova itself and loaded with /reload (docs/EXTENSIONS.md).

Build it two ways: go build ./cmd/nova for everything, or -tags notui for a minimal headless binary with no UI dependencies.

Layout

One module, github.com/AutumnsGrove/nova. The core never imports the UI; a check enforces it. See docs/ARCHITECTURE.md for the full tree and line budgets.

message/ media/ clipboard/ diag/ provider/ auth/ tool/ tools/
permission/ proto/ agent/ session/ compaction/ usage/ config/ mode/ ext/
update/ doctor/ testkit/                                        the backend (no UI dependencies)
bundled/                                                        in-tree extensions (use charm.land)
tui/                                                            the terminal UI (charm.land)
cmd/nova/  scripts/  assets/  examples/  docs/

Working on Nova

Work arrives as issues and is done test-first: write the failing test, make it pass, then run the gate.

make ci            # fmt, vet, build (full and -tags notui), race tests, import rules, solved-area guards
make test          # the fast loop: go test -short

AGENTS.md is the guide for anyone, human or agent, changing the code: how a change goes, the test-driven rules, the repo map, the hard rules, and the definition of done. CONTRIBUTING.md is the short version.

When something goes wrong

A crash never exits silently. On a panic Nova restores the terminal, prints a one-line error, and writes a report — the version, mode, model, last operation, and a full stack — to <config dir>/nova/crash.log (on macOS and Linux that is ~/.config/nova/crash.log). The path is printed with the error, nova doctor shows it, and nova log prints the most recent report (nova log --path prints the file). In the TUI, /log opens it in a dialog.

To record routine activity for a crash you are trying to reproduce, run with --debug or set NOVA_DEBUG=1; traces go to <config dir>/nova/debug.log.

North star

One day, a full coding harness on par with pi — our own, same principles. It is reached in two pieces: the backend grows into a complete primitive layer (loop, tools, sessions, compaction, extensions), and the frontend grows into a polished daily coding agent on the charm.land stack. Any Go program can embed the backend; only the frontend pays for the UI. examples/embed/ is a standalone, tested program that does exactly that.

Why

her-go, polaris, and ivy each implement (or are about to implement) the same agentic substrate: an LLM tool-calling loop, a tool registry, tool descriptions, session/context management, and streaming. her-go already extracted a shared agent_engine; polaris has a large bespoke research loop; ivy's "Ask Ivy" loop is planned but unbuilt. Nova is that substrate, factored out once, so a new Go program can add an agent loop by importing a package instead of recreating the wheel.

Documents

Document Contents
docs/PLAN.md Vision, goals, principles, and the roadmap.
docs/DECISIONS.md Every locked decision, with rationale and what was rejected.
docs/ARCHITECTURE.md Layout, layers, core types, the loop, sessions, modes.
docs/PROTOCOL.md The one JSONL protocol every front door speaks.
docs/EXTENSIONS.md Extension tiers, manifest, install over git, bundled and suggested extensions.
docs/TUI.md The terminal UI: stack, layout, components, themes, splash.
docs/IDE.md Proposal: a graphical IDE front door, the protocol additions it needs, and a milestone plan.
docs/IMAGE.md Images: the content part, where it is legal on the wire, normalization and bounds, every front door, inline TUI rendering.
docs/TESTING.md Test layers, the failure-mode catalog, the matrix rule, definition of done.
AGENTS.md The guide for working on Nova: workflow, test-driven rules, repo map, hard rules, definition of done.
CONTRIBUTING.md The short version for contributors.
CHANGELOG.md What changed, release by release.
docs/archive/ The finished build-out: the chunk specs (C00 to C23), each with a test matrix that still guards its area, the build plan, and the hand-off log.
docs/BRAND.md The two logo marks, the palette, and how to regenerate them.
docs/DESIGN.md The ecosystem survey and what we borrow from where.
docs/INTEGRATION.md How her-go, polaris, and ivy embed Nova.
docs/SPIKE.md Historical: what the early M0 prototype proved, and where its ideas live now.

Name

Nova — a star that suddenly brightens. Astral, short, and in the same family as polaris, her-go, and ivy. The module path is github.com/AutumnsGrove/nova.

Inspirations

Two projects shape Nova:

  • pi — the architecture. A small agent loop, hooks at every stage, a tool/provider extension model, a session tree, and a minimal core that grows rich through extension.
  • crush — the experience. A gorgeous, fast, keyboard-driven terminal agent built on the charm.land libraries. Nova uses the same stack for its frontend so the result feels as good as it works.

Lineage

Nova borrows deliberately:

  • from pi — the agent loop and hooks, the tool/provider extension model, the session tree, and the minimal-core philosophy;
  • from crush / charm.land — the terminal design language and the frontend stack (Bubble Tea, Lipgloss, Bubbles, Glamour, Log);
  • from her-go — the shared loop with lifecycle hooks, YAML tool manifests, continuation windows, and the OpenAI-compatible client shape;
  • from polaris — concurrent tool dispatch with panic isolation, pseudo tool-call recovery, and research nudges as hooks;
  • from ivy — the provider-as-chokepoint idea (its llm.Gate enforces policy, caps, and ledger as a provider decorator).

Directories

Path Synopsis
Package agent runs the tool-calling loop: request a completion, execute any tool calls, feed the results back, and repeat until the model answers, the turn budget runs out, the context is cancelled, or the provider fails.
Package agent runs the tool-calling loop: request a completion, execute any tool calls, feed the results back, and repeat until the model answers, the turn budget runs out, the context is cancelled, or the provider fails.
sub
Package sub runs child agent loops from a parent's configuration, so a program that embeds Nova can fan out sub-agents without writing the hard parts itself: a restricted tool view, isolated per-child state, event tagging, usage that folds back into the parent exactly once, depth and concurrency limits, and cancellation that follows the parent's context.
Package sub runs child agent loops from a parent's configuration, so a program that embeds Nova can fan out sub-agents without writing the hard parts itself: a restricted tool view, isolated per-child state, event tagging, usage that folds back into the parent exactly once, depth and concurrency limits, and cancellation that follows the parent's context.
assets
logo/gen command
Command gen writes the Nova logo as SVG files.
Command gen writes the Nova logo as SVG files.
Package auth implements OpenRouter's OAuth PKCE login and the small key store behind `nova login`.
Package auth implements OpenRouter's OAuth PKCE login and the small key store behind `nova login`.
opencode
Package opencode signs in to the OpenCode Console with the OAuth device grant and provisions a per-machine OpenCode Go API key.
Package opencode signs in to the OpenCode Console with the OAuth device grant and provisions a per-machine OpenCode Go API key.
providerauth
Package providerauth is a registry of interactive provider sign-in flows.
Package providerauth is a registry of interactive provider sign-in flows.
Package bundled collects the extensions Nova includes by default.
Package bundled collects the extensions Nova includes by default.
ask
Package ask is the bundled ask extension: a model-facing `ask` tool that presents a multi-question form and returns the answers as text.
Package ask is the bundled ask extension: a model-facing `ask` tool that presents a multi-question form and returns the answers as text.
plan
Package plan is the bundled plan-mode extension: a `/plan` toggle, a read-only guard, plan-mode instructions, and a `plan_submit` approval tool.
Package plan is the bundled plan-mode extension: a `/plan` toggle, a read-only guard, plan-mode instructions, and a `plan_submit` approval tool.
skills
Package skills embeds Nova's built-in skills.
Package skills embeds Nova's built-in skills.
subagent
Package subagent is the bundled subagent extension: a `subagent` tool that runs a fresh agent loop with a restricted tool set and returns its answer.
Package subagent is the bundled subagent extension: a `subagent` tool that runs a fresh agent loop with a restricted tool set and returns its answer.
webfetch
Package webfetch is the bundled web_fetch extension: a keyless HTTP GET that converts HTML to markdown.
Package webfetch is the bundled web_fetch extension: a keyless HTTP GET that converts HTML to markdown.
Package clipboard reads an image from the OS clipboard.
Package clipboard reads an image from the OS clipboard.
cmd
nova command
Command nova is the main entry point: it parses flags, loads configuration, and picks a mode (print, JSON, or RPC today; the TUI in C15).
Command nova is the main entry point: it parses flags, loads configuration, and picks a mode (print, JSON, or RPC today; the TUI in C15).
Package compaction keeps a long session inside the model's context window.
Package compaction keeps a long session inside the model's context window.
Package config loads Nova's settings and the resources that shape a session: project instructions, skills, and prompt templates.
Package config loads Nova's settings and the resources that shape a session: project instructions, skills, and prompt templates.
Package decide defines the contract for decision models: a request carries a shared state and a set of typed questions, evaluated in parallel and in isolation, and returns typed answers with calibrated probabilities.
Package decide defines the contract for decision models: a request carries a shared state and a set of typed questions, evaluated in parallel and in isolation, and returns typed answers with calibrated probabilities.
openrouter
Package openrouter implements decide.Decider over OpenRouter's decision surfaces.
Package openrouter implements decide.Decider over OpenRouter's decision surfaces.
Package diag records crash reports and optional routine debug traces.
Package diag records crash reports and optional routine debug traces.
Package docs embeds Nova's markdown documentation so `nova docs` can print it without shipping the source tree.
Package docs embeds Nova's markdown documentation so `nova docs` can print it without shipping the source tree.
Package doctor runs the installation checks behind `nova doctor`.
Package doctor runs the installation checks behind `nova doctor`.
Package embed defines the contract for embeddings: text in, vectors out, with the cost and provenance of the call.
Package embed defines the contract for embeddings: text in, vectors out, with the cost and provenance of the call.
ollama
Package ollama implements embed.Embedder against a local Ollama instance: POST /api/embed, which takes a batch and returns one embedding per input.
Package ollama implements embed.Embedder against a local Ollama instance: POST /api/embed, which takes a batch and returns one embedding per input.
openai
Package openai implements embed.Embedder over an OpenAI-compatible embeddings endpoint: POST {base}/embeddings.
Package openai implements embed.Embedder over an OpenAI-compatible embeddings endpoint: POST {base}/embeddings.
openrouter
Package openrouter is the OpenRouter preset for embed.Embedder: one client that embeds through the OpenAI-compatible endpoint and reads the live embeddings roster.
Package openrouter is the OpenRouter preset for embed.Embedder: one client that embeds through the OpenAI-compatible endpoint and reads the live embeddings roster.
Package examples embeds the example extensions so `nova docs` can print them without the source tree.
Package examples embeds the example extensions so `nova docs` can print them without the source tree.
embed command
Command embed is a standalone program that uses Nova as a library: it imports the harness layer only (agent, tool, provider, message, proto) and none of the application shell (mode, config, session, tui, bundled).
Command embed is a standalone program that uses Nova as a library: it imports the harness layer only (agent, tool, provider, message, proto) and none of the application shell (mode, config, session, tui, bundled).
extensions/ask-demo command
Command ask-demo asks the user for a choice and a note.
Command ask-demo asks the user for a choice and a note.
extensions/clock-widget command
Command clock-widget shows the current time in a text widget.
Command clock-widget shows the current time in a text widget.
extensions/hello-go command
Command hello-go is the SDK example: the smallest useful Nova extension.
Command hello-go is the SDK example: the smallest useful Nova extension.
extensions/path-guard command
Command path-guard blocks write and edit calls that leave the working directory.
Command path-guard blocks write and edit calls that leave the working directory.
extensions/session-notes command
Command session-notes keeps notes in session entries.
Command session-notes keeps notes in session entries.
extensions/status-segment command
Command status-segment shows a turn counter in the footer.
Command status-segment shows a turn counter in the footer.
extensions/summarize command
Command summarize summarizes text with a nested model call.
Command summarize summarizes text with a nested model call.
extensions/todo-like-sdk command
Command todo-like-sdk is a subprocess port of the bundled tasks extension, built on the Go SDK.
Command todo-like-sdk is a subprocess port of the bundled tasks extension, built on the Go SDK.
extensions/web-search command
The adapter seam: everything a real provider has to supply lives in this file.
The adapter seam: everything a real provider has to supply lives in this file.
ext
Package ext runs third-party extensions as subprocesses speaking the Nova protocol.
Package ext runs third-party extensions as subprocesses speaking the Nova protocol.
install
Package install installs, updates, removes and lists extensions from git repositories or local directories, and pins what it installed in a lockfile.
Package install installs, updates, removes and lists extensions from git repositories or local directories, and pins what it installed in a lockfile.
sdk
Package sdk is the Go SDK for writing a Nova subprocess extension.
Package sdk is the Go SDK for writing a Nova subprocess extension.
Package media normalizes image bytes on their way into the transcript.
Package media normalizes image bytes on their way into the transcript.
Package message defines the conversation transcript types shared by the agent loop, provider layer, and tools.
Package message defines the conversation transcript types shared by the agent loop, provider layer, and tools.
Package mode is the server core and the transports on top of it.
Package mode is the server core and the transports on top of it.
attach
Package attach turns protocol attachments into transcript content.
Package attach turns protocol attachments into transcript content.
providers
Package providers builds the cross-provider router Nova serves: OpenRouter and OpenCode Go, with each request routed to the provider its model names.
Package providers builds the cross-provider router Nova serves: OpenRouter and OpenCode Go, with each request routed to the provider its model names.
serve
Package serve exposes a mode.Server over HTTP and server-sent events.
Package serve exposes a mode.Server over HTTP and server-sent events.
Package permission decides what happens to a tool call: it runs, it asks the user, or it is denied.
Package permission decides what happens to a tool call: it runs, it asks the user, or it is denied.
Package proc holds the process-group primitives that the bash tool and the extension host share: start a command in its own group, signal the whole group, and read how a command ended.
Package proc holds the process-group primitives that the bash tool and the extension host share: start a command in its own group, signal the whole group, and read how a command ended.
Package proto defines the wire types and JSONL framing for Nova's single protocol.
Package proto defines the wire types and JSONL framing for Nova's single protocol.
Package provider defines the model-provider contract and the registry that lets applications plug in new providers.
Package provider defines the model-provider contract and the registry that lets applications plug in new providers.
messages
Package messages implements the Anthropic Messages API with streaming and tool use.
Package messages implements the Anthropic Messages API with streaming and tool use.
openaicompat
Package openaicompat implements the OpenAI chat-completions API with streaming and function/tool calling.
Package openaicompat implements the OpenAI chat-completions API with streaming and function/tool calling.
opencodego
Package opencodego is the OpenCode Go preset: one provider that sends each model to the wire dialect its endpoint uses (chat completions, Responses, or Messages), with a code-defined catalog and a live model overlay.
Package opencodego is the OpenCode Go preset: one provider that sends each model to the wire dialect its endpoint uses (chat completions, Responses, or Messages), with a code-defined catalog and a live model overlay.
openrouter
Package openrouter provides an OpenRouter preset over the OpenAI-compatible provider.
Package openrouter provides an OpenRouter preset over the OpenAI-compatible provider.
responses
Package responses implements the OpenAI Responses API with streaming and function calling.
Package responses implements the OpenAI Responses API with streaming and function calling.
ssestream
Package ssestream is the shared POST + Server-Sent Events transport for every streaming dialect: chat-completions (openaicompat), Responses, and Messages.
Package ssestream is the shared POST + Server-Sent Events transport for every streaming dialect: chat-completions (openaicompat), Responses, and Messages.
Package roles resolves an application role name to a model chain and runs one attempt per model under the role's timeout.
Package roles resolves an application role name to a model chain and runs one attempt per model under the role's timeout.
scripts
accept command
Command accept is the definition of done for a chunk.
Command accept is the definition of done for a chunk.
importcheck command
Command importcheck enforces three architectural rules the compiler cannot: the layer rules in ARCHITECTURE.md section 2, the UI import boundary, and the dependency allow-list (D46).
Command importcheck enforces three architectural rules the compiler cannot: the layer rules in ARCHITECTURE.md section 2, the UI import boundary, and the dependency allow-list (D46).
linecount command
Command linecount enforces the per-package line budgets in a chunk spec.
Command linecount enforces the per-package line budgets in a chunk spec.
matrixcheck command
Command matrixcheck proves that every row of a chunk spec's matrix has a test, and that no test cites a row the spec does not define.
Command matrixcheck proves that every row of a chunk spec's matrix has a test, and that no test cites a row the spec does not define.
spec
Package spec parses Nova chunk specifications: the YAML front matter and the matrix tables that define the acceptance criteria for a chunk.
Package spec parses Nova chunk specifications: the YAML front matter and the matrix tables that define the acceptance criteria for a chunk.
Package session stores a conversation as an append-only JSONL tree with branches, custom entries, and compaction, and rebuilds the model-facing context from it.
Package session stores a conversation as an append-only JSONL tree with branches, custom entries, and compaction, and rebuilds the model-facing context from it.
Package testkit holds the fakes and helpers every Nova test uses: a fake clock, a scripted provider, a fault-injecting SSE server, filesystem and golden helpers, and a goroutine leak check.
Package testkit holds the fakes and helpers every Nova test uses: a fake clock, a scripted provider, a fault-injecting SSE server, filesystem and golden helpers, and a goroutine leak check.
Package tool defines the tool contract and registry.
Package tool defines the tool contract and registry.
tools
bash
Package bash provides the shell tool: one command, one process group, capped output, and a result the model can read.
Package bash provides the shell tool: one command, one process group, capped output, and a result the model can read.
fs
Package fs provides the core filesystem tools: read, write, edit, and list.
Package fs provides the core filesystem tools: read, write, edit, and list.
search
Package search provides the read-only search tools: glob and grep.
Package search provides the read-only search tools: glob and grep.
tui
chat
Package chat folds protocol events and stored messages into transcript items and renders assistant text as incremental markdown.
Package chat folds protocol events and stored messages into transcript items and renders assistant text as incremental markdown.
cli
Package cli styles the nova command tree with fang.
Package cli styles the nova command tree with fang.
client
Package client adapts a mode.Client to Bubble Tea messages.
Package client adapts a mode.Client to Bubble Tea messages.
dialog
Package dialog is every TUI overlay that is not the transcript or the editor: the approval prompt, the extension UI dialogs, the multi-question form, the pickers, and help.
Package dialog is every TUI overlay that is not the transcript or the editor: the approval prompt, the extension UI dialogs, the multi-question form, the pickers, and help.
diff
Package diff renders unified diffs for the TUI: a line-number gutter, added and removed backgrounds, hunk headers, wrapping, and syntax highlighting.
Package diff renders unified diffs for the TUI: a line-number gutter, added and removed backgrounds, hunk headers, wrapping, and syntax highlighting.
firstrun
Package firstrun is the flow a new user sees before the chat screen: sign in or paste a key, then pick a model.
Package firstrun is the flow a new user sees before the chat screen: sign in or paste a key, then pick a model.
git
Package git reads the branch and working-tree line counts the status region shows.
Package git reads the branch and working-tree line counts the status region shows.
highlight
Package highlight turns source code into ANSI-styled lines with chroma.
Package highlight turns source code into ANSI-styled lines with chroma.
image
Package image renders an image inline in a terminal that supports a graphics protocol.
Package image renders an image inline in a terminal that supports a graphics protocol.
layout
Package layout computes the rectangles of the TUI screen from the terminal size and the desired heights of the editor and widgets.
Package layout computes the rectangles of the TUI screen from the terminal size and the desired heights of the editor and widgets.
list
Package list is a virtualised, auto-scrolling list of items.
Package list is a virtualised, auto-scrolling list of items.
render
Package render draws tool calls as cards: a one-line header and an optional body.
Package render draws tool calls as cards: a one-line header and an optional body.
sanitize
Package sanitize makes untrusted strings safe to draw in a terminal.
Package sanitize makes untrusted strings safe to draw in a terminal.
splash
Package splash draws the Nova opening sequence on the character grid.
Package splash draws the Nova opening sequence on the character grid.
splash/splashgif command
Command splashgif renders the Nova splash sequence to an animated GIF for the README.
Command splashgif renders the Nova splash sequence to an animated GIF for the README.
status
Package status renders the multi-line status region below the editor: the shipped cwd, token, cost, context and model segments, plus whatever extensions publish.
Package status renders the multi-line status region below the editor: the shipped cwd, token, cost, context and model segments, plus whatever extensions publish.
styles
Package styles turns a theme palette into the lipgloss styles the TUI draws with.
Package styles turns a theme palette into the lipgloss styles the TUI draws with.
trust
Package trust is the pre-start prompt that asks whether a project folder may contribute config, extensions, hooks, and context files.
Package trust is the pre-start prompt that asks whether a project folder may contribute config, extensions, hooks, and context files.
ui
Package ui is the Nova terminal user interface: one Bubble Tea model that talks to the server through tui/client and renders with tui/chat.
Package ui is the Nova terminal user interface: one Bubble Tea model that talks to the server through tui/client and renders with tui/chat.
widget
Package widget holds the extension-published pieces of the TUI: named widgets in three placements, status segments for the footer, and toasts.
Package widget holds the extension-published pieces of the TUI: named widgets in three placements, status segments for the footer, and toasts.
Package update replaces the running nova binary from a source checkout or from a GitHub release.
Package update replaces the running nova binary from a source checkout or from a GitHub release.
Package usage keeps the running token and cost ledger for a session, with a catalog price fallback when a provider does not report cost itself.
Package usage keeps the running token and cost ledger for a session, with a catalog price fallback when a provider does not report cost itself.

Jump to

Keyboard shortcuts

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