@herbertgao/pi-extensions 2026.10.14 → 2026.10.16

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 (203) hide show
  1. package/README.md +13 -11
  2. package/THIRD_PARTY_NOTICES.md +3 -3
  3. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +2 -2
  4. package/node_modules/@herbertgao/pi-cc-extensions/README.md +2 -2
  5. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +38 -1
  6. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +13 -9
  7. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +2 -2
  8. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-highlight.ts +41 -1
  9. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/write-execution.ts +42 -25
  10. package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
  11. package/node_modules/@narumitw/pi-btw/README.md +1 -1
  12. package/node_modules/@narumitw/pi-btw/dist/index.ts +77 -64
  13. package/node_modules/@narumitw/pi-btw/dist/index.ts.map +2 -2
  14. package/node_modules/@narumitw/pi-btw/docs/core-alignment.md +10 -2
  15. package/node_modules/@narumitw/pi-btw/package.json +5 -5
  16. package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +83 -63
  17. package/node_modules/@narumitw/pi-caffeinate/package.json +3 -3
  18. package/node_modules/pi-lens/CHANGELOG.md +37 -0
  19. package/node_modules/pi-lens/README.md +32 -0
  20. package/node_modules/pi-lens/config/biome/core.jsonc +3 -3
  21. package/node_modules/pi-lens/dist/{chunk-K2GUZ4DN.js → chunk-2DDDCJDL.js} +4 -4
  22. package/node_modules/pi-lens/dist/{chunk-DS2USX5G.js → chunk-2DMLM3ZO.js} +11 -11
  23. package/node_modules/pi-lens/dist/chunk-2F47TQOA.js +73 -0
  24. package/node_modules/pi-lens/dist/{chunk-YXDCRUKQ.js → chunk-2PHMIAKO.js} +4 -4
  25. package/node_modules/pi-lens/dist/{chunk-PP2A5V2T.js → chunk-2RLWJO5K.js} +7 -7
  26. package/node_modules/pi-lens/dist/{chunk-T4NGVFYI.js → chunk-2X4VLOCC.js} +2 -2
  27. package/node_modules/pi-lens/dist/{chunk-QT66NEYN.js → chunk-3MYEA7QD.js} +3 -3
  28. package/node_modules/pi-lens/dist/{chunk-7ZS7MC24.js → chunk-3WEPUD2V.js} +22 -22
  29. package/node_modules/pi-lens/dist/{chunk-TL2TCJYL.js → chunk-4AVZ3TG7.js} +14 -14
  30. package/node_modules/pi-lens/dist/{chunk-SNEUMLM7.js → chunk-4PCQCU47.js} +4 -4
  31. package/node_modules/pi-lens/dist/chunk-4WX4CTUE.js +57 -0
  32. package/node_modules/pi-lens/dist/{chunk-5LRUKYFA.js → chunk-5APMQ2IJ.js} +2 -2
  33. package/node_modules/pi-lens/dist/{chunk-4U7GDSZQ.js → chunk-5CV5ITZF.js} +2 -2
  34. package/node_modules/pi-lens/dist/{chunk-VUAVE3QC.js → chunk-5ZR3APIM.js} +36 -36
  35. package/node_modules/pi-lens/dist/{chunk-CPZ5JJW6.js → chunk-63RIVFQI.js} +4 -4
  36. package/node_modules/pi-lens/dist/{chunk-EDMLIW6W.js → chunk-75SY4F24.js} +12 -12
  37. package/node_modules/pi-lens/dist/{chunk-RCHO5W7M.js → chunk-7RQXA5GG.js} +6 -6
  38. package/node_modules/pi-lens/dist/{chunk-XHDBJODR.js → chunk-A3YNG5KP.js} +21 -21
  39. package/node_modules/pi-lens/dist/{chunk-3WCEHYOI.js → chunk-AE37FEGH.js} +1 -1
  40. package/node_modules/pi-lens/dist/{chunk-KPVLQHCZ.js → chunk-AMXIUN2R.js} +2 -2
  41. package/node_modules/pi-lens/dist/{chunk-XI34NWDI.js → chunk-ARD426WI.js} +1 -1
  42. package/node_modules/pi-lens/dist/{chunk-RG3MXTRI.js → chunk-BHUWL2Y3.js} +7 -7
  43. package/node_modules/pi-lens/dist/{chunk-4ODSZ35Z.js → chunk-BI5LAQ3Y.js} +44 -44
  44. package/node_modules/pi-lens/dist/{chunk-Q42LJANT.js → chunk-BM5GS6ZH.js} +2 -2
  45. package/node_modules/pi-lens/dist/{chunk-CG5V25HX.js → chunk-BWYQUPOS.js} +1 -1
  46. package/node_modules/pi-lens/dist/{chunk-HYVXA3BB.js → chunk-CFRQMBGP.js} +23 -23
  47. package/node_modules/pi-lens/dist/{chunk-NLIVE7L6.js → chunk-CJYKEW2L.js} +1 -1
  48. package/node_modules/pi-lens/dist/{chunk-MEFLGBCS.js → chunk-DC4CFXM5.js} +3 -3
  49. package/node_modules/pi-lens/dist/{chunk-ASRAO7KG.js → chunk-DMSLNKF7.js} +27 -27
  50. package/node_modules/pi-lens/dist/{chunk-YSDPVDFC.js → chunk-DQXSPYRI.js} +3 -3
  51. package/node_modules/pi-lens/dist/{chunk-YKVDBNPO.js → chunk-EVDGNG4F.js} +3 -3
  52. package/node_modules/pi-lens/dist/{chunk-2LDMXL2M.js → chunk-F5Z6URKM.js} +2 -2
  53. package/node_modules/pi-lens/dist/{chunk-72J27ICO.js → chunk-F6X3YJWD.js} +2 -2
  54. package/node_modules/pi-lens/dist/{chunk-YXGRRORB.js → chunk-FA5LDARD.js} +13 -13
  55. package/node_modules/pi-lens/dist/{chunk-OMJ3OFBJ.js → chunk-FFL3A2VP.js} +6 -6
  56. package/node_modules/pi-lens/dist/chunk-FJIVKLPH.js +31 -0
  57. package/node_modules/pi-lens/dist/chunk-G2B7F6ZU.js +88 -0
  58. package/node_modules/pi-lens/dist/{chunk-YWWG4AQA.js → chunk-GAACZY6R.js} +24 -25
  59. package/node_modules/pi-lens/dist/{chunk-F7BO6FWH.js → chunk-GMTFDAOK.js} +11 -11
  60. package/node_modules/pi-lens/dist/{chunk-UVY4TOJH.js → chunk-GNSIWBAT.js} +3 -3
  61. package/node_modules/pi-lens/dist/chunk-GTAI2J6U.js +27 -0
  62. package/node_modules/pi-lens/dist/{chunk-SJHC3BCZ.js → chunk-GZE7WOI4.js} +98 -111
  63. package/node_modules/pi-lens/dist/{chunk-ZAPSUBLU.js → chunk-H7HTEQUZ.js} +7 -7
  64. package/node_modules/pi-lens/dist/{chunk-ZPJM7DID.js → chunk-HK6JVFZC.js} +3 -3
  65. package/node_modules/pi-lens/dist/chunk-IPDG45G5.js +26 -0
  66. package/node_modules/pi-lens/dist/{chunk-ZSUX7KEM.js → chunk-J6JP25XU.js} +2 -2
  67. package/node_modules/pi-lens/dist/{chunk-6XSESGWD.js → chunk-JL6CXUMW.js} +2 -2
  68. package/node_modules/pi-lens/dist/{chunk-Y5KTA2OB.js → chunk-K2YGBXOA.js} +2 -2
  69. package/node_modules/pi-lens/dist/{chunk-AHWA4AKM.js → chunk-KLQVC3XC.js} +4 -4
  70. package/node_modules/pi-lens/dist/{chunk-27VWVB23.js → chunk-KSR7RGQY.js} +10 -10
  71. package/node_modules/pi-lens/dist/{chunk-N3PLNNCW.js → chunk-KXF5R4UN.js} +1 -1
  72. package/node_modules/pi-lens/dist/{chunk-GLW3YDZZ.js → chunk-LEJOJDXL.js} +9 -9
  73. package/node_modules/pi-lens/dist/{chunk-Y2TPADJR.js → chunk-MA77RSFN.js} +9 -9
  74. package/node_modules/pi-lens/dist/{chunk-IL7K66ZQ.js → chunk-MKVZQUEG.js} +15 -15
  75. package/node_modules/pi-lens/dist/{chunk-EIKRZ32J.js → chunk-MN7MHUXQ.js} +2 -2
  76. package/node_modules/pi-lens/dist/{chunk-4FHUGDKU.js → chunk-MT6BVNFW.js} +5 -5
  77. package/node_modules/pi-lens/dist/{chunk-3SNDVPOR.js → chunk-NDMCVUYK.js} +8 -8
  78. package/node_modules/pi-lens/dist/{chunk-63NMUNYP.js → chunk-NIU2IPC5.js} +6 -6
  79. package/node_modules/pi-lens/dist/{chunk-APFJKOP6.js → chunk-NNKXDXXS.js} +2 -2
  80. package/node_modules/pi-lens/dist/{chunk-FEDWAYDS.js → chunk-OJLTLYHB.js} +12 -12
  81. package/node_modules/pi-lens/dist/{chunk-KJJAVH3X.js → chunk-OLAWH5UQ.js} +5 -5
  82. package/node_modules/pi-lens/dist/{chunk-G224FADB.js → chunk-OOU2WZZE.js} +1 -1
  83. package/node_modules/pi-lens/dist/{chunk-NFNVDDGB.js → chunk-OSTKYB55.js} +1 -1
  84. package/node_modules/pi-lens/dist/chunk-P4QNXS6I.js +27 -0
  85. package/node_modules/pi-lens/dist/{chunk-7IYC4ENJ.js → chunk-PKES3ISE.js} +2 -2
  86. package/node_modules/pi-lens/dist/{chunk-UCVMSOXF.js → chunk-PO45POGF.js} +2 -2
  87. package/node_modules/pi-lens/dist/{chunk-JWOVP5BL.js → chunk-PPIBVH4R.js} +6 -6
  88. package/node_modules/pi-lens/dist/{chunk-EWXXLS26.js → chunk-PQJFG24Z.js} +82 -12
  89. package/node_modules/pi-lens/dist/{chunk-TPYYEDP5.js → chunk-Q3UZHW6N.js} +45 -22
  90. package/node_modules/pi-lens/dist/{chunk-5DKE4HGX.js → chunk-Q4EMRFNA.js} +34 -34
  91. package/node_modules/pi-lens/dist/{chunk-XHLK33VM.js → chunk-Q4FCYCRE.js} +16 -16
  92. package/node_modules/pi-lens/dist/chunk-Q6D6VMI4.js +22 -0
  93. package/node_modules/pi-lens/dist/{chunk-Q4BKKOVC.js → chunk-QGSTQH4D.js} +8 -8
  94. package/node_modules/pi-lens/dist/{chunk-GYRZ72R4.js → chunk-RZOXUSPC.js} +2 -2
  95. package/node_modules/pi-lens/dist/{chunk-EN5AM7PX.js → chunk-S67UJDGQ.js} +10 -10
  96. package/node_modules/pi-lens/dist/{chunk-YWNO5Q4R.js → chunk-SCIUNBPF.js} +17 -17
  97. package/node_modules/pi-lens/dist/{chunk-VIDEKABZ.js → chunk-SJJYRZB4.js} +2 -2
  98. package/node_modules/pi-lens/dist/chunk-SXGD4ANG.js +25 -0
  99. package/node_modules/pi-lens/dist/{chunk-THEXI2QO.js → chunk-T7FTXGS3.js} +42 -42
  100. package/node_modules/pi-lens/dist/{chunk-WUY4BZEP.js → chunk-TIQJPRDD.js} +106 -50
  101. package/node_modules/pi-lens/dist/{chunk-EXVXBSGN.js → chunk-TIYGSODX.js} +17 -17
  102. package/node_modules/pi-lens/dist/{chunk-2FYKETQJ.js → chunk-U2SDMG7C.js} +5 -5
  103. package/node_modules/pi-lens/dist/{chunk-PJXNTPB2.js → chunk-U6OC3QEM.js} +21 -21
  104. package/node_modules/pi-lens/dist/{chunk-LMCTHJ2H.js → chunk-UCGQT677.js} +18 -18
  105. package/node_modules/pi-lens/dist/{chunk-UL5SXQVX.js → chunk-UHGF5UT5.js} +1 -1
  106. package/node_modules/pi-lens/dist/{chunk-AI3GP74G.js → chunk-UN4TEBWN.js} +15 -15
  107. package/node_modules/pi-lens/dist/{chunk-2SDHYHHO.js → chunk-V3APN3DY.js} +13 -13
  108. package/node_modules/pi-lens/dist/{chunk-7FLRUH6B.js → chunk-V63BC55Q.js} +1 -1
  109. package/node_modules/pi-lens/dist/{chunk-S55TEC7I.js → chunk-VG5JS5SW.js} +2 -2
  110. package/node_modules/pi-lens/dist/{chunk-IEBJF3PN.js → chunk-VPBIMOAQ.js} +11 -11
  111. package/node_modules/pi-lens/dist/{chunk-EX4EXBW7.js → chunk-VQH24FIP.js} +15 -15
  112. package/node_modules/pi-lens/dist/{chunk-TVZRLTG6.js → chunk-VSFLRN5Y.js} +1 -1
  113. package/node_modules/pi-lens/dist/{chunk-KCBRHV5E.js → chunk-W2V54OCL.js} +3 -3
  114. package/node_modules/pi-lens/dist/{chunk-VITFDI3O.js → chunk-W5LGKNET.js} +12 -12
  115. package/node_modules/pi-lens/dist/{chunk-OZNCKLOX.js → chunk-W5R5SABV.js} +12 -12
  116. package/node_modules/pi-lens/dist/{chunk-ELZRSR5N.js → chunk-WIZWZR4C.js} +38 -38
  117. package/node_modules/pi-lens/dist/{chunk-MKPCELNI.js → chunk-WQOIR3QY.js} +13 -13
  118. package/node_modules/pi-lens/dist/{chunk-COOUUC5W.js → chunk-XAIT2YGS.js} +6 -6
  119. package/node_modules/pi-lens/dist/chunk-XCUHKYCQ.js +23 -0
  120. package/node_modules/pi-lens/dist/{chunk-KFXCL4OV.js → chunk-XQCSWV2G.js} +22 -23
  121. package/node_modules/pi-lens/dist/{chunk-RU34BA4D.js → chunk-YBSONGSZ.js} +34 -34
  122. package/node_modules/pi-lens/dist/{chunk-GTDSYEA2.js → chunk-YISME6ON.js} +1 -1
  123. package/node_modules/pi-lens/dist/chunk-YRD4ISED.js +30 -0
  124. package/node_modules/pi-lens/dist/{chunk-X3UTCXAA.js → chunk-YSBHPOY6.js} +12 -12
  125. package/node_modules/pi-lens/dist/{chunk-XWFIHYCH.js → chunk-Z2XAOKHK.js} +2 -2
  126. package/node_modules/pi-lens/dist/{chunk-K4SZB56V.js → chunk-Z7IGUAXL.js} +7 -7
  127. package/node_modules/pi-lens/dist/{chunk-KX56K73G.js → chunk-ZKXQKGWZ.js} +2 -2
  128. package/node_modules/pi-lens/dist/{chunk-FWZRGGGY.js → chunk-ZQ6NZZTB.js} +6 -4
  129. package/node_modules/pi-lens/dist/{chunk-2Y6OJRSI.js → chunk-ZUUI3ZSA.js} +3 -3
  130. package/node_modules/pi-lens/dist/{chunk-UO66IMVP.js → chunk-ZYNI26MI.js} +2 -2
  131. package/node_modules/pi-lens/dist/index.js +571 -409
  132. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +10 -10
  133. package/node_modules/pi-lens/dist/mcp/cli.js +42 -42
  134. package/node_modules/pi-lens/dist/mcp/server.js +108 -108
  135. package/node_modules/pi-lens/dist/mcp/worker.js +61 -61
  136. package/node_modules/pi-lens/dist/probes/installer.js +19 -19
  137. package/node_modules/pi-lens/docs/agent-tools.md +28 -7
  138. package/node_modules/pi-lens/docs/configuration.md +3 -1
  139. package/node_modules/pi-lens/docs/defect-shapes.md +738 -0
  140. package/node_modules/pi-lens/docs/invariants/caches-stores.md +30 -0
  141. package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +164 -0
  142. package/node_modules/pi-lens/docs/invariants/git-guard-host.md +53 -0
  143. package/node_modules/pi-lens/docs/invariants/language-config.md +31 -0
  144. package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +286 -0
  145. package/node_modules/pi-lens/docs/invariants/paths-os.md +59 -0
  146. package/node_modules/pi-lens/docs/invariants/session-telemetry.md +74 -0
  147. package/node_modules/pi-lens/docs/pi-lens-fixer.md +2 -1
  148. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +10 -8
  149. package/node_modules/pi-lens/docs/pi-lens-monitor.md +2 -2
  150. package/node_modules/pi-lens/docs/pi-lens-orchestration.md +41 -0
  151. package/node_modules/pi-lens/docs/pi-lens-release.md +20 -0
  152. package/node_modules/pi-lens/docs/pi-lens-retro.md +3 -2
  153. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +6 -6
  154. package/node_modules/pi-lens/docs/pi-lens-subagent.md +2 -2
  155. package/node_modules/pi-lens/package.json +3 -2
  156. package/node_modules/pi-provider-qoder/dist/index.js +27 -5
  157. package/node_modules/pi-provider-qoder/package.json +1 -1
  158. package/node_modules/pi-typesafe/README.md +1 -1
  159. package/node_modules/pi-typesafe/dist/client.js +43 -1
  160. package/node_modules/pi-typesafe/package.json +1 -1
  161. package/node_modules/pi-web-access/CHANGELOG.md +40 -0
  162. package/node_modules/pi-web-access/README.md +96 -22
  163. package/node_modules/pi-web-access/brave-rate-limit.ts +2 -2
  164. package/node_modules/pi-web-access/curator-page.ts +3 -1
  165. package/node_modules/pi-web-access/curator-server.ts +1 -0
  166. package/node_modules/pi-web-access/dist/index.js +2607 -1674
  167. package/node_modules/pi-web-access/dist/mcp-cli.js +1119 -327
  168. package/node_modules/pi-web-access/duckduckgo-rate-limit.ts +95 -0
  169. package/node_modules/pi-web-access/duckduckgo.ts +51 -45
  170. package/node_modules/pi-web-access/exa.ts +48 -6
  171. package/node_modules/pi-web-access/extract.ts +2 -2
  172. package/node_modules/pi-web-access/fetch-params.ts +5 -4
  173. package/node_modules/pi-web-access/field-extract.ts +347 -0
  174. package/node_modules/pi-web-access/gemini-search.ts +151 -13
  175. package/node_modules/pi-web-access/index.ts +128 -125
  176. package/node_modules/pi-web-access/mistral-search.ts +1 -1
  177. package/node_modules/pi-web-access/ninerouter.ts +92 -0
  178. package/node_modules/pi-web-access/offtopic-judge.ts +72 -0
  179. package/node_modules/pi-web-access/openai-search.ts +36 -10
  180. package/node_modules/pi-web-access/package.json +1 -1
  181. package/node_modules/pi-web-access/perplexity.ts +1 -0
  182. package/node_modules/pi-web-access/query-rewrite.ts +39 -13
  183. package/node_modules/pi-web-access/source-check.ts +31 -15
  184. package/node_modules/pi-web-access/summary-model-scope.ts +19 -1
  185. package/node_modules/pi-web-access/summary-review.ts +13 -20
  186. package/node_modules/pi-web-access/tool-arguments.ts +1 -1
  187. package/node_modules/pi-web-access/upgrade-notice.ts +47 -0
  188. package/node_modules/pi-web-access/utils.ts +26 -1
  189. package/node_modules/pi-web-access/web-tool-contract.ts +4 -1
  190. package/node_modules/pi-web-access/web-tool-core.ts +99 -19
  191. package/node_modules/pi-web-access/xai-search.ts +3 -3
  192. package/package.json +10 -10
  193. package/node_modules/pi-lens/dist/chunk-22Y2BM7H.js +0 -23
  194. package/node_modules/pi-lens/dist/chunk-44X7VIKR.js +0 -73
  195. package/node_modules/pi-lens/dist/chunk-54NIOJJZ.js +0 -25
  196. package/node_modules/pi-lens/dist/chunk-7WWQAW5P.js +0 -30
  197. package/node_modules/pi-lens/dist/chunk-EA2ZRG44.js +0 -27
  198. package/node_modules/pi-lens/dist/chunk-EKNWOL2I.js +0 -27
  199. package/node_modules/pi-lens/dist/chunk-G5UCJFT7.js +0 -26
  200. package/node_modules/pi-lens/dist/chunk-N5FBM25N.js +0 -22
  201. package/node_modules/pi-lens/dist/chunk-P5XUGPIX.js +0 -31
  202. package/node_modules/pi-lens/dist/chunk-PKOXJIVT.js +0 -88
  203. package/node_modules/pi-lens/dist/chunk-RG7OODGM.js +0 -57
