@andares/pi-toolkits 1.0.1 → 1.1.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/CHANGELOG.md CHANGED
@@ -11,6 +11,23 @@ renames that heading to the version being published and refuses an empty section
11
11
 
12
12
  <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
13
13
 
14
+ ## 1.1.0 — 2026-11-25
15
+
16
+ <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
17
+
18
+ - **spec** — running `/ask-spec` without arguments while a spec review is active now leaves the phase; `/ask-spec off` still works.
19
+ - **spec** — after feedback, the next submitted revision starts a new review server and opens a new window instead of printing a dead URL; reopening a closed review restarts it, and the revision history is preserved.
20
+ - **keep** — `/keep-quit` marks the current session unfinished and quits in one step; `/keep-load` lists that backlog, already-loaded rows dimmed but still selectable, and `/keep-drop` (or `ctrl+r` in the list) removes one.
21
+ - **keep** — the next interactive start reports how many kept sessions are still unloaded (`2 not loaded · /keep-load`).
22
+ - **keep** — a loaded session begins with the note you left at quit time, delivered as a message the model can read without triggering a turn.
23
+ - **keep** — the backlog is an append-only ledger: two pi processes can write at once, and a `load` left behind by a killed process is repaired on the next read.
24
+
25
+ ## 1.0.2 — 2026-11-24
26
+
27
+ <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
28
+
29
+ - **host compatibility** — verified against every published pi release from 0.99.0 through 1.6.0 (window 1.3–1.6); the declared range stays `pi >= 0.99.0` with no upper bound, and the package loads cleanly on 1.6.0.
30
+
14
31
  ## 1.0.1 — 2026-11-17
15
32
 
16
33
  - **ask-spec** — the browser review command is now `/ask-spec` (`/ask-plan` still works as an alias), the submit tool is `spec_submit`, and an untitled review defaults to `specs/spec.md` instead of `specs/plan.md`.
@@ -64,3 +81,5 @@ renames that heading to the version being published and refuses an empty section
64
81
 
65
82
 
66
83
 
