@andares/pi-toolkits 1.0.1 → 1.0.2

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,12 @@ 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.0.2 — 2026-11-24
15
+
16
+ <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
17
+
18
+ - **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.
19
+
14
20
  ## 1.0.1 — 2026-11-17
15
21
 
16
22
  - **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 +70,4 @@ renames that heading to the version being published and refuses an empty section
64
70
 
65
71
 
66
72
 
73
+
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
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.
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
 
@@ -387,7 +387,7 @@ pi's `/compact` and auto-compact summarize the context **with the current sessio
387
387
  | auto-compact threshold reached | summarized by the compaction model |
388
388
  | context overflow recovery | summarized by the compaction model, retry behavior unchanged |
389
389
 
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):
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.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
391
 
392
392
  - **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
393
  - **Split behavior** — the `keepRecentTokens` retention policy, and `firstKeptEntryId` / `tokensBefore` passed back unchanged
@@ -468,7 +468,7 @@ An **identical command line** declared by both sources runs once: a duplicate is
468
468
 
469
469
  **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
470
 
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).
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.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
472
 
473
473
  ---
474
474
 
@@ -718,7 +718,7 @@ pnpm typecheck # tsc --noEmit
718
718
  pnpm test # vitest (all feature unit tests)
719
719
 
720
720
  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
721
+ pnpm check:compat # re-measure the declared pi range against real hosts (fails if it drifted)
722
722
  pnpm approval-report # summarize the local approval log (answer mix, targets, rule candidates)
723
723
  ```
724
724
 
@@ -796,7 +796,7 @@ PRs and issues welcome. A few conventions:
796
796
  - **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
797
  - **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
798
  - **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.
799
+ - **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
800
  - **Quality gate** — `pnpm typecheck && pnpm test` must pass before submitting
801
801
 
802
802
  ---
package/README.zh-CN.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  一句话介绍:目前包含十二个开箱即用的功能——**只读咨询模式** `ask`、**会话级边界权限** `ask-perm`、**模型收藏** `favorites`、**提示词暂存** `stash`、**第三方代码评审** `ask-review`、**独立压缩模型** `compact-model`、**会话启动自动化** `autostart`、**agent 记忆框架** `ask-init`、**浏览器内规格评审** `ask-spec`、**验收台账与浏览器页面** `ask-uat`、**退出看门狗** `quit-guard`、**升级后首次启动的版本变更提示** `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
 
@@ -380,7 +380,7 @@ pi 的 `/compact` 与 auto-compact 默认**用当前会话模型**做上下文
380
380
  | auto-compact 阈值触发 | 压缩模型总结 |
381
381
  | context overflow 恢复 | 压缩模型总结,重试行为不变 |
382
382
 
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 回填进摘要请求):
383
+ **接管后与 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
384
 
385
385
  - **摘要格式** —— Goal / Progress / Key Decisions 结构化 checkpoint;已有摘要时用迭代更新版 prompt,信息延续不丢
386
386
  - **切分行为** —— 保留最近 `keepRecentTokens` 的策略、`firstKeptEntryId` / `tokensBefore` 原样回传,不动
@@ -461,7 +461,7 @@ run = [
461
461
 
462
462
  **关键约束:只支持扩展命令**。`/add-dir`(pi-add-dir)、`/cd`(pi-cd)等 `registerCommand` 注册的命令可以;内置命令(`/compact`、`/reload`、`/resume`…)在 TUI 层分发,扩展层触发不了;skill 命令(`/skill:name`)是展开机制而非执行机制。依赖的目标扩展(如 pi-add-dir)需要先安装。
463
463
 
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)。
464
+ > **实现说明**:执行用 `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
465
 
466
466
  ---
467
467
 
@@ -615,7 +615,7 @@ pnpm typecheck # tsc --noEmit
615
615
  pnpm test # vitest(全部功能单元测试)
616
616
 
617
617
  pnpm check:keybindings # 用宿主自己的分发表审计本插件的按键
618
- pnpm check:compat # 校验声明的 pi 下限:强制 4 条线窗口 + 向后 4 条线探针 → public floor
618
+ pnpm check:compat # 用真实宿主实测声明的 pi 区间(与声明不符即判失败)
619
619
  pnpm approval-report # 汇总本地审批日志(答复分布、目标目录、候选规则)
620
620
  ```
