@nanobpm/nano-coder 0.19.1 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -5
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -22,7 +22,7 @@ cargo install nano-coder # or build from source
22
22
  - **Configuration**: TOML-based config file at `~/.config/nano-coder/config.toml`
23
23
  - **Commands**: `/help`, `/compact`, `/context`, `/verbosity`, `/settings`, `/tools`, `/skills`, `/queue`, `/restart`, `/exit`
24
24
  - **Streaming output**: answers stream in, thinking shows collapsed (Ctrl-O expands it), tool calls show inline
25
- - **Status line** on the bottom row of the terminal (redrawn as output scrolls, so history reflows on resize), plus manual and automatic context compaction
25
+ - **Status line** pinned to the bottom of the terminal, plus manual and automatic context compaction
26
26
  - **Task plans**: `plan_*` tools keep a plan with notes outside the conversation, so long tasks survive compaction, resume and a change of worker
27
27
  - **Project instructions**: `AGENTS.md` (or `CLAUDE.md`, `.github/copilot-instructions.md`) from the repository is added to the system prompt
28
28
  - **Safety**: built-in guards block destructive commands (`rm -rf /`, `DROP DATABASE`, force-pushing `main`, ...), user allow/deny rules, and an optional OS sandbox (Seatbelt on macOS, Landlock on Linux)
@@ -148,6 +148,7 @@ src/
148
148
  ├── context.rs # Token accounting, context-window heuristics, overflow detection
149
149
  ├── status.rs # Bottom-of-terminal status line
150
150
  ├── ui.rs # Verbosity levels and the streaming output renderer
151
+ ├── frame.rs # App-owned frame renderer (renderer = "frame"): full redraw on resize
151
152
  ├── lineedit.rs # Key-by-key prompt input (Ctrl-O, mid-turn input on the status line)
152
153
  ├── instructions.rs # AGENTS.md / CLAUDE.md discovery for the system prompt
153
154
  ├── plan.rs # Task plan and the plan_add / plan_update / plan_show tools
@@ -357,6 +358,7 @@ auto_compact_threshold = 0.8 # fraction of the context window
357
358
  compaction_mode = "standard" # standard | smart (experimental, see Smart compaction)
358
359
  # context_window = 128000 # override the window (providers can set it too)
359
360
  verbosity = "normal" # quiet | normal | verbose | debug (or --verbosity)
361
+ renderer = "legacy" # legacy | frame (app-owned redraw on resize, experimental)
360
362
  timestamps = true # prefix CLI messages with the local time (HH:MM:SS)
361
363
  project_instructions = true # load AGENTS.md etc. (see Project Instructions)
362
364
  project_instruction_files = ["AGENTS.md", "CLAUDE.md", ".github/copilot-instructions.md"]
@@ -562,6 +564,17 @@ Every message (your prompt, answers, tool calls and results, thinking, notes) st
562
564
  the local time as `HH:MM:SS`. The prompt's time is rewritten when you press Enter, so it
563
565
  shows when the message was sent. Turn this off with `timestamps = false`.
564
566
 
567
+ **Renderer (experimental).** By default (`renderer = "legacy"`) the terminal owns the
568
+ scrollback and reflows history itself on a resize, with the status line pinned to the bottom
569
+ via a scroll region. Setting `renderer = "frame"` (or picking it in `/settings`) switches to
570
+ an **app-owned frame renderer**: nano-coder composes the whole screen — transcript, input
571
+ editor, then the status bar as the last line — into one frame and diff-renders it through a
572
+ single writer, wrapped in synchronized-output markers so a half-drawn frame is never visible.
573
+ On a width change it re-renders the entire frame (clearing the screen and scrollback) instead
574
+ of relying on the terminal's native reflow, and resizes are debounced (~40ms) so a drag
575
+ settles on one clean redraw. It never captures the mouse. This is opt-in for now; `legacy`
576
+ remains the default.
577
+
565
578
  ## Status Line and Compaction
566
579
 
567
580
  In an interactive terminal the bottom row shows the provider/model, context usage
@@ -569,10 +582,10 @@ In an interactive terminal the bottom row shows the provider/model, context usag
569
582
  a fill bar, message count, session input/output tokens, the auto-compaction threshold and
570
583
  count, the active mode when it is `plan` or `auto` (the default `normal` is not shown, to
571
584
  save space), and what the agent is doing. With a GitHub Copilot model it also shows the session's
572
- AI Credits (`0.4 AIC`), summed from the `total_nano_aiu` each response reports. It is drawn on the
573
- bottom row and redrawn as output scrolls, and is off when stdin/stdout isn't a TTY or `AGENTIC_NO_STATUS` is set.
574
- Because it does not confine the conversation to a terminal scroll region, the message history
575
- reflows when the window is resized (in terminals that reflow, such as Ghostty and iTerm2).
585
+ AI Credits (`0.4 AIC`), summed from the `total_nano_aiu` each response reports. It uses a terminal
586
+ scroll region, follows resizes, and is off when stdin/stdout isn't a TTY or `AGENTIC_NO_STATUS` is set. The conversation is kept
587
+ directly above the status line (empty space collects at the top), so shrinking the window
588
+ drops empty rows rather than pushing the conversation out of view.
576
589
 
577
590
  The context window comes from, in order: `context_window` in the config, `context_window`
578
591
  on the provider, the window the endpoint reports, a built-in table of known models, then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanobpm/nano-coder",
3
- "version": "0.19.1",
3
+ "version": "0.20.0",
4
4
  "description": "A 6MB coding agent. Run a fleet on your laptop.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -31,9 +31,9 @@
31
31
  "node": ">=18"
32
32
  },
33
33
  "optionalDependencies": {
34
- "@nanobpm/nano-coder-darwin-arm64": "0.19.1",
35
- "@nanobpm/nano-coder-darwin-x64": "0.19.1",
36
- "@nanobpm/nano-coder-linux-arm64": "0.19.1",
37
- "@nanobpm/nano-coder-linux-x64": "0.19.1"
34
+ "@nanobpm/nano-coder-darwin-arm64": "0.20.0",
35
+ "@nanobpm/nano-coder-darwin-x64": "0.20.0",
36
+ "@nanobpm/nano-coder-linux-arm64": "0.20.0",
37
+ "@nanobpm/nano-coder-linux-x64": "0.20.0"
38
38
  }
39
39
  }