84
+
85
+
package/README.md CHANGED
@@ -13,9 +13,9 @@
13
13
  [![pi >= 0.99](https://img.shields.io/badge/pi-%3E%3D0.99.0-blueviolet)](https://github.com/earendil-works/pi)
14
14
  [![GitHub](https://img.shields.io/badge/github-andares%2Fpi--toolkits-181717?logo=github)](https://github.com/andares/pi-toolkits)
15
15
 
16
- In a nutshell: twelve ready-to-use capabilities — **read-only consult mode** `ask`, **session-scoped boundary permission** `ask-perm`, **model favorites** `favorites`, **prompt stash** `stash`, **third-party code review** `ask-review`, **dedicated compaction model** `compact-model`, **session startup automation** `autostart`, an **agent memory framework** `ask-init`, a **spec review in the browser** `ask-spec`, an **acceptance ledger with a browser page** `ask-uat`, a **quit watchdog** `quit-guard`, and **release notes on the first start after an upgrade** `whats-new` — with more to come.
16
+ In a nutshell: thirteen ready-to-use capabilities — **read-only consult mode** `ask`, **session-scoped boundary permission** `ask-perm`, **model favorites** `favorites`, **prompt stash** `stash`, **third-party code review** `ask-review`, **dedicated compaction model** `compact-model`, **session startup automation** `autostart`, an **agent memory framework** `ask-init`, a **spec review in the browser** `ask-spec`, an **acceptance ledger with a browser page** `ask-uat`, a **quit watchdog** `quit-guard`, a **session backlog for parallel work** `keep`, and **release notes on the first start after an upgrade** `whats-new` — with more to come.
17
17
 
18
- **Requirements**: pi `>=0.99.0`. Every published pi release from 0.99.0 through 1.5.2 has been verified with the full gate (install → `tsc --noEmit` → full test suite → keybinding audit → hash compare of the host files this package patches), each in a sandbox with the whole `@earendil-works/*` family pinned to the version under test. Newer releases are verified as they ship and the floor moves only when the measurement says so; `pnpm check:compat` reproduces the result. Note: pi ≥ 0.99 hosts require host-provided packages to be declared in `peerDependencies` with a `"*"` range — `@earendil-works/pi-tui` and `typebox` (the `scratchpad` tool builds a TypeBox schema) are declared that way; an installed copy in `dependencies` would make pi warn.
18
+ **Requirements**: pi `>=0.99.0`. Every published pi release from 0.99.0 through 1.6.0 has been verified with the full gate (install → `tsc --noEmit` → full test suite → keybinding audit → hash compare of the host files this package patches), each in a sandbox with the whole `@earendil-works/*` family pinned to the version under test. Newer releases are verified as they ship and the floor moves only when the measurement says so; `pnpm check:compat` reproduces the result. Note: pi ≥ 0.99 hosts require host-provided packages to be declared in `peerDependencies` with a `"*"` range — `@earendil-works/pi-tui` and `typebox` (the `scratchpad` tool builds a TypeBox schema) are declared that way; an installed copy in `dependencies` would make pi warn.
19
19
 
20
20
  ---
21
21
 
@@ -58,6 +58,7 @@ After installing, verify in any pi session:
58
58
  - [🚀 autostart — session startup automation](#autostart)
59
59
  - [🧠 init — agent memory framework](#init)
60
60
  - [🧯 quit-guard — quit watchdog](#quit-guard)
61
+ - [🧷 keep — session backlog](#keep)
61
62
  - [🆕 whats-new — release notes after an upgrade](#whats-new)
62
63
  - [Development](#development)
63
64
  - [Contributing](#contributing)
@@ -82,6 +83,7 @@ After installing, verify in any pi session:
82
83
  | 🚀 **autostart** session startup automation | `.pi/autostart.toml` | declare slash commands to run automatically at session start, per project (first use case: mounting multi-repo directories with `/add-dir`); never runs in untrusted directories, unregistered commands are skipped instead of being sent to the model |
83
84
  | 🧠 **init** agent memory framework | `/ask-init` | install or adopt a fixed memory layout (`AGENTS.md` + `specs/` + `.agents/memory` + `.agents/implementations`), migrate an existing one with a snapshot and a coverage table, then audit/refresh it for drift, budgets and duplicated facts |
84
85
  | 🧯 **quit-guard** quit watchdog | `/quit-guard` | force-exit when an interactive shutdown hangs, whether after the TUI teardown or before it on a signal-triggered quit; write a hang report and give the shell prompt back; TUI restarts and Ctrl+Z resume disarm it |
86
+ | 🧷 **keep** session backlog | `/keep-quit` · `/keep-load` · `/keep-drop` | mark a session unfinished as you quit, reopen the backlog next time (loaded rows dimmed but still selectable), drop what you finished; an append-only ledger, no lock and no host session listing |
85
87
  | 🆕 **whats-new** release notes after an upgrade | automatic | the first `pi` start after an upgrade shows what changed since the version you last ran, once; no slash command or other global namespace is claimed |
86
88
 
87
89
  ---
@@ -298,6 +300,7 @@ After a development task is done, type the `/ask-review` command to summon **a d
298
300
  - **Approve and deny both carry your notes.** They only choose the next step: approve means "start implementing" (with every note applied on the way), deny means "revise the spec and submit again".
299
301
  - **History is kept.** Every submitted revision is stored under `<agent-dir>/ask-spec/<slug>/` and the header lets you reopen any of them read-only. Existing `<agent-dir>/ask-plan/` histories are migrated on first use.
300
302
  - **The review phase uses the boundary checks.** `/ask-perm` is switched on with its defaults when the review starts and restored when it ends; the only file the review phase may write is markdown.
303
+ - **Every revision gets a fresh window.** The review server closes shortly after you send a decision, so the next submitted revision starts a new server (next free port in the 20-port range) and opens a new window instead of pointing you at a dead URL. That is a restart of the page, not of the review: every revision, annotation and decision is kept, and the history drawer still lists the earlier rounds.
301
304
  - **No model switching, ever.** The spec is reviewed and implemented with whatever model the session is on. (`/ask-review` is the one command that does switch, because you asked it to.)
302
305
 
303
306
  **Browser on WSL**: the review server binds `0.0.0.0` and the URL is printed with the WSL address, because Windows cannot reach a loopback-only server inside WSL. The opener prefers a Windows-side launcher (`wslview`, `cmd.exe /c start`, `powershell Start-Process`) and only falls back to `xdg-open` elsewhere — that is the difference between "opens your browser" and "opens a browser inside WSL that you cannot see".
@@ -305,6 +308,7 @@ After a development task is done, type the `/ask-review` command to summon **a d
305
308
  ```text
306
309
  /ask-spec build the export feature # start the review
307
310
  /ask-spec open # re-open the review page
311
+ /ask-spec # while reviewing: leave the phase
308
312
  /ask-spec off # leave the phase (the draft stays where it is)
309
313
  ```
310
314
 
@@ -387,7 +391,7 @@ pi's `/compact` and auto-compact summarize the context **with the current sessio
387
391
  | auto-compact threshold reached | summarized by the compaction model |
388
392
  | context overflow recovery | summarized by the compaction model, retry behavior unchanged |
389
393
 
390
- **Parts that are identical to pi's built-in behavior after takeover** (the built-in implementation is mirrored verbatim — copied from 0.87.1, byte-identical across 1.2.0 → 1.5.2 apart from the two 1.4.0 fixes adopted here: summaries request the model's output limit instead of a fixed fraction of `reserveTokens`, and `/compact <instructions>` also reaches the split-turn prefix, plus the 1.5.0 `cost.totalFromProvider` merge rule in the usage accounting — and only the executing model changes; the conversation serializer itself is imported from the host, so it follows whatever the running host does, e.g. 1.2.0 stops feeding assistant thinking back into the summarization request):
394
+ **Parts that are identical to pi's built-in behavior after takeover** (the built-in implementation is mirrored verbatim — copied from 0.87.1, byte-identical across 1.2.0 → 1.6.0 apart from the two 1.4.0 fixes adopted here: summaries request the model's output limit instead of a fixed fraction of `reserveTokens`, and `/compact <instructions>` also reaches the split-turn prefix, plus the 1.5.0 `cost.totalFromProvider` merge rule in the usage accounting — and only the executing model changes; the conversation serializer itself is imported from the host, so it follows whatever the running host does, e.g. 1.2.0 stops feeding assistant thinking back into the summarization request):
391
395
 
392
396
  - **Summary format** — the structured Goal / Progress / Key Decisions checkpoint; when a summary already exists, the iterative-update prompt is used so information carries over instead of being lost
393
397
  - **Split behavior** — the `keepRecentTokens` retention policy, and `firstKeptEntryId` / `tokensBefore` passed back unchanged
@@ -468,7 +472,7 @@ An **identical command line** declared by both sources runs once: a duplicate is
468
472
 
469
473
  **Key constraint: extension commands only**. Commands registered via `registerCommand` such as `/add-dir` (pi-add-dir) and `/cd` (pi-cd) work; built-in commands (`/compact`, `/reload`, `/resume`, …) are dispatched in the TUI layer and cannot be triggered from the extension layer; skill commands (`/skill:name`) are an expansion mechanism rather than an execution mechanism. The target extension you depend on (e.g. pi-add-dir) must be installed first.
470
474
 
471
- > **Implementation notes**: execution uses `sendUserMessage(cmd, { expandPromptTemplates: true })` — that option routes `/cmd args` into command dispatch instead of the model prompt path (the wrapper defaults to `false`; `_tryExecuteExtensionCommand` is byte-identical across 1.2.0–1.5.2, and although 1.5.1 moved the rest of `sendUserMessage` into `_preparePrompt`, the extension-command branch is still its first early exit — see the host-compatibility discipline in AGENTS.md). Pre-validation uses `pi.getCommands()` (accepting only `source: "extension"`). Depends on `smol-toml` (zero-dependency, ~10KB, TOML 1.0).
475
+ > **Implementation notes**: execution uses `sendUserMessage(cmd, { expandPromptTemplates: true })` — that option routes `/cmd args` into command dispatch instead of the model prompt path (the wrapper defaults to `false`; `_tryExecuteExtensionCommand` is byte-identical across 1.2.0–1.6.0, and although 1.5.1 moved the rest of `sendUserMessage` into `_preparePrompt`, the extension-command branch is still its first early exit — see the host-compatibility discipline in AGENTS.md). Pre-validation uses `pi.getCommands()` (accepting only `source: "extension"`). Depends on `smol-toml` (zero-dependency, ~10KB, TOML 1.0).
472
476
 
473
477
  ---
474
478
 
@@ -681,6 +685,43 @@ kill appends `thread-kill heartbeat-stopped …` there.
681
685
 
682
686
  ---
683
687
 
688
+ ## 🧷 keep — session backlog for parallel work
689
+
690
+ <a name="keep"></a>
691
+
692
+ **What this does.** `/keep-quit` marks the current session unfinished and quits in one step, so the
693
+ list of open tasks is written down at the moment you walk away instead of reconstructed from memory
694
+ a day later. `/keep-load` lists exactly that backlog. Loading does **not** remove anything:
695
+ `/keep-drop` (or `ctrl+r` in the list) is the only way out.
696
+
697
+ Kept and loaded are two axes on purpose. A session is *kept* while it is unfinished and *loaded*
698
+ while some pi process has it open, and the second one is a record, not a lock: a hard-killed
699
+ process leaves a stale marker, so a loaded row stays selectable and can be loaded again. The next
700
+ read after that process is gone notices the dead pid and marks the session unloaded again.
701
+
702
+ State is an append-only ledger at `<agent-dir>/pi-toolkits-keep/keep.jsonl` with four events
703
+ (`keep`, `drop`, `load`, `unload`); everything the list shows is a pure fold over it, so two pi
704
+ processes can append at the same time without a lock. Nothing here calls the host's session
705
+ listing (576 ms for this project's 109 sessions, 9.8 s for the whole agent dir) — the backlog reads
706
+ only the ledger, and `rebuild` reads 16 KB per session file when you have to restore it.
707
+
708
+ | command | what it does |
709
+ | --- | --- |
710
+ | `/keep-quit [note]` | mark this session unfinished and quit; the note falls back to the session name, then to the first user message |
711
+ | `/keep-load` | open the backlog: `↑↓` move, enter load, `ctrl+r` drop, esc cancel; already-loaded rows are dimmed but still selectable |
712
+ | `/keep-load <n\|id>` | load by 1-based index or session id prefix |
713
+ | `/keep-load --all` | include other projects, with a project column |
714
+ | `/keep-load rebuild` | re-add keeps from the breadcrumb each session file carries (recovery after the ledger is lost) |
715
+ | `/keep-drop` | remove the current session from the backlog |
716
+
717
+ The next interactive start shows the backlog as one line — `2 not loaded · /keep-load`. Loading a
718
+ session injects the note you left at quit time as a message the model can see without triggering a
719
+ turn, so it knows where you stopped. The current session never lists itself: `/keep-quit` and
720
+ `/keep-drop` are its commands.
721
+
722
+ **Not a lock.** Two processes can still open the same session file; this records that they did, it
723
+ does not prevent it. `pi -ne` and headless runs never write `load`, so they stay invisible here.
724
+
684
725
  ## 🆕 whats-new — release notes after an upgrade
685
726
 
686
727
  <a name="whats-new"></a>
@@ -718,7 +759,7 @@ pnpm typecheck # tsc --noEmit
718
759
  pnpm test # vitest (all feature unit tests)
719
760
 
720
761
  pnpm check:keybindings # audit this plugin's keys against the host's own dispatch table
721
- pnpm check:compat # mandatory 4-line window + backward probe (4 more lines) → public floor
762
+ pnpm check:compat # re-measure the declared pi range against real hosts (fails if it drifted)
722
763
  pnpm approval-report # summarize the local approval log (answer mix, targets, rule candidates)
723
764
  ```
724
765
 
@@ -796,7 +837,7 @@ PRs and issues welcome. A few conventions:
796
837
  - **Built-in patches** (favorites) must stay **version-guarded and idempotent** — verify the target prototype members exist before patching, guard against double-apply, degrade with a `console.warn` instead of breaking the extension
797
838
  - **Built-in prompt sync** (compact) — the summarization prompts in `src/features/compact/prompt.ts` are copied verbatim from pi's built-in compaction; when upgrading the pi dependency, diff `dist/core/compaction/compaction.js` (and `utils.js`) and update the strings + assembly helpers to match, keeping takeover output byte-compatible with stock
798
839
  - **Keybindings** — before picking a new shortcut, check pi defaults + reserved keys, terminal control chars, and OS/terminal-emulator grabs; prefer `ctrl+alt+<letter>` for cross-platform safety. Do not stop at "it works on my machine in the main screen": in `fullscreen` mode (pi's default since 1.0) the alt-screen layer consumes `tui.altScreen.*` **before** dialogs see the key, and on Windows/WSL several of those bindings differ from the Linux defaults. Run `pnpm check:keybindings [candidate...]` (and `pnpm check:keybindings --all` after a pi upgrade) — it probes the installed host's resolved keybinding table with the host's own `matchesKey`. A key free in the host table can still be taken at the machine layer: Windows Terminal binds `ctrl+v` (paste) and `ctrl+shift+f` (find), and third-party Windows tools commonly grab `ctrl+alt+<letter>` (a screenshot tool once took `ctrl+alt+f`) — so try the key for real on the target machine before shipping it.
799
- - **Host compatibility** — the peer range is a measured statement, not a wish, and it only points backwards: the four most recently released pi minor lines are a mandatory window (fix our code, never raise the floor), below it we probe up to four older lines to find where compatibility actually ends, and the single number users see is the resulting floor (`pi >= <floor>`, no upper bound). Re-run `pnpm check:compat` whenever the host dependency moves and read its verdict block (it fails if the declared floor drifts from the measured one). See the pi 宿主兼容 section of AGENTS.md; keybinding collisions found during an upgrade are reported to the maintainer for a decision, never re-keyed silently.
840
+ - **Host compatibility** — the peer range is a measured statement, not a wish: `pi >= <floor>` with no upper bound, where the floor is the oldest release that still passes the full gate and every published version from the floor up to the newest verified one has been tested. Move the host dependency only together with a green `pnpm check:compat` run — it re-measures the declared range against real hosts and fails if the declared floor drifts from the measured one. See the pi 宿主兼容 section of AGENTS.md; keybinding collisions found during an upgrade are reported to the maintainer for a decision, never re-keyed silently.
800
841
  - **Quality gate** — `pnpm typecheck && pnpm test` must pass before submitting
801
842
 
802
843
  ---
package/README.zh-CN.md CHANGED
@@ -13,9 +13,9 @@
13
13
  [![pi >= 0.99](https://img.shields.io/badge/pi-%3E%3D0.99.0-blueviolet)](https://github.com/earendil-works/pi)
14
14
  [![GitHub](https://img.shields.io/badge/github-andares%2Fpi--toolkits-181717?logo=github)](https://github.com/andares/pi-toolkits)
15
15
 
16
- 一句话介绍:目前包含十二个开箱即用的功能——**只读咨询模式** `ask`、**会话级边界权限** `ask-perm`、**模型收藏** `favorites`、**提示词暂存** `stash`、**第三方代码评审** `ask-review`、**独立压缩模型** `compact-model`、**会话启动自动化** `autostart`、**agent 记忆框架** `ask-init`、**浏览器内规格评审** `ask-spec`、**验收台账与浏览器页面** `ask-uat`、**退出看门狗** `quit-guard`、**升级后首次启动的版本变更提示** `whats-new`,后续持续追加。
16
+ 一句话介绍:目前包含十三个开箱即用的功能——**只读咨询模式** `ask`、**会话级边界权限** `ask-perm`、**模型收藏** `favorites`、**提示词暂存** `stash`、**第三方代码评审** `ask-review`、**独立压缩模型** `compact-model`、**会话启动自动化** `autostart`、**agent 记忆框架** `ask-init`、**浏览器内规格评审** `ask-spec`、**验收台账与浏览器页面** `ask-uat`、**退出看门狗** `quit-guard`、**并行任务的会话暂存** `keep`、**升级后首次启动的版本变更提示** `whats-new`,后续持续追加。
17
17
 
18
- **版本要求**:pi `>=0.99.0`。0.99.0 到 1.5.2 的每一个已发布版本都用完整门禁实测过(install → `tsc --noEmit` → 全量测试 → 键位审计 → 对 patch 目标宿主文件做哈希比对),每个版本都在沙箱中把整个 `@earendil-works/*` 家族钉在同一版本。更新的版本随发布逐个验证,下限只在实测结果允许时移动;`pnpm check:compat` 可复现该结论。注:pi ≥ 0.99 的宿主要求「宿主提供的包」一律声明为 peerDependencies `"*"` —— `@earendil-works/pi-tui` 与 `typebox`(ask 的 `scratchpad` 用它构造参数 schema)都按此声明;若放进 `dependencies`,pi 会告警。
18
+ **版本要求**:pi `>=0.99.0`。0.99.0 到 1.6.0 的每一个已发布版本都用完整门禁实测过(install → `tsc --noEmit` → 全量测试 → 键位审计 → 对 patch 目标宿主文件做哈希比对),每个版本都在沙箱中把整个 `@earendil-works/*` 家族钉在同一版本。更新的版本随发布逐个验证,下限只在实测结果允许时移动;`pnpm check:compat` 可复现该结论。注:pi ≥ 0.99 的宿主要求「宿主提供的包」一律声明为 peerDependencies `"*"` —— `@earendil-works/pi-tui` 与 `typebox`(ask 的 `scratchpad` 用它构造参数 schema)都按此声明;若放进 `dependencies`,pi 会告警。
19
19
 
20
20
  ---
21
21
 
@@ -58,6 +58,7 @@ pi -e ./src/index.ts
58
58
  - [🚀 autostart — 会话启动自动化](#autostart)
59
59
  - [🧠 init — agent 记忆框架](#init)
60
60
  - [🧯 quit-guard — 退出看门狗](#quit-guard)
61
+ - [🧷 keep — 会话暂存](#keep)
61
62
  - [🆕 whats-new — 升级后的版本变更提示](#whats-new)
62
63
  - [开发](#development)
63
64
  - [贡献](#contributing)
@@ -82,6 +83,7 @@ pi -e ./src/index.ts
82
83
  | 🚀 **autostart** 会话启动自动化 | `.pi/autostart.toml` | 项目内声明启动时自动执行的斜杠命令(首批用例:`/add-dir` 多仓库挂载);未信任不执行、未注册命令跳过不发给模型 |
83
84
  | 🧠 **init** agent 记忆框架 | `/ask-init` | 安装或接管一套固定的记忆结构(`AGENTS.md` + `specs/` + `.agents/memory` + `.agents/implementations`),带快照与覆盖表迁移旧文档,之后可随时审计/刷新漂移、预算与重复事实 |
84
85
  | 🧯 **quit-guard** 退出看门狗 | `/quit-guard` | 交互式退出卡死时,无论发生在 TUI 收尾之后、还是信号触发路径的收尾之前,超时后写诊断报告并强制退出,把命令行提示符还给你;TUI 重启与 Ctrl+Z 恢复都会解除看守 |
86
+ | 🧷 **keep** 会话暂存 | `/keep-quit` · `/keep-load` · `/keep-drop` | 退出时一条命令把当前会话标记为未完成,下次进来直接看这个待办列表(已载入的置灰但仍可选);做完的用 `/keep-drop` 或列表里的 `ctrl+r` 移出。只追加账本,没有锁,也不读宿主的会话列表 |
85
87
  | 🆕 **whats-new** 升级后的版本变更提示 | 自动 | 升级后的首次 `pi` 启动展示「从你上次运行的版本到现在改了什么」,只展示一次;不注册斜杠命令,不占用宿主的全局命令命名空间 |
86
88
 
87
89
  ---
@@ -298,6 +300,7 @@ run = ["/ask-perm allow allow allow ask"]
298
300
  - **批准和提意见都携带批注。** 它们只决定下一步:批准是「开始实施」(所有批注都带上),提意见是「改完 spec 再提交一版」。
299
301
  - **历史留档。** 每次提交都存在 `<agent-dir>/ask-spec/<slug>/`,页头可以只读回看任意一版;旧的 `<agent-dir>/ask-plan/` 历史会在第一次使用时迁移。
300
302
  - **评审期走边界检查。** `/ask-perm` 在评审开始时按默认值开启,结束时恢复;评审期唯一能写的是 markdown。
303
+ - **每一版都有自己的新窗口。** 你提交决定后评审服务很快关端口,所以下一次提交修订会重起服务(20 个端口段里取下一个空闲的)并弹新窗口,而不是把你指向一个死链接。重启的是页面,不是评审:每一版、每条批注和决定都保留,历史抽屉里前几轮仍在。
301
304
  - **绝不切模型。** spec 评审与实施都用会话当前的模型。(`/ask-review` 是唯一会切模型的命令,那是你要求的。)
302
305
 
303
306
  **WSL 下的浏览器**:评审服务器绑 `0.0.0.0`,URL 用 WSL 的地址打印,因为 Windows 连不到 WSL 里只绑 loopback 的服务器。打开器优先用 Windows 侧启动器(`wslview`、`cmd.exe /c start`、`powershell Start-Process`),其它平台才回落到 `xdg-open`——这决定了是「打开你的浏览器」还是「在 WSL 里打开一个你看不见的浏览器」。
@@ -305,6 +308,7 @@ run = ["/ask-perm allow allow allow ask"]
305
308
  ```text
306
309
  /ask-spec 做导出功能 # 进入规格评审
307
310
  /ask-spec open # 重新打开评审页
311
+ /ask-spec # 评审中再次执行:退出评审期
308
312
  /ask-spec off # 退出评审期(草稿留在原处)
309
313
  ```
310
314
 
@@ -380,7 +384,7 @@ pi 的 `/compact` 与 auto-compact 默认**用当前会话模型**做上下文
380
384
  | auto-compact 阈值触发 | 压缩模型总结 |
381
385
  | context overflow 恢复 | 压缩模型总结,重试行为不变 |
382
386
 
383
- **接管后与 pi 内建行为完全一致的部分**(逐字同步 pi 内建实现,复制自 0.87.1、在 1.2.0 → 1.5.2 内字节级不变 —— 除了此处采纳的两项 1.4.0 修正:摘要请求使用模型自身的输出上限而非 `reserveTokens` 的固定比例,以及 `/compact <instructions>` 也会进入 split-turn 前缀,外加 1.5.0 的 `cost.totalFromProvider` 合并规则(用量统计);只换执行模型;对话序列化函数(`serializeConversation`)是直接从宿主导入的,因此跟随宿主行为 —— 例如 1.2.0 起不再把 assistant thinking 回填进摘要请求):
387
+ **接管后与 pi 内建行为完全一致的部分**(逐字同步 pi 内建实现,复制自 0.87.1、在 1.2.0 → 1.6.0 内字节级不变 —— 除了此处采纳的两项 1.4.0 修正:摘要请求使用模型自身的输出上限而非 `reserveTokens` 的固定比例,以及 `/compact <instructions>` 也会进入 split-turn 前缀,外加 1.5.0 的 `cost.totalFromProvider` 合并规则(用量统计);只换执行模型;对话序列化函数(`serializeConversation`)是直接从宿主导入的,因此跟随宿主行为 —— 例如 1.2.0 起不再把 assistant thinking 回填进摘要请求):
384
388
 
385
389
  - **摘要格式** —— Goal / Progress / Key Decisions 结构化 checkpoint;已有摘要时用迭代更新版 prompt,信息延续不丢
386
390
  - **切分行为** —— 保留最近 `keepRecentTokens` 的策略、`firstKeptEntryId` / `tokensBefore` 原样回传,不动
@@ -461,7 +465,7 @@ run = [
461
465
 
462
466
  **关键约束:只支持扩展命令**。`/add-dir`(pi-add-dir)、`/cd`(pi-cd)等 `registerCommand` 注册的命令可以;内置命令(`/compact`、`/reload`、`/resume`…)在 TUI 层分发,扩展层触发不了;skill 命令(`/skill:name`)是展开机制而非执行机制。依赖的目标扩展(如 pi-add-dir)需要先安装。
463
467
 
464
- > **实现说明**:执行用 `sendUserMessage(cmd, { expandPromptTemplates: true })` —— 该选项把 `/cmd args` 路由到命令分发而不是模型 prompt 路径(包装层默认 `false`;`_tryExecuteExtensionCommand` 在 1.2.0–1.5.2 全区间字节级一致,1.5.1 虽把 `sendUserMessage` 其余部分重构进 `_preparePrompt`,扩展命令分支仍是它最前面的早退路径,见 AGENTS.md 宿主兼容纪律)。预校验用 `pi.getCommands()`(只认 `source: "extension"`)。依赖 `smol-toml`(零依赖、~10KB、TOML 1.0)。
468
+ > **实现说明**:执行用 `sendUserMessage(cmd, { expandPromptTemplates: true })` —— 该选项把 `/cmd args` 路由到命令分发而不是模型 prompt 路径(包装层默认 `false`;`_tryExecuteExtensionCommand` 在 1.2.0–1.6.0 全区间字节级一致,1.5.1 虽把 `sendUserMessage` 其余部分重构进 `_preparePrompt`,扩展命令分支仍是它最前面的早退路径,见 AGENTS.md 宿主兼容纪律)。预校验用 `pi.getCommands()`(只认 `source: "extension"`)。依赖 `smol-toml`(零依赖、~10KB、TOML 1.0)。
465
469
 
466
470
  ---
467
471
 
@@ -591,6 +595,37 @@ refresh 就会正常更新它。
591
595
 
592
596
  ---
593
597
 
598
+ ## 🧷 keep — 并行任务的会话暂存
599
+
600
+ <a name="keep"></a>
601
+
602
+ **做什么。** `/keep-quit` 把「退出」和「这个任务还没做完」合成一次动作:走的时候顺手记下来,不用第二天再凭记忆翻会话。
603
+ `/keep-load` 只列这份待办。**载入不会把会话移出待办**——出列只有 `/keep-drop` 和列表里的 `ctrl+r` 两条路。
604
+
605
+ 「已入账」和「已载入」故意分成两个维度:入账表示没做完,载入表示某个 pi 进程正开着它。后者是**记账不是锁**——
606
+ 进程被硬杀会留下脏标记,所以已载入的行仍然可以选中、可以强行重载;那个进程真的没了之后,下一次读取会发现 pid 不在了,
607
+ 自动补一条解锁记录。
608
+
609
+ 状态是 `<agent-dir>/pi-toolkits-keep/keep.jsonl` 里的只追加事件流(`keep` / `drop` / `load` / `unload`),
610
+ 列表是它的纯函数折叠,所以两个 pi 进程可以同时追加,不需要加锁。这里**不调用宿主的会话列表**(本项目 109 个会话要 576 ms,
611
+ 整个 agent 目录 648 个要 9.8 s)——日常只读账本,只有 `rebuild` 会在恢复时读每个会话文件的尾部 16 KB。
612
+
613
+ | 命令 | 作用 |
614
+ | --- | --- |
615
+ | `/keep-quit [note]` | 标记当前会话未完成并退出;note 省略时依次回落到会话名、首条用户消息 |
616
+ | `/keep-load` | 打开待办:↑↓ 移动、enter 载入、`ctrl+r` 移出、esc 取消;已载入的行置灰但仍可选中 |
617
+ | `/keep-load <序号\|id>` | 按 1 起序号或会话 id 前缀直接载入 |
618
+ | `/keep-load --all` | 含其他项目,并多一列项目名 |
619
+ | `/keep-load rebuild` | 从会话文件里的面包屑重建账本(账本丢了之后的兜底) |
620
+ | `/keep-drop` | 把当前会话移出待办 |
621
+
622
+ 下次交互式启动时,待办只占一行:`2 not loaded · /keep-load`。载入会话后,当初留下的那句备注会作为一条
623
+ **模型能看到、但不触发回合**的消息注入,所以 agent 一上来就知道上次停在哪。列表里永远不出现当前会话本身——
624
+ 它的命令是 `/keep-quit` 和 `/keep-drop`。
625
+
626
+ **不是锁。** 两个进程仍然可以同时打开同一个会话文件;这里只记录发生过,不阻止。`pi -ne` 与 headless 运行不写 `load`,
627
+ 在这里是不可见的。
628
+
594
629
  ## 🆕 whats-new — 升级后的版本变更提示
595
630
 
596
631
  <a name="whats-new"></a>
@@ -615,7 +650,7 @@ pnpm typecheck # tsc --noEmit
615
650
  pnpm test # vitest(全部功能单元测试)
616
651
 
617
652
  pnpm check:keybindings # 用宿主自己的分发表审计本插件的按键
618
- pnpm check:compat # 校验声明的 pi 下限:强制 4 条线窗口 + 向后 4 条线探针 → public floor
653
+ pnpm check:compat # 用真实宿主实测声明的 pi 区间(与声明不符即判失败)
619
654
  pnpm approval-report # 汇总本地审批日志(答复分布、目标目录、候选规则)
620
655
  ```
621
656
 
@@ -692,7 +727,7 @@ pnpm release:github --audit # 列出 npm 版本 vs GitHub Release vs 远
692
727
  - **内建 patch**(favorites)必须保持**版本守卫 + 幂等** —— 打 patch 前先确认目标原型成员存在,防止重复应用,失败时用 `console.warn` 降级而不是把扩展搞挂
693
728
  - **内建提示词同步**(compact) —— `src/features/compact/prompt.ts` 里的总结 prompt 逐字抄自 pi 内建压缩;升级 pi 依赖时 diff `dist/core/compaction/compaction.js`(及 `utils.js`),同步字符串与组装辅助函数,保持接管输出与内建字节级一致
694
729
  - **键位** —— 定新快捷键前先查 pi 默认键位 + 保留键、终端控制字符、OS/终端模拟器占用;跨平台安全优先选 `ctrl+alt+<字母>`。**不得只验证「主屏下我这台机器能用」**:自 pi 1.0 起默认 `fullscreen`,alt-screen 层在对话框看到按键**之前**就消费 `tui.altScreen.*`,且 Windows/WSL 上多个绑定与 Linux 默认值不同。用 `pnpm check:keybindings [候选键...]` 核查(pi 升级后跑 `pnpm check:keybindings --all`),它用宿主自己的 `matchesKey` 探测已安装宿主的**已解析**键位表。**宿主表空闲 ≠ 机器层空闲**:Windows Terminal 默认占 `ctrl+v`(粘贴)与 `ctrl+shift+f`(查找),第三方 Windows 工具常绑 `ctrl+alt+<字母>`(截图工具占过 `ctrl+alt+f`)——定键后必须在真机试按,确认按键真的到得了应用。
695
- - **宿主兼容** —— peer 区间是实测结论而非愿望,而且只往回指:最近 4 个已发布中版本线是**强制窗口**(不兼容就改我们的代码,绝不抬下限),窗口之下再向后探最多 4 条线找出兼容实际停在哪里,对使用者只展示一个数:由此得到的**下限**(`pi >= <floor>`,无上界)。宿主依赖一动就重跑 `pnpm check:compat`,读它的 verdict 段(声明下限与实测不一致会直接判失败)。详见 AGENTS.md「pi 宿主兼容」;升级中发现的键位冲突**上报崔总决策**,不得顺手换键。
730
+ - **宿主兼容** —— peer 区间是实测结论而非愿望:`pi >= <floor>`,无上界;下限是仍能通过完整门禁的最老版本,下限到「已验证的最新版本」之间的每一个已发布版本都实测过。宿主依赖只在 `pnpm check:compat` 全绿时一起升——它用真实宿主重测声明区间,声明与实测不一致会直接判失败。详见 AGENTS.md「pi 宿主兼容」;升级中发现的键位冲突**上报崔总决策**,不得顺手换键。
696
731
  - **质量门禁** —— 提交前必须通过 `pnpm typecheck && pnpm test`
697
732
 
698
733
  ---
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@andares/pi-toolkits",
3
- "version": "1.0.1",
4
- "description": "Integrated toolkit extension for pi — ask mode (read-only Q&A), browser-reviewed planning, an acceptance ledger with a browser page, session-scoped permission checks, model favorites, prompt stash, third-party code review, session autostart, a dedicated compaction model, an agent memory framework (/ask-init), a quit watchdog, and release notes on the first start after an upgrade",
3
+ "version": "1.1.0",
4
+ "description": "Integrated toolkit extension for pi — ask mode (read-only Q&A), browser-reviewed planning, an acceptance ledger with a browser page, session-scoped permission checks, model favorites, prompt stash, third-party code review, session autostart, a dedicated compaction model, an agent memory framework (/ask-init), a session backlog (/keep-quit, /keep-load, /keep-drop), a quit watchdog, and release notes on the first start after an upgrade",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -49,7 +49,8 @@
49
49
  "watchdog",
50
50
  "whats-new",
51
51
  "release-notes",
52
- "changelog"
52
+ "changelog",
53
+ "session-backlog"
53
54
  ],
54
55
  "peerDependencies": {
55
56
  "@earendil-works/pi-coding-agent": ">=0.99.0",
@@ -62,9 +63,9 @@
62
63
  "smol-toml": "^1.9.0"
63
64
  },
64
65
  "devDependencies": {
65
- "@earendil-works/pi-ai": "^1.5.1",
66
- "@earendil-works/pi-coding-agent": "^1.5.1",
67
- "@earendil-works/pi-tui": "^1.5.1",
66
+ "@earendil-works/pi-ai": "^1.6.0",
67
+ "@earendil-works/pi-coding-agent": "^1.6.0",
68
+ "@earendil-works/pi-tui": "^1.6.0",
68
69
  "@types/node": "^26.6.2",
69
70
  "typebox": "^1.3.27",
70
71
  "typescript": "^5.6.0",
@@ -48,7 +48,7 @@ export const RUNNABLE_REASONS: ReadonlySet<string> = new Set([
48
48
  * `-r` (`--resume`), `--session <path>` and `--fork <path>` all open an
49
49
  * existing session *before* the first runtime exists, and that runtime is
50
50
  * created without an explicit session_start event, so extensions see pi's
51
- * default reason — `startup` — not `resume` (verified on pi 1.2.0–1.5.1:
51
+ * default reason — `startup` — not `resume` (verified on pi 1.2.0–1.6.0:
52
52
  * `main.js` builds the initial session manager from those flags and calls
53
53
  * `createAgentSessionRuntime` with no `sessionStartEvent`;
54
54
  * `agent-session.js` defaults it to `{ reason: "startup" }`). `resume` is only
@@ -27,11 +27,12 @@
27
27
  * that flag is what routes "/cmd args" through _tryExecuteExtensionCommand
28
28
  * instead of the model prompt path. The wrapper defaults it to false in this
29
29
  * package. `_tryExecuteExtensionCommand` is byte-identical across every
30
- * published version of the supported window (1.2.0 → 1.5.1); `sendUserMessage`
30
+ * published version of the supported window (1.3.0 → 1.6.0); `sendUserMessage`
31
31
  * itself was refactored in 1.5.1 (the rest of the body moved into
32
32
  * `_preparePrompt`, #9154), but the extension-command branch is still the
33
33
  * first early exit of the wrapper, so `/cmd args` never reaches the model
34
- * prompt path. See AGENTS.md host-compat discipline for the version matrix.
34
+ * prompt path (1.6.0 left `sendUserMessage` and `_preparePrompt`
35
+ * byte-identical). See AGENTS.md host-compat discipline for the version matrix.
35
36
  *
36
37
  * Only extension commands can run this way. Built-in commands (/compact,
37
38
  * /reload, /resume, …) are dispatched at the TUI layer and cannot be
@@ -13,7 +13,7 @@
13
13
  * the summary file-list tail are verbatim pi built-in behavior (copied
14
14
  * from 0.87.1; `core/compaction/compaction.js` stayed byte-identical
15
15
  * 1.0.0 → 1.3.0, 1.4.0 changed only the summary output budget and
16
- * the split-turn focus handling mirrored below, and 1.5.0 / 1.5.1 left it
16
+ * the split-turn focus handling mirrored below, and 1.5.0 → 1.6.0 left it
17
17
  * untouched; the only mirrored helper that moved after that span is
18
18
  * `combineUsage`, see prompt.ts) — only the executing
19
19
  * model differs. The one exception is `serializeConversation`, which is
@@ -6,16 +6,16 @@
6
6
  * summaries produced by the configured compact model are formatted exactly
7
7
  * like pi's own compaction output. Only the executing model differs.
8
8
  * Verified byte-identical against every published version of the supported
9
- * window (1.2.0 → 1.5.1): the only utils.js changes (1.2.0 dropping assistant
9
+ * window (1.3.0 → 1.6.0): the only utils.js changes (1.2.0 dropping assistant
10
10
  * thinking from serializeConversation; 1.5.1 routing `truncateText` through
11
11
  * `sliceHead` so a truncation never splits a surrogate pair) do not touch the
12
12
  * strings mirrored here — that serializer is imported from the host, not
13
13
  * mirrored — compaction.js last changed in 1.4.0, in the output budget and
14
14
  * the split-turn focus handling (both adopted here, see
15
- * buildTurnPrefixPromptText) and is untouched in 1.5.1, and
15
+ * buildTurnPrefixPromptText) and is untouched in 1.5.1, 1.5.2 and 1.6.0, and
16
16
  * core/usage-totals.js changed once past that point, in 1.5.0, which only
17
17
  * added the `cost.totalFromProvider` merge rule mirrored below (the numeric
18
- * fields are untouched; 1.5.1 left it alone). 0.87.0 shipped a
18
+ * fields are untouched; 1.5.1 → 1.6.0 left it alone). 0.87.0 shipped a
19
19
  * different split-turn prefix prompt; the text mirrored here is 0.87.1's
20
20
  * fix, and the mirror is the only variant any supported host gets
21
21
  * — intentional.
@@ -22,13 +22,17 @@
22
22
  * keeps loading and ctrl+p falls back to stock behavior. The prototype
23
23
  * shape touched here (handleInput/updateList/filterModels and the instance
24
24
  * fields below) is unchanged across the mandatory window
25
- * pi 1.2.0 → 1.5.1 (and exercised by the 0.99.0 → 1.1.0 backward probes).
25
+ * pi 1.3.0 → 1.6.0 (and exercised by the 0.99.0 → 1.2.0 backward probes).
26
26
  * updateList gained one layout change in 1.5.0 — the disambiguating model
27
27
  * name after the id — mirrored here; see distinctModelName below.
28
28
  * filterModels gained a second `preferredModel` argument in 1.5.1 (keep the
29
29
  * selection when a background catalog refresh lands, #9109). The override
30
30
  * forwards it as-is: hosts before 1.5.1 ignore the extra argument, hosts from
31
31
  * 1.5.1 keep the highlighted row instead of jumping back to the top.
32
+ * 1.6.0 changed the *call site* only: the stock handleInput re-filters just
33
+ * when the query text actually changed (cursor keys no longer move the
34
+ * selection). Our override is on filterModels, which that path still calls,
35
+ * and the favorites keys are intercepted before the original handleInput runs.
32
36
  */
33
37
  import {
34
38
  ModelSelectorComponent,
@@ -0,0 +1,44 @@
1
+ /**
2
+ * keep feature — constants shared by the ledger, the commands and the picker.
3
+ *
4
+ * Two custom entry types are written into the session file itself:
5
+ * - `keep:unfinished` is the breadcrumb appended by `/keep-quit` (display
6
+ * only, out of the model context) and the marker `rebuild` looks for in a
7
+ * session tail;
8
+ * - `keep:notice` carries the one-line startup notice, rendered through
9
+ * `registerEntryRenderer` so `ui.invalidate()` cannot wipe it.
10
+ *
11
+ * `keep:resume` is a `custom_message`, not an entry: it must reach the model
12
+ * (the note left at quit time is the whole point of coming back).
13
+ */
14
+ import type { KeyId } from "@earendil-works/pi-tui";
15
+
16
+ /** Breadcrumb entry appended when a session is kept. */
17
+ export const KEEP_ENTRY = "keep:unfinished";
18
+ /** Startup notice entry (rendered, never sent to the model). */
19
+ export const KEEP_NOTICE_ENTRY = "keep:notice";
20
+ /** Resume note message injected into the loaded session. */
21
+ export const KEEP_RESUME_ENTRY = "keep:resume";
22
+
23
+ /** `<agent-dir>/pi-toolkits-keep/keep.jsonl`. */
24
+ export const KEEP_DIR = "pi-toolkits-keep";
25
+ export const KEEP_LEDGER_FILE = "keep.jsonl";
26
+
27
+ /**
28
+ * Drop the highlighted row without loading it.
29
+ *
30
+ * `ctrl+r` is free where we need it: the host binds it to
31
+ * `app.session.rename` inside its own session selector, and to nothing in
32
+ * `tui.altScreen.*` (the bindings that preempt a dialog) or in the global
33
+ * table. Our picker owns its own component, so it consumes the key itself.
34
+ * Re-audited with `pnpm check:keybindings ctrl+r` — see the feature section in
35
+ * AGENTS.md for the re-check obligation on host upgrades.
36
+ */
37
+ export const KEEP_DROP_KEY: KeyId = "ctrl+r";
38
+
39
+ /** Rows shown before the list scrolls. */
40
+ export const KEEP_MAX_ROWS = 12;
41
+ /** Note length cap: a note is a reminder, not a summary. */
42
+ export const KEEP_NOTE_MAX = 60;
43
+ /** Bytes read from the end of a session file when rebuilding the ledger. */
44
+ export const KEEP_TAIL_BYTES = 16 * 1024;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * keep feature — text rendering.
3
+ *
4
+ * Pure string building so the rows, the startup notice and the resume note can
5
+ * be asserted without a terminal. Age is deliberately coarse (`12m`, `3h`,
6
+ * `2d`): the exact minute of a decision is in the ledger, not in the list.
7
+ */
8
+ import { basename } from "node:path";
9
+ import type { KeepEntryView } from "./ledger.js";
10
+
11
+ const MINUTE = 60_000;
12
+ const HOUR = 60 * MINUTE;
13
+ const DAY = 24 * HOUR;
14
+ const WEEK = 7 * DAY;
15
+
16
+ /** `now` / `12m` / `3h` / `2d` / `5w`. */
17
+ export function formatAge(iso: string, now: Date): string {
18
+ const then = Date.parse(iso);
19
+ if (Number.isNaN(then)) return "?";
20
+ const diff = now.getTime() - then;
21
+ if (diff < MINUTE) return "now";
22
+ if (diff < HOUR) return `${Math.floor(diff / MINUTE)}m`;
23
+ if (diff < DAY) return `${Math.floor(diff / HOUR)}h`;
24
+ if (diff < 2 * WEEK) return `${Math.floor(diff / DAY)}d`;
25
+ return `${Math.floor(diff / WEEK)}w`;
26
+ }
27
+
28
+ /** `2026-11-24 15:02` in local time (no locale dependence). */
29
+ export function formatStamp(iso: string): string {
30
+ const date = new Date(iso);
31
+ if (Number.isNaN(date.getTime())) return iso;
32
+ const pad = (value: number): string => String(value).padStart(2, "0");
33
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`;
34
+ }
35
+
36
+ /** Last path segment, used as the project column with `--all`. */
37
+ export function projectName(cwd: string): string {
38
+ const name = basename(cwd);
39
+ return name.length > 0 ? name : cwd;
40
+ }
41
+
42
+ /**
43
+ * One list row: state glyph, age, note, then optional project and `missing`.
44
+ * `○` is not loaded, `●` is loaded (the row is dimmed by the picker).
45
+ */
46
+ export function rowText(
47
+ entry: KeepEntryView,
48
+ options: { readonly now: Date; readonly showProject: boolean },
49
+ ): string {
50
+ const glyph = entry.loaded ? "●" : "○";
51
+ const age = formatAge(entry.keptAt, options.now);
52
+ const parts = [entry.note.length > 0 ? entry.note : "(no note)"];
53
+ if (options.showProject) parts.push(projectName(entry.cwd));
54
+ if (entry.missing) parts.push("missing");
55
+ return `${glyph} ${age} ${parts.join(" · ")}`;
56
+ }
57
+
58
+ /** Header line above the rows. */
59
+ export function pickerTitle(notLoaded: number, loaded: number): string {
60
+ const parts = [`${notLoaded} not loaded`];
61
+ if (loaded > 0) parts.push(`${loaded} loaded`);
62
+ return `Keep backlog — ${parts.join(", ")}`;
63
+ }
64
+
65
+ /** Startup notice: one line, counts only, current project only. */
66
+ export function noticeText(count: number): string {
67
+ return `${count} not loaded · /keep-load`;
68
+ }
69
+
70
+ /**
71
+ * Message injected into a loaded session. It is a `custom_message`, so the
72
+ * model sees it on the next turn without the note triggering a turn of its own.
73
+ */
74
+ export function resumeText(entry: KeepEntryView): string {
75
+ const note = entry.note.length > 0 ? entry.note : "(no note)";
76
+ return `[keep] Resumed from the backlog — note left ${formatStamp(entry.keptAt)}: "${note}"`;
77
+ }