@herbertgao/pi-extensions 2026.10.19 → 2026.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/README.md +19 -4
  2. package/THIRD_PARTY_NOTICES.md +53 -2
  3. package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
  4. package/node_modules/@herbertgao/pi-subagents/README.md +142 -45
  5. package/node_modules/@herbertgao/pi-subagents/docs/rpc.md +17 -7
  6. package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
  7. package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +111 -59
  8. package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +135 -117
  9. package/node_modules/@herbertgao/pi-subagents/src/cross-extension-rpc.ts +41 -14
  10. package/node_modules/@herbertgao/pi-subagents/src/index.ts +110 -19
  11. package/node_modules/@herbertgao/pi-subagents/src/nested-tools.ts +8 -0
  12. package/node_modules/@herbertgao/pi-subagents/src/prompts.ts +31 -0
  13. package/node_modules/@tintinweb/pi-tasks/CHANGELOG.md +270 -0
  14. package/node_modules/@tintinweb/pi-tasks/CONTRIBUTING.md +67 -0
  15. package/node_modules/@tintinweb/pi-tasks/CUSTOMIZING.md +289 -0
  16. package/node_modules/@tintinweb/pi-tasks/LICENSE +21 -0
  17. package/node_modules/@tintinweb/pi-tasks/README.md +417 -0
  18. package/node_modules/@tintinweb/pi-tasks/SECURITY.md +107 -0
  19. package/node_modules/@tintinweb/pi-tasks/dist/auto-clear.d.ts +64 -0
  20. package/node_modules/@tintinweb/pi-tasks/dist/auto-clear.js +129 -0
  21. package/node_modules/@tintinweb/pi-tasks/dist/index.d.ts +17 -0
  22. package/node_modules/@tintinweb/pi-tasks/dist/index.js +1338 -0
  23. package/node_modules/@tintinweb/pi-tasks/dist/process-tracker.d.ts +29 -0
  24. package/node_modules/@tintinweb/pi-tasks/dist/process-tracker.js +121 -0
  25. package/node_modules/@tintinweb/pi-tasks/dist/reminder-cadence.d.ts +39 -0
  26. package/node_modules/@tintinweb/pi-tasks/dist/reminder-cadence.js +61 -0
  27. package/node_modules/@tintinweb/pi-tasks/dist/task-glyphs.d.ts +48 -0
  28. package/node_modules/@tintinweb/pi-tasks/dist/task-glyphs.js +68 -0
  29. package/node_modules/@tintinweb/pi-tasks/dist/task-paths.d.ts +44 -0
  30. package/node_modules/@tintinweb/pi-tasks/dist/task-paths.js +60 -0
  31. package/node_modules/@tintinweb/pi-tasks/dist/task-sort.d.ts +23 -0
  32. package/node_modules/@tintinweb/pi-tasks/dist/task-sort.js +69 -0
  33. package/node_modules/@tintinweb/pi-tasks/dist/task-store.d.ts +61 -0
  34. package/node_modules/@tintinweb/pi-tasks/dist/task-store.js +397 -0
  35. package/node_modules/@tintinweb/pi-tasks/dist/tasks-config.d.ts +16 -0
  36. package/node_modules/@tintinweb/pi-tasks/dist/tasks-config.js +51 -0
  37. package/node_modules/@tintinweb/pi-tasks/dist/types.d.ts +36 -0
  38. package/node_modules/@tintinweb/pi-tasks/dist/types.js +4 -0
  39. package/node_modules/@tintinweb/pi-tasks/dist/ui/settings-menu.d.ts +15 -0
  40. package/node_modules/@tintinweb/pi-tasks/dist/ui/settings-menu.js +140 -0
  41. package/node_modules/@tintinweb/pi-tasks/dist/ui/task-widget.d.ts +69 -0
  42. package/node_modules/@tintinweb/pi-tasks/dist/ui/task-widget.js +278 -0
  43. package/node_modules/@tintinweb/pi-tasks/package.json +57 -0
  44. package/node_modules/@tintinweb/pi-tasks/src/auto-clear.ts +134 -0
  45. package/node_modules/@tintinweb/pi-tasks/src/index.ts +1417 -0
  46. package/node_modules/@tintinweb/pi-tasks/src/process-tracker.ts +140 -0
  47. package/node_modules/@tintinweb/pi-tasks/src/reminder-cadence.ts +90 -0
  48. package/node_modules/@tintinweb/pi-tasks/src/task-glyphs.ts +110 -0
  49. package/node_modules/@tintinweb/pi-tasks/src/task-paths.ts +65 -0
  50. package/node_modules/@tintinweb/pi-tasks/src/task-sort.ts +90 -0
  51. package/node_modules/@tintinweb/pi-tasks/src/task-store.ts +402 -0
  52. package/node_modules/@tintinweb/pi-tasks/src/tasks-config.ts +77 -0
  53. package/node_modules/@tintinweb/pi-tasks/src/types.ts +40 -0
  54. package/node_modules/@tintinweb/pi-tasks/src/ui/settings-menu.ts +174 -0
  55. package/node_modules/@tintinweb/pi-tasks/src/ui/task-widget.ts +325 -0
  56. package/node_modules/pi-commandcode-provider/CHANGELOG.md +330 -0
  57. package/node_modules/pi-commandcode-provider/CONTRIBUTING.md +192 -0
  58. package/node_modules/pi-commandcode-provider/LICENSE +21 -0
  59. package/node_modules/pi-commandcode-provider/README.md +243 -0
  60. package/node_modules/pi-commandcode-provider/RELEASE.md +194 -0
  61. package/node_modules/pi-commandcode-provider/index.ts +309 -0
  62. package/node_modules/pi-commandcode-provider/package.json +91 -0
  63. package/node_modules/pi-commandcode-provider/scripts/live-e2e-profile.mjs +87 -0
  64. package/node_modules/pi-commandcode-provider/scripts/pi-authenticated.mjs +50 -0
  65. package/node_modules/pi-commandcode-provider/scripts/pi-isolated.mjs +79 -0
  66. package/node_modules/pi-commandcode-provider/src/api-key.ts +69 -0
  67. package/node_modules/pi-commandcode-provider/src/auth-server.ts +229 -0
  68. package/node_modules/pi-commandcode-provider/src/commandcode-catalog-overrides.ts +28 -0
  69. package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +260 -0
  70. package/node_modules/pi-commandcode-provider/src/converters.ts +477 -0
  71. package/node_modules/pi-commandcode-provider/src/core.ts +836 -0
  72. package/node_modules/pi-commandcode-provider/src/cost.ts +76 -0
  73. package/node_modules/pi-commandcode-provider/src/json-schema.ts +417 -0
  74. package/node_modules/pi-commandcode-provider/src/models.ts +515 -0
  75. package/node_modules/pi-commandcode-provider/src/oauth.ts +229 -0
  76. package/node_modules/pi-commandcode-provider/src/overflow.ts +120 -0
  77. package/node_modules/pi-commandcode-provider/src/pricing.ts +370 -0
  78. package/node_modules/pi-commandcode-provider/src/quota-command.ts +66 -0
  79. package/node_modules/pi-commandcode-provider/src/quota-format.ts +143 -0
  80. package/node_modules/pi-commandcode-provider/src/quota-types.ts +47 -0
  81. package/node_modules/pi-commandcode-provider/src/quota.ts +357 -0
  82. package/node_modules/pi-commandcode-provider/src/responses-stream.ts +249 -0
  83. package/node_modules/pi-commandcode-provider/src/runtime.ts +330 -0
  84. package/node_modules/pi-commandcode-provider/src/transcript.ts +56 -0
  85. package/node_modules/pi-commandcode-provider/src/transport.ts +147 -0
  86. package/node_modules/pi-commandcode-provider/src/types.ts +212 -0
  87. package/node_modules/pi-commandcode-provider/src/usage.ts +261 -0
  88. package/node_modules/pi-lens/CHANGELOG.md +149 -0
  89. package/node_modules/pi-lens/README.md +12 -2
  90. package/node_modules/pi-lens/config/markdownlint/run-no-fix.mjs +36 -0
  91. package/node_modules/pi-lens/dist/{chunk-WME2OQST.js → chunk-2453RRJ2.js} +11 -6
  92. package/node_modules/pi-lens/dist/{chunk-FZKFVUEC.js → chunk-2BKUFQKR.js} +276 -208
  93. package/node_modules/pi-lens/dist/chunk-2TS4GLOJ.js +31 -0
  94. package/node_modules/pi-lens/dist/{chunk-QHSNL7B2.js → chunk-2ZE3AUJQ.js} +12 -14
  95. package/node_modules/pi-lens/dist/{chunk-MPKRJBPK.js → chunk-35WKJWO5.js} +28 -30
  96. package/node_modules/pi-lens/dist/chunk-3JAHQBSY.js +27 -0
  97. package/node_modules/pi-lens/dist/{chunk-4LM3VAZH.js → chunk-3O5EII3W.js} +2 -2
  98. package/node_modules/pi-lens/dist/chunk-447YZL4S.js +25 -0
  99. package/node_modules/pi-lens/dist/{chunk-H7OR7DFZ.js → chunk-4B2YFN4U.js} +25 -21
  100. package/node_modules/pi-lens/dist/{chunk-OSTKYB55.js → chunk-4BKU7PV3.js} +1 -1
  101. package/node_modules/pi-lens/dist/{chunk-RRV3FNNM.js → chunk-4LL2VRNY.js} +27 -28
  102. package/node_modules/pi-lens/dist/{chunk-BZARLRJW.js → chunk-4NBWFYWW.js} +9 -9
  103. package/node_modules/pi-lens/dist/{chunk-KKCK636N.js → chunk-4QG55RRC.js} +12 -12
  104. package/node_modules/pi-lens/dist/{chunk-RQS4QQSD.js → chunk-4W52ZKZX.js} +2 -2
  105. package/node_modules/pi-lens/dist/{chunk-Z2XAOKHK.js → chunk-565VRUP4.js} +2 -2
  106. package/node_modules/pi-lens/dist/{chunk-HWDAVBFU.js → chunk-57X2CDRX.js} +23 -23
  107. package/node_modules/pi-lens/dist/{chunk-MB6PXBUA.js → chunk-5F3XF3SX.js} +7 -15
  108. package/node_modules/pi-lens/dist/{chunk-O4BJFESU.js → chunk-5RNB4HVK.js} +1 -1
  109. package/node_modules/pi-lens/dist/{chunk-ZMAUPOMG.js → chunk-5T5A6YAJ.js} +35 -34
  110. package/node_modules/pi-lens/dist/{chunk-4ZYJHQMB.js → chunk-6FIRFP6A.js} +12 -12
  111. package/node_modules/pi-lens/dist/{chunk-4YHYPW2G.js → chunk-6GMGEKQN.js} +9 -5
  112. package/node_modules/pi-lens/dist/{chunk-4LOE5R5P.js → chunk-6LJOJ6EO.js} +20 -15
  113. package/node_modules/pi-lens/dist/{chunk-3YY7IXIL.js → chunk-6YUNI7B5.js} +3 -3
  114. package/node_modules/pi-lens/dist/{chunk-PKES3ISE.js → chunk-7ANZ7XDD.js} +2 -2
  115. package/node_modules/pi-lens/dist/{chunk-FB5SCCPT.js → chunk-7CGIDRIK.js} +16 -15
  116. package/node_modules/pi-lens/dist/{chunk-L3CMBQMH.js → chunk-7MAD5ZAY.js} +16 -17
  117. package/node_modules/pi-lens/dist/{chunk-WDBICWH3.js → chunk-7TNILKGY.js} +1 -1
  118. package/node_modules/pi-lens/dist/{chunk-RORGS5II.js → chunk-A5GRLYPZ.js} +9 -9
  119. package/node_modules/pi-lens/dist/{chunk-MNJIXFX4.js → chunk-AGGUWKRK.js} +1 -1
  120. package/node_modules/pi-lens/dist/{chunk-ABPKUVA4.js → chunk-BBET6HD6.js} +1 -1
  121. package/node_modules/pi-lens/dist/{chunk-L5JYIU47.js → chunk-BHWW6FAX.js} +14 -13
  122. package/node_modules/pi-lens/dist/{chunk-URCQWAQ4.js → chunk-BOPDQ7AZ.js} +23 -21
  123. package/node_modules/pi-lens/dist/{chunk-KDX35VXP.js → chunk-BQG2QFVO.js} +158 -133
  124. package/node_modules/pi-lens/dist/{chunk-CB4WHS4H.js → chunk-BUZIQDFS.js} +3 -3
  125. package/node_modules/pi-lens/dist/{chunk-2PHMIAKO.js → chunk-CM73PPGD.js} +4 -4
  126. package/node_modules/pi-lens/dist/{chunk-DH5JPM3K.js → chunk-CUDD35TW.js} +10 -9
  127. package/node_modules/pi-lens/dist/{chunk-AWDSEDER.js → chunk-CZL44WFN.js} +2 -2
  128. package/node_modules/pi-lens/dist/{chunk-N5WSK2K7.js → chunk-DIWK3LBC.js} +12 -15
  129. package/node_modules/pi-lens/dist/{chunk-24BILSZW.js → chunk-DYRZGUMA.js} +2 -2
  130. package/node_modules/pi-lens/dist/{chunk-PR6PO3ES.js → chunk-FHEV6T4L.js} +22 -18
  131. package/node_modules/pi-lens/dist/{chunk-DQZFQSR5.js → chunk-FRLAUP2B.js} +4 -4
  132. package/node_modules/pi-lens/dist/{chunk-RZOXUSPC.js → chunk-G5GV2Q7K.js} +2 -2
  133. package/node_modules/pi-lens/dist/{chunk-EKWX4WD3.js → chunk-G6JKM4O7.js} +7 -7
  134. package/node_modules/pi-lens/dist/chunk-GGYOZWHW.js +27 -0
  135. package/node_modules/pi-lens/dist/{chunk-XT2HTCJ5.js → chunk-GIRBSBGL.js} +6 -5
  136. package/node_modules/pi-lens/dist/{chunk-PQJFG24Z.js → chunk-GMROJJRN.js} +1292 -946
  137. package/node_modules/pi-lens/dist/{chunk-U6VN4NVL.js → chunk-HHR7WGCI.js} +3 -3
  138. package/node_modules/pi-lens/dist/{chunk-TIQJPRDD.js → chunk-HKIL6DCL.js} +3 -2
  139. package/node_modules/pi-lens/dist/{chunk-SNDXCFRS.js → chunk-HUAM7QG3.js} +11 -11
  140. package/node_modules/pi-lens/dist/{chunk-QOE342SU.js → chunk-HXFUTMX2.js} +2 -2
  141. package/node_modules/pi-lens/dist/{chunk-U7BD2QL7.js → chunk-I22THIHI.js} +12 -12
  142. package/node_modules/pi-lens/dist/chunk-IE5D3RA5.js +58 -0
  143. package/node_modules/pi-lens/dist/{chunk-DPGEAHZT.js → chunk-IYVYZQRL.js} +10 -16
  144. package/node_modules/pi-lens/dist/{chunk-3F6BMY53.js → chunk-JBP7KESM.js} +1 -1
  145. package/node_modules/pi-lens/dist/{chunk-U5HPROLA.js → chunk-JE6HKLC7.js} +2 -2
  146. package/node_modules/pi-lens/dist/{chunk-ZE3KXHS7.js → chunk-JPRDTY5S.js} +85 -3
  147. package/node_modules/pi-lens/dist/{chunk-HO6LWE2E.js → chunk-JYLOYTZD.js} +17 -1
  148. package/node_modules/pi-lens/dist/{chunk-KW5JQPO5.js → chunk-JZRP4DGP.js} +2 -2
  149. package/node_modules/pi-lens/dist/{chunk-CPSR3AVL.js → chunk-KZ4ALBCH.js} +2 -2
  150. package/node_modules/pi-lens/dist/{chunk-6IR3ZYIB.js → chunk-L3CLUGDY.js} +3 -3
  151. package/node_modules/pi-lens/dist/{chunk-LV4UMYVH.js → chunk-L4NEVZ4T.js} +28 -27
  152. package/node_modules/pi-lens/dist/chunk-LPYTPNOJ.js +22 -0
  153. package/node_modules/pi-lens/dist/{chunk-WGRJOXED.js → chunk-LSFXZLPW.js} +1016 -636
  154. package/node_modules/pi-lens/dist/{chunk-LBLBAFG3.js → chunk-MC6VB2E5.js} +4 -4
  155. package/node_modules/pi-lens/dist/{chunk-U2SDMG7C.js → chunk-NM2NWH55.js} +5 -5
  156. package/node_modules/pi-lens/dist/{chunk-T7A2HK2B.js → chunk-NSPVR3FN.js} +19 -18
  157. package/node_modules/pi-lens/dist/{chunk-ZGSJDWQU.js → chunk-O2ARHQKF.js} +2 -2
  158. package/node_modules/pi-lens/dist/{chunk-OXOI55RU.js → chunk-O4N5BQ3T.js} +10 -10
  159. package/node_modules/pi-lens/dist/{chunk-3FRLWYBG.js → chunk-OC7VWJBZ.js} +39 -40
  160. package/node_modules/pi-lens/dist/chunk-OFNMHPBT.js +89 -0
  161. package/node_modules/pi-lens/dist/{chunk-HR3OJ3TH.js → chunk-OWTG6UMO.js} +21 -21
  162. package/node_modules/pi-lens/dist/{chunk-75GAYVNO.js → chunk-OY7WZI7Q.js} +6 -6
  163. package/node_modules/pi-lens/dist/{chunk-ZJTT47IG.js → chunk-OZWXLJMX.js} +2 -2
  164. package/node_modules/pi-lens/dist/{chunk-F6X3YJWD.js → chunk-PIQQM32Y.js} +2 -2
  165. package/node_modules/pi-lens/dist/chunk-PKLB2XJL.js +8 -0
  166. package/node_modules/pi-lens/dist/{chunk-EAOK7MIZ.js → chunk-PKSUMEPT.js} +17 -4
  167. package/node_modules/pi-lens/dist/{chunk-YISME6ON.js → chunk-PPKECBPP.js} +1 -1
  168. package/node_modules/pi-lens/dist/{chunk-4L36HG27.js → chunk-R2QQC33W.js} +14 -14
  169. package/node_modules/pi-lens/dist/{chunk-LUBPZN36.js → chunk-R4QWJQ2H.js} +11 -11
  170. package/node_modules/pi-lens/dist/{chunk-V63BC55Q.js → chunk-RGGH6M34.js} +1 -1
  171. package/node_modules/pi-lens/dist/{chunk-Y7F7IEE3.js → chunk-RZG472YW.js} +65 -7
  172. package/node_modules/pi-lens/dist/{chunk-PUZ3E2J4.js → chunk-SDFKOLSF.js} +6 -6
  173. package/node_modules/pi-lens/dist/{chunk-YHC2O2WO.js → chunk-SFLHSL5R.js} +9 -9
  174. package/node_modules/pi-lens/dist/{chunk-CCV2EU7T.js → chunk-SP4TFY5F.js} +14 -13
  175. package/node_modules/pi-lens/dist/{chunk-J6JP25XU.js → chunk-SQC7K3SP.js} +4 -3
  176. package/node_modules/pi-lens/dist/{chunk-3K2F6UDZ.js → chunk-T2S3FNNJ.js} +44 -42
  177. package/node_modules/pi-lens/dist/{chunk-2TF6RXWB.js → chunk-TV6RXRYH.js} +10 -10
  178. package/node_modules/pi-lens/dist/{chunk-GNSIWBAT.js → chunk-U3AS2FR6.js} +3 -3
  179. package/node_modules/pi-lens/dist/{chunk-F7K5IBZG.js → chunk-UHHLR2VY.js} +40 -40
  180. package/node_modules/pi-lens/dist/chunk-UYXV5NIS.js +20 -0
  181. package/node_modules/pi-lens/dist/{chunk-VSFLRN5Y.js → chunk-VLQ7UKZH.js} +1 -1
  182. package/node_modules/pi-lens/dist/{chunk-VUZWQ7UG.js → chunk-VN3L2JWZ.js} +46 -72
  183. package/node_modules/pi-lens/dist/{chunk-NA7SEXHE.js → chunk-VOP4PJKA.js} +7 -7
  184. package/node_modules/pi-lens/dist/{chunk-F5Z6URKM.js → chunk-VOXTCULR.js} +2 -2
  185. package/node_modules/pi-lens/dist/{chunk-LLS45EWB.js → chunk-VPLBLWFO.js} +6 -8
  186. package/node_modules/pi-lens/dist/chunk-W3BGKBBK.js +27 -0
  187. package/node_modules/pi-lens/dist/{chunk-ZKXQKGWZ.js → chunk-WC6WRNQT.js} +4 -3
  188. package/node_modules/pi-lens/dist/{chunk-YVHBNSME.js → chunk-WMDUT4KH.js} +1148 -1132
  189. package/node_modules/pi-lens/dist/{chunk-KXF5R4UN.js → chunk-WQV6BI4Q.js} +1 -1
  190. package/node_modules/pi-lens/dist/chunk-WXUDRAG6.js +24 -0
  191. package/node_modules/pi-lens/dist/{chunk-KPPJTH44.js → chunk-X35S7HSB.js} +28 -10
  192. package/node_modules/pi-lens/dist/{chunk-JMEKXFOL.js → chunk-X66YJ2SS.js} +40 -34
  193. package/node_modules/pi-lens/dist/{chunk-CE6VMBCB.js → chunk-XOMGO63G.js} +22 -21
  194. package/node_modules/pi-lens/dist/{chunk-LS3QJRUB.js → chunk-XWIME22V.js} +13 -13
  195. package/node_modules/pi-lens/dist/{chunk-R5MOQM2H.js → chunk-XYLC35E4.js} +119 -87
  196. package/node_modules/pi-lens/dist/{chunk-OE5ZBP7F.js → chunk-YHGYAEFH.js} +18 -18
  197. package/node_modules/pi-lens/dist/{chunk-7E2563GA.js → chunk-ZFORSIED.js} +13 -13
  198. package/node_modules/pi-lens/dist/{chunk-E7HJ56Y7.js → chunk-ZKLTNLAW.js} +64 -73
  199. package/node_modules/pi-lens/dist/chunk-ZONZ6YY3.js +74 -0
  200. package/node_modules/pi-lens/dist/chunk-ZSM35JF4.js +30 -0
  201. package/node_modules/pi-lens/dist/{chunk-RC2Z6K47.js → chunk-ZZDIOAAJ.js} +15 -6
  202. package/node_modules/pi-lens/dist/index.js +6993 -5396
  203. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +10 -10
  204. package/node_modules/pi-lens/dist/mcp/cli.js +44 -42
  205. package/node_modules/pi-lens/dist/mcp/server.js +1627 -504
  206. package/node_modules/pi-lens/dist/mcp/worker.js +62 -61
  207. package/node_modules/pi-lens/dist/probes/installer.js +20 -19
  208. package/node_modules/pi-lens/docs/adr/0003-git-guard-latch-writer.md +11 -6
  209. package/node_modules/pi-lens/docs/agent-tools.md +18 -8
  210. package/node_modules/pi-lens/docs/alignment-families.md +29 -0
  211. package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +6 -4
  212. package/node_modules/pi-lens/docs/ci-bot-pr-checks.md +126 -0
  213. package/node_modules/pi-lens/docs/configuration.md +99 -3
  214. package/node_modules/pi-lens/docs/defect-shapes.md +55 -12
  215. package/node_modules/pi-lens/docs/engineering-principles.md +27 -2
  216. package/node_modules/pi-lens/docs/features.md +2 -2
  217. package/node_modules/pi-lens/docs/invariants/git-guard-host.md +7 -3
  218. package/node_modules/pi-lens/docs/invariants/language-config.md +15 -4
  219. package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +16 -2
  220. package/node_modules/pi-lens/docs/invariants/paths-os.md +4 -2
  221. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +119 -39
  222. package/node_modules/pi-lens/docs/merge-queue-rollout.md +1 -1
  223. package/node_modules/pi-lens/docs/pi-lens-fixer.md +24 -17
  224. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +20 -11
  225. package/node_modules/pi-lens/docs/pi-lens-monitor.md +9 -0
  226. package/node_modules/pi-lens/docs/pi-lens-orchestration.md +4 -1
  227. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +5 -5
  228. package/node_modules/pi-lens/docs/pi-lens-subagent.md +6 -3
  229. package/node_modules/pi-lens/docs/public-api-stability.md +18 -2
  230. package/node_modules/pi-lens/docs/schema/pi-lens-config-v1.json +10 -0
  231. package/node_modules/pi-lens/docs/settings.md +10 -6
  232. package/node_modules/pi-lens/docs/word-index.md +17 -5
  233. package/node_modules/pi-lens/package.json +5 -3
  234. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-accumulating-spread-js-test.yml +37 -0
  235. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/ts-redundant-filter-map-test.yml +12 -1
  236. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-js-test.yml +12 -0
  237. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-test.yml +25 -0
  238. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-accumulating-spread-js.yml +49 -1
  239. package/node_modules/pi-lens/rules/ast-grep-rules/rules/ts-redundant-filter-map.yml +9 -1
  240. package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/filter-then-map-js.yml +17 -0
  241. package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/filter-then-map.yml +36 -0
  242. package/node_modules/pi-lens/rules/ast-grep-rules/self-scan-baseline.json +1 -1
  243. package/node_modules/pi-provider-qoder/README.md +22 -0
  244. package/node_modules/pi-provider-qoder/dist/index.js +370 -11
  245. package/node_modules/pi-provider-qoder/package.json +5 -2
  246. package/package.json +11 -8
  247. package/node_modules/@tifan/pi-preferred-thinking/README.md +0 -54
  248. package/node_modules/@tifan/pi-preferred-thinking/package.json +0 -43
  249. package/node_modules/@tifan/pi-preferred-thinking/src/index.ts +0 -236
  250. package/node_modules/pi-lens/dist/chunk-46TNM7XZ.js +0 -88
  251. package/node_modules/pi-lens/dist/chunk-72OKUXSD.js +0 -31
  252. package/node_modules/pi-lens/dist/chunk-7GLOLOSH.js +0 -57
  253. package/node_modules/pi-lens/dist/chunk-AKUUMGD5.js +0 -26
  254. package/node_modules/pi-lens/dist/chunk-ASUXV767.js +0 -22
  255. package/node_modules/pi-lens/dist/chunk-CTADOKYM.js +0 -25
  256. package/node_modules/pi-lens/dist/chunk-JJ2RRESP.js +0 -58
  257. package/node_modules/pi-lens/dist/chunk-LSC3VADM.js +0 -23
  258. package/node_modules/pi-lens/dist/chunk-SHLDT3OI.js +0 -27
  259. package/node_modules/pi-lens/dist/chunk-UF7RTZSO.js +0 -27
  260. package/node_modules/pi-lens/dist/chunk-W4WP2ERB.js +0 -30
  261. package/node_modules/pi-lens/dist/chunk-YES5CACN.js +0 -73
