@nanobpm/nano-coder 0.10.0 → 0.12.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 +28 -11
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ echoes it in `_meta.plan`, and the model is told about it with the first prompt
|
|
|
97
97
|
advertises this as `agentCapabilities._meta.planSeed`. See [Task Plans](#task-plans).
|
|
98
98
|
|
|
99
99
|
**Outcomes.** When the model calls `report_outcome`, the `session/prompt` result carries
|
|
100
|
-
`_meta.outcome`: `{"status": "completed" | "blocked", "summary": "..."}`. A client can use it
|
|
100
|
+
`_meta.outcome`: `{"status": "completed" | "blocked" | "needs_input", "summary": "..."}`. A client can use it
|
|
101
101
|
instead of guessing from the stop reason: `blocked` means the model needs help (an
|
|
102
102
|
escalation). Redelivering the input returns the same outcome. See [Outcomes](#outcomes).
|
|
103
103
|
|
|
@@ -139,7 +139,9 @@ src/
|
|
|
139
139
|
├── lineedit.rs # Key-by-key prompt input (Ctrl-O, steering on the status line)
|
|
140
140
|
├── instructions.rs # AGENTS.md / CLAUDE.md discovery for the system prompt
|
|
141
141
|
├── plan.rs # Task plan and the plan_add / plan_update / plan_show tools
|
|
142
|
-
├── goal.rs # report_outcome tool (completed / blocked)
|
|
142
|
+
├── goal.rs # report_outcome tool (completed / blocked / needs_input)
|
|
143
|
+
├── mode.rs # Agent mode (normal / plan / auto) and the plan-mode tool gate
|
|
144
|
+
├── question.rs # question tool and the mid-turn question / turn-cap rendezvous
|
|
143
145
|
├── commands.rs # Slash-command table for /help and the as-you-type menu
|
|
144
146
|
├── skills.rs # SKILL.md discovery, ai.lock sources and the load_skill tool
|
|
145
147
|
├── reminders.rs # <system-reminder> notes appended to tool results
|
|
@@ -178,8 +180,11 @@ The harness exposes 6 lifecycle hook events:
|
|
|
178
180
|
- `edit_file` - Replace exact text (`path`, `old_string`, `new_string`, optional `replace_all`).
|
|
179
181
|
Fails unless `old_string` matches exactly once (or `replace_all` is set).
|
|
180
182
|
- `plan_add`, `plan_update`, `plan_show` - The agent's task plan (see [Task Plans](#task-plans)).
|
|
181
|
-
- `report_outcome` - Report the task `completed` or `
|
|
182
|
-
(see [Outcomes](#outcomes)).
|
|
183
|
+
- `report_outcome` - Report the task `completed`, `blocked` or `needs_input`, with a `summary`; ends
|
|
184
|
+
the turn (see [Outcomes](#outcomes)).
|
|
185
|
+
- `question` - Ask the user a structured question and wait for the answer, without ending the turn.
|
|
186
|
+
Interactive sessions only; in auto mode an unanswered question is resolved after 15s with the
|
|
187
|
+
away message. Headless (ACP) sessions get an error instead.
|
|
183
188
|
- `load_skill` - Return a skill's instructions and list its other files; `name`. Offered only
|
|
184
189
|
when skills were found (see [Skills](#skills)).
|
|
185
190
|
|
|
@@ -269,13 +274,14 @@ list is built from the same table as `/help` (`src/commands.rs`).
|
|
|
269
274
|
- `/compact [focus]` - Summarize older messages with the current model, keeping the latest
|
|
270
275
|
message. Optional text tells the summary what to focus on. Esc Esc or Ctrl-C cancels
|
|
271
276
|
- `/verbosity [quiet|normal|verbose|debug]` - Show or set how much is printed (see below)
|
|
272
|
-
- `/context` - Show context usage, window, session token totals, auto-compaction state and the loaded instruction files
|
|
277
|
+
- `/context` - Show context usage, window, session token totals, AI Credits (GitHub Copilot), auto-compaction state and the loaded instruction files
|
|
273
278
|
- `/settings` - Interactive settings menu:
|
|
274
279
|
- **Model**: pick a provider, then a model from its live model list (or type an ID)
|
|
275
280
|
- **Add or edit a provider**: name, API kind (OpenAI-compatible, Anthropic, Copilot),
|
|
276
281
|
base URL, key source (env var, shell command, or a literal key; the file is then
|
|
277
282
|
written with mode 0600) and default model
|
|
278
283
|
- temperature, max tokens, system prompt
|
|
284
|
+
- **Turn cap** (`max_iterations`): LLM calls per input; normal mode asks before stopping
|
|
279
285
|
- **Context**: auto-compaction on/off, threshold, context-window override
|
|
280
286
|
- **Verbosity**
|
|
281
287
|
- **Save to config file**: writes only the keys you changed into the config file
|
|
@@ -285,6 +291,10 @@ list is built from the same table as `/help` (`src/commands.rs`).
|
|
|
285
291
|
- `/skills` - List the skills the agent can load, where each lives, and any loading warnings
|
|
286
292
|
- `/plan` - Show the agent's task plan with all notes
|
|
287
293
|
- `/model [provider/model]` - Show the current model and pick a new one: scroll the provider list, then the model list (Esc steps back). With an argument, switches directly (conversation is kept)
|
|
294
|
+
- `/mode [normal|plan|auto]` - Show or set the agent mode (Shift+Tab cycles it, at the prompt or mid-turn):
|
|
295
|
+
- **normal** - full tools; reaching the turn cap asks whether to keep going
|
|
296
|
+
- **plan** - read-only: mutating tools (`bash`, `write_file`, `edit_file`) are gated, only analysis and output
|
|
297
|
+
- **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"
|
|
288
298
|
- `/providers` - List providers, endpoints and whether their API key is available
|
|
289
299
|
- `/session` - Show the session ID and log path
|
|
290
300
|
- `/restart` - Start a fresh session (clean context) without exiting
|
|
@@ -516,8 +526,10 @@ shows when the message was sent. Turn this off with `timestamps = false`.
|
|
|
516
526
|
In an interactive terminal the bottom row shows the provider/model, context usage
|
|
517
527
|
(`~` marks an estimate; without it the figure is anchored to the provider's reported usage),
|
|
518
528
|
a fill bar, message count, session input/output tokens, the auto-compaction threshold and
|
|
519
|
-
count,
|
|
520
|
-
|
|
529
|
+
count, the active mode when it is `plan` or `auto` (the default `normal` is not shown, to
|
|
530
|
+
save space), and what the agent is doing. With a GitHub Copilot model it also shows the session's
|
|
531
|
+
AI Credits (`0.4 AIC`), summed from the `total_nano_aiu` each response reports. It uses a terminal
|
|
532
|
+
scroll region, follows resizes, and is off when stdin/stdout isn't a TTY or `AGENTIC_NO_STATUS` is set. The conversation is kept
|
|
521
533
|
directly above the status line (empty space collects at the top), so shrinking the window
|
|
522
534
|
drops empty rows rather than pushing the conversation out of view.
|
|
523
535
|
|
|
@@ -639,16 +651,21 @@ Plan and outcome calls don't count. Set `reminders = false` to turn them off.
|
|
|
639
651
|
## Outcomes
|
|
640
652
|
|
|
641
653
|
`report_outcome` is the model's explicit end-of-task signal: `status` is `completed` (the
|
|
642
|
-
whole task is done and checked; the summary lists PRs or commits)
|
|
654
|
+
whole task is done and checked; the summary lists PRs or commits), `blocked` (after three
|
|
643
655
|
or more different failed attempts, or when only a person can unblock it; the summary says
|
|
644
|
-
what is needed)
|
|
645
|
-
|
|
656
|
+
what is needed), or `needs_input` (the model has a question or needs a decision; the summary
|
|
657
|
+
is the question). The call ends the turn. Other calls in the same response still run, then the
|
|
658
|
+
summary becomes the final answer (`Blocked: ...` / `Question: ...`), and the outcome is returned
|
|
646
659
|
in ACP `_meta.outcome` and recorded in the session log's `turn_end` record. If the harness
|
|
647
660
|
stops after the call but before the turn ends, resuming the input finishes it with the
|
|
648
661
|
recorded outcome without calling the model again. In the terminal the call shows as
|
|
649
|
-
`✔ completed
|
|
662
|
+
`✔ completed`, `■ blocked`, or `? needs input` followed by the summary. Set `outcome_tool = false` to leave the
|
|
650
663
|
tool out.
|
|
651
664
|
|
|
665
|
+
`needs_input` is the structural "waiting on the user" signal: an orchestrator (or auto mode)
|
|
666
|
+
can tell it apart from a clean `completed` without guessing from the text. For a richer,
|
|
667
|
+
multi-choice question that does not end the turn, the model uses the `question` tool instead.
|
|
668
|
+
|
|
652
669
|
## Sessions
|
|
653
670
|
|
|
654
671
|
When `persist_sessions` is on, each conversation is written to `<session_dir>/<id>.jsonl`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanobpm/nano-coder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.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.12.0",
|
|
35
|
+
"@nanobpm/nano-coder-darwin-x64": "0.12.0",
|
|
36
|
+
"@nanobpm/nano-coder-linux-arm64": "0.12.0",
|
|
37
|
+
"@nanobpm/nano-coder-linux-x64": "0.12.0"
|
|
38
38
|
}
|
|
39
39
|
}
|