@nanobpm/nano-coder 0.65.0 → 0.67.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 +17 -0
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -586,7 +586,10 @@ session_titles = false # ask the model for a few-word title per
586
586
  # title_model = "openai/gpt-4o-mini" # model for titles (default: the session's model)
587
587
  auto_compact = true # summarize automatically when the context fills up
588
588
  auto_compact_threshold = 0.8 # fraction of the context window
589
+ idle_compact = true # already past the threshold? compact at the idle prompt, not on your next message (Esc Esc cancels)
590
+ # idle_compact_hold_secs = 180 # how long the prompt (and any draft) must sit untouched first
589
591
  compaction_mode = "standard" # standard | smart (experimental, see Smart compaction)
592
+ # compaction_pin_requests = true # re-attach the user's requests verbatim after each summary (issue #66)
590
593
  # context_window = 128000 # override the window (providers can set it too)
591
594
  verbosity = "normal" # quiet | normal | verbose | debug (or --verbosity)
592
595
  timestamps = true # prefix CLI messages with the local time (HH:MM:SS)
@@ -1107,6 +1110,20 @@ another 10% of the window, so a context that can't shrink isn't summarized on ev
1107
1110
  If summarizing fails, the older messages are dropped with a note. The session log records
1108
1111
  the new conversation, so `--resume` continues from it.
1109
1112
 
1113
+ After the summary, compaction re-attaches the **user's requests verbatim** (a pinned block,
1114
+ `compaction_pin_requests`, on by default). A summary of a summary would otherwise paraphrase
1115
+ the user's original words away over repeated compactions; the pinned block is rebuilt from the
1116
+ original messages each time, so an exact flag, number or phrase the user stated once survives
1117
+ intact. The block is bounded by an allowance derived from the context window (about an eighth
1118
+ of it): when a long session's requests outgrow it, the oldest follow-ups are dropped with an
1119
+ explicit omission note — the goal and the newest requests are kept — so the pin can never push
1120
+ the context past the window. The note names the dropped requests by one covering session-log span
1121
+ (`#2-#40`), so however many requests are dropped the note stays a fixed, small size. Hook output appended to a prompt is not pinned as the user's
1122
+ words — the user-typed text is recorded separately, so a prompt that itself mentions a
1123
+ `<system-reminder>` tag (even at its very start) keeps its whole task in the pin. In smart mode each pinned request is
1124
+ labelled with its `#N` log ID, so the full text is
1125
+ one `history_read` away.
1126
+
1110
1127
  ### Smart compaction (experimental)
1111
1128
 
1112
1129
  A summary is lossy: whatever it leaves out is gone for the agent, even though the session
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanobpm/nano-coder",
3
- "version": "0.65.0",
3
+ "version": "0.67.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.65.0",
31
- "@nanobpm/nano-coder-darwin-x64": "0.65.0",
32
- "@nanobpm/nano-coder-linux-arm64": "0.65.0",
33
- "@nanobpm/nano-coder-linux-x64": "0.65.0"
30
+ "@nanobpm/nano-coder-darwin-arm64": "0.67.0",
31
+ "@nanobpm/nano-coder-darwin-x64": "0.67.0",
32
+ "@nanobpm/nano-coder-linux-arm64": "0.67.0",
33
+ "@nanobpm/nano-coder-linux-x64": "0.67.0"
34
34
  }
35
35
  }