621
621
 
@@ -692,7 +692,7 @@ pnpm release:github --audit # 列出 npm 版本 vs GitHub Release vs 远
692
692
  - **内建 patch**(favorites)必须保持**版本守卫 + 幂等** —— 打 patch 前先确认目标原型成员存在,防止重复应用,失败时用 `console.warn` 降级而不是把扩展搞挂
693
693
  - **内建提示词同步**(compact) —— `src/features/compact/prompt.ts` 里的总结 prompt 逐字抄自 pi 内建压缩;升级 pi 依赖时 diff `dist/core/compaction/compaction.js`(及 `utils.js`),同步字符串与组装辅助函数,保持接管输出与内建字节级一致
694
694
  - **键位** —— 定新快捷键前先查 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 宿主兼容」;升级中发现的键位冲突**上报崔总决策**,不得顺手换键。
695
+ - **宿主兼容** —— peer 区间是实测结论而非愿望:`pi >= <floor>`,无上界;下限是仍能通过完整门禁的最老版本,下限到「已验证的最新版本」之间的每一个已发布版本都实测过。宿主依赖只在 `pnpm check:compat` 全绿时一起升——它用真实宿主重测声明区间,声明与实测不一致会直接判失败。详见 AGENTS.md「pi 宿主兼容」;升级中发现的键位冲突**上报崔总决策**,不得顺手换键。
696
696
  - **质量门禁** —— 提交前必须通过 `pnpm typecheck && pnpm test`
697
697
 
698
698
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andares/pi-toolkits",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
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",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -62,9 +62,9 @@
62
62
  "smol-toml": "^1.9.0"
63
63
  },
64
64
  "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",
65
+ "@earendil-works/pi-ai": "^1.6.0",
66
+ "@earendil-works/pi-coding-agent": "^1.6.0",
67
+ "@earendil-works/pi-tui": "^1.6.0",
68
68
  "@types/node": "^26.6.2",
69
69
  "typebox": "^1.3.27",
70
70
  "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,
@@ -41,7 +41,9 @@ class ApplyOnEnter implements Component {
41
41
  }
42
42
 
43
43
  render(width: number): string[] {
44
- return this.list.render(width);
44
+ // pi 1.6.0 widened `Component.render` to `readonly string[]`; copy so the
45
+ // mutable local signature stays valid on both sides of that change.
46
+ return [...this.list.render(width)];
45
47
  }
46
48
 
47
49
  invalidate(): void {
@@ -4,9 +4,10 @@
4
4
  * Problem this solves: pi's interactive `/quit` stops the TUI, then awaits
5
5
  * `runtimeHost.dispose()` — every extension's `session_shutdown` handler,
6
6
  * one after another, with no timeout (upstream issue #9997; still unbounded
7
- * in 1.5.1 and on main — 1.5.1 added `await session.abort()` before the
8
- * handler loop and `await settleCredentialWrites()` after it, i.e. more awaits
9
- * in the same untimed chain, which makes the failure mode more likely, not
7
+ * in 1.6.0 and on main — 1.5.1 added `await session.abort()` before the
8
+ * handler loop and `await settleCredentialWrites()` after it, 1.6.0 added
9
+ * `await flushStdout()` further down, i.e. more awaits in the same untimed
10
+ * chain, which makes the failure mode more likely, not
10
11
  * less). One handler that never settles leaves the process
11
12
  * alive at 0% CPU, the terminal already restored and the final frame
12
13
  * reprinted: the screen looks like a frozen "exit screen" and the shell