@herbertgao/pi-extensions 2026.11.2 → 2026.11.4

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 (235) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +13 -13
  3. package/THIRD_PARTY_NOTICES.md +2 -2
  4. package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +12 -0
  5. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +2 -2
  6. package/node_modules/@herbertgao/pi-cc-extensions/README.md +2 -2
  7. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +109 -16
  8. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +33 -5
  9. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/ccstyle-tool.ts +72 -17
  10. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/write-execution.ts +5 -1
  11. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +10 -2
  12. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-io.ts +16 -7
  13. package/node_modules/@herbertgao/pi-cc-extensions/package.json +7 -5
  14. package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-dark-hc.json +92 -0
  15. package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-light-hc.json +92 -0
  16. package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
  17. package/node_modules/@herbertgao/pi-subagents/README.md +12 -10
  18. package/node_modules/@herbertgao/pi-subagents/docs/rpc.md +1 -1
  19. package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
  20. package/node_modules/@herbertgao/pi-subagents/src/agent-record-entry.ts +22 -6
  21. package/node_modules/@herbertgao/pi-subagents/src/index.ts +9 -4
  22. package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +167 -7
  23. package/node_modules/@herbertgao/pi-subagents/src/ui/viewer-keys.ts +8 -4
  24. package/node_modules/@narumitw/pi-btw/CHANGELOG.md +259 -0
  25. package/node_modules/@narumitw/pi-btw/package.json +6 -5
  26. package/node_modules/@narumitw/pi-caffeinate/CHANGELOG.md +70 -0
  27. package/node_modules/@narumitw/pi-caffeinate/package.json +5 -4
  28. package/node_modules/pi-commandcode-provider/CHANGELOG.md +48 -0
  29. package/node_modules/pi-commandcode-provider/CONTRIBUTING.md +64 -5
  30. package/node_modules/pi-commandcode-provider/README.md +44 -18
  31. package/node_modules/pi-commandcode-provider/RELEASE.md +25 -0
  32. package/node_modules/pi-commandcode-provider/index.ts +222 -42
  33. package/node_modules/pi-commandcode-provider/package.json +9 -8
  34. package/node_modules/pi-commandcode-provider/scripts/live-e2e-profile.mjs +6 -13
  35. package/node_modules/pi-commandcode-provider/scripts/typecheck-entrypoint.mjs +88 -0
  36. package/node_modules/pi-commandcode-provider/src/api-key.ts +67 -10
  37. package/node_modules/pi-commandcode-provider/src/auth-server.ts +33 -24
  38. package/node_modules/pi-commandcode-provider/src/commandcode-catalog-overrides.ts +1 -1
  39. package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +9 -2
  40. package/node_modules/pi-commandcode-provider/src/cost.ts +29 -43
  41. package/node_modules/pi-commandcode-provider/src/diagnostics.ts +215 -0
  42. package/node_modules/pi-commandcode-provider/src/oauth.ts +41 -7
  43. package/node_modules/pi-commandcode-provider/src/pricing.ts +5 -3
  44. package/node_modules/pi-commandcode-provider/src/quota-command.ts +1 -1
  45. package/node_modules/pi-commandcode-provider/src/routing.ts +166 -0
  46. package/node_modules/pi-commandcode-provider/src/runtime.ts +23 -10
  47. package/node_modules/pi-commandcode-provider/src/transport.ts +82 -85
  48. package/node_modules/pi-commandcode-provider/src/types.ts +20 -39
  49. package/node_modules/pi-commandcode-provider/src/usage.ts +1 -1
  50. package/node_modules/pi-lens/CHANGELOG-USER.md +31 -0
  51. package/node_modules/pi-lens/CHANGELOG.md +178 -0
  52. package/node_modules/pi-lens/README.md +2 -1
  53. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +1 -1
  54. package/node_modules/pi-lens/dist/{chunk-3O5EII3W.js → chunk-2VZ3VN3N.js} +2 -2
  55. package/node_modules/pi-lens/dist/{chunk-SDFKOLSF.js → chunk-3HTZDY3C.js} +8 -6
  56. package/node_modules/pi-lens/dist/{chunk-A5GRLYPZ.js → chunk-3NPWO5UO.js} +7 -13
  57. package/node_modules/pi-lens/dist/{chunk-AGGUWKRK.js → chunk-47UCC4MM.js} +1 -1
  58. package/node_modules/pi-lens/dist/chunk-4ENEJHF4.js +198 -0
  59. package/node_modules/pi-lens/dist/{chunk-WXUDRAG6.js → chunk-5GEYJJHG.js} +10 -12
  60. package/node_modules/pi-lens/dist/{chunk-HHR7WGCI.js → chunk-5YSEQHJN.js} +3 -3
  61. package/node_modules/pi-lens/dist/{chunk-L3CLUGDY.js → chunk-6GPB3JLL.js} +3 -3
  62. package/node_modules/pi-lens/dist/{chunk-5F3XF3SX.js → chunk-7R5GZIA6.js} +6 -6
  63. package/node_modules/pi-lens/dist/{chunk-CUDD35TW.js → chunk-7UTSNTWM.js} +4 -4
  64. package/node_modules/pi-lens/dist/{chunk-DYRZGUMA.js → chunk-7YTRG6YW.js} +2 -2
  65. package/node_modules/pi-lens/dist/{chunk-JZRP4DGP.js → chunk-AACN5GNE.js} +2 -2
  66. package/node_modules/pi-lens/dist/{chunk-7ANZ7XDD.js → chunk-ACRJ2GZ5.js} +2 -2
  67. package/node_modules/pi-lens/dist/{chunk-6FIRFP6A.js → chunk-C3YRO3EU.js} +10 -12
  68. package/node_modules/pi-lens/dist/{chunk-GMROJJRN.js → chunk-CB7PEVOJ.js} +9 -1
  69. package/node_modules/pi-lens/dist/{chunk-BBET6HD6.js → chunk-CDFJF5YD.js} +1 -1
  70. package/node_modules/pi-lens/dist/{chunk-NSPVR3FN.js → chunk-CJS6WE66.js} +17 -19
  71. package/node_modules/pi-lens/dist/{chunk-6YUNI7B5.js → chunk-CM6BDY4E.js} +14 -60
  72. package/node_modules/pi-lens/dist/{chunk-G5GV2Q7K.js → chunk-CZCAZVTD.js} +16 -2
  73. package/node_modules/pi-lens/dist/chunk-DGKFWQK4.js +23 -0
  74. package/node_modules/pi-lens/dist/{chunk-VOP4PJKA.js → chunk-E65WJVI5.js} +7 -9
  75. package/node_modules/pi-lens/dist/{chunk-TV6RXRYH.js → chunk-EKNYSXFB.js} +8 -10
  76. package/node_modules/pi-lens/dist/{chunk-4LL2VRNY.js → chunk-EY6LY2HO.js} +16 -18
  77. package/node_modules/pi-lens/dist/{chunk-MC6VB2E5.js → chunk-F6BEQWAK.js} +17 -5
  78. package/node_modules/pi-lens/dist/{chunk-R2QQC33W.js → chunk-FGNSESAC.js} +12 -14
  79. package/node_modules/pi-lens/dist/{chunk-OC7VWJBZ.js → chunk-FRUBVFXV.js} +35 -37
  80. package/node_modules/pi-lens/dist/{chunk-7CGIDRIK.js → chunk-G22UNQID.js} +14 -16
  81. package/node_modules/pi-lens/dist/{chunk-L4NEVZ4T.js → chunk-GQTQUNCG.js} +25 -27
  82. package/node_modules/pi-lens/dist/{chunk-ZKLTNLAW.js → chunk-H3BVMK47.js} +6 -6
  83. package/node_modules/pi-lens/dist/chunk-H6FLQ5NW.js +28 -0
  84. package/node_modules/pi-lens/dist/{chunk-2ZE3AUJQ.js → chunk-HEA3EM23.js} +13 -15
  85. package/node_modules/pi-lens/dist/{chunk-CZL44WFN.js → chunk-HSOBIN22.js} +2 -2
  86. package/node_modules/pi-lens/dist/{chunk-PKSUMEPT.js → chunk-HYSKJMZK.js} +3 -3
  87. package/node_modules/pi-lens/dist/{chunk-VN3L2JWZ.js → chunk-IICERRFF.js} +5 -5
  88. package/node_modules/pi-lens/dist/{chunk-O4N5BQ3T.js → chunk-IILEH3ZC.js} +8 -10
  89. package/node_modules/pi-lens/dist/{chunk-WC6WRNQT.js → chunk-J3Q2NYJR.js} +2 -2
  90. package/node_modules/pi-lens/dist/{chunk-SFLHSL5R.js → chunk-JUZ67QZQ.js} +18 -7
  91. package/node_modules/pi-lens/dist/chunk-KR5VGMVT.js +25 -0
  92. package/node_modules/pi-lens/dist/{chunk-UHHLR2VY.js → chunk-KV6GQOGN.js} +38 -41
  93. package/node_modules/pi-lens/dist/{chunk-HUAM7QG3.js → chunk-KXMJLOZF.js} +25 -23
  94. package/node_modules/pi-lens/dist/{chunk-BUZIQDFS.js → chunk-L4Y3ROKQ.js} +3 -3
  95. package/node_modules/pi-lens/dist/{chunk-JBP7KESM.js → chunk-L6WBJGQS.js} +1 -1
  96. package/node_modules/pi-lens/dist/{chunk-35WKJWO5.js → chunk-L7O774U7.js} +14 -14
  97. package/node_modules/pi-lens/dist/{chunk-BOPDQ7AZ.js → chunk-LAHHGNAY.js} +19 -21
  98. package/node_modules/pi-lens/dist/{chunk-RGGH6M34.js → chunk-LT62P654.js} +1 -1
  99. package/node_modules/pi-lens/dist/{chunk-5T5A6YAJ.js → chunk-LWOM6LVS.js} +33 -34
  100. package/node_modules/pi-lens/dist/{chunk-JYLOYTZD.js → chunk-MKPDIAZH.js} +5 -1
  101. package/node_modules/pi-lens/dist/{chunk-CM73PPGD.js → chunk-MN635QYA.js} +3 -4
  102. package/node_modules/pi-lens/dist/{chunk-BQG2QFVO.js → chunk-MQ4PPCJB.js} +21 -29
  103. package/node_modules/pi-lens/dist/{chunk-HXFUTMX2.js → chunk-MRLH4MYU.js} +2 -2
  104. package/node_modules/pi-lens/dist/{chunk-XOMGO63G.js → chunk-N56BNAA6.js} +19 -21
  105. package/node_modules/pi-lens/dist/{chunk-7MAD5ZAY.js → chunk-N5CEGQPG.js} +14 -16
  106. package/node_modules/pi-lens/dist/{chunk-ZFORSIED.js → chunk-NCLO6E6N.js} +13 -33
  107. package/node_modules/pi-lens/dist/{chunk-SQC7K3SP.js → chunk-NL5LSKVD.js} +2 -2
  108. package/node_modules/pi-lens/dist/{chunk-I22THIHI.js → chunk-NMUSOZ2D.js} +10 -12
  109. package/node_modules/pi-lens/dist/{chunk-4NBWFYWW.js → chunk-NOWH2VA2.js} +8 -33
  110. package/node_modules/pi-lens/dist/{chunk-NM2NWH55.js → chunk-NUSXS6YB.js} +6 -5
  111. package/node_modules/pi-lens/dist/{chunk-OZWXLJMX.js → chunk-OSEKJEUU.js} +2 -2
  112. package/node_modules/pi-lens/dist/{chunk-2BKUFQKR.js → chunk-OUYAUXAT.js} +405 -181
  113. package/node_modules/pi-lens/dist/{chunk-JPRDTY5S.js → chunk-PBZNYHMM.js} +8 -10
  114. package/node_modules/pi-lens/dist/{chunk-JE6HKLC7.js → chunk-PIIUNJIT.js} +2 -4
  115. package/node_modules/pi-lens/dist/{chunk-ZZDIOAAJ.js → chunk-PRHYIA6X.js} +6 -6
  116. package/node_modules/pi-lens/dist/{chunk-4W52ZKZX.js → chunk-PXQ45SGD.js} +2 -2
  117. package/node_modules/pi-lens/dist/chunk-Q6JQKWPK.js +25 -0
  118. package/node_modules/pi-lens/dist/{chunk-PIQQM32Y.js → chunk-QB7T2PHK.js} +2 -2
  119. package/node_modules/pi-lens/dist/{chunk-HKIL6DCL.js → chunk-QGITU23N.js} +1 -1
  120. package/node_modules/pi-lens/dist/chunk-QJJKOHLH.js +57 -0
  121. package/node_modules/pi-lens/dist/{chunk-6LJOJ6EO.js → chunk-QP33NKYC.js} +14 -16
  122. package/node_modules/pi-lens/dist/{chunk-DIWK3LBC.js → chunk-QVBOXT3L.js} +8 -10
  123. package/node_modules/pi-lens/dist/{chunk-IYVYZQRL.js → chunk-RNJFRXEN.js} +5 -7
  124. package/node_modules/pi-lens/dist/{chunk-G6JKM4O7.js → chunk-RNXOWDM6.js} +10 -10
  125. package/node_modules/pi-lens/dist/{chunk-5RNB4HVK.js → chunk-RTFMDIKV.js} +1 -1
  126. package/node_modules/pi-lens/dist/{chunk-XWIME22V.js → chunk-SIQHOB6P.js} +11 -13
  127. package/node_modules/pi-lens/dist/{chunk-T2S3FNNJ.js → chunk-SLSMJPEF.js} +41 -42
  128. package/node_modules/pi-lens/dist/chunk-T5QSLSMM.js +50 -0
  129. package/node_modules/pi-lens/dist/chunk-TGQDAG4B.js +88 -0
  130. package/node_modules/pi-lens/dist/{chunk-6GMGEKQN.js → chunk-THYHUIDR.js} +39 -12
  131. package/node_modules/pi-lens/dist/{chunk-WMDUT4KH.js → chunk-TMNUTMT5.js} +72 -89
  132. package/node_modules/pi-lens/dist/{chunk-7TNILKGY.js → chunk-TOE2RRCS.js} +1 -1
  133. package/node_modules/pi-lens/dist/chunk-TYHPVE5H.js +25 -0
  134. package/node_modules/pi-lens/dist/chunk-UAKO2M6B.js +73 -0
  135. package/node_modules/pi-lens/dist/chunk-UC5AXW5Z.js +20 -0
  136. package/node_modules/pi-lens/dist/chunk-UTJP6WOS.js +28 -0
  137. package/node_modules/pi-lens/dist/{chunk-FRLAUP2B.js → chunk-UXTQ3QPD.js} +4 -4
  138. package/node_modules/pi-lens/dist/{chunk-4QG55RRC.js → chunk-V2WDBOLZ.js} +10 -12
  139. package/node_modules/pi-lens/dist/{chunk-FHEV6T4L.js → chunk-V67D6TMU.js} +8 -10
  140. package/node_modules/pi-lens/dist/{chunk-VLQ7UKZH.js → chunk-VCRVNLE7.js} +135 -2
  141. package/node_modules/pi-lens/dist/{chunk-KZ4ALBCH.js → chunk-VO4JFPTV.js} +2 -2
  142. package/node_modules/pi-lens/dist/{chunk-GIRBSBGL.js → chunk-VWLSU3XV.js} +3 -3
  143. package/node_modules/pi-lens/dist/{chunk-2453RRJ2.js → chunk-W5E72HJA.js} +59 -22
  144. package/node_modules/pi-lens/dist/{chunk-VPLBLWFO.js → chunk-W7TY6HYX.js} +1 -1
  145. package/node_modules/pi-lens/dist/{chunk-SP4TFY5F.js → chunk-WSSLVMDA.js} +11 -13
  146. package/node_modules/pi-lens/dist/{chunk-PPKECBPP.js → chunk-WTB4GKMH.js} +10 -1
  147. package/node_modules/pi-lens/dist/{chunk-X35S7HSB.js → chunk-X5BJ3G2P.js} +41 -30
  148. package/node_modules/pi-lens/dist/{chunk-X66YJ2SS.js → chunk-XKFO2SZV.js} +33 -34
  149. package/node_modules/pi-lens/dist/{chunk-OWTG6UMO.js → chunk-XLAI7UYY.js} +75 -22
  150. package/node_modules/pi-lens/dist/{chunk-4B2YFN4U.js → chunk-XO756WE5.js} +45 -33
  151. package/node_modules/pi-lens/dist/{chunk-VOXTCULR.js → chunk-XVB3Q2PG.js} +2 -4
  152. package/node_modules/pi-lens/dist/{chunk-XYLC35E4.js → chunk-YOXCCJDF.js} +517 -308
  153. package/node_modules/pi-lens/dist/{chunk-O2ARHQKF.js → chunk-ZCQBNPRH.js} +2 -2
  154. package/node_modules/pi-lens/dist/chunk-ZD4KVFXI.js +234 -0
  155. package/node_modules/pi-lens/dist/{chunk-LSFXZLPW.js → chunk-ZDMFGACN.js} +184 -235
  156. package/node_modules/pi-lens/dist/{chunk-4BKU7PV3.js → chunk-ZMMHHXSW.js} +1 -1
  157. package/node_modules/pi-lens/dist/{chunk-OY7WZI7Q.js → chunk-ZPM7ZIFL.js} +6 -6
  158. package/node_modules/pi-lens/dist/{chunk-R4QWJQ2H.js → chunk-ZVCDHYWZ.js} +9 -11
  159. package/node_modules/pi-lens/dist/{chunk-RZG472YW.js → chunk-ZZN74OGD.js} +83 -46
  160. package/node_modules/pi-lens/dist/{chunk-BHWW6FAX.js → chunk-ZZSJAR76.js} +37 -19
  161. package/node_modules/pi-lens/dist/index.js +4910 -4218
  162. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +12 -17
  163. package/node_modules/pi-lens/dist/mcp/cli.js +41 -42
  164. package/node_modules/pi-lens/dist/mcp/server.js +1451 -648
  165. package/node_modules/pi-lens/dist/mcp/worker.js +59 -60
  166. package/node_modules/pi-lens/dist/probes/installer.js +17 -19
  167. package/node_modules/pi-lens/docs/agent-tools.md +40 -8
  168. package/node_modules/pi-lens/docs/analysisall.md +1 -1
  169. package/node_modules/pi-lens/docs/ci-bot-pr-checks.md +7 -5
  170. package/node_modules/pi-lens/docs/configuration.md +51 -9
  171. package/node_modules/pi-lens/docs/defect-shapes.md +52 -3
  172. package/node_modules/pi-lens/docs/environment-variables.md +18 -1
  173. package/node_modules/pi-lens/docs/features.md +12 -5
  174. package/node_modules/pi-lens/docs/globalconfig.md +11 -3
  175. package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +9 -2
  176. package/node_modules/pi-lens/docs/invariants/session-telemetry.md +2 -2
  177. package/node_modules/pi-lens/docs/language-coverage.md +1 -0
  178. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +57 -35
  179. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +4 -1
  180. package/node_modules/pi-lens/docs/merge-queue-rollout.md +10 -8
  181. package/node_modules/pi-lens/docs/module-report-read-symbol.md +34 -23
  182. package/node_modules/pi-lens/docs/pi-lens-fixer.md +11 -1
  183. package/node_modules/pi-lens/docs/pi-lens-investigator.md +3 -0
  184. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +15 -7
  185. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +1 -1
  186. package/node_modules/pi-lens/docs/pi-lens-subagent.md +13 -0
  187. package/node_modules/pi-lens/docs/public-api-stability.md +39 -5
  188. package/node_modules/pi-lens/docs/release-qa-baseline.md +7 -4
  189. package/node_modules/pi-lens/docs/schema/pi-lens-config-v1.json +11 -2
  190. package/node_modules/pi-lens/docs/servercapabilities.md +3 -1
  191. package/node_modules/pi-lens/docs/settings.md +2 -2
  192. package/node_modules/pi-lens/docs/word-index.md +3 -2
  193. package/node_modules/pi-lens/package.json +8 -3
  194. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +1 -2
  195. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +1 -2
  196. package/node_modules/pi-lens/scripts/download-grammars.js +3 -2
  197. package/node_modules/pi-lens/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
  198. package/node_modules/pi-provider-qoder/dist/index.js +473 -62
  199. package/node_modules/pi-provider-qoder/package.json +1 -1
  200. package/node_modules/pi-web-access/CHANGELOG.md +22 -0
  201. package/node_modules/pi-web-access/README.md +31 -12
  202. package/node_modules/pi-web-access/curator-page.ts +5 -1
  203. package/node_modules/pi-web-access/curator-server.ts +2 -0
  204. package/node_modules/pi-web-access/dist/index.js +673 -308
  205. package/node_modules/pi-web-access/dist/mcp-cli.js +666 -309
  206. package/node_modules/pi-web-access/gemini-search.ts +12 -4
  207. package/node_modules/pi-web-access/github-api.ts +1 -1
  208. package/node_modules/pi-web-access/github-extract.ts +3 -2
  209. package/node_modules/pi-web-access/index.ts +7 -3
  210. package/node_modules/pi-web-access/mcp-tool-definitions.ts +1 -1
  211. package/node_modules/pi-web-access/outcrawl.ts +204 -0
  212. package/node_modules/pi-web-access/package.json +2 -2
  213. package/node_modules/pi-web-access/sofya.ts +201 -0
  214. package/node_modules/pi-web-access/utils.ts +16 -6
  215. package/node_modules/pi-web-access/web-tool-core.ts +4 -0
  216. package/package.json +16 -14
  217. package/node_modules/pi-commandcode-provider/src/converters.ts +0 -477
  218. package/node_modules/pi-commandcode-provider/src/core.ts +0 -836
  219. package/node_modules/pi-commandcode-provider/src/json-schema.ts +0 -417
  220. package/node_modules/pi-commandcode-provider/src/transcript.ts +0 -56
  221. package/node_modules/pi-lens/dist/chunk-2TS4GLOJ.js +0 -31
  222. package/node_modules/pi-lens/dist/chunk-3JAHQBSY.js +0 -27
  223. package/node_modules/pi-lens/dist/chunk-447YZL4S.js +0 -25
  224. package/node_modules/pi-lens/dist/chunk-565VRUP4.js +0 -136
  225. package/node_modules/pi-lens/dist/chunk-57X2CDRX.js +0 -49
  226. package/node_modules/pi-lens/dist/chunk-GGYOZWHW.js +0 -27
  227. package/node_modules/pi-lens/dist/chunk-IE5D3RA5.js +0 -58
  228. package/node_modules/pi-lens/dist/chunk-LPYTPNOJ.js +0 -22
  229. package/node_modules/pi-lens/dist/chunk-OFNMHPBT.js +0 -89
  230. package/node_modules/pi-lens/dist/chunk-U3AS2FR6.js +0 -106
  231. package/node_modules/pi-lens/dist/chunk-W3BGKBBK.js +0 -27
  232. package/node_modules/pi-lens/dist/chunk-WQV6BI4Q.js +0 -48
  233. package/node_modules/pi-lens/dist/chunk-YHGYAEFH.js +0 -443
  234. package/node_modules/pi-lens/dist/chunk-ZONZ6YY3.js +0 -74
  235. package/node_modules/pi-lens/dist/chunk-ZSM35JF4.js +0 -30
@@ -84,7 +84,7 @@ export async function executeWriteWithMetadata(
84
84
  // 覆盖层只揽写前快照:路径解析(含 Windows 下 /mnt/<drive>、/cygdrive/<drive> 转换)、
85
85
  // 目录创建、mutation queue 与错误文案全交回 pi 官方 write,参数与官方逐字一致。
86
86
  const definition = createWriteToolDefinition(cwd, {
87
- operations: writeSnapshotOperations(store, toolCallId),
87
+ operations: writeSnapshotOperations(store, toolCallId, signal),
88
88
  }) as any;
89
89
  try {
90
90
  await definition.execute(toolCallId, params, signal, undefined, { cwd });
@@ -101,12 +101,16 @@ export async function executeWriteWithMetadata(
101
101
  function writeSnapshotOperations(
102
102
  store: WriteExecutionMetadataStore,
103
103
  toolCallId: string,
104
+ signal: AbortSignal | undefined,
104
105
  ): WriteOperations {
105
106
  return {
106
107
  mkdir: (dir) => mkdir(dir, { recursive: true }).then(() => {}),
107
108
  writeFile: async (absolutePath, content) => {
108
109
  store.delete(toolCallId);
109
110
  const metadata = await capturePreviousContent(absolutePath);
111
+ // 官方只在进 operations 之前查 abort(紧接着这次调用,中间没有 await),
112
+ // 快照读盘期间的取消只能在这里补:抛错,不写文件,也不留 metadata。
113
+ if (signal?.aborted) throw new Error("Operation aborted");
110
114
  await writeFile(absolutePath, content, "utf8");
111
115
  // 写已生效:后续 abort 不得把这次写报成失败,快照先落下。
112
116
  store.set(toolCallId, metadata);
@@ -26,6 +26,7 @@ import { mcpToolTitle } from "./mcp-title.ts";
26
26
  import { collapseHintText, isToolTuiFullscreen, showMoreHintText } from "./names.ts";
27
27
  import {
28
28
  contentRowRange,
29
+ hasVisibleText,
29
30
  imagePlacement,
30
31
  stripAnsi,
31
32
  stripBackgroundAnsi,
@@ -364,10 +365,17 @@ function expandedToolRows(tool: any, width: number): string[] {
364
365
  const cached = expandedToolRowsCache.get(paint);
365
366
  if (cached) return cached;
366
367
  const rendered = visibleLines(paint);
367
- if (rendered.length) {
368
- rendered[0] = stripLeadingStatusIcon(rendered[0])
368
+ // 首行的状态图标由组前缀给,子行里要剥掉。
369
+ const stripIcon = (line: string) =>
370
+ stripLeadingStatusIcon(line)
369
371
  .replace(/^ +/, "")
370
372
  .replace(/^((?:\x1b\[[0-?]*[ -/]*[@-~])*) +/, "$1");
373
+ // 剥完什么都没剩下(子卡首行只剩一个图标)就丢掉这一行,再对新的首行剥一次:
374
+ // 留着会多出一行只有 `├ ✓` 的空行,标题行也会带着图标和前缀叠成两个。
375
+ while (rendered.length) {
376
+ rendered[0] = stripIcon(rendered[0]);
377
+ if (hasVisibleText(rendered[0])) break;
378
+ rendered.shift();
371
379
  }
372
380
  const rows = rendered.length
373
381
  ? // 续行只剥外层 Box 的 1 格 left pad,保留 Input/Output 相对缩进
@@ -106,8 +106,11 @@ export class ExpandedToolIoView {
106
106
 
107
107
  /** flushLeft:贴左渲染(外层 Box 负责 1 格 pad);默认 false 保留 1 格前导空格。 */
108
108
  private flushLeft: boolean;
109
- /** 尾部附注(shell 的耗时)。挂到 Output 的 show-more 行上,没有那一行时单独成行。 */
110
- private footer: string | undefined;
109
+ /** 尾部附注(shell 的耗时)。挂到 Output 的 show-more 行上,没有那一行时单独成行。
110
+ * 传取值函数时每帧求值,值变了才重画:运行中的秒数要跟着动画 tick 走。 */
111
+ private footer: string | (() => string | undefined) | undefined;
112
+ /** 上一次求值结果,用来判断 footer 是否变化。 */
113
+ private footerText: string | undefined;
111
114
 
112
115
  constructor(
113
116
  theme: any,
@@ -224,7 +227,7 @@ export class ExpandedToolIoView {
224
227
  }
225
228
 
226
229
  /** 尾部附注(耗时等)。挂在 show-more 行上;无 show-more 行时单独成行。 */
227
- setFooter(text: string | undefined): void {
230
+ setFooter(text: string | (() => string | undefined) | undefined): void {
228
231
  if (this.footer === text) return;
229
232
  this.footer = text;
230
233
  this.invalidate();
@@ -268,6 +271,12 @@ export class ExpandedToolIoView {
268
271
  }
269
272
 
270
273
  render(width: number): string[] {
274
+ // footer 可以是取值函数(运行中的耗时),每帧重算;变了就丢掉行缓存。
275
+ const footer = typeof this.footer === "function" ? this.footer() : this.footer;
276
+ if (footer !== this.footerText) {
277
+ this.footerText = footer;
278
+ this.cachedLines = undefined;
279
+ }
271
280
  if (this.cachedLines !== undefined && this.cachedWidth === width) {
272
281
  return withIoViewMarkers(this, this.cachedLines);
273
282
  }
@@ -397,7 +406,7 @@ export class ExpandedToolIoView {
397
406
  limit: this.maxOutputLines,
398
407
  continued: false,
399
408
  section: "output",
400
- footerNote: this.footer,
409
+ footerNote: footer,
401
410
  });
402
411
  } else {
403
412
  this.truncated.output = outputWouldTruncate;
@@ -406,14 +415,14 @@ export class ExpandedToolIoView {
406
415
  limit: this.maxOutputLines,
407
416
  continued: false,
408
417
  section: "output",
409
- footerNote: this.footer,
418
+ footerNote: footer,
410
419
  });
411
420
  }
412
421
 
413
422
  // 耗时挂在 Output 的 show-more 行上(与折叠态一样,提示留在行尾);
414
423
  // 没截断就没有那一行,才单独成行。放在最后追加,前面记下的行号不受影响。
415
- if (this.footer && this.showMoreHeaderRows.output === undefined) {
416
- pushRailLine(theme.fg("muted", this.footer), false);
424
+ if (footer && this.showMoreHeaderRows.output === undefined) {
425
+ pushRailLine(theme.fg("muted", footer), false);
417
426
  }
418
427
 
419
428
  this.cachedWidth = width;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-cc-extensions",
3
- "version": "1.0.13-local.1",
3
+ "version": "1.0.15-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",
@@ -35,7 +35,9 @@
35
35
  ],
36
36
  "themes": [
37
37
  "./themes/cc-dark.json",
38
- "./themes/cc-light.json"
38
+ "./themes/cc-light.json",
39
+ "./themes/cc-dark-hc.json",
40
+ "./themes/cc-light-hc.json"
39
41
  ],
40
42
  "image": "https://raw.githubusercontent.com/HerbertGao/pi-extensions/master/packages/pi-cc-extensions/assets/readme/preview.webp",
41
43
  "video": "https://github.com/minuque/pi-cc-extensions/releases/download/v0.9.4/demo.mp4"
@@ -72,10 +74,10 @@
72
74
  },
73
75
  "x-upstream": {
74
76
  "package": "pi-cc-extensions",
75
- "version": "1.0.13",
76
- "reviewedVersion": "1.0.13",
77
+ "version": "1.0.15",
78
+ "reviewedVersion": "1.0.15",
77
79
  "repository": "https://github.com/minuque/pi-cc-extensions",
78
- "commit": "2ee840f0049be01e352a86f96a6c6e8be9f74670",
80
+ "commit": "b996151bb63028c270340bde3e9526a62c634d2f",
79
81
  "trackVersion": true
80
82
  }
81
83
  }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "https://pi.dev/schemas/theme.schema.json",
3
+ "name": "cc-dark-hc",
4
+ "appearance": "dark",
5
+ "vars": {
6
+ "fg": "#d6dde3",
7
+ "fgMuted": "#929eab",
8
+ "fgSubtle": "#768494",
9
+ "canvas": "#0d1117",
10
+ "canvasSubtle": "#1c2033",
11
+ "canvasInset": "#161a2b",
12
+ "border": "#1c2d44",
13
+ "borderMuted": "#16233a",
14
+ "blue": "#4f9eff",
15
+ "blueBright": "#79c0ff",
16
+ "green": "#37b34a",
17
+ "red": "#ff6e62",
18
+ "redSoft": "#ff7b72",
19
+ "yellow": "#cb9214",
20
+ "orange": "#f0883e",
21
+ "orangeSoft": "#ffa657",
22
+ "purple": "#be8fff",
23
+ "pink": "#f778ba",
24
+ "cyan": "#39c5cf",
25
+ "selection": "#1a4480",
26
+ "diffAddBg": "#0f2a24",
27
+ "diffDelBg": "#261418"
28
+ },
29
+ "colors": {
30
+ "accent": "blue",
31
+ "border": "border",
32
+ "borderAccent": "blue",
33
+ "borderMuted": "borderMuted",
34
+ "success": "green",
35
+ "error": "#ffc4bd",
36
+ "warning": "yellow",
37
+ "muted": "fgMuted",
38
+ "dim": "#71717a",
39
+ "text": "#f2f6fa",
40
+ "thinkingText": "#c6d0dc",
41
+ "selectedBg": "selection",
42
+ "scrollbarTrack": "borderMuted",
43
+ "scrollbarThumb": "#3a5274",
44
+ "searchMatchBg": "#1e1800",
45
+ "searchMatchText": "fg",
46
+ "userMessageBg": "#17375a",
47
+ "userMessageText": "#f2f6fa",
48
+ "customMessageBg": "borderMuted",
49
+ "customMessageText": "fgMuted",
50
+ "customMessageLabel": "blue",
51
+ "toolPendingBg": "#1a2534",
52
+ "toolSuccessBg": "#123c2b",
53
+ "toolErrorBg": "#4b1b21",
54
+ "toolTitle": "#f2f6fa",
55
+ "toolOutput": "#c6d0dc",
56
+ "mdHeading": "#b8ddff",
57
+ "mdLink": "#a3d0ff",
58
+ "mdLinkUrl": "#c6d0dc",
59
+ "mdCode": "#a5d6ff",
60
+ "mdCodeBlock": "#f2f6fa",
61
+ "mdCodeBlockBorder": "#6b95c7",
62
+ "mdQuote": "#c6d0dc",
63
+ "mdQuoteBorder": "#6b95c7",
64
+ "mdHr": "#6b95c7",
65
+ "mdListBullet": "#b8ddff",
66
+ "toolDiffAdded": "green",
67
+ "toolDiffRemoved": "red",
68
+ "toolDiffContext": "fgMuted",
69
+ "syntaxComment": "#c6d0dc",
70
+ "syntaxKeyword": "#ffc7c0",
71
+ "syntaxFunction": "#e0c9ff",
72
+ "syntaxVariable": "#ffc99b",
73
+ "syntaxString": "#a5d6ff",
74
+ "syntaxNumber": "#b8ddff",
75
+ "syntaxType": "#ffc98f",
76
+ "syntaxOperator": "#ffc7c0",
77
+ "syntaxPunctuation": "#f2f6fa",
78
+ "thinkingOff": "fgMuted",
79
+ "thinkingMinimal": "fgSubtle",
80
+ "thinkingLow": "blue",
81
+ "thinkingMedium": "blue",
82
+ "thinkingHigh": "blueBright",
83
+ "thinkingXhigh": "cyan",
84
+ "thinkingMax": "cyan",
85
+ "bashMode": "green"
86
+ },
87
+ "export": {
88
+ "pageBg": "#0a1424",
89
+ "cardBg": "canvasSubtle",
90
+ "infoBg": "#122544"
91
+ }
92
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "https://pi.dev/schemas/theme.schema.json",
3
+ "name": "cc-light-hc",
4
+ "appearance": "light",
5
+ "vars": {
6
+ "fg": "#1e252a",
7
+ "fgMuted": "#3e4a56",
8
+ "fgSubtle": "#46525e",
9
+ "canvas": "#ffffff",
10
+ "canvasSubtle": "#d6e1f1",
11
+ "canvasInset": "#e3ebf5",
12
+ "border": "#7391c2",
13
+ "borderMuted": "#a8bdd9",
14
+ "blue": "#0058ad",
15
+ "blueBright": "#004776",
16
+ "green": "#005a16",
17
+ "red": "#a81417",
18
+ "redSoft": "#9b1b1f",
19
+ "yellow": "#765300",
20
+ "orange": "#843f00",
21
+ "orangeSoft": "#663600",
22
+ "purple": "#65339c",
23
+ "pink": "#931662",
24
+ "cyan": "#005359",
25
+ "selection": "#c5d6ee",
26
+ "diffAddBg": "#c3dcd0",
27
+ "diffDelBg": "#f0d5d8"
28
+ },
29
+ "colors": {
30
+ "accent": "blue",
31
+ "border": "border",
32
+ "borderAccent": "blue",
33
+ "borderMuted": "borderMuted",
34
+ "success": "green",
35
+ "error": "#6f0307",
36
+ "warning": "yellow",
37
+ "muted": "fgMuted",
38
+ "dim": "#4e5966",
39
+ "text": "#0a0f14",
40
+ "thinkingText": "#262e36",
41
+ "selectedBg": "selection",
42
+ "scrollbarTrack": "borderMuted",
43
+ "scrollbarThumb": "#5d84b8",
44
+ "searchMatchBg": "#f3e4b0",
45
+ "searchMatchText": "fg",
46
+ "userMessageBg": "#8ecdfa",
47
+ "userMessageText": "#0a0f14",
48
+ "customMessageBg": "#c5d3e6",
49
+ "customMessageText": "fgMuted",
50
+ "customMessageLabel": "blue",
51
+ "toolPendingBg": "canvasSubtle",
52
+ "toolSuccessBg": "#8ce3b8",
53
+ "toolErrorBg": "#ffbdba",
54
+ "toolTitle": "#0a0f14",
55
+ "toolOutput": "#262e36",
56
+ "mdHeading": "#00294f",
57
+ "mdLink": "#003263",
58
+ "mdLinkUrl": "#262e36",
59
+ "mdCode": "#00294f",
60
+ "mdCodeBlock": "#0a0f14",
61
+ "mdCodeBlockBorder": "#2f4d75",
62
+ "mdQuote": "#262e36",
63
+ "mdQuoteBorder": "#4a6d9e",
64
+ "mdHr": "#2f4d75",
65
+ "mdListBullet": "#00294f",
66
+ "toolDiffAdded": "green",
67
+ "toolDiffRemoved": "red",
68
+ "toolDiffContext": "fgMuted",
69
+ "syntaxComment": "#262e36",
70
+ "syntaxKeyword": "#6f0307",
71
+ "syntaxFunction": "#3f1a66",
72
+ "syntaxVariable": "#552800",
73
+ "syntaxString": "#00294f",
74
+ "syntaxNumber": "#00294f",
75
+ "syntaxType": "#522500",
76
+ "syntaxOperator": "#6f0307",
77
+ "syntaxPunctuation": "#0a0f14",
78
+ "thinkingOff": "fgMuted",
79
+ "thinkingMinimal": "fgSubtle",
80
+ "thinkingLow": "blue",
81
+ "thinkingMedium": "blue",
82
+ "thinkingHigh": "blueBright",
83
+ "thinkingXhigh": "cyan",
84
+ "thinkingMax": "cyan",
85
+ "bashMode": "green"
86
+ },
87
+ "export": {
88
+ "pageBg": "#f4f7fb",
89
+ "cardBg": "canvasSubtle",
90
+ "infoBg": "#d0dff2"
91
+ }
92
+ }
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.23.1-local.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#353](https://github.com/HerbertGao/pi-extensions/pull/353) [`d7118e9`](https://github.com/HerbertGao/pi-extensions/commit/d7118e94347a57977fdaaedd81ea8bd6a02f5976) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Draw conversation-viewer tool calls with the session's own tool renderers, and unfold elided output with ctrl+o. After a reload, get_subagent_result still finds a saved agent by its handle or alias. Unconsumed results and a failed worktree cleanup stay recoverable.
8
+
3
9
  ## 0.23.0-local.1
4
10
 
5
11
  ### Minor Changes
@@ -14,7 +14,7 @@ https://github.com/user-attachments/assets/8685261b-9338-4fea-8dfe-1c590d5df543
14
14
  - **Parallel background agents** — spawn multiple agents that run concurrently with automatic queuing (configurable concurrency limit, default 10) and completion notifications that reach the parent at its next boundary, several at once when they finish together
15
15
  - **Live widget UI** — persistent above-editor widget with animated spinners, live tool activity, token counts, and colored status icons. Configurable via `/agents → Settings → Widget`: `all` (every agent), `background` (default — hides foreground runs, which already render inline as the `Agent` tool result), or `off`
16
16
  - **FleetView** — Claude Code-style navigable list of `main` + every running subagent rendered below the editor (earliest-launched first). Press `↓` (or `←`) at an empty prompt to jump in, `↑`/`↓` to move the selection, `Enter` to open the selected agent's live, auto-updating conversation, `Esc` to return. Finished agents linger briefly before dropping out, and a viewer stays open through completion so you can read the final output. Toggle via `/agents → Settings → Fleet view`
17
- - **Conversation viewer** — select any agent in `/agents` to open a live-scrolling overlay of its full conversation (auto-follows new content, scroll up to pause). In pi's fullscreen mode it is a borderless, full-terminal observer with mouse support. Steer a running agent inline by pressing `Enter` to open a composer, typing, then `Enter` to send (`Esc` or an empty submit returns) — the message appears as a user message and redirects the agent after its current tool. Press `b` on a running foreground `Agent` call to hand that run to the background (see [Sending a foreground agent to the background](#sending-a-foreground-agent-to-the-background)). Stop a still-running agent by pressing `x` (then `x` again to confirm) — steer and stop both work for background agents too. Assistant text renders as Markdown; `m` cycles that between off, assistant-only and everything (see [Viewer markdown](#persistent-settings))
17
+ - **Conversation viewer** — select any agent in `/agents` to open a live-scrolling overlay of its full conversation (auto-follows new content, scroll up to pause). In pi's fullscreen mode it is a borderless, full-terminal observer with mouse support. Steer a running agent inline by pressing `Enter` to open a composer, typing, then `Enter` to send (`Esc` or an empty submit returns) — the message appears as a user message and redirects the agent after its current tool. Press `b` on a running foreground `Agent` call to hand that run to the background (see [Sending a foreground agent to the background](#sending-a-foreground-agent-to-the-background)). Stop a still-running agent by pressing `x` (then `x` again to confirm) — steer and stop both work for background agents too. Tool calls render the way they do in pi's own transcript, through the renderers registered in the agent's session: a bash call shows its command and output, `read` its line numbers, `edit` its diff, an extension tool its own renderer, and a tool without one falls back to its arguments plus a bounded output preview. `ctrl+o` (or whatever `app.tools.expand` is bound to) unfolds elided tool output. Assistant text renders as Markdown; `m` cycles that between off, assistant-only and everything (see [Viewer markdown](#persistent-settings))
18
18
  - **Custom agent types** — define agents in `.pi/agents/<name>.md` or `.agents/agents/<name>.md` (project) or globally, with YAML frontmatter: custom system prompts, model selection, thinking levels, tool restrictions, and Claude Code-compatible colored name badges
19
19
  - **Package-shipped agents** — a pi package can declare its own subagents (and workflow scripts) with `"pi": { "subagents": { "agents": ["./agents"] } }` in its `package.json`, so `pi install` is the whole setup: no copying files into `.pi/agents/` on every machine or container start. Only packages pi has actually installed are read (never `node_modules`), package definitions rank below every agent you wrote, and `/agents` shows them read-only with Eject and Disable. Narrow or switch it off with `packageAgents` / `packageWorkflows`. **[Full guide](https://github.com/HerbertGao/pi-extensions/blob/master/packages/pi-subagents/docs/packages.md)**
20
20
  - **Nested subagents** — opt-in, default-off delegation: a custom agent that sets `allowed_subagents` gets its own ownership-scoped `Agent`, `get_subagent_result`, and `steer_subagent` tools, depth-capped from the main session (default 2). It can control only its own children, they are stopped when it finishes, and their transcripts and token spend roll up to it. The allowlist is a privilege boundary — a child runs with its own tools, so pick it as carefully as `tools:` itself
@@ -549,15 +549,15 @@ Concurrency is capped at `max(1, min(16, cpus - 2))` — the run's own limit, in
549
549
 
550
550
  Check status and retrieve results from a background agent.
551
551
 
552
- | Parameter | Type | Required | Description |
553
- | ---------- | ------- | -------- | ----------------------------- |
554
- | `agent_id` | string | yes | Agent ID to check |
555
- | `wait` | boolean | no | Wait for completion |
556
- | `verbose` | boolean | no | Include full conversation log |
552
+ | Parameter | Type | Required | Description |
553
+ | ---------- | ------- | -------- | --------------------------------------------------------------------------------------------- |
554
+ | `agent_id` | string | yes | Agent ID or handle — its `name` if one was given, otherwise its type (`explore`, `explore-2`) |
555
+ | `wait` | boolean | no | Wait for completion |
556
+ | `verbose` | boolean | no | Include full conversation log |
557
557
 
558
558
  Cancelling a `wait: true` call (for example, with `Esc`) stops only the wait. The background agent keeps running, and its completion notification still arrives normally.
559
559
 
560
- A finished agent's result stays retrievable after its in-memory record is cleaned up (about ten minutes after it finishes) or lost to a reload: the final record is saved in the session as a `subagents:record` entry, and `get_subagent_result` answers from it, without the stats or the conversation (`verbose`).
560
+ A finished agent's result stays retrievable after its in-memory record is cleaned up (about ten minutes after it finishes) or lost to a reload: the final record is saved in the session as a `subagents:record` entry, and `get_subagent_result` answers from it by id or by handle, without the stats or the conversation (`verbose`).
561
561
 
562
562
  ### `steer_subagent`
563
563
 
@@ -768,10 +768,12 @@ Toggle via `/agents → Settings → Show model`; applied live.
768
768
 
769
769
  ```text
770
770
  off every line literal, as before this setting existed
771
- assistant assistant text rendered; tool results verbatim and dim (default)
772
- all tool results rendered too
771
+ assistant assistant text rendered; any result the viewer prints itself stays verbatim (default)
772
+ all those results rendered too
773
773
  ```
774
774
 
775
+ Tool calls are outside this setting: a call and its result are drawn by the tool's own renderer (see [the conversation viewer](#ui)), which knows the shape of what it produced — a diff, line-numbered source, a shell transcript — better than a generic Markdown pass would. So `m` changes assistant text and the plain result block the viewer still prints for a result whose call is not in the transcript (a compacted prefix, a reopened session).
776
+
775
777
  Scoped rather than all-or-nothing because the two kinds of content have different contracts. Assistant text _is_ Markdown — the model writes it that way, and the viewer was the only surface showing its source. A tool result is whatever bytes the tool produced, and a Markdown pass over one rewrites things that occur constantly in real output: `# section` in a shell script loses its `#`, a `---` line is swallowed as a setext heading, indented output is re-fenced, and `| a | b |` is redrawn as a box-drawing table. Each of those reads as the _tool_ having misbehaved, which is why `all` is opt-in.
776
778
 
777
779
  Two rewrites are suppressed outright rather than left to the mode, because they change _data_ rather than layout: ordered-list markers keep their source numbering (`3) 7) 9)` stays, instead of being renumbered `3. 4. 5.`) and backslash escapes are not normalised.
@@ -1117,7 +1119,7 @@ src/
1117
1119
  agent-widget.ts # Persistent widget: spinners, activity, status icons, theming
1118
1120
  fleet-list.ts # FleetView: navigable agent list below the editor
1119
1121
  conversation-viewer.ts # Live conversation overlay for viewing agent sessions
1120
- viewer-keys.ts # Viewer scroll keys resolved through user keybindings
1122
+ viewer-keys.ts # Viewer scroll and expand keys, resolved through user keybindings
1121
1123
  agent-mention.ts # `@` roster (running, resumable, and startable agents) + popup rows
1122
1124
  schedule-menu.ts # /agents → Scheduled jobs submenu
1123
1125
  select-item.ts # Collision-safe ctx.ui.select wrapper (numbered rows)
@@ -130,7 +130,7 @@ Fire-and-forget is the intended use: the reply carries nothing to act on, and th
130
130
 
131
131
  Consumption is not terminal. An `@handle` steer un-consumes the record (the mention handler, `src/index.ts`) because the agent's reply to that message still needs relaying. A background resume (`AgentManager.resume`) does too, because the record is starting a new run, and so does handing a foreground agent to the background (`AgentManager.sendToBackground`), because its result now has to reach the parent as a notification.
132
132
 
133
- One related thing that lives nowhere else: on every top-level settle, pi-subagents writes a session entry — not an event — via `pi.appendEntry("subagents:record", …)` (the manager's completion callback, `src/index.ts`, and the Agent tool's foreground `resume` branch, which settles inline without that callback; the shape is `AgentRecordEntryData` in `src/agent-record-entry.ts`), carrying `id`, `type`, `description`, `status`, `result`, `error`, `startedAt` and `completedAt`, plus `sessionFile`, `handle` and `alias` when the agent has them, and `worktreeLost: true` when its work lived in a worktree that has since been removed. `get_subagent_result` answers from it once the live record is gone, `Agent({ resume })` reopens the agent's session from it, and it serves cross-extension history reconstruction. It is append-only history, not something to react to.
133
+ One related thing that lives nowhere else: on every top-level settle, pi-subagents writes a session entry — not an event — via `pi.appendEntry("subagents:record", …)` (the manager's completion callback, `src/index.ts`, and the Agent tool's foreground `resume` branch, which settles inline without that callback; the shape is `AgentRecordEntryData` in `src/agent-record-entry.ts`), carrying `id`, `type`, `description`, `status`, `result`, `error`, `startedAt` and `completedAt`, plus `sessionFile`, `handle` and `alias` when the agent has them, and `worktreeLost: true` when its work lived in a worktree that has since been removed. `get_subagent_result` answers from it once the live record is gone, by id or by the entry's handle or alias. `Agent({ resume })` reopens the agent's session from its id, and the entry also serves cross-extension history reconstruction. It is append-only history, not something to react to.
134
134
 
135
135
  ## Steering a running agent
136
136
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-subagents",
3
- "version": "0.23.0-local.1",
3
+ "version": "0.23.1-local.1",
4
4
  "description": "Claude Code-style autonomous subagents and workflow orchestration for Pi, with HerbertGao-maintained UI extensions.",
5
5
  "keywords": [
6
6
  "agent",
@@ -69,10 +69,10 @@
69
69
  },
70
70
  "x-upstream": {
71
71
  "package": "@tintinweb/pi-subagents",
72
- "version": "0.23.0",
73
- "reviewedVersion": "0.23.0",
72
+ "version": "0.23.1",
73
+ "reviewedVersion": "0.23.1",
74
74
  "repository": "https://github.com/tintinweb/pi-subagents",
75
- "commit": "a60247c47f8b0a17bfe7208f9e248e464eda05f0",
75
+ "commit": "9bb6c822bae9f4fe8d33384b715a5e2e96d5df10",
76
76
  "trackVersion": true
77
77
  }
78
78
  }
@@ -93,23 +93,39 @@ function isAgentRecordEntryData(data: unknown): data is AgentRecordEntryData {
93
93
  }
94
94
 
95
95
  /**
96
- * The latest persisted record of agent `id` on the current branch. A resumed
97
- * agent appends a new entry on each finish, so the last one wins; an entry on
98
- * an abandoned branch is not this conversation's.
96
+ * The latest persisted record of `id` on the current branch. A resumed agent
97
+ * appends a new entry on each finish, so the last one wins; an entry on an
98
+ * abandoned branch is not this conversation's.
99
+ *
100
+ * When `matchHandle` is set, the handle and alias match too, case-insensitively
101
+ * like `@handle`, and only if no entry's id is `id`. Resume leaves it off: it
102
+ * reopens whatever this returns, and a handle would reopen a saved session
103
+ * while that agent's live record still exists.
99
104
  */
100
105
  export function findAgentRecordEntry(
101
106
  ctx: ExtensionContext,
102
107
  id: string,
108
+ matchHandle = false,
103
109
  ): AgentRecordEntryData | undefined {
104
110
  const entries = ctx.sessionManager.getBranch()
111
+ const wanted = id.toLowerCase()
112
+ let named: AgentRecordEntryData | undefined
105
113
  for (let i = entries.length - 1; i >= 0; i--) {
106
114
  const entry = entries[i]
107
115
  if (entry.type !== "custom" || entry.customType !== AGENT_RECORD_ENTRY_TYPE)
108
116
  continue
109
- if (isAgentRecordEntryData(entry.data) && entry.data.id === id)
110
- return entry.data
117
+ if (!isAgentRecordEntryData(entry.data)) continue
118
+ if (entry.data.id === id) return entry.data
119
+ if (
120
+ matchHandle &&
121
+ named === undefined &&
122
+ (entry.data.handle?.toLowerCase() === wanted ||
123
+ entry.data.alias?.toLowerCase() === wanted)
124
+ ) {
125
+ named = entry.data
126
+ }
111
127
  }
112
- return undefined
128
+ return named
113
129
  }
114
130
 
115
131
  /**
@@ -3814,13 +3814,18 @@ Terse command-style prompts produce shallow, generic work.
3814
3814
  const record = resolveAgentRef(params.agent_id)
3815
3815
  if (!record) {
3816
3816
  // Evicted, or lost to a reload: answer from the record the session saved.
3817
- // An evicted handle still resolves to its id through its tombstone.
3817
+ // An evicted handle still resolves to its id through its tombstone. After
3818
+ // a reload there is no tombstone, so the saved entry's handle and alias
3819
+ // have to match on their own.
3818
3820
  const tombstone = manager.resolveMention(params.agent_id)
3819
- const saved = findAgentRecordEntry(
3820
- ctx,
3821
+ const savedId =
3821
3822
  tombstone?.kind === "tombstone"
3822
3823
  ? tombstone.entry.id
3823
- : params.agent_id,
3824
+ : params.agent_id
3825
+ const saved = findAgentRecordEntry(
3826
+ ctx,
3827
+ savedId,
3828
+ tombstone === undefined,
3824
3829
  )
3825
3830
  if (saved) {
3826
3831
  outbox.cancel(saved.id)