@nanobpm/nano-coder 0.43.0 → 0.45.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 +39 -7
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -255,8 +255,12 @@ phases). Disable them with `--no-hooks`, or granularly via the
|
|
|
255
255
|
`command`, optional `timeout_seconds` (default `bash_timeout_secs`, 600) and
|
|
256
256
|
`max_output_length` (default 40,000, max 1,000,000 characters each for stdout and stderr).
|
|
257
257
|
Returns stdout, then `Stderr:` and `Exit code: N` when relevant, or `(no output)`.
|
|
258
|
-
Long output keeps its head and tail with `...N bytes truncated; complete output in <path>...`;
|
|
259
|
-
the full capture stays in that file.
|
|
258
|
+
Long output keeps its head and tail with `...N bytes truncated (sha256:<digest>); complete output in <path>...`;
|
|
259
|
+
the full capture stays in that file. The digest is the first 16 hex characters (64 bits) of a
|
|
260
|
+
SHA-256 over the capture's complete content — a truncated prefix of the full `sha256sum` value,
|
|
261
|
+
hashed incrementally while the command runs (not re-read after it exits) — so two results whose
|
|
262
|
+
bounded head, tail and byte count match but whose content differs are still told apart, without
|
|
263
|
+
an unbounded post-exit reread of a multi-gigabyte capture.
|
|
260
264
|
- `read_file` - Numbered lines of a text file; `path`, optional `offset` (1-based) and `limit`
|
|
261
265
|
(default 2000 lines). Refuses binary files.
|
|
262
266
|
- `write_file` - Create or overwrite a file (`path`, `content`), creating parent directories.
|
|
@@ -383,7 +387,7 @@ argument: a type-ahead list narrows as you type and Tab completes it.
|
|
|
383
387
|
base URL, key source (env var, shell command, or a literal key; the file is then
|
|
384
388
|
written with mode 0600) and default model
|
|
385
389
|
- temperature, max tokens, system prompt
|
|
386
|
-
- **Turn cap** (`max_iterations`): LLM calls per input (0 = unbounded); a positive cap makes normal mode ask before stopping
|
|
390
|
+
- **Turn cap** (`max_iterations`): LLM calls per input (0 = unbounded); a positive cap makes normal mode ask before stopping. In a headless (non-interactive) session an unbounded cap falls back to a 300-call safety net
|
|
387
391
|
- **Context**: auto-compaction on/off, threshold, compaction mode, context-window override
|
|
388
392
|
- **Verbosity**
|
|
389
393
|
- **Save to config file**: writes only the keys you changed into the config file
|
|
@@ -399,7 +403,7 @@ argument: a type-ahead list narrows as you type and Tab completes it.
|
|
|
399
403
|
- `/mode [normal|plan|auto]` - Show or set the agent mode (Shift+Tab cycles it, at the prompt or mid-turn):
|
|
400
404
|
- **normal** - full tools; reaching a positive turn cap asks whether to keep going
|
|
401
405
|
- **plan** - read-only: mutating tools (`bash`, `write_file`, `edit_file`) are gated, only analysis and output
|
|
402
|
-
- **auto** - no turn cap; a `question` left unanswered for 15s is answered with "the user is away from the keyboard, make the best decision you can"
|
|
406
|
+
- **auto** - no turn cap (headless runs still get the 300-call safety cap); a `question` left unanswered for 15s is answered with "the user is away from the keyboard, make the best decision you can"
|
|
403
407
|
- `/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)
|
|
404
408
|
- `/providers` - List providers, endpoints and whether their API key is available
|
|
405
409
|
- `/session` - Show the session ID and log path
|
|
@@ -464,7 +468,7 @@ model = "anthropic/claude-sonnet-4-5" # provider/model
|
|
|
464
468
|
default_provider = "mock" # used when the model has no known provider prefix
|
|
465
469
|
temperature = 0.7 # or "default" to send none (see Temperature below)
|
|
466
470
|
max_tokens = 4096
|
|
467
|
-
max_iterations = 0 # LLM calls per user input (0 = unbounded)
|
|
471
|
+
max_iterations = 0 # LLM calls per user input (0 = unbounded; headless runs get a 300-call safety cap)
|
|
468
472
|
system_prompt = "You are a helpful assistant with access to tools."
|
|
469
473
|
bash_timeout_secs = 600
|
|
470
474
|
persist_sessions = true
|
|
@@ -841,7 +845,9 @@ single writer, wrapped in synchronized-output markers so a half-drawn frame is n
|
|
|
841
845
|
On a width change it re-renders the entire frame (clearing the screen and scrollback) instead
|
|
842
846
|
of relying on the terminal's native reflow, and resizes are debounced (~40ms) so a drag
|
|
843
847
|
settles on one clean redraw. The `/` command menu is drawn under the input editor as part of
|
|
844
|
-
the frame.
|
|
848
|
+
the frame. The prompt shows whose turn it is: a green `›` with a dim `ready` hint
|
|
849
|
+
when nano-coder is waiting for you, and a spinner with `working 12s · Enter steers, Esc Esc
|
|
850
|
+
cancels` while a turn runs (the hint shows while the input is empty). It never captures the mouse. Setting `renderer = "legacy"` (or picking it in
|
|
845
851
|
`/settings`) switches back to the scroll-region renderer, where the terminal owns the
|
|
846
852
|
scrollback and reflows history itself on a resize, with the status line pinned to the bottom.
|
|
847
853
|
|
|
@@ -1049,7 +1055,33 @@ To turn plans off, set `plan_tools = false`.
|
|
|
1049
1055
|
the result:
|
|
1050
1056
|
- after 12 tool calls with no plan change while items are open, naming the item in progress
|
|
1051
1057
|
(or the next one) and asking for `plan_update`; again every 12 calls;
|
|
1052
|
-
- once per session, after 10 tool calls in one turn with no plan, suggesting `plan_add
|
|
1058
|
+
- once per session, after 10 tool calls in one turn with no plan, suggesting `plan_add`;
|
|
1059
|
+
- when the model repeats the same tool call — same tool, same (normalised) arguments, same
|
|
1060
|
+
result — three times in a row, telling it to change approach or report `blocked`. The
|
|
1061
|
+
warning fires at most twice per turn; if the model keeps repeating after that, the turn
|
|
1062
|
+
ends with a `blocked` outcome instead of burning budget, and any remaining calls in the
|
|
1063
|
+
same batch are skipped rather than run. For `bash`, the match strips a trailing run of
|
|
1064
|
+
read-only diagnostic pipeline stages (`| wc -l`, `| head`, `| grep …`, …) off the base
|
|
1065
|
+
command (parsed quote- and escape-aware, so a `|` inside quotes or a `||` operator never
|
|
1066
|
+
splits a command), so appending `| wc -l`/`| grep …`-style stages does not dodge it while
|
|
1067
|
+
the stable base — which may itself contain non-diagnostic stages like `sed` — keeps
|
|
1068
|
+
matching. Stripping stops at the first stage that could change state (a writer like
|
|
1069
|
+
`tee`, a redirection, a write option such as `sort -o`, a shell control construct like
|
|
1070
|
+
`;`/`$(…)`, or an unrecognised command), so everything to its left stays in the
|
|
1071
|
+
fingerprint and genuinely different calls are never conflated. The result fingerprint
|
|
1072
|
+
ignores only the per-call spill filename in the output bounder's `complete output in …`
|
|
1073
|
+
marker (matched through its `...` terminator, so even a `session_dir` path with spaces is
|
|
1074
|
+
normalised; not arbitrary output that merely resembles one). The marker also carries a
|
|
1075
|
+
`(sha256:<digest>)` of the *complete* output, so identical runaway output is still recognised
|
|
1076
|
+
while a result that changes only in its truncated middle — invisible to the bounded head,
|
|
1077
|
+
tail and byte count — stays distinct and is never hard-stopped as a false repeat. The
|
|
1078
|
+
fingerprint likewise folds in each attached image's content hash, so a `read_file` of a
|
|
1079
|
+
changing image (whose result text is only the unchanging metadata) is told apart by the
|
|
1080
|
+
bytes the model actually received. Enabled
|
|
1081
|
+
plan, outcome and
|
|
1082
|
+
`question` calls break the streak (so only genuinely consecutive repeats count, and an
|
|
1083
|
+
interleaved such call makes the calls around it non-consecutive); when plan tools are
|
|
1084
|
+
*disabled* a repeated hallucinated `plan_*` call is itself detected rather than exempted.
|
|
1053
1085
|
|
|
1054
1086
|
Plan and outcome calls don't count. Set `reminders = false` to turn them off.
|
|
1055
1087
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanobpm/nano-coder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.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.
|
|
35
|
-
"@nanobpm/nano-coder-darwin-x64": "0.
|
|
36
|
-
"@nanobpm/nano-coder-linux-arm64": "0.
|
|
37
|
-
"@nanobpm/nano-coder-linux-x64": "0.
|
|
34
|
+
"@nanobpm/nano-coder-darwin-arm64": "0.45.0",
|
|
35
|
+
"@nanobpm/nano-coder-darwin-x64": "0.45.0",
|
|
36
|
+
"@nanobpm/nano-coder-linux-arm64": "0.45.0",
|
|
37
|
+
"@nanobpm/nano-coder-linux-x64": "0.45.0"
|
|
38
38
|
}
|
|
39
39
|
}
|