package/README.md CHANGED
@@ -21,11 +21,11 @@ When migrating from `pi-mcp-adapter`, remove any standalone adapter install as w
21
21
  The package bundles 5 active `@herbertgao/*` child packages—`pi-agency`, `pi-bark`, `pi-cc-extensions`, `pi-subagents`, and `sol-pi`—plus the following upstream packages under their original names:
22
22
 
23
23
  - `pi-antigravity@0.11.0`
24
- - `pi-provider-qoder@0.6.5`
24
+ - `pi-provider-qoder@0.6.6`
25
25
  - `@dietrichgebert/ponytail@5.3.2`
26
26
  - `@juicesharp/rpiv-ask-user-question@2.15.0`
27
- - `@narumitw/pi-btw@0.63.0`
28
- - `@narumitw/pi-caffeinate@0.49.12`
27
+ - `@narumitw/pi-btw@0.63.1`
28
+ - `@narumitw/pi-caffeinate@0.49.13`
29
29
  - `@pi-plugins/fast-mode@0.1.14`
30
30
  - `@tifan/pi-copy-response@0.2.7`
31
31
  - `@tifan/pi-handoff@2.2.2`
@@ -34,16 +34,16 @@ The package bundles 5 active `@herbertgao/*` child packages—`pi-agency`, `pi-b
34
34
  - `@tifan/pi-preferred-thinking@1.0.2`
35
35
  - `@tifan/pi-recap@0.4.8`
36
36
  - `@tifan/pi-rename@0.6.0`
37
- - `pi-typesafe@0.13.0`
37
+ - `pi-typesafe@0.13.1`
38
38
  - `pi-next-cue@1.0.8`
39
- - `pi-lens@4.4.5`
40
- - `pi-web-access@0.44.0`
39
+ - `pi-lens@4.4.6`
40
+ - `pi-web-access@0.45.0`
41
41
 
42
42
  Pi loads their extensions and skills through `node_modules/` paths inside one package root. The upstream companions are pinned and bundled, not forked or renamed.
43
43
 
44
- The locally customized CC package follows upstream `pi-cc-extensions@1.0.11`; SoL-Pi follows its complete main baseline `e1a586af` with Pi 1.x/codemode compatibility updates through `21956803`. Local behavior not already covered upstream is retained. SoL-Pi's `update_plan` now follows upstream's model-only contract: invoke it directly, not inside codemode scripts. Action Fusion and ccstyle write rich diffs coexist without disabling either feature. All four SoL-Pi features remain opt-in; its new non-persistent-session evidence archives remain on disk for consumers and require host or caller cleanup.
44
+ The locally customized CC package follows upstream `pi-cc-extensions@1.0.12`; SoL-Pi follows its complete main baseline `e1a586af` with Pi 1.x/codemode compatibility updates through `21956803`. Local behavior not already covered upstream is retained. SoL-Pi's `update_plan` now follows upstream's model-only contract: invoke it directly, not inside codemode scripts. Action Fusion and ccstyle write rich diffs coexist without disabling either feature. All four SoL-Pi features remain opt-in; its new non-persistent-session evidence archives remain on disk for consumers and require host or caller cleanup.
45
45
 
46
- Antigravity `0.11.0` enriches search citations by visiting source sites by default (`ANTIGRAVITY_NO_SOURCE_ENRICH=1` disables enrichment). It refreshes a curated model catalog and upgrades the existing model cache; previously listed model IDs may disappear. Ask `2.15.0` lets other extensions in the same process answer or cancel TUI questionnaires through its event channel, without sender authentication. Its notes shortcut defaults to `n` and can be a single non-Latin character; reserved navigation keys stay on `n`. Web Access `0.44.0` keeps direct tool exposure and `toolActivation: auto` by default. Linkup, DeepSeek search and fetch, provider gateways, `toolActivation: "none"`, deferred exposure, and GCE ADC support require explicit configuration.
46
+ Antigravity `0.11.0` enriches search citations by visiting source sites by default (`ANTIGRAVITY_NO_SOURCE_ENRICH=1` disables enrichment). It refreshes a curated model catalog and upgrades the existing model cache; previously listed model IDs may disappear. Ask `2.15.0` lets other extensions in the same process answer or cancel TUI questionnaires through its event channel, without sender authentication. Its notes shortcut defaults to `n` and can be a single non-Latin character; reserved navigation keys stay on `n`. Web Access `0.45.0` keeps direct tool exposure and `toolActivation: auto` by default. Linkup, DeepSeek search and fetch, provider gateways, `toolActivation: "none"`, deferred exposure, GCE ADC, field extraction, 9router, and plain HTTP gateway URLs require explicit configuration.
47
47
 
48
48
  Ponytail `5.3.2` updates the Pi skill guidance, including how to turn it off. Its Pi extension entry is unchanged; the new Claude Code band/board hooks are not registered by this aggregate.
49
49
 
@@ -55,11 +55,13 @@ Ponytail `5.3.2` updates the Pi skill guidance, including how to turn it off. It
55
55
 
56
56
  `@herbertgao/pi-bark` sends localized Bark pushes when a user-facing Pi run fully settles or `@juicesharp/rpiv-ask-user-question` needs an answer. Notifications include emoji-labeled machine/path metadata and support the bundled official Pi badge through Bark's `icon` parameter. Configure it in `$PI_CODING_AGENT_DIR/bark.json` (normally `~/.pi/agent/bark.json`); see the [package README](../pi-bark/README.md). Without a valid endpoint it stays inactive.
57
57
 
58
- `@narumitw/pi-caffeinate@0.49.12` uses the host platform's sleep inhibitor during each Pi agent run. On macOS, `/caffeinate sleep` keeps the system awake while allowing the display to sleep; `/caffeinate display` also keeps the display awake. It releases the inhibitor when the run or session ends. Its D-Bus dependency remains on the normal socket transport under Node; Bun on Linux/macOS can use FFI and an in-process reader thread for Unix file-descriptor transport, falling back when unavailable. No daemon or build step is added.
58
+ `@narumitw/pi-caffeinate@0.49.13` uses the host platform's sleep inhibitor during each Pi agent run. On macOS, `/caffeinate sleep` keeps the system awake while allowing the display to sleep; `/caffeinate display` also keeps the display awake. It releases the inhibitor when the run or session ends. Its D-Bus dependency remains on the normal socket transport under Node; Bun on Linux/macOS can use FFI and an in-process reader thread for Unix file-descriptor transport, and that thread can be unreferenced so the connection need not keep the process alive. It falls back when FFI is unavailable. No daemon or build step is added.
59
59
 
60
- `clef` asks Cloudflare Clef-flash an on-demand yes/no, choice, or score and prints the questions and answers in the transcript, plus a one-line notice. It is not a permission gate. `pi-typesafe@0.13.0` provides `/typesafe` and `typesafe_evaluate` for explicit structured decisions; `/typesafe enable` or `PI_TYPESAFE_ENABLED=1` is still required for agent tool calls. The default backend remains `https://api.typesafe.ai`. `PI_TYPESAFE_BACKEND` and `PI_TYPESAFE_MODEL` select the session backend and model, and `/typesafe login` stores a key for the named backend. Daily request, token, and USD caps are opt-in. OpenRouter, Command Code, Liquid, SubQ, and a named endpoint stay explicit and use that backend's own key. The promoted SDK is `@typesafe-ai/sdk@0.7.0`.
60
+ `@narumitw/pi-btw@0.63.1` opens its side workspace through the `@narumitw/pi-tui-kit@^0.67.0` fullscreen handoff. It does not start that UI when the flow is already disposed or the parent terminal cannot be restored. Importing new main-thread context stays manual.
61
61
 
62
- `@herbertgao/sol-pi` adds opt-in Action Fusion, ObservationPack, Evidence-Preserving Reducer, and Online Context Compact; see its [configuration guide](../sol-pi/docs/configuration.md). `pi-lens@4.4.5` publishes a public LSP config schema, reads user-level custom rule directories (project before user before built-in), normalizes argv-style server entries, downgrades `throw-new-error` to a warning, and counts Docker, JSON, and Jedi servers in idle eviction; language routing and the retained multi-root diagnostic facts are unchanged. It promotes `@ast-grep/cli` to `0.51.0` and `@ast-grep/napi` to `^0.51.0`. Concatenated SQL passed to `.execute()` is an advisory full-analysis finding; a parameterized `execute(sql, values)` call stays quiet. Keeping injected findings in later requests is opt-in. `pi-web-access@0.44.0` provides configurable web search and fetch tools; its `toolActivation` defaults to `auto`, choosing eager or dynamic tool activation per model. `toolActivation: "none"` stays opt-in and still requires deferred exposure. It adds structured search/fetch data for codemode and an optional, manually started `pi-web-access-mcp` stdio CLI; installing the aggregate does not start that server. Degoog, Keenable, Ceramic, Linkup, and DeepSeek fetch are explicit-only, excluded from automatic and `all` selection. Provider gateway base URLs are opt-in and are not configured by the aggregate. OpenAI search now defaults to `gpt-6-luna`, results and clone cleanup are scoped per extension instance, and the promoted `@modelcontextprotocol/sdk@^1.32.1` moves the bundle off GHSA-6qxp-vccf-f47h. Perplexity search now uses the Search API's ranked pages and snippets rather than a Sonar-generated answer; requests requiring prose still use Sonar. `pi-antigravity@0.11.0` reads Pi 0.86+ transcript system messages, so Antigravity requests carry Pi's system prompt and tools; it also registers `google_search` and `generate_image` tools that use the signed-in Antigravity account. `pi-provider-qoder@0.6.5` registers the `qoder` and `qoder-cn` model providers. Sign in with `/login qoder` (browser or a personal access token from [qoder.com/account/integrations](https://qoder.com/account/integrations)) or `/login qoder-cn` (token from [qoder.com.cn/account/integrations](https://qoder.com.cn/account/integrations)). `QODER_PERSONAL_ACCESS_TOKEN` and `QODERCN_PERSONAL_ACCESS_TOKEN` log those providers in at startup. `/qoder-usage footer on` replaces the status-bar footer for that session, so leave it off while the pi-cc footer is in use. Preferred Thinking 1.0.2 preserves an explicit subagent `--thinking` choice. Deprecated `@tifan/pi-titlebar-spinner` is no longer bundled; Rename remains the single owner of Herdr tab naming.
62
+ `clef` asks Cloudflare Clef-flash an on-demand yes/no, choice, or score and prints the questions and answers in the transcript, plus a one-line notice. It is not a permission gate. `pi-typesafe@0.13.1` provides `/typesafe` and `typesafe_evaluate` for explicit structured decisions; `/typesafe enable` or `PI_TYPESAFE_ENABLED=1` is still required for agent tool calls. The default backend remains `https://api.typesafe.ai`. `PI_TYPESAFE_BACKEND` and `PI_TYPESAFE_MODEL` select the session backend and model, and `/typesafe login` stores a key for the named backend. Daily request, token, and USD caps are opt-in. OpenRouter, Command Code, Liquid, SubQ, and a named endpoint stay explicit and use that backend's own key. The promoted SDK is `@typesafe-ai/sdk@0.7.0`. Under Bun, the judge transport reads each response body once and replays it, so the SDK can still read the result after Bun marks the original body used.
63
+
64
+ `@herbertgao/sol-pi` adds opt-in Action Fusion, ObservationPack, Evidence-Preserving Reducer, and Online Context Compact; see its [configuration guide](../sol-pi/docs/configuration.md). `pi-lens@4.4.6` publishes a public LSP config schema, reads user-level custom rule directories (project before user before built-in), normalizes argv-style server entries, downgrades `throw-new-error` to a warning, and counts Docker, JSON, and Jedi servers in idle eviction; language routing and the retained multi-root diagnostic facts are unchanged. It promotes `@ast-grep/cli` to `0.51.0` and `@ast-grep/napi` to `^0.51.0`. Concatenated SQL passed to `.execute()` is an advisory full-analysis finding; a parameterized `execute(sql, values)` call stays quiet. Keeping injected findings in later requests is opt-in. A workspace edit through a dangling symlink is refused, and a symlink that resolves outside the workspace is refused; the fallback Biome config no longer names a nursery rule. `pi-web-access@0.45.0` provides configurable web search and fetch tools; its `toolActivation` defaults to `auto`, choosing eager or dynamic tool activation per model. `toolActivation: "none"` stays opt-in and still requires deferred exposure. Field extraction, 9router, empty or off-topic search fallback, and plain HTTP gateway URLs stay off unless configured. An unknown tool-call provider name fails instead of selecting a provider automatically, and DuckDuckGo searches stay spaced apart after a bot check. It adds structured search/fetch data for codemode and an optional, manually started `pi-web-access-mcp` stdio CLI; installing the aggregate does not start that server. Degoog, Keenable, Ceramic, Linkup, and DeepSeek fetch are explicit-only, excluded from automatic and `all` selection. Provider gateway base URLs are opt-in and are not configured by the aggregate. OpenAI search now defaults to `gpt-6-luna`, results and clone cleanup are scoped per extension instance, and the promoted `@modelcontextprotocol/sdk@^1.32.1` moves the bundle off GHSA-6qxp-vccf-f47h. Perplexity search now uses the Search API's ranked pages and snippets rather than a Sonar-generated answer; requests requiring prose still use Sonar. `pi-antigravity@0.11.0` reads Pi 0.86+ transcript system messages, so Antigravity requests carry Pi's system prompt and tools; it also registers `google_search` and `generate_image` tools that use the signed-in Antigravity account. `pi-provider-qoder@0.6.6` registers the `qoder` and `qoder-cn` model providers. A queued model-busy response reports its wait instead of being ignored; a ready busy response stays retryable. Sign in with `/login qoder` (browser or a personal access token from [qoder.com/account/integrations](https://qoder.com/account/integrations)) or `/login qoder-cn` (token from [qoder.com.cn/account/integrations](https://qoder.com.cn/account/integrations)). `QODER_PERSONAL_ACCESS_TOKEN` and `QODERCN_PERSONAL_ACCESS_TOKEN` log those providers in at startup. `/qoder-usage footer on` replaces the status-bar footer for that session, so leave it off while the pi-cc footer is in use. Preferred Thinking 1.0.2 preserves an explicit subagent `--thinking` choice. Deprecated `@tifan/pi-titlebar-spinner` is no longer bundled; Rename remains the single owner of Herdr tab naming.
63
65
 
64
66
  `pi-stash` is no longer bundled: `/btw` already preserves the main editor draft while handling side questions outside the main conversation. Prior `@herbertgao/pi-stash` releases remain available but are no longer maintained here.
65
67
 
@@ -36,7 +36,7 @@ THE SOFTWARE.
36
36
 
37
37
  ## `@narumitw/pi-caffeinate`
38
38
 
39
- The aggregate bundles [`@narumitw/pi-caffeinate`](https://github.com/narumiruna/pi-extensions/tree/main/packages/pi-caffeinate) version 0.49.12 under its original MIT license:
39
+ The aggregate bundles [`@narumitw/pi-caffeinate`](https://github.com/narumiruna/pi-extensions/tree/main/packages/pi-caffeinate) version 0.49.13 under its original MIT license:
40
40
 
41
41
  MIT License
42
42
 
@@ -111,7 +111,7 @@ THE SOFTWARE.
111
111
 
112
112
  ## `pi-typesafe`
113
113
 
114
- The aggregate bundles [`pi-typesafe`](https://github.com/DevMortimer/pi-typesafe) version 0.13.0 under its original MIT license:
114
+ The aggregate bundles [`pi-typesafe`](https://github.com/DevMortimer/pi-typesafe) version 0.13.1 under its original MIT license:
115
115
 
116
116
  MIT License
117
117
 
@@ -163,4 +163,4 @@ THE SOFTWARE.
163
163
 
164
164
  ## `pi-provider-qoder`
165
165
 
166
- The aggregate bundles [`pi-provider-qoder`](https://github.com/simonsmh/pi-provider-qoder) version 0.6.5 under its original package name. npm metadata and the repository README declare the MIT license. The published tarball does not include a LICENSE file. The published package corresponds to git commit [`fa5067d1bf0c4accc2fc88ad672e23390a2d6f16`](https://github.com/simonsmh/pi-provider-qoder/commit/fa5067d1bf0c4accc2fc88ad672e23390a2d6f16).
166
+ The aggregate bundles [`pi-provider-qoder`](https://github.com/simonsmh/pi-provider-qoder) version 0.6.6 under its original package name. npm metadata and the repository README declare the MIT license. The published tarball does not include a LICENSE file. The published package corresponds to git commit [`29dbb8fff8fe27356f883f7d4ba2bae8ce7e20b0`](https://github.com/simonsmh/pi-provider-qoder/commit/29dbb8fff8fe27356f883f7d4ba2bae8ce7e20b0).
@@ -46,7 +46,7 @@ Renderer snapshots for `on` / `compact` modes: [default](./docs/tool-render-exam
46
46
  {
47
47
  // style
48
48
  "mode": "on", // on / compact / off
49
- "excludeRenderers": [], // tools keeping the native renderer; Agent always keeps its dedicated renderer
49
+ "excludeRenderers": [], // tools keeping the native renderer, matched case-insensitively; Agent always keeps its dedicated renderer
50
50
 
51
51
  // features
52
52
  "enableSessionReference": true, // @ session references
@@ -126,7 +126,7 @@ pi -e . # one run, does not edit settings.json
126
126
 
127
127
  ## Credits
128
128
 
129
- - Based on [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.11 (MIT), upstream baseline [`4697b4a`](https://github.com/minuque/pi-cc-extensions/commit/4697b4ac2cc28ee89bb9c37f1021e91075bfd94c), with this repository's configuration migration and compatibility patches retained.
129
+ - Based on [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.12 (MIT), upstream baseline [`90957cd`](https://github.com/minuque/pi-cc-extensions/commit/90957cd445403bc493e8aaee2231e1932ac26d46), with this repository's configuration migration and compatibility patches retained.
130
130
  - Rich diffs are adapted from [`MasuRii/pi-tool-display`](https://github.com/MasuRii/pi-tool-display) (MIT). See [`extensions/renderer/tool/diff/ATTRIBUTION.md`](./extensions/renderer/tool/diff/ATTRIBUTION.md).
131
131
 
132
132
  ## License
@@ -46,7 +46,7 @@ pi install git:github.com/HerbertGao/pi-extensions
46
46
  {
47
47
  // style
48
48
  "mode": "on", // on / compact / off
49
- "excludeRenderers": [], // 走原生渲染的工具名;Agent 始终保留专用渲染器
49
+ "excludeRenderers": [], // 走原生渲染的工具名,匹配忽略大小写;Agent 始终保留专用渲染器
50
50
 
51
51
  // features
52
52
  "enableSessionReference": true, // @ session 引用
@@ -125,7 +125,7 @@ pi -e . # 只跑一次,不改 settings.json
125
125
 
126
126
  ## 致谢
127
127
 
128
- - 基于 [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.11(MIT),上游基线 [`4697b4a`](https://github.com/minuque/pi-cc-extensions/commit/4697b4ac2cc28ee89bb9c37f1021e91075bfd94c);保留本仓库的配置迁移与兼容性补丁。
128
+ - 基于 [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.12(MIT),上游基线 [`90957cd`](https://github.com/minuque/pi-cc-extensions/commit/90957cd445403bc493e8aaee2231e1932ac26d46);保留本仓库的配置迁移与兼容性补丁。
129
129
  - Rich diff 改编自 [`MasuRii/pi-tool-display`](https://github.com/MasuRii/pi-tool-display)(MIT);详见 [`extensions/renderer/tool/diff/ATTRIBUTION.md`](./extensions/renderer/tool/diff/ATTRIBUTION.md)。
130
130
 
131
131
  ## 许可证
@@ -122,7 +122,7 @@ export const THINKING_PREVIEW_LINES_VALUES = ["0", "1", "3", "5", "10"];
122
122
  export const THINKING_ANIMATION_INTERVAL_VALUES = ["40", "60", "90", "120", "180"];
123
123
  /** Tools commonly toggled in excludeRenderers via the settings panel. */
124
124
  export const EXCLUDE_RENDERER_CANDIDATES = [
125
- "Agent",
125
+ "agent",
126
126
  "bash",
127
127
  "powershell",
128
128
  "read",
@@ -340,6 +340,43 @@ export function formatExcludeRenderers(names: readonly string[]): string {
340
340
  return names.length === 0 ? "none" : names.join(", ");
341
341
  }
342
342
 
343
+ /** excludeRenderers 与运行时工具名按大小写不敏感匹配(如候选 "agent" 对上 pi-subagents 的 "Agent")。 */
344
+ export function isExcludedRenderer(
345
+ toolName: string,
346
+ excludeRenderers: readonly string[] = config.excludeRenderers,
347
+ ): boolean {
348
+ const key = toolName.toLowerCase();
349
+ return excludeRenderers.some((name) => name.toLowerCase() === key);
350
+ }
351
+
352
+ /** 写入名单时去掉同名异大小写项,再按 id 写入,避免 agent/Agent 并存。 */
353
+ export function withExcludeRendererToggle(
354
+ excludeRenderers: readonly string[],
355
+ id: string,
356
+ exclude: boolean,
357
+ ): string[] {
358
+ const key = id.toLowerCase();
359
+ const next = excludeRenderers.filter((name) => name.toLowerCase() !== key);
360
+ if (exclude) next.push(id);
361
+ return [...new Set(next)].sort((a, b) => a.localeCompare(b));
362
+ }
363
+
364
+ /** 面板候选:内置候选与用户名单按大小写不敏感合并,保留先出现的写法(候选在前,仍是 agent)。 */
365
+ export function mergeExcludeRendererCandidates(
366
+ names: readonly string[],
367
+ candidates: readonly string[] = EXCLUDE_RENDERER_CANDIDATES,
368
+ ): string[] {
369
+ const seen = new Set<string>();
370
+ const merged: string[] = [];
371
+ for (const name of [...candidates, ...names]) {
372
+ const key = name.toLowerCase();
373
+ if (seen.has(key)) continue;
374
+ seen.add(key);
375
+ merged.push(name);
376
+ }
377
+ return merged.sort((a, b) => a.localeCompare(b));
378
+ }
379
+
343
380
  export function formatConfigStatus(source: Config = config): string {
344
381
  return [
345
382
  `mode=${source.mode}`,
@@ -38,7 +38,6 @@ import {
38
38
  DIFF_INDICATOR_MODES,
39
39
  DIFF_SPLIT_MIN_WIDTH_VALUES,
40
40
  DIFF_VIEW_MODES,
41
- EXCLUDE_RENDERER_CANDIDATES,
42
41
  EXPANDED_INPUT_MAX_LINES_VALUES,
43
42
  EXPANDED_OUTPUT_MAX_LINES_VALUES,
44
43
  EXPANDED_PREVIEW_MAX_LINES_VALUES,
@@ -62,6 +61,9 @@ import {
62
61
  type FooterGitStatsMode,
63
62
  type FooterTokenRateMode,
64
63
  type ScrollButtonMode,
64
+ isExcludedRenderer,
65
+ mergeExcludeRendererCandidates,
66
+ withExcludeRendererToggle,
65
67
  } from "./config.ts";
66
68
 
67
69
  /** renderer 注入的渲染副作用,面板自身不触碰渲染状态。 */
@@ -269,14 +271,13 @@ function buildExcludeRenderersSubmenu(
269
271
  invalidate: () => void;
270
272
  handleInput: (data: string) => void;
271
273
  } {
272
- const candidates = [
273
- ...new Set([...EXCLUDE_RENDERER_CANDIDATES, ...config.excludeRenderers]),
274
- ].sort((a, b) => a.localeCompare(b));
274
+ // 候选与名单按大小写不敏感合并:存过 Agent 时不再多出一行 agent。
275
+ const candidates = mergeExcludeRendererCandidates(config.excludeRenderers);
275
276
  const items = candidates.map((name) => ({
276
277
  id: name,
277
278
  label: name,
278
279
  description: `Use Pi native renderer for ${name} instead of Claude Code styling.`,
279
- currentValue: config.excludeRenderers.includes(name) ? "exclude" : "style",
280
+ currentValue: isExcludedRenderer(name, config.excludeRenderers) ? "exclude" : "style",
280
281
  values: ["style", "exclude"],
281
282
  }));
282
283
  const list = new SettingsList(
@@ -284,10 +285,13 @@ function buildExcludeRenderersSubmenu(
284
285
  Math.min(8, Math.max(4, items.length)),
285
286
  getSettingsListTheme(),
286
287
  (id: string, value: string) => {
287
- const excluded = new Set(config.excludeRenderers);
288
- if (value === "exclude") excluded.add(id);
289
- else excluded.delete(id);
290
- updateConfig({ excludeRenderers: [...excluded].sort((a, b) => a.localeCompare(b)) });
288
+ updateConfig({
289
+ excludeRenderers: withExcludeRendererToggle(
290
+ config.excludeRenderers,
291
+ id,
292
+ value === "exclude",
293
+ ),
294
+ });
291
295
  onLiveChange();
292
296
  },
293
297
  () => onClose(),
@@ -6,7 +6,7 @@
6
6
  * 生命周期对齐 compact-mode:installDefaultMode → hooks.shutdown。
7
7
  */
8
8
  import { ToolExecutionComponent } from "@earendil-works/pi-coding-agent";
9
- import { config, type CompactStyleMode } from "../config/config.ts";
9
+ import { config, isExcludedRenderer, type CompactStyleMode } from "../config/config.ts";
10
10
  import {
11
11
  COMPONENT_TOOL_RENDER_MODE,
12
12
  GLOBAL_TOOL_RENDER_PATCH,
@@ -27,7 +27,7 @@ export function preservesOriginalRenderer(
27
27
  builtInToolDefinition?: any,
28
28
  excludeRenderers: readonly string[] = config.excludeRenderers,
29
29
  ): boolean {
30
- if (!excludeRenderers.includes(toolName)) return false;
30
+ if (!isExcludedRenderer(toolName, excludeRenderers)) return false;
31
31
  return [extensionDefinition, builtInToolDefinition].some(
32
32
  (definition) =>
33
33
  definition?.renderShell === "self" ||
@@ -45,11 +45,51 @@ export function createCodeLineHighlighter(
45
45
  invalidate?: () => void,
46
46
  ): CodeLineHighlighter {
47
47
  const codeEntries = entries.filter((entry): entry is DiffLineEntry => entry.kind === "line");
48
+ const allCode = codeEntries
49
+ .map((entry) => cleanCodeLine(normalizeCodeWhitespace(entry.content)))
50
+ .join("\n");
51
+ // Budget check stays on the whole visible code: over the limit nothing is highlighted.
52
+ // Per-segment checks would let a huge diff highlight itself one segment at a time.
53
+ const segmentLanguage = shouldHighlightCodeBlock(allCode) ? language : undefined;
54
+ const highlightByEntry = new WeakMap<DiffLineEntry, CodeLineHighlighter>();
55
+ let segment: DiffLineEntry[] = [];
56
+
57
+ const flushSegment = () => {
58
+ if (segment.length === 0) return;
59
+ const highlight = createContiguousCodeLineHighlighter(
60
+ segmentLanguage,
61
+ theme,
62
+ segment,
63
+ invalidate,
64
+ );
65
+ for (const entry of segment) highlightByEntry.set(entry, highlight);
66
+ segment = [];
67
+ };
68
+
69
+ // Omitted source cannot carry lexer state across a diff discontinuity.
70
+ // Each segment is highlighted and cached on its own; the budget above still bounds one diff.
71
+ for (const entry of entries) {
72
+ if (entry.kind === "line") segment.push(entry);
73
+ else flushSegment();
74
+ }
75
+ flushSegment();
76
+
77
+ return (line, entry) => highlightByEntry.get(entry)?.(line, entry) ?? "";
78
+ }
79
+
80
+ function createContiguousCodeLineHighlighter(
81
+ language: string | undefined,
82
+ theme: DiffTheme,
83
+ codeEntries: readonly DiffLineEntry[],
84
+ invalidate?: () => void,
85
+ ): CodeLineHighlighter {
48
86
  const cleanLines = codeEntries.map((entry) =>
49
87
  cleanCodeLine(normalizeCodeWhitespace(entry.content)),
50
88
  );
51
89
  const code = cleanLines.join("\n");
52
- const shouldHighlight = !!language && shouldHighlightCodeBlock(code);
90
+ // A segment is a subset of the visible code, so `segmentLanguage` already carries
91
+ // the total budget decision; only the per-segment highlight is left to decide here.
92
+ const shouldHighlight = language !== undefined;
53
93
  const fallbackLines = shouldHighlight
54
94
  ? (() => {
55
95
  try {
@@ -1,6 +1,5 @@
1
- import { withFileMutationQueue } from "@earendil-works/pi-coding-agent";
1
+ import { createWriteToolDefinition, type WriteOperations } from "@earendil-works/pi-coding-agent";
2
2
  import { lstat, mkdir, readFile, writeFile } from "node:fs/promises";
3
- import { dirname, isAbsolute, resolve } from "node:path";
4
3
 
5
4
  export const MAX_COMPARABLE_WRITE_BYTES = 512_000;
6
5
  export const MAX_WRITE_METADATA_ENTRIES = 100;
@@ -81,33 +80,51 @@ export async function executeWriteWithMetadata(
81
80
  signal: AbortSignal | undefined,
82
81
  cwd: string,
83
82
  ): Promise<{ content: Array<{ type: "text"; text: string }>; details: undefined }> {
84
- const absolutePath = isAbsolute(params.path) ? params.path : resolve(cwd, params.path);
85
83
  store.delete(toolCallId);
84
+ // 覆盖层只揽写前快照:路径解析(含 Windows 下 /mnt/<drive>、/cygdrive/<drive> 转换)、
85
+ // 目录创建、mutation queue 与错误文案全交回 pi 官方 write,参数与官方逐字一致。
86
+ const definition = createWriteToolDefinition(cwd, {
87
+ operations: writeSnapshotOperations(store, toolCallId),
88
+ }) as any;
86
89
  try {
87
- return await withFileMutationQueue(absolutePath, async () => {
88
- const throwIfAborted = () => {
89
- if (signal?.aborted) throw new Error("Operation aborted");
90
- };
91
- throwIfAborted();
92
- const metadata = await capturePreviousContent(absolutePath);
93
- throwIfAborted();
94
- await mkdir(dirname(absolutePath), { recursive: true });
95
- throwIfAborted();
96
- await writeFile(absolutePath, params.content, "utf8");
97
- // 写入后不再检查 abort:文件已变更,必须如实报告成功
98
- store.set(toolCallId, metadata);
99
- return {
100
- content: [
101
- {
102
- type: "text",
103
- text: `Successfully wrote ${Buffer.byteLength(params.content, "utf8")} bytes to ${params.path}`,
104
- },
105
- ],
106
- details: undefined,
107
- };
108
- });
90
+ await definition.execute(toolCallId, params, signal, undefined, { cwd });
91
+ return writeSuccessResult(params);
109
92
  } catch (error) {
93
+ // 文件已落盘,只是官方写后那次 abort 检查抦了错:保持「文件已改即成功」。
94
+ if (store.get(toolCallId) && signal?.aborted) return writeSuccessResult(params);
110
95
  store.delete(toolCallId);
111
96
  throw error;
112
97
  }
113
98
  }
99
+
100
+ /** 官方 write 的落盘操作:拿到的是官方解析后的绝对路径,快照才跟真实落盘一致。 */
101
+ function writeSnapshotOperations(
102
+ store: WriteExecutionMetadataStore,
103
+ toolCallId: string,
104
+ ): WriteOperations {
105
+ return {
106
+ mkdir: (dir) => mkdir(dir, { recursive: true }).then(() => {}),
107
+ writeFile: async (absolutePath, content) => {
108
+ store.delete(toolCallId);
109
+ const metadata = await capturePreviousContent(absolutePath);
110
+ await writeFile(absolutePath, content, "utf8");
111
+ // 写已生效:后续 abort 不得把这次写报成失败,快照先落下。
112
+ store.set(toolCallId, metadata);
113
+ },
114
+ };
115
+ }
116
+
117
+ function writeSuccessResult(params: { path: string; content: string }): {
118
+ content: Array<{ type: "text"; text: string }>;
119
+ details: undefined;
120
+ } {
121
+ return {
122
+ content: [
123
+ {
124
+ type: "text",
125
+ text: `Successfully wrote ${Buffer.byteLength(params.content, "utf8")} bytes to ${params.path}`,
126
+ },
127
+ ],
128
+ details: undefined,
129
+ };
130
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-cc-extensions",
3
- "version": "1.0.11-local.1",
3
+ "version": "1.0.12-local.1",
4
4
  "license": "MIT",
5
5
  "description": "A Pi productivity suite with Claude Code-style UI, context inspection, and agent/session references",
6
6
  "type": "module",
@@ -71,10 +71,10 @@
71
71
  },
72
72
  "x-upstream": {
73
73
  "package": "pi-cc-extensions",
74
- "version": "1.0.11",
75
- "reviewedVersion": "1.0.11",
74
+ "version": "1.0.12",
75
+ "reviewedVersion": "1.0.12",
76
76
  "repository": "https://github.com/minuque/pi-cc-extensions",
77
- "commit": "4697b4ac2cc28ee89bb9c37f1021e91075bfd94c",
77
+ "commit": "90957cd445403bc493e8aaee2231e1932ac26d46",
78
78
  "trackVersion": true
79
79
  }
80
80
  }
@@ -191,7 +191,7 @@ The file is read for every `/btw` invocation, so edits apply without `/reload`.
191
191
  - Resume state is memory-only and lasts only for the current extension instance.
192
192
  - Main-conversation context is a limited text snapshot, not the complete session; see [context scope](./docs/workflows.md#choose-context-and-resume-threads).
193
193
  - Clipboard access depends on Pi's host helper, the operating system, and the terminal.
194
- - The live workspace still uses a BTW-owned terminal handoff and private host-layout access because Pi has no public workspace-composition API; see the [core-alignment handoff](./docs/core-alignment.md) for tested safeguards, exact limits, and proposed APIs.
194
+ - The live workspace uses a separate TUI instance and BTW-owned private host-layout access because Pi has no public workspace-composition API; see the [core-alignment handoff](./docs/core-alignment.md) for tested safeguards, exact limits, and proposed APIs. This intentionally deviates from Pi's advice against a second terminal renderer: only one renderer owns the terminal at a time, without an official support guarantee. The [shared fullscreen handoff record](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-tui-kit/docs/fullscreen-handoff.md) records the Kit physical-lifecycle contract, two-consumer proof, release guards, and physical-terminal limits; layouts, input, and domain state stay in BTW.
195
195
  - Pi does not expose all effective renderer options or a public clipboard-read callback. BTW uses native automatic wheel behavior but does not inherit private host wheel overrides or right-click clipboard paste.
196
196
  - Conversation appearance follows native defaults, not custom host editor/footer extensions or private padding settings. BTW uses one-cell message padding and zero-cell editor padding; see the [appearance reference and before/after frames](./docs/native-appearance.md).
197
197
  - Malformed, unsupported, or oversized Mermaid diagrams remain readable as fenced source; partial parses also show a warning.