@nanobpm/nano-coder 0.49.0 → 0.50.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.
- package/README.md +20 -22
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ cargo install nano-coder # or build from source
|
|
|
22
22
|
Claude Code–compatible external user hooks loaded from `.claude/settings.json`
|
|
23
23
|
- **Configuration**: TOML-based config file at `~/.config/nano-coder/config.toml`
|
|
24
24
|
- **Commands**: `/help`, `/compact`, `/context`, `/verbosity`, `/settings`, `/tools`, `/skills`, `/queue`, `/restart`, `/exit`
|
|
25
|
-
- **Streaming output**: answers stream in, thinking shows collapsed
|
|
26
|
-
- **Status line**
|
|
25
|
+
- **Streaming output**: answers stream in, thinking shows collapsed, tool calls show inline
|
|
26
|
+
- **Status line** as the bottom row of the terminal, plus manual and automatic context compaction
|
|
27
27
|
- **Task plans**: `plan_*` tools keep a plan with notes outside the conversation, so long tasks survive compaction, resume and a change of worker
|
|
28
28
|
- **Project instructions**: `AGENTS.md` (or `CLAUDE.md`, `.github/copilot-instructions.md`) from the repository is added to the system prompt
|
|
29
29
|
- **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)
|
|
@@ -52,7 +52,10 @@ xterm, kitty, WezTerm, Ghostty, iTerm2); elsewhere use `/queue add message`. The
|
|
|
52
52
|
line shows how many are waiting. Edit the queue at any time
|
|
53
53
|
(even mid-turn) with `/queue`: `/queue` lists the waiting messages, `/queue remove N`
|
|
54
54
|
drops one (or several, `/queue remove N M`), `/queue edit N new text` rewrites one, and
|
|
55
|
-
`/queue clear` empties the queue.
|
|
55
|
+
`/queue clear` empties the queue. Steers you have sent but the agent has not read yet
|
|
56
|
+
show in the same list (marked `steer`, with the id from the `↪ steer #N` note), and
|
|
57
|
+
`remove`/`edit`/`clear` apply to them too — so a steer the running turn has made stale can
|
|
58
|
+
be withdrawn or rewritten before the agent's next step. A queued message is never injected while the agent is
|
|
56
59
|
asking for input (the `question` tool's picker owns the terminal until you answer).
|
|
57
60
|
Slash commands work mid-turn too, where it is safe:
|
|
58
61
|
- **Right away:** read-only ones (`/help`, `/tools`, `/skills`, `/providers`, `/session`, `/plan`,
|
|
@@ -177,10 +180,10 @@ src/
|
|
|
177
180
|
├── session_index.rs # Session summaries (.index.jsonl) for the --resume picker
|
|
178
181
|
├── resume.rs # --resume picker, --resume last, --list-sessions
|
|
179
182
|
├── context.rs # Token accounting, context-window heuristics, overflow detection
|
|
180
|
-
├── status.rs #
|
|
183
|
+
├── status.rs # Status bar contents (the frame's last row)
|
|
181
184
|
├── ui.rs # Verbosity levels and the streaming output renderer
|
|
182
|
-
├── frame.rs # App-owned frame renderer
|
|
183
|
-
├── lineedit.rs # Key-by-key prompt input (
|
|
185
|
+
├── frame.rs # App-owned frame renderer: full redraw on resize
|
|
186
|
+
├── lineedit.rs # Key-by-key prompt input (editing, history, mid-turn steer/queue)
|
|
184
187
|
├── input_history.rs # Up/Down recall of submitted lines (session-scoped)
|
|
185
188
|
├── instructions.rs # AGENTS.md / CLAUDE.md discovery for the system prompt
|
|
186
189
|
├── plan.rs # Task plan and the plan_add / plan_update / plan_show tools
|
|
@@ -411,7 +414,7 @@ argument: a type-ahead list narrows as you type and Tab completes it.
|
|
|
411
414
|
- `/plan` - Show the agent's task plan with all notes
|
|
412
415
|
- `/memory [forget ID]` - List cross-session memories with their ids, or delete one by id (see [Memory](#memory))
|
|
413
416
|
- `/hooks` - List the loaded external user hooks (from `.claude/settings.json` and friends), the files they came from, and any skipped entries (see [Lifecycle Hooks](#lifecycle-hooks))
|
|
414
|
-
- `/queue [list|add text|remove N...|edit N text|clear]` - Show or edit the queued messages. Works while a turn runs, so a queued message can be removed or rewritten before it is sent.
|
|
417
|
+
- `/queue [list|add text|remove N...|edit N text|clear]` - Show or edit the queued messages and unread steers. Works while a turn runs, so a queued message or steer can be removed or rewritten before it is sent.
|
|
415
418
|
- `/model [provider/model]` - Show the current model and pick a new one. The list starts with the last four models you used (the current one marked; the previous one highlighted, so `/model` then Enter switches back), then the providers: pick a provider to scroll its model list (Esc steps back). With an argument, switches directly (conversation is kept). Typing `/model ` shows a type-ahead of the current model, recently used models, and each configured provider's default model; Tab completes (a bare provider name completes to its default model). Recently used models are kept in `~/.local/share/nano-coder/recent-models.json`
|
|
416
419
|
- `/mode [normal|plan|auto]` - Show or set the agent mode (Shift+Tab cycles it, at the prompt or mid-turn):
|
|
417
420
|
- **normal** - full tools; reaching a positive turn cap asks whether to keep going
|
|
@@ -420,7 +423,7 @@ argument: a type-ahead list narrows as you type and Tab completes it.
|
|
|
420
423
|
- `/thinking [level|default|off|reset]` - Show the thinking level in use and the levels the current model takes, or set one for this session (`reset` goes back to the configured level). See [Thinking](#thinking)
|
|
421
424
|
- `/providers` - List providers, endpoints and whether their API key is available
|
|
422
425
|
- `/session` - Show the session ID and log path
|
|
423
|
-
- `/trajectory` - Show this session's trajectory turn by turn: user input, thinking, answers, tool calls and results, tokens and timings. Each message row is labelled with its `#N` session-log ID, the same ID `history_read` and smart-compaction summaries use (compaction and crash-recovered input rows have no `#N`, as they aren't cited that way). When it doesn't fit on the screen it opens in your pager (`$PAGER`, default `less`) — but only at an idle prompt
|
|
426
|
+
- `/trajectory` - Show this session's trajectory turn by turn: user input, thinking, answers, tool calls and results, tokens and timings. Each message row is labelled with its `#N` session-log ID, the same ID `history_read` and smart-compaction summaries use (compaction and crash-recovered input rows have no `#N`, as they aren't cited that way). When it doesn't fit on the screen it opens in your pager (`$PAGER`, default `less`) — but only at an idle prompt on a terminal: invoked mid-turn (while a turn runs) or with piped output it prints inline instead. `/trajectory --json` or `/trajectory --markdown` prints an export instead; `nano-coder --trajectory SESSION_ID [--json|--markdown]` does the same for any saved session
|
|
424
427
|
- `/resume [ID|last]` - Switch to a saved session without restarting: the same picker as `--resume` (leaving out the session in use), or the session with that ID, or `last` (the most recent other session in this directory). Run it at the prompt, not during a turn
|
|
425
428
|
- `/restart` - Start a fresh session (clean context) without exiting
|
|
426
429
|
- `/exit` - Exit the agent (prints the session's `--resume` command first, when session persistence is enabled)
|
|
@@ -493,7 +496,6 @@ auto_compact_threshold = 0.8 # fraction of the context window
|
|
|
493
496
|
compaction_mode = "standard" # standard | smart (experimental, see Smart compaction)
|
|
494
497
|
# context_window = 128000 # override the window (providers can set it too)
|
|
495
498
|
verbosity = "normal" # quiet | normal | verbose | debug (or --verbosity)
|
|
496
|
-
renderer = "frame" # frame (default: app-owned redraw on resize) | legacy
|
|
497
499
|
timestamps = true # prefix CLI messages with the local time (HH:MM:SS)
|
|
498
500
|
project_instructions = true # load AGENTS.md etc. (see Project Instructions)
|
|
499
501
|
project_instruction_files = ["AGENTS.md", "CLAUDE.md", ".claude/CLAUDE.md", ".github/copilot-instructions.md"]
|
|
@@ -857,10 +859,8 @@ with `/verbosity`, `--verbosity`, or `verbosity` in the config (default `normal`
|
|
|
857
859
|
| `verbose` | Also the first lines of each tool's output |
|
|
858
860
|
| `debug` | Also lifecycle hook events (`[hook] ...`) |
|
|
859
861
|
|
|
860
|
-
**Thinking.** Reasoning
|
|
861
|
-
|
|
862
|
-
**Ctrl-O** switches to showing thinking in full, including the block that is streaming. At
|
|
863
|
-
the prompt it prints the last thinking in full. Press it again to collapse. Reasoning is read
|
|
862
|
+
**Thinking.** Reasoning shows as a single collapsed line while it streams and becomes
|
|
863
|
+
`∴ Thought for 3.1s · 812 chars` when the answer starts. Reasoning is read
|
|
864
864
|
from `reasoning_content` / `reasoning` fields (DeepSeek, llama.cpp, vLLM, OpenRouter, Ollama),
|
|
865
865
|
from `<think>...</think>` in the content, and from Anthropic `thinking` blocks. Anthropic
|
|
866
866
|
thinking blocks are kept with the conversation so tool use keeps working when thinking is
|
|
@@ -870,7 +870,7 @@ enabled (e.g. `extra_body = { thinking = { type = "enabled", budget_tokens = 400
|
|
|
870
870
|
error).
|
|
871
871
|
|
|
872
872
|
**Input.** On a terminal, input is read key by key. While a turn runs, what you type shows
|
|
873
|
-
|
|
873
|
+
in the input editor; Enter sends it to steer the running turn, Ctrl-Enter (or Cmd-Enter)
|
|
874
874
|
adds it to the message queue (one queued message runs per following turn; `/queue` lists,
|
|
875
875
|
edits and removes them), and Esc Esc or Ctrl-C cancels the turn. The prompt supports
|
|
876
876
|
editing: Left/Right move the cursor, Home/End (or Ctrl-A/Ctrl-E) jump to the start/end,
|
|
@@ -890,8 +890,7 @@ Every message (your prompt, answers, tool calls and results, thinking, notes) st
|
|
|
890
890
|
the local time as `HH:MM:SS`. The prompt's time is rewritten when you press Enter, so it
|
|
891
891
|
shows when the message was sent. Turn this off with `timestamps = false`.
|
|
892
892
|
|
|
893
|
-
**Renderer.**
|
|
894
|
-
renderer**: it composes the whole screen — transcript, input
|
|
893
|
+
**Renderer.** In a terminal nano-coder uses an **app-owned frame renderer**: it composes the whole screen — transcript, input
|
|
895
894
|
editor, then the status bar as the last line — into one frame and diff-renders it through a
|
|
896
895
|
single writer, wrapped in synchronized-output markers so a half-drawn frame is never visible.
|
|
897
896
|
On a width change it re-renders the entire frame (clearing the screen and scrollback) instead
|
|
@@ -902,9 +901,9 @@ when nano-coder is waiting for you, and a spinner with `working 12s · Enter ste
|
|
|
902
901
|
cancels` while a turn runs (the hint shows while the input is empty). The `working` count is
|
|
903
902
|
working time, not wall time: while the turn is blocked waiting for a picker — the agent
|
|
904
903
|
asking a question, or the turn-cap prompt — the clock pauses, so the time you spend
|
|
905
|
-
answering does not inflate it. It never captures the mouse.
|
|
906
|
-
|
|
907
|
-
|
|
904
|
+
answering does not inflate it. It never captures the mouse. When stdout is not a terminal
|
|
905
|
+
(piped or redirected), output is plain text instead. The scroll-region `renderer = "legacy"`
|
|
906
|
+
option was removed; a config that still sets `renderer` loads, with a one-line notice.
|
|
908
907
|
|
|
909
908
|
## Status Line and Compaction
|
|
910
909
|
|
|
@@ -915,9 +914,8 @@ In an interactive terminal the bottom row shows the provider/model, the working
|
|
|
915
914
|
a fill bar, message count, session input/output tokens, the auto-compaction threshold and
|
|
916
915
|
count (labelled `smart-compact` when compactions are smart, else `auto-compact`), the active mode when it is `plan` or `auto` (the default `normal` is not shown, to
|
|
917
916
|
save space), and what the agent is doing. With a GitHub Copilot model it also shows the session's
|
|
918
|
-
AI Credits (`0.4 AIC`), summed from the `total_nano_aiu` each response reports.
|
|
919
|
-
renderer it
|
|
920
|
-
the bar as the frame's final row. Either way it follows resizes, and is off when stdin/stdout isn't a TTY or `AGENTIC_NO_STATUS` is set. The conversation is kept
|
|
917
|
+
AI Credits (`0.4 AIC`), summed from the `total_nano_aiu` each response reports. The frame
|
|
918
|
+
renderer draws the bar as the frame's final row; it follows resizes, and is off when stdin/stdout isn't a TTY or `AGENTIC_NO_STATUS` is set. The conversation is kept
|
|
921
919
|
directly above the status line (empty space collects at the top), so shrinking the window
|
|
922
920
|
drops empty rows rather than pushing the conversation out of view.
|
|
923
921
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanobpm/nano-coder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "A 6MB coding agent. Run a fleet on your laptop.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"node": ">=18"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@nanobpm/nano-coder-darwin-arm64": "0.
|
|
31
|
-
"@nanobpm/nano-coder-darwin-x64": "0.
|
|
32
|
-
"@nanobpm/nano-coder-linux-arm64": "0.
|
|
33
|
-
"@nanobpm/nano-coder-linux-x64": "0.
|
|
30
|
+
"@nanobpm/nano-coder-darwin-arm64": "0.50.0",
|
|
31
|
+
"@nanobpm/nano-coder-darwin-x64": "0.50.0",
|
|
32
|
+
"@nanobpm/nano-coder-linux-arm64": "0.50.0",
|
|
33
|
+
"@nanobpm/nano-coder-linux-x64": "0.50.0"
|
|
34
34
|
}
|
|
35
35
|
}
|