@@ -0,0 +1,325 @@
1
+ /**
2
+ * task-widget.ts — Persistent widget showing task list with status glyphs and progress.
3
+ *
4
+ * Display style matches Claude Code's task list:
5
+ * ✔ completed tasks (strikethrough + dim)
6
+ * ◼ in_progress tasks
7
+ * ◻ pending tasks
8
+ * ✳/✽ actively executing task (star spinner with activeForm text)
9
+ *
10
+ * Every glyph on screen is a default that `glyphs` in tasks-config.json can
11
+ * replace — see task-glyphs.ts.
12
+ */
13
+
14
+ import { truncateToWidth } from "@earendil-works/pi-tui";
15
+ import { resolveTaskGlyphs } from "../task-glyphs.js";
16
+ import type { TaskStore } from "../task-store.js";
17
+ import type { TasksConfig } from "../tasks-config.js";
18
+
19
+ // ---- Truncation ----
20
+
21
+ import type { Task } from "../types.js";
22
+
23
+ function truncateFromTop(tasks: Task[], limit: number): Task[] {
24
+ return tasks.slice(-limit);
25
+ }
26
+
27
+ function truncateFromBottom(tasks: Task[], limit: number): Task[] {
28
+ return tasks.slice(0, limit);
29
+ }
30
+
31
+ const TRUNCATE_FNS = { top: truncateFromTop, bottom: truncateFromBottom };
32
+
33
+ // ---- Types ----
34
+
35
+ export type Theme = {
36
+ fg(color: string, text: string): string;
37
+ bold(text: string): string;
38
+ strikethrough(text: string): string;
39
+ };
40
+
41
+ export type UICtx = {
42
+ setStatus(key: string, text: string | undefined): void;
43
+ setWidget(
44
+ key: string,
45
+ content: undefined | ((tui: any, theme: Theme) => { render(): string[]; invalidate(): void }),
46
+ options?: { placement?: "aboveEditor" | "belowEditor" },
47
+ ): void;
48
+ };
49
+
50
+ const DEFAULT_MAX_VISIBLE_TASKS = 10;
51
+
52
+ /** Per-task runtime metrics (elapsed time, token usage). */
53
+ export interface TaskMetrics {
54
+ startedAt: number;
55
+ inputTokens: number;
56
+ outputTokens: number;
57
+ }
58
+
59
+ /** Format milliseconds as a human-readable duration (e.g., "2m 49s", "1h 3m"). */
60
+ function formatDuration(ms: number): string {
61
+ const totalSec = Math.floor(ms / 1000);
62
+ if (totalSec < 60) return `${totalSec}s`;
63
+ const min = Math.floor(totalSec / 60);
64
+ const sec = totalSec % 60;
65
+ if (min < 60) return sec > 0 ? `${min}m ${sec}s` : `${min}m`;
66
+ const hr = Math.floor(min / 60);
67
+ const remMin = min % 60;
68
+ return remMin > 0 ? `${hr}h ${remMin}m` : `${hr}h`;
69
+ }
70
+
71
+ /** Format token count with k suffix (e.g., "4.1k", "850"). */
72
+ function formatTokens(n: number): string {
73
+ if (n < 1000) return String(n);
74
+ return (n / 1000).toFixed(1).replace(/\.0$/, "") + "k";
75
+ }
76
+
77
+ // ---- Widget ----
78
+
79
+ export class TaskWidget {
80
+ private uiCtx: UICtx | undefined;
81
+ private widgetFrame = 0;
82
+ private widgetInterval: ReturnType<typeof setInterval> | undefined;
83
+ /** IDs of tasks currently being actively executed (show spinner). */
84
+ private activeTaskIds = new Set<string>();
85
+ /** Per-task runtime metrics keyed by task ID. */
86
+ private metrics = new Map<string, TaskMetrics>();
87
+ /** Cached TUI instance for requestRender() calls. */
88
+ private tui: any | undefined;
89
+ /** Whether the widget callback is currently registered. */
90
+ private widgetRegistered = false;
91
+
92
+ constructor(
93
+ private store: TaskStore,
94
+ private config: TasksConfig = {},
95
+ ) {}
96
+
97
+ setStore(store: TaskStore) {
98
+ this.store = store;
99
+ }
100
+
101
+ setUICtx(ctx: UICtx) {
102
+ this.uiCtx = ctx;
103
+ }
104
+
105
+ /** Add or remove a task from the active spinner set. */
106
+ setActiveTask(taskId: string | undefined, active = true) {
107
+ if (taskId && active) {
108
+ this.activeTaskIds.add(taskId);
109
+ if (!this.metrics.has(taskId)) {
110
+ this.metrics.set(taskId, { startedAt: Date.now(), inputTokens: 0, outputTokens: 0 });
111
+ }
112
+ this.ensureTimer();
113
+ } else if (taskId) {
114
+ this.activeTaskIds.delete(taskId);
115
+ }
116
+ this.update();
117
+ }
118
+
119
+ /** Record token usage for the currently active task(s). */
120
+ addTokenUsage(inputTokens: number, outputTokens: number) {
121
+ // Distribute to all currently active tasks
122
+ for (const id of this.activeTaskIds) {
123
+ const m = this.metrics.get(id);
124
+ if (m) {
125
+ m.inputTokens += inputTokens;
126
+ m.outputTokens += outputTokens;
127
+ }
128
+ }
129
+ }
130
+
131
+ /** Ensure the widget update timer is running. The spinner advances here and
132
+ * nowhere else: `update()` also runs on every task mutation and tool execution,
133
+ * so incrementing there tied the animation speed to how busy the agent was. */
134
+ ensureTimer() {
135
+ if (!this.widgetInterval) {
136
+ this.widgetInterval = setInterval(() => {
137
+ this.widgetFrame++;
138
+ this.update();
139
+ }, 150);
140
+ }
141
+ }
142
+
143
+ /** Render callback entry point. Guarded so a render error can never escape to
144
+ * the TUI timer and crash the whole host process — worst case the widget is
145
+ * empty for one frame. */
146
+ private renderWidget(tui: any, theme: Theme): string[] {
147
+ try {
148
+ return this.buildWidgetLines(tui, theme);
149
+ } catch {
150
+ return [];
151
+ }
152
+ }
153
+
154
+ /** Build widget lines from current live state. */
155
+ private buildWidgetLines(tui: any, theme: Theme): string[] {
156
+ const sortOrder = this.config.sortOrder ?? "id";
157
+ // Resolved per render, not cached: the extension swaps this config object's
158
+ // contents when the host moves to a session in another workspace.
159
+ const glyphs = resolveTaskGlyphs(this.config.glyphs);
160
+ const tasks = this.store.list(sortOrder);
161
+ const w = tui.terminal.columns;
162
+ const truncate = (line: string) => truncateToWidth(line, w, glyphs.truncation);
163
+
164
+ if (tasks.length === 0) return [];
165
+
166
+ const completed = tasks.filter(t => t.status === "completed");
167
+ const inProgress = tasks.filter(t => t.status === "in_progress");
168
+ const pending = tasks.filter(t => t.status === "pending");
169
+
170
+ const parts: string[] = [];
171
+ if (completed.length > 0) parts.push(`${completed.length} done`);
172
+ if (inProgress.length > 0) parts.push(`${inProgress.length} in progress`);
173
+ if (pending.length > 0) parts.push(`${pending.length} open`);
174
+ const statusText = `${tasks.length} tasks (${parts.join(", ")})`;
175
+
176
+ const spinnerFrame = glyphs.spinner[this.widgetFrame % glyphs.spinner.length];
177
+ const lines: string[] = [truncate(theme.fg("accent", glyphs.header) + " " + theme.fg("accent", statusText))];
178
+
179
+ // Collapsing only decides what goes in the list; the visible-limit logic below
180
+ // then runs unchanged over whatever remains.
181
+ const collapseCompleted = this.config.collapseCompleted ?? false;
182
+ const listed = collapseCompleted ? tasks.filter(t => t.status !== "completed") : tasks;
183
+ const showAll = this.config.showAll ?? false;
184
+ const limit = this.config.maxVisible ?? DEFAULT_MAX_VISIBLE_TASKS;
185
+ // Narrowed rather than defaulted: config is hand-editable JSON, and an
186
+ // unrecognised value would index TRUNCATE_FNS to undefined and blank the widget.
187
+ const hiddenAt = this.config.hiddenAt === "top" ? "top" : "bottom";
188
+ const visible = showAll ? listed : TRUNCATE_FNS[hiddenAt](listed, limit);
189
+
190
+ const hiddenCount = listed.length - visible.length;
191
+ const overflowLine = hiddenCount > 0
192
+ ? truncate(theme.fg("dim", ` ${glyphs.overflow} and ${hiddenCount} more`))
193
+ : undefined;
194
+
195
+ if (overflowLine && hiddenAt === "top") {
196
+ lines.push(overflowLine);
197
+ }
198
+ for (let i = 0; i < visible.length; i++) {
199
+ const task = visible[i];
200
+ const isActive = this.activeTaskIds.has(task.id) && task.status === "in_progress";
201
+
202
+ let statusGlyph: string;
203
+ if (isActive) {
204
+ statusGlyph = theme.fg("accent", spinnerFrame);
205
+ } else if (task.status === "completed") {
206
+ statusGlyph = theme.fg("success", glyphs.completed);
207
+ } else if (task.status === "in_progress") {
208
+ statusGlyph = theme.fg("accent", glyphs.inProgress);
209
+ } else {
210
+ statusGlyph = glyphs.pending;
211
+ }
212
+
213
+ let suffix = "";
214
+ if (task.status === "pending" && task.blockedBy.length > 0) {
215
+ const openBlockers = task.blockedBy.filter(bid => {
216
+ const blocker = this.store.get(bid);
217
+ return blocker && blocker.status !== "completed";
218
+ });
219
+ if (openBlockers.length > 0) {
220
+ suffix = theme.fg("dim", ` ${glyphs.blocked} blocked by ${openBlockers.map(id => "#" + id).join(", ")}`);
221
+ }
222
+ }
223
+
224
+ let text: string;
225
+ if (isActive) {
226
+ const form = task.activeForm || task.subject;
227
+ const agentId = task.metadata?.agentId;
228
+ const agentLabel = agentId ? ` (agent ${agentId.slice(0, 5)})` : "";
229
+ const m = this.metrics.get(task.id);
230
+ let stats = "";
231
+ if (m) {
232
+ const elapsed = formatDuration(Date.now() - m.startedAt);
233
+ const tokenParts: string[] = [];
234
+ if (m.inputTokens > 0) tokenParts.push(`${glyphs.inputTokens} ${formatTokens(m.inputTokens)}`);
235
+ if (m.outputTokens > 0) tokenParts.push(`${glyphs.outputTokens} ${formatTokens(m.outputTokens)}`);
236
+ stats = tokenParts.length > 0
237
+ ? ` ${theme.fg("dim", `(${elapsed} ${glyphs.statsSeparator} ${tokenParts.join(" ")})`)}`
238
+ : ` ${theme.fg("dim", `(${elapsed})`)}`;
239
+ }
240
+ text = ` ${statusGlyph} ${theme.fg("dim", "#" + task.id)} ${
241
+ theme.fg("accent", form + agentLabel + glyphs.trailingEllipsis)
242
+ }${stats}`;
243
+ } else if (task.status === "completed") {
244
+ text = ` ${statusGlyph} ${theme.fg("dim", theme.strikethrough("#" + task.id + " " + task.subject))}`;
245
+ } else {
246
+ const agentSuffix = task.status === "in_progress" && task.metadata?.agentId
247
+ ? theme.fg("dim", ` (agent ${task.metadata.agentId.slice(0, 5)})`)
248
+ : "";
249
+ text = ` ${statusGlyph} ${theme.fg("dim", "#" + task.id)} ${task.subject}${agentSuffix}`;
250
+ }
251
+
252
+ lines.push(truncate(text + suffix));
253
+ }
254
+
255
+ if (overflowLine && hiddenAt !== "top") {
256
+ lines.push(overflowLine);
257
+ }
258
+ if (collapseCompleted && completed.length > 0) {
259
+ lines.push(truncate(` ${theme.fg("success", glyphs.completedSummary)} ${theme.fg("dim", `${completed.length} completed`)}`));
260
+ }
261
+
262
+ return lines;
263
+ }
264
+
265
+ /** Force an immediate widget update. */
266
+ update() {
267
+ if (!this.uiCtx) return;
268
+ const tasks = this.store.list();
269
+
270
+ // Transition: visible → hidden
271
+ if (tasks.length === 0) {
272
+ if (this.widgetRegistered) {
273
+ this.uiCtx.setWidget("tasks", undefined);
274
+ this.widgetRegistered = false;
275
+ }
276
+ if (this.widgetInterval) {
277
+ clearInterval(this.widgetInterval);
278
+ this.widgetInterval = undefined;
279
+ }
280
+ return;
281
+ }
282
+
283
+ // Prune stale active IDs (deleted or no longer in_progress)
284
+ for (const id of this.activeTaskIds) {
285
+ const t = this.store.get(id);
286
+ if (!t || t.status !== "in_progress") {
287
+ this.activeTaskIds.delete(id);
288
+ this.metrics.delete(id);
289
+ }
290
+ }
291
+
292
+ // Check if any task needs animation
293
+ const hasActiveSpinner = tasks.some(t => this.activeTaskIds.has(t.id) && t.status === "in_progress");
294
+ if (hasActiveSpinner) {
295
+ this.ensureTimer();
296
+ } else if (!hasActiveSpinner && this.widgetInterval) {
297
+ clearInterval(this.widgetInterval);
298
+ this.widgetInterval = undefined;
299
+ }
300
+
301
+ // Transition: hidden → visible — register widget callback once
302
+ if (!this.widgetRegistered) {
303
+ this.uiCtx.setWidget("tasks", (tui, theme) => {
304
+ this.tui = tui;
305
+ return { render: () => this.renderWidget(tui, theme), invalidate: () => {} };
306
+ }, { placement: "aboveEditor" });
307
+ this.widgetRegistered = true;
308
+ } else if (this.tui) {
309
+ // Widget already registered — just request a re-render
310
+ this.tui.requestRender();
311
+ }
312
+ }
313
+
314
+ dispose() {
315
+ if (this.widgetInterval) {
316
+ clearInterval(this.widgetInterval);
317
+ this.widgetInterval = undefined;
318
+ }
319
+ if (this.uiCtx) {
320
+ this.uiCtx.setWidget("tasks", undefined);
321
+ }
322
+ this.widgetRegistered = false;
323
+ this.tui = undefined;
324
+ }
325
+ }