@nanobpm/nano-coder 0.55.2 → 0.57.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 +78 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ cargo install nano-coder # or build from source
|
|
|
21
21
|
- **Lifecycle Hooks**: 6 internal hook events for observing agent behavior, plus
|
|
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
|
-
- **Commands**: `/help`, `/version`, `/compact`, `/context`, `/verbosity`, `/settings`, `/tools`, `/skills`, `/queue`, `/restart`, `/exit`
|
|
24
|
+
- **Commands**: `/help`, `/version`, `/compact`, `/context`, `/verbosity`, `/settings`, `/tools`, `/skills`, `/queue`, `/restart`, `/update`, `/relaunch`, `/exit`
|
|
25
25
|
- **Streaming output**: answers stream in, thinking shows collapsed, tool calls show inline
|
|
26
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
|
|
@@ -76,6 +76,13 @@ Slash commands work mid-turn too, where it is safe:
|
|
|
76
76
|
the running turn, killing any running bash command; a second Ctrl-C at the prompt exits.
|
|
77
77
|
At the idle prompt, **Esc Esc** instead clears the input, so a half-typed or pasted prompt
|
|
78
78
|
can be discarded without deleting it character by character.
|
|
79
|
+
|
|
80
|
+
Tool calls, their results and thinking blocks are shown collapsed (`● bash ls -la`,
|
|
81
|
+
`⎿ first line (+N lines)`, `∴ Thought for 3.1s · 812 chars`). **Ctrl-O** expands the
|
|
82
|
+
latest one in place — the call's full arguments with every line of its result, or the
|
|
83
|
+
full reasoning text — and pressing it again collapses it. It works at the idle prompt
|
|
84
|
+
and mid-turn (where it expands the thinking block that is still streaming), and the
|
|
85
|
+
expanded view reflows on resize. Piped output is unchanged.
|
|
79
86
|
With piped (non-terminal) stdin, lines read during a turn are queued as later prompts
|
|
80
87
|
(never steer).
|
|
81
88
|
|
|
@@ -429,8 +436,67 @@ argument: a type-ahead list narrows as you type and Tab completes it.
|
|
|
429
436
|
- `/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
|
|
430
437
|
- `/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
|
|
431
438
|
- `/restart` - Start a fresh session (clean context) without exiting
|
|
439
|
+
- `/update` - Install the latest release through the channel nano-coder was installed from (`npm install -g @nanobpm/nano-coder@latest` or `cargo install nano-coder`), with the installer's progress on the terminal; verifies the installed version afterwards and leaves the running session untouched on failure. On an install that is not managed by cargo or npm it prints the releases page and changes nothing. Run it at the prompt, not during a turn (see [Updates](#updates))
|
|
440
|
+
- `/relaunch` - Restart the binary (re-resolved, so a just-installed update is picked up), resuming the current session — the transcript and scrollback carry over. Works whether or not an update was just installed. An unsent draft or queued messages are confirmed before being discarded. Run it at the prompt, not during a turn (see [Updates](#updates))
|
|
432
441
|
- `/exit` - Exit the agent (prints the session's `--resume` command first, when session persistence is enabled)
|
|
433
442
|
|
|
443
|
+
## Updates
|
|
444
|
+
|
|
445
|
+
In an interactive terminal session, nano-coder checks in the background whether a newer
|
|
446
|
+
release exists: once at startup (in a background task — the first prompt is never delayed)
|
|
447
|
+
and then every hour. The last-check time and the latest-known version are persisted in
|
|
448
|
+
`<platform data dir>/nano-coder/update-check.json`, so rapid restarts do not re-check
|
|
449
|
+
inside the hour. When a newer version is found, a single non-modal hint per new version is
|
|
450
|
+
shown at an idle prompt:
|
|
451
|
+
|
|
452
|
+
> nano-coder 0.43.0 is available (you have 0.42.1) — /update to install it
|
|
453
|
+
|
|
454
|
+
The check runs only in interactive TTY sessions — never in `-p`/headless, ACP or CI runs
|
|
455
|
+
(automated runners use deliberately pinned versions) — and only when the binary is managed
|
|
456
|
+
by a known install channel, detected once at startup from the executable's path:
|
|
457
|
+
|
|
458
|
+
- **npm** (under a `node_modules/@nanobpm/` tree — both launcher states: the
|
|
459
|
+
platform-package binary and the self-replaced copy in `bin/`): the latest version comes
|
|
460
|
+
from `https://registry.npmjs.org/@nanobpm/nano-coder/latest`, and `/update` runs
|
|
461
|
+
`npm install -g @nanobpm/nano-coder@latest`.
|
|
462
|
+
- **cargo** (in `$CARGO_HOME/bin`, default `~/.cargo/bin`): the latest version comes from
|
|
463
|
+
`https://crates.io/api/v1/crates/nano-coder`, and `/update` runs `cargo install
|
|
464
|
+
nano-coder` — which compiles from source and takes minutes, so the installer runs
|
|
465
|
+
attached to the terminal with its progress visible and Ctrl-C cancelling it, like a
|
|
466
|
+
long bash command.
|
|
467
|
+
- **anything else** (standalone tarball, a dev build in `target/`, a distro package): no
|
|
468
|
+
background check and no self-modification. `/update` explains that the install is not
|
|
469
|
+
managed and points at the
|
|
470
|
+
[releases page](https://github.com/nanobpm/nano-coder/releases); a locally built binary
|
|
471
|
+
is never overwritten.
|
|
472
|
+
|
|
473
|
+
`/update` runs only at an idle prompt. It suspends the frame UI while the installer owns
|
|
474
|
+
the terminal, then verifies the result with `nano-coder --version`: on success it suggests
|
|
475
|
+
`/relaunch`; on failure it shows the installer's exit status and leaves the running
|
|
476
|
+
session untouched. If the channel's tool (`npm`/`cargo`) is not on `PATH`, `/update`
|
|
477
|
+
prints the exact manual command instead. If you are already on the latest release (a fresh
|
|
478
|
+
check, not the hourly cache), it says so.
|
|
479
|
+
|
|
480
|
+
`/relaunch` restarts the harness without losing the session: it re-resolves the binary
|
|
481
|
+
(so a just-installed update is picked up), restores the terminal modes, and replaces the
|
|
482
|
+
process with the original arguments plus `--resume <current session>`. The session log,
|
|
483
|
+
persisted timers and trust decisions live outside the process and carry over; ephemeral
|
|
484
|
+
state — session-scoped permission grants and MCP connections — is re-established by the
|
|
485
|
+
resume, as with any `--resume`. An unsent draft or queued messages are confirmed before
|
|
486
|
+
being discarded. It also works with no update pending, as a "restart the harness, keep
|
|
487
|
+
the session" verb (unlike `/restart`, which starts a fresh session with clean context).
|
|
488
|
+
|
|
489
|
+
The check fails silently and quickly when the network is unavailable (a short timeout, no
|
|
490
|
+
retries, no effect on turn latency). To opt out, either:
|
|
491
|
+
|
|
492
|
+
```toml
|
|
493
|
+
# ~/.config/nano-coder/config.toml
|
|
494
|
+
check_updates = false
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
or set an environment variable — `NANO_CODER_NO_UPDATE_CHECK=1`, or the de-facto standard
|
|
498
|
+
`NO_UPDATE_NOTIFIER=1`.
|
|
499
|
+
|
|
434
500
|
## Building and Running
|
|
435
501
|
|
|
436
502
|
```bash
|
|
@@ -512,10 +578,12 @@ user_rules_dirs = ["~/.claude/rules"]
|
|
|
512
578
|
instruction_imports_outside_project = false # let project @imports / rule links leave the repo
|
|
513
579
|
plan_tools = true # offer the plan_* tools (see Task Plans)
|
|
514
580
|
outcome_tool = true # offer report_outcome (see Outcomes)
|
|
581
|
+
verify_before_complete = true # ask once for the check's evidence when completing after an unchecked edit (see Outcomes)
|
|
515
582
|
reminders = true # append <system-reminder> notes to tool results
|
|
516
583
|
memory = "on" # on | read_only | off — cross-session memory (see Memory)
|
|
517
584
|
# memory_dir = "/path/to/memory" # default: <platform data dir>/nano-coder/memory
|
|
518
585
|
memory_expiry_days = 90 # expire memories unused this long (0 = never)
|
|
586
|
+
check_updates = true # hourly background release check, interactive sessions only (see Updates)
|
|
519
587
|
|
|
520
588
|
[skills] # see Skills
|
|
521
589
|
enabled = true
|
|
@@ -1202,6 +1270,15 @@ recorded outcome without calling the model again. In the terminal the call shows
|
|
|
1202
1270
|
`✔ completed`, `■ blocked`, or `? needs input` followed by the summary. Set `outcome_tool = false` to leave the
|
|
1203
1271
|
tool out.
|
|
1204
1272
|
|
|
1273
|
+
A `completed` report is expected to name its check: the `summary` description asks for what was done
|
|
1274
|
+
*and how it was checked* (the command run and its result). To back that up, `verify_before_complete`
|
|
1275
|
+
(on by default in the terminal) watches the turn: if the model edited a file (`write_file` / `edit_file`)
|
|
1276
|
+
after its last `bash` call and then reports `completed`, that one report is bounced with a reminder —
|
|
1277
|
+
"You changed files after your last check. Run the relevant tests/build, or report again if no check
|
|
1278
|
+
applies." The reminder fires at most once per turn, so a second `report_outcome` always goes through
|
|
1279
|
+
and the model is never trapped; `blocked` and `needs_input` are never intercepted. The ACP harness
|
|
1280
|
+
turns the flag off because the orchestrator runs its own verification there.
|
|
1281
|
+
|
|
1205
1282
|
`needs_input` is the structural "waiting on the user" signal: an orchestrator (or auto mode)
|
|
1206
1283
|
can tell it apart from a clean `completed` without guessing from the text. For a richer,
|
|
1207
1284
|
multi-choice question that does not end the turn, the model uses the `question` tool instead.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanobpm/nano-coder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.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.57.0",
|
|
31
|
+
"@nanobpm/nano-coder-darwin-x64": "0.57.0",
|
|
32
|
+
"@nanobpm/nano-coder-linux-arm64": "0.57.0",
|
|
33
|
+
"@nanobpm/nano-coder-linux-x64": "0.57.0"
|
|
34
34
|
}
|
|
35
35
|
}
|