@herbertgao/pi-extensions 2026.11.10 → 2026.11.12

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 (296) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +10 -10
  3. package/THIRD_PARTY_NOTICES.md +3 -3
  4. package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +16 -0
  5. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +3 -4
  6. package/node_modules/@herbertgao/pi-cc-extensions/README.md +3 -4
  7. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/core.ts +22 -15
  8. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/index.ts +22 -8
  9. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +0 -29
  10. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +5 -2
  11. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +73 -47
  12. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +3 -2
  13. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +0 -40
  14. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-parse.ts +4 -1
  15. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +79 -18
  16. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-io.ts +0 -5
  17. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/ansi-text.ts +18 -4
  18. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/format.ts +15 -0
  19. package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
  20. package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +12 -0
  21. package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
  22. package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
  23. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +4 -2
  24. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/adapt.md +2 -2
  25. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/animate.md +17 -0
  26. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.md +12 -1
  27. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.native.md +4 -0
  28. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique-rubric.md +496 -0
  29. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique.md +13 -505
  30. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/documenter.md +1 -1
  31. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/finish-reviewer.md +1 -1
  32. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/motion-reviewer.md +29 -0
  33. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/distill.md +1 -1
  34. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/document.md +3 -1
  35. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/foundations.md +44 -0
  36. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/hooks.md +3 -3
  37. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live-setup.md +1 -1
  38. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live.md +26 -12
  39. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-comp.md +24 -0
  40. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-world.md +20 -0
  41. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work.md +9 -37
  42. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/onboard.md +7 -6
  43. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/overdrive.md +2 -2
  44. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/quieter.md +1 -1
  45. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/typeset.md +6 -0
  46. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/visualize.md +1 -1
  47. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
  48. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
  49. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable +69 -16
  50. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable.cmd +55 -7
  51. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +51 -22
  52. package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
  53. package/node_modules/@herbertgao/pi-subagents/README.md +27 -9
  54. package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +11 -11
  55. package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
  56. package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +13 -0
  57. package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +51 -32
  58. package/node_modules/@herbertgao/pi-subagents/src/default-agents.ts +7 -0
  59. package/node_modules/@herbertgao/pi-subagents/src/index.ts +334 -893
  60. package/node_modules/@herbertgao/pi-subagents/src/nested-tools.ts +4 -1
  61. package/node_modules/@herbertgao/pi-subagents/src/prompts.ts +13 -0
  62. package/node_modules/@herbertgao/pi-subagents/src/schedule-store.ts +18 -13
  63. package/node_modules/@herbertgao/pi-subagents/src/schedule.ts +25 -5
  64. package/node_modules/@herbertgao/pi-subagents/src/settings.ts +215 -69
  65. package/node_modules/@herbertgao/pi-subagents/src/types.ts +17 -0
  66. package/node_modules/@herbertgao/pi-subagents/src/ui/agent-widget.ts +9 -0
  67. package/node_modules/@herbertgao/pi-subagents/src/ui/agents-menu.ts +705 -0
  68. package/node_modules/@herbertgao/pi-subagents/src/ui/settings-menu.ts +361 -0
  69. package/node_modules/@herbertgao/pi-subagents/src/ui/viewer-keys.ts +1 -1
  70. package/node_modules/pi-antigravity/README.md +58 -9
  71. package/node_modules/pi-antigravity/docs/reader-guarantees.md +35 -0
  72. package/node_modules/pi-antigravity/package.json +15 -6
  73. package/node_modules/pi-antigravity/src/client/client.ts +63 -14
  74. package/node_modules/pi-antigravity/src/client/enterprise.ts +150 -0
  75. package/node_modules/pi-antigravity/src/client/index.ts +1 -0
  76. package/node_modules/pi-antigravity/src/diagnostics/diagnostics.ts +7 -0
  77. package/node_modules/pi-antigravity/src/features/generate-image.ts +56 -2
  78. package/node_modules/pi-antigravity/src/features/read-url-content.ts +124 -0
  79. package/node_modules/pi-antigravity/src/image/image.ts +16 -2
  80. package/node_modules/pi-antigravity/src/index.ts +145 -2
  81. package/node_modules/pi-antigravity/src/models/discovery.ts +3 -4
  82. package/node_modules/pi-antigravity/src/models/grouping.ts +39 -15
  83. package/node_modules/pi-antigravity/src/models/models.ts +126 -14
  84. package/node_modules/pi-antigravity/src/stream/stream.ts +189 -30
  85. package/node_modules/pi-antigravity/src/types/types.ts +30 -1
  86. package/node_modules/pi-antigravity/src/usage/usage.ts +58 -0
  87. package/node_modules/pi-antigravity/src/utils/address.ts +180 -0
  88. package/node_modules/pi-antigravity/src/utils/credits.ts +149 -0
  89. package/node_modules/pi-antigravity/src/utils/html.ts +31 -0
  90. package/node_modules/pi-antigravity/src/utils/index.ts +2 -0
  91. package/node_modules/pi-antigravity/src/utils/security.ts +172 -13
  92. package/node_modules/pi-antigravity/src/utils/text.ts +66 -0
  93. package/node_modules/pi-antigravity/src/utils/util.ts +5 -4
  94. package/node_modules/pi-antigravity/src/web-fetch/document.ts +83 -0
  95. package/node_modules/pi-antigravity/src/web-fetch/fences.ts +24 -0
  96. package/node_modules/pi-antigravity/src/web-fetch/header.ts +97 -0
  97. package/node_modules/pi-antigravity/src/web-fetch/index.ts +3 -0
  98. package/node_modules/pi-antigravity/src/web-fetch/inspect.ts +328 -0
  99. package/node_modules/pi-antigravity/src/web-fetch/limits.ts +4 -0
  100. package/node_modules/pi-antigravity/src/web-fetch/markdown.ts +744 -0
  101. package/node_modules/pi-antigravity/src/web-fetch/mdn.ts +164 -0
  102. package/node_modules/pi-antigravity/src/web-fetch/media.ts +11 -0
  103. package/node_modules/pi-antigravity/src/web-fetch/metadata.ts +9 -0
  104. package/node_modules/pi-antigravity/src/web-fetch/representation.ts +93 -0
  105. package/node_modules/pi-antigravity/src/web-fetch/save.ts +71 -0
  106. package/node_modules/pi-antigravity/src/web-fetch/sites.ts +138 -0
  107. package/node_modules/pi-antigravity/src/web-fetch/vendor.d.ts +9 -0
  108. package/node_modules/pi-antigravity/src/web-fetch/web-fetch.ts +957 -0
  109. package/node_modules/pi-antigravity/tsconfig.json +2 -2
  110. package/node_modules/pi-commandcode-provider/CHANGELOG.md +21 -1
  111. package/node_modules/pi-commandcode-provider/README.md +2 -2
  112. package/node_modules/pi-commandcode-provider/index.ts +2 -1
  113. package/node_modules/pi-commandcode-provider/package.json +5 -4
  114. package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +15 -9
  115. package/node_modules/pi-commandcode-provider/src/oauth.ts +69 -12
  116. package/node_modules/pi-commandcode-provider/src/pricing.ts +8 -1
  117. package/node_modules/pi-commandcode-provider/src/responses-compat.ts +137 -0
  118. package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
  119. package/node_modules/pi-lens/CHANGELOG.md +172 -0
  120. package/node_modules/pi-lens/README.md +103 -217
  121. package/node_modules/pi-lens/dist/{chunk-KXDQD34C.js → chunk-27JQHK7Y.js} +1 -1
  122. package/node_modules/pi-lens/dist/{chunk-W6VLB6LL.js → chunk-2APSZHHI.js} +61 -3
  123. package/node_modules/pi-lens/dist/{chunk-5EEWCJG7.js → chunk-2H5GHZKC.js} +8 -8
  124. package/node_modules/pi-lens/dist/{chunk-TS5EIWEF.js → chunk-2H7NFZ4Q.js} +11 -11
  125. package/node_modules/pi-lens/dist/{chunk-6GWCYEP7.js → chunk-37IDWT6O.js} +64 -16
  126. package/node_modules/pi-lens/dist/{chunk-OEPWTSUG.js → chunk-3PAS2ERX.js} +8 -8
  127. package/node_modules/pi-lens/dist/{chunk-ET3DSSFZ.js → chunk-3PO4YYOX.js} +9 -17
  128. package/node_modules/pi-lens/dist/{chunk-C6V2DSZZ.js → chunk-3QXFUP6T.js} +11 -11
  129. package/node_modules/pi-lens/dist/{chunk-HWMNTQBJ.js → chunk-3TSMQZG6.js} +32 -11
  130. package/node_modules/pi-lens/dist/{chunk-QY6J2FTK.js → chunk-4DAHGU3V.js} +15 -14
  131. package/node_modules/pi-lens/dist/{chunk-PCREZ4HJ.js → chunk-4IZZEN63.js} +33 -34
  132. package/node_modules/pi-lens/dist/{chunk-OYXD2MOM.js → chunk-5HBQL7DH.js} +2 -2
  133. package/node_modules/pi-lens/dist/{chunk-B4FAFEBP.js → chunk-5JB4WENL.js} +1 -1
  134. package/node_modules/pi-lens/dist/chunk-5YJXF2IS.js +56 -0
  135. package/node_modules/pi-lens/dist/{chunk-GHATCG2A.js → chunk-6CFSDLHE.js} +22 -18
  136. package/node_modules/pi-lens/dist/{chunk-FVQKX5KI.js → chunk-6E5QLMWI.js} +24 -22
  137. package/node_modules/pi-lens/dist/{chunk-AVBEPUCD.js → chunk-6GLMMGCX.js} +2 -2
  138. package/node_modules/pi-lens/dist/{chunk-YTXFNCVN.js → chunk-74AMPWNC.js} +2 -2
  139. package/node_modules/pi-lens/dist/{chunk-K2GV34T2.js → chunk-7CLWC2UH.js} +26 -37
  140. package/node_modules/pi-lens/dist/{chunk-MOEWCPMC.js → chunk-7DPXUPRF.js} +2 -2
  141. package/node_modules/pi-lens/dist/{chunk-7BEADGAZ.js → chunk-7U36VQL6.js} +2 -2
  142. package/node_modules/pi-lens/dist/{chunk-PPYUBO6Y.js → chunk-7WKVCZI4.js} +1 -1
  143. package/node_modules/pi-lens/dist/{chunk-ILC2B7IJ.js → chunk-7ZVTFLCC.js} +10 -10
  144. package/node_modules/pi-lens/dist/{chunk-IT7MFVGP.js → chunk-ADYQRETD.js} +2 -2
  145. package/node_modules/pi-lens/dist/{chunk-NCDH2JB7.js → chunk-ARTYCUGF.js} +25 -10
  146. package/node_modules/pi-lens/dist/{chunk-Z6WTLVUL.js → chunk-AXAR5ZW2.js} +225 -104
  147. package/node_modules/pi-lens/dist/{chunk-PK3GDU4M.js → chunk-AZG5UJYY.js} +1 -1
  148. package/node_modules/pi-lens/dist/{chunk-NRVWLTOY.js → chunk-B2OXE4AH.js} +60 -21
  149. package/node_modules/pi-lens/dist/{chunk-ORYQGVC3.js → chunk-B42AIWPJ.js} +2 -2
  150. package/node_modules/pi-lens/dist/{chunk-IC4L65U7.js → chunk-BBSDJTOV.js} +12 -13
  151. package/node_modules/pi-lens/dist/{chunk-HJWF7CGW.js → chunk-BKWFDWYM.js} +16 -16
  152. package/node_modules/pi-lens/dist/{chunk-D2ZYRI7M.js → chunk-C5PLBTNR.js} +1 -1
  153. package/node_modules/pi-lens/dist/{chunk-SRXYSLMW.js → chunk-CQY2HEH7.js} +1 -1
  154. package/node_modules/pi-lens/dist/{chunk-7424ANRU.js → chunk-CXQYK4YT.js} +1 -1
  155. package/node_modules/pi-lens/dist/{chunk-HYR25MV3.js → chunk-CZJGAOKL.js} +8 -7
  156. package/node_modules/pi-lens/dist/{chunk-DIIDMDZU.js → chunk-DCA2MXVQ.js} +11 -11
  157. package/node_modules/pi-lens/dist/{chunk-K2LD6YNH.js → chunk-DFKOA74L.js} +9 -9
  158. package/node_modules/pi-lens/dist/{chunk-AYDE7RFV.js → chunk-DI4AZZNY.js} +2 -2
  159. package/node_modules/pi-lens/dist/{chunk-6EXGCXM5.js → chunk-G53LBDNU.js} +99 -5
  160. package/node_modules/pi-lens/dist/chunk-GCSDF5IE.js +27 -0
  161. package/node_modules/pi-lens/dist/{chunk-5KLRCUDT.js → chunk-H5API74E.js} +6 -6
  162. package/node_modules/pi-lens/dist/chunk-HBX55MWO.js +27 -0
  163. package/node_modules/pi-lens/dist/{chunk-JRSS6KM4.js → chunk-HIJ4CHFF.js} +2 -2
  164. package/node_modules/pi-lens/dist/{chunk-3MHY4BQY.js → chunk-HIRBC72R.js} +4 -4
  165. package/node_modules/pi-lens/dist/{chunk-F7AMFFVK.js → chunk-HRLF35WL.js} +8 -8
  166. package/node_modules/pi-lens/dist/{chunk-HSTN27NR.js → chunk-I2FYOZNW.js} +9 -9
  167. package/node_modules/pi-lens/dist/{chunk-5FDUKJZO.js → chunk-I3NZVAMN.js} +9 -9
  168. package/node_modules/pi-lens/dist/{chunk-NZINZCHB.js → chunk-INBK3HIT.js} +3 -3
  169. package/node_modules/pi-lens/dist/{chunk-PXGVB2CY.js → chunk-J2ZB5MDS.js} +20 -18
  170. package/node_modules/pi-lens/dist/{chunk-HYDJUVOE.js → chunk-JGUDT5KD.js} +4 -4
  171. package/node_modules/pi-lens/dist/chunk-JOIKBUQN.js +88 -0
  172. package/node_modules/pi-lens/dist/{chunk-AZXTLZHE.js → chunk-K4Z7MK6T.js} +169 -165
  173. package/node_modules/pi-lens/dist/{chunk-WTSQKJAR.js → chunk-K7O6AHSJ.js} +10 -10
  174. package/node_modules/pi-lens/dist/{chunk-S6ZQFPOX.js → chunk-KNJH6WJQ.js} +6 -6
  175. package/node_modules/pi-lens/dist/{chunk-SUIZOCSY.js → chunk-KNSOA43J.js} +1 -1
  176. package/node_modules/pi-lens/dist/{chunk-3QMLB4TI.js → chunk-KXGTLAUW.js} +2 -2
  177. package/node_modules/pi-lens/dist/{chunk-OHEUOWYT.js → chunk-KZ732ZVW.js} +1 -1
  178. package/node_modules/pi-lens/dist/{chunk-G3LR6V6N.js → chunk-L6BDRYUK.js} +19 -17
  179. package/node_modules/pi-lens/dist/{chunk-OVPR3GQ6.js → chunk-LGH2HHZG.js} +24 -6
  180. package/node_modules/pi-lens/dist/{chunk-3R3Z54J7.js → chunk-LOEJFTF2.js} +1 -1
  181. package/node_modules/pi-lens/dist/{chunk-HGEE5LDW.js → chunk-LQQNFCQJ.js} +1 -1
  182. package/node_modules/pi-lens/dist/chunk-LVLPA32Q.js +810 -0
  183. package/node_modules/pi-lens/dist/chunk-M2YMBT5G.js +73 -0
  184. package/node_modules/pi-lens/dist/{chunk-Z2W5YJBW.js → chunk-MJRGPEQ5.js} +11 -11
  185. package/node_modules/pi-lens/dist/{chunk-3EIZMRXI.js → chunk-MOAVEPC4.js} +10 -10
  186. package/node_modules/pi-lens/dist/{chunk-TOOXNL6M.js → chunk-NGNBJIUO.js} +7 -7
  187. package/node_modules/pi-lens/dist/{chunk-AGEQRJ5A.js → chunk-NHA5K226.js} +1 -1
  188. package/node_modules/pi-lens/dist/{chunk-YLW26OHX.js → chunk-NNEQOC3U.js} +31 -59
  189. package/node_modules/pi-lens/dist/{chunk-ZWZD4TJ5.js → chunk-O2MHF7QM.js} +35 -36
  190. package/node_modules/pi-lens/dist/{chunk-PTJXMYRY.js → chunk-OLWGYBYT.js} +15 -16
  191. package/node_modules/pi-lens/dist/{chunk-JKAVKTMY.js → chunk-OZQQ3AIR.js} +17 -20
  192. package/node_modules/pi-lens/dist/{chunk-6JLNZ6DP.js → chunk-P5MSLVUW.js} +10 -10
  193. package/node_modules/pi-lens/dist/{chunk-OF2YGDUE.js → chunk-PFJLYRO3.js} +37 -38
  194. package/node_modules/pi-lens/dist/chunk-PKWEBMCA.js +2957 -0
  195. package/node_modules/pi-lens/dist/{chunk-JLMS7EMD.js → chunk-PPQHMSPH.js} +16 -15
  196. package/node_modules/pi-lens/dist/{chunk-6EIV3H7O.js → chunk-PQF6YGYB.js} +12 -5
  197. package/node_modules/pi-lens/dist/{chunk-VU2PRGRI.js → chunk-PQXUZYTQ.js} +4 -4
  198. package/node_modules/pi-lens/dist/{chunk-MV6ST2KT.js → chunk-Q7J3JYJ2.js} +13 -12
  199. package/node_modules/pi-lens/dist/{chunk-BMMRLJA4.js → chunk-QE5DJ7MX.js} +27 -10
  200. package/node_modules/pi-lens/dist/{chunk-IZ36G463.js → chunk-QE7BJQ6K.js} +7 -7
  201. package/node_modules/pi-lens/dist/{chunk-E5SSUV2A.js → chunk-QMWKSYWB.js} +4 -4
  202. package/node_modules/pi-lens/dist/{chunk-QJ4T73J5.js → chunk-QV3JPCMK.js} +1 -1
  203. package/node_modules/pi-lens/dist/{chunk-3PMLYGJN.js → chunk-R4L7KZ7R.js} +5 -5
  204. package/node_modules/pi-lens/dist/{chunk-7ZVEFWOE.js → chunk-RIH3UBK4.js} +10 -10
  205. package/node_modules/pi-lens/dist/{chunk-T5EGSBM2.js → chunk-RJ3APNIP.js} +3 -3
  206. package/node_modules/pi-lens/dist/{chunk-AAIVSSUU.js → chunk-S6MCMD27.js} +35 -12
  207. package/node_modules/pi-lens/dist/{chunk-SF7KSXB5.js → chunk-SCU62JLX.js} +6 -6
  208. package/node_modules/pi-lens/dist/{chunk-FDLGJFAE.js → chunk-SDYLT45T.js} +3 -3
  209. package/node_modules/pi-lens/dist/chunk-TFKN5EIR.js +27 -0
  210. package/node_modules/pi-lens/dist/{chunk-Y7XMKBFP.js → chunk-TKOFTLGB.js} +34 -26
  211. package/node_modules/pi-lens/dist/chunk-TQWRH25U.js +35 -0
  212. package/node_modules/pi-lens/dist/{chunk-DZSQXG66.js → chunk-TWEOJE3D.js} +277 -62
  213. package/node_modules/pi-lens/dist/{chunk-R67WQ5RY.js → chunk-UN72ZAJ5.js} +8 -8
  214. package/node_modules/pi-lens/dist/{chunk-AD7JDEI6.js → chunk-UNP6Y4JV.js} +16 -16
  215. package/node_modules/pi-lens/dist/{chunk-D6ANA6YU.js → chunk-VGRGW4UL.js} +63 -55
  216. package/node_modules/pi-lens/dist/{chunk-DFAY7JUN.js → chunk-VSQT6IHZ.js} +2 -2
  217. package/node_modules/pi-lens/dist/{chunk-7T64QA5D.js → chunk-VWEBZ2JV.js} +39 -38
  218. package/node_modules/pi-lens/dist/{chunk-HRQTYU2T.js → chunk-W26QZ3OM.js} +1 -1
  219. package/node_modules/pi-lens/dist/{chunk-2HWVG3IM.js → chunk-XDNWR7SG.js} +2 -2
  220. package/node_modules/pi-lens/dist/{chunk-75TVYCQW.js → chunk-XSC3BCN3.js} +5 -5
  221. package/node_modules/pi-lens/dist/{chunk-ME6MF2N2.js → chunk-YCR6ZYTE.js} +1 -1
  222. package/node_modules/pi-lens/dist/{chunk-LD7SXICE.js → chunk-ZI7YHV6I.js} +5 -5
  223. package/node_modules/pi-lens/dist/{chunk-E3PNZDPH.js → chunk-ZQSSO7LO.js} +33 -1
  224. package/node_modules/pi-lens/dist/{chunk-T6PPK3T6.js → chunk-ZULZS2I6.js} +385 -407
  225. package/node_modules/pi-lens/dist/index.js +6508 -5413
  226. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +9 -9
  227. package/node_modules/pi-lens/dist/mcp/cli.js +39 -38
  228. package/node_modules/pi-lens/dist/mcp/server.js +602 -345
  229. package/node_modules/pi-lens/dist/mcp/worker.js +57 -58
  230. package/node_modules/pi-lens/dist/probes/installer.js +19 -17
  231. package/node_modules/pi-lens/docs/architecture.md +113 -0
  232. package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +2 -2
  233. package/node_modules/pi-lens/docs/ci.md +18 -4
  234. package/node_modules/pi-lens/docs/defect-shapes.md +41 -3
  235. package/node_modules/pi-lens/docs/dependencies.md +10 -10
  236. package/node_modules/pi-lens/docs/features.md +3 -3
  237. package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +13 -1
  238. package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +19 -0
  239. package/node_modules/pi-lens/docs/language-coverage.md +39 -0
  240. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +10 -4
  241. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
  242. package/node_modules/pi-lens/docs/pi-lens-fixer.md +4 -0
  243. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +1 -1
  244. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +4 -5
  245. package/node_modules/pi-lens/docs/pi-lens-subagent.md +5 -2
  246. package/node_modules/pi-lens/docs/prose-standard.md +112 -0
  247. package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
  248. package/node_modules/pi-lens/docs/usage.md +50 -0
  249. package/node_modules/pi-lens/package.json +1 -1
  250. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-js-test.yml +23 -0
  251. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-test.yml +23 -0
  252. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-js-test.yml +8 -0
  253. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-test.yml +8 -0
  254. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-js-test.yml +16 -0
  255. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-test.yml +16 -0
  256. package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return-js.yml +8 -0
  257. package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return.yml +8 -0
  258. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check-js.yml +17 -5
  259. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check.yml +17 -5
  260. package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call-js.yml +8 -1
  261. package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call.yml +8 -1
  262. package/node_modules/pi-lens/rules/tree-sitter-queries/typescript/ts-react-antipatterns.yml +8 -0
  263. package/node_modules/pi-web-access/CHANGELOG.md +29 -0
  264. package/node_modules/pi-web-access/README.md +35 -15
  265. package/node_modules/pi-web-access/anysearch.ts +7 -3
  266. package/node_modules/pi-web-access/autom.ts +196 -0
  267. package/node_modules/pi-web-access/cloro.ts +254 -0
  268. package/node_modules/pi-web-access/curator-page.ts +7 -1
  269. package/node_modules/pi-web-access/curator-server.ts +3 -0
  270. package/node_modules/pi-web-access/dist/index.js +12931 -12111
  271. package/node_modules/pi-web-access/dist/mcp-cli.js +1188 -416
  272. package/node_modules/pi-web-access/domain-filter-normalization.ts +30 -0
  273. package/node_modules/pi-web-access/duckduckgo-rate-limit.ts +144 -34
  274. package/node_modules/pi-web-access/duckduckgo.ts +11 -3
  275. package/node_modules/pi-web-access/extract.ts +60 -4
  276. package/node_modules/pi-web-access/gemini-search.ts +25 -5
  277. package/node_modules/pi-web-access/index.ts +9 -1
  278. package/node_modules/pi-web-access/package.json +2 -2
  279. package/node_modules/pi-web-access/page-query.ts +12 -3
  280. package/node_modules/pi-web-access/specstream.ts +276 -0
  281. package/node_modules/pi-web-access/tool-activation.ts +21 -6
  282. package/node_modules/pi-web-access/utils.ts +4 -0
  283. package/node_modules/pi-web-access/video-extract.ts +2 -2
  284. package/node_modules/pi-web-access/web-tool-core.ts +24 -5
  285. package/node_modules/pi-web-access/youtube-extract.ts +2 -2
  286. package/package.json +11 -8
  287. package/node_modules/pi-lens/dist/chunk-3VWEZ6H2.js +0 -72
  288. package/node_modules/pi-lens/dist/chunk-7KWI5UHL.js +0 -28
  289. package/node_modules/pi-lens/dist/chunk-7M64NTAK.js +0 -38
  290. package/node_modules/pi-lens/dist/chunk-BEIPWPVR.js +0 -1037
  291. package/node_modules/pi-lens/dist/chunk-D7OEGXDX.js +0 -2417
  292. package/node_modules/pi-lens/dist/chunk-KUDUKKQE.js +0 -89
  293. package/node_modules/pi-lens/dist/chunk-TM3A3K7T.js +0 -28
  294. package/node_modules/pi-lens/dist/chunk-VD7MQFEV.js +0 -56
  295. package/node_modules/pi-lens/dist/chunk-YLHJWAQS.js +0 -256
  296. package/node_modules/pi-lens/dist/chunk-YULIERZW.js +0 -27
@@ -17,7 +17,7 @@ https://github.com/user-attachments/assets/8685261b-9338-4fea-8dfe-1c590d5df543
17
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
- - **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
20
+ - **Nested subagents** — the built-in `general-purpose` agent can delegate to subagents of its own, as in Claude Code; `Explore` and `Plan` cannot, and a custom agent opts in by setting `allowed_subagents`. A delegating agent 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
21
21
  - **Agent mentions** — subagents are first-class: type `@explore also check the RPC path` at the prompt and it goes to that agent instead of the main model, without a word of it entering the chat. One syntax covers the whole lifecycle — message it while it runs, resume it once it has finished, reopen its session from disk long after that, or start it if it never ran. Mentioning an agent that isn't running spawns it through an off-screen clone of the conversation, so it gets Claude Code's context-written prompt and a real `Agent` tool call without a word of it reaching the chat; `direct` mode starts it here from your text instead, with no model call at all. The orchestrator can `name` an agent so you address it as `@auth-audit`, and handles work in `steer_subagent`/`get_subagent_result` too. `@` completes live agents, resumable ones, and startable types alongside pi's file completion; `@main` forces text back to the main model. Toggle via `/agents → Settings → Agent mentions`
22
22
  - **Scripted workflows** — a `SubagentWorkflow` tool that runs a deterministic JavaScript script orchestrating many subagents: `agent()`, `parallel()`, `pipeline()`, `phase()`, `log()` and `args`, with a pure-literal `meta` block declaring the phases. `pipeline()` has no barrier between stages, so one item can be in a later stage while another is still in the first — unlike `parallel()`, which idles every fast agent until the slowest finishes. Runs in the background with a live card, inspectable via `/agents → Workflows` or by selecting the run in FleetView. `agent()` also takes `gate: "npm test"` to verify a child by running a command (inside its worktree, when isolated) rather than asking another model, and `resume: "<label>"` to continue a child instead of re-paying its context. Scripts run in a `node:vm` sandbox on a worker thread where `Date.now()`, `Math.random()` and `eval` throw. On by default, but it stands down for company: if another extension already provides a `Workflow` or `SubagentWorkflow` tool, this one warns and disables itself for the session rather than offering the model two orchestrators. Pin it either way with `"workflowsEnabled"` in `subagents.json` or `/agents → Settings → Workflows`. A script written for Claude Code's `Workflow` tool runs here unchanged: same globals, `schema` returns a validated object exactly as it does there, `budget` is present and always reports no token target (pi has no such directive) so its `budget.total`-guarded patterns still take the branch they were written for, and nested `workflow()` composes saved workflows one level deep. **[Full guide](https://github.com/HerbertGao/pi-extensions/blob/master/packages/pi-subagents/docs/workflows.md)**
23
23
  - **Mid-run steering** — inject messages into running agents to redirect their work without restarting
@@ -278,7 +278,7 @@ Group completions render each agent as a separate block. The LLM receives struct
278
278
  | `Explore` | read, bash, grep, find, ls | inherit | `replace` (standalone) | Fast codebase exploration (read-only) |
279
279
  | `Plan` | read, bash, grep, find, ls | inherit | `replace` (standalone) | Software architect for implementation planning (read-only) |
280
280
 
281
- The `general-purpose` agent is a **parent twin** — it receives the parent's system prompt plus a sub-agent context bridge, so it follows the same rules the parent does. The parent's skill list, cwd and extension sections are left out: the subagent's own session adds them for itself, so its skills follow its `skills` setting. Explore and Plan use standalone prompts tailored to their read-only roles.
281
+ The `general-purpose` agent is a **parent twin** — it receives the parent's system prompt plus a sub-agent context bridge, so it follows the same rules the parent does. The parent's skill list, cwd and extension sections are left out: the subagent's own session adds them for itself, so its skills follow its `skills` setting. When it can [delegate](#nested-subagents), it also gets Claude Code's closing line telling it not to hand its whole assignment to a single child. Explore and Plan use standalone prompts tailored to their read-only roles.
282
282
 
283
283
  Default agents can be **ejected** (`/agents` → select agent → Eject) to export them as `.md` files for customization, **overridden** by creating a `.md` file with the same name (e.g. `.pi/agents/general-purpose.md`), or **disabled** per-project with `enabled: false` frontmatter. To run Explore on a cheaper model, eject it and add `model:` (e.g. `model: anthropic/claude-haiku-4-5`); a pinned model resolves through any provider with a key, not just the session's.
284
284
 
@@ -367,7 +367,7 @@ Frontmatter is authoritative. If an agent file sets `model`, `thinking`, `max_tu
367
367
 
368
368
  ### Nested subagents
369
369
 
370
- Nested delegation is default-off. Set `allowed_subagents` only on a non-isolated custom agent that owns a real fan-out responsibility:
370
+ The built-in `general-purpose` agent delegates out of the box, matching Claude Code: it already has every tool, so a child can do nothing it could not. It does not delegate as a [workflow](#subagentworkflow) `agent()`, where the script does the fanning out — Claude Code's workflow agents have no `Agent` tool either. `Explore` and `Plan` never delegate. For custom agents nesting is default-off — set `allowed_subagents` only on a non-isolated custom agent that owns a real fan-out responsibility:
371
371
 
372
372
  ```yaml
373
373
  ---
@@ -381,7 +381,15 @@ allowed_subagents: support-file-finder, support-callsite-tracer # or `all`
381
381
 
382
382
  `allowed_subagents` is runtime-enforced. A comma-separated list restricts nesting to those types; `all` (or `"*"` / `true`, matching how `extensions:` and `skills:` take booleans) allows any enabled agent; omitted, empty, `none`, or `false` means no nested tools are injected at all. Unknown, disabled, and out-of-list types are rejected rather than falling back — regardless of the project's [fallback agent](#persistent-settings) setting, so a configured fallback can never hand a nested caller an agent outside its allowlist — and a nested `model:` is validated against [Model Scope](#model-scope) exactly like a top-level spawn. Result, resume, and steering operations are ownership-scoped, so a parent can control only its own children. Nested records remain internal to that parent and do not appear in top-level tools, lifecycle events, or agent UI other than [FleetView](#fleetview) (which lists them under their parent with their own usage) and `/agents → Running agents` — so when a parent finishes, is stopped, or ends a resumed turn, its nested children are stopped with it. They do write their own `.output` transcript (subject to the same `output_transcript` gate), filed under the root session's directory alongside their ancestors', so a nested run can still be inspected after the fact. Their token usage is folded into every ancestor's totals up to the top-level agent (lifecycle events, completion notifications, `/agents`), so nested spend stays attributable at any depth on surfaces where the children themselves stay hidden. A nested result that ends `stopped`, `aborted`, or `steered` is labelled as partial, the same guarantee top-level results carry.
383
383
 
384
- The hard cap is depth 2 by default: main session (0) → subagent (1) → nested child (2). Change it project-wide with `maxSubagentDepth` in `subagents.json` (or `/agents → Settings → Nested depth`); `0` or `1` turns nesting off everywhere. An agent already at the cap gets no nested tools at all — not even `get_subagent_result`, since it can never own a child. A child must independently set `allowed_subagents` to delegate again; isolated agents never receive nested tools.
384
+ `maxSubagentDepth` (default `2`) is the deepest level an agent may run at, counted from the main session (0). An agent can spawn only while its own depth is below it:
385
+
386
+ | `maxSubagentDepth` | Main → subagent (1) | Subagent → child (2) | Child → grandchild (3) |
387
+ | --------------------------- | ------------------- | -------------------- | ---------------------- |
388
+ | `0` or `1` | yes | no | no |
389
+ | `2` (default) | yes | yes | no |
390
+ | `3` (Claude Code's default) | yes | yes | yes |
391
+
392
+ **`0` or `1` turns nested subagents off everywhere, even for agents that set `allowed_subagents`** (including the built-in `general-purpose`). No agent gets nested tools or the re-delegation line, so no prompt carries any nesting text; top-level spawns from the main session are unaffected. Set it in `subagents.json` or `/agents → Settings → Nested depth`. An agent already at the cap gets no nested tools at all — not even `get_subagent_result`, since it can never own a child. A child delegates again only if its own agent allows it (`general-purpose` does); isolated agents never receive nested tools.
385
393
 
386
394
  Nested children occupy no slot in either queueing pool — their parent already holds one, and queueing them behind it would deadlock a parent waiting on its own child. They do count toward the [nested limit](#concurrency) `maxConcurrentNested` (default `10`), which bounds how _wide_ nesting goes: a nested spawn over it is refused, not queued, and the parent gets a tool error telling it to do the work itself. The depth cap bounds how _deep_.
387
395
 
@@ -560,7 +568,7 @@ Check status and retrieve results from a background agent.
560
568
 
561
569
  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.
562
570
 
563
- 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`).
571
+ 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`). That answer states when the run finished and how long ago, since the entry lasts as long as the session and a days-old result would otherwise read as current.
564
572
 
565
573
  ### `steer_subagent`
566
574
 
@@ -713,12 +721,20 @@ When on, each subagent spawn's effective model is validated against pi's own `en
713
721
 
714
722
  Runtime tuning values set via `/agents` → Settings (max background concurrency, max foreground concurrency, max nested concurrency, nested depth, default max turns, grace turns, fallback agent, default join mode, scheduling on/off, scope models on/off, disable defaults on/off, strict agent files on/off, package agents on/off, package workflows on/off, agent mentions on/off, output transcript on/off, tool description full/compact/custom, widget all/background/off, usage reporting on/off, cost display on/off, model display on/off, viewer markdown off/assistant/all) persist across pi restarts. Two files, merged on load:
715
723
 
716
- - **Global:** `~/.pi/agent/subagents.json` — your machine-wide defaults. Edit by hand; the `/agents` menu never writes here.
717
- - **Project:** `<cwd>/.pi/subagents.json` — per-project overrides. Written by `/agents` → Settings.
724
+ - **Global:** `~/.pi/agent/subagents.json` — your machine-wide defaults.
725
+ - **Project:** `<cwd>/.pi/subagents.json` — per-project overrides.
726
+
727
+ `/agents` → Settings writes to the scope named in its header: Project when the project already has a `subagents.json`, Global otherwise. Tab switches it. Choosing Project in a repo without the file creates it on your first change; without that choice the menu never creates one. The list always shows the effective (merged) values, and saving to Global a setting the project file also sets warns that the project value still wins.
728
+
729
+ A save writes only the setting you changed into that file; every other key in it, including ones another pi session saved, is left as it was.
730
+
731
+ Rows are ordered by category: limits, dispatch, features, agent files, display. The filter sits above the first row: typing filters the rows by label from anywhere in the list, ↓ or Enter from the filter moves onto the first row without changing it, ↑ from the first row returns to the filter, and Esc clears it before it closes the menu. The list fits the terminal and scrolls when it has more rows than room.
732
+
733
+ A row whose value comes from a settings file is tagged with that file (`project` or `global`, in a column after the labels); an untagged row is at its built-in default. With the cursor on a tagged row, Delete (or Backspace) removes that setting from the tagged file, so the row shows what the next start would load: the other file's value if it sets one, otherwise the built-in default. With the cursor in the filter, those keys edit the filter instead. Enter on a number row opens an input under the list, with the accepted range: Enter saves, Esc returns to the list, and a value outside the range is refused. The ranges match what loading accepts, so a value the menu saves survives a restart.
718
734
 
719
735
  **Precedence:** project overrides global on any field present in both. Missing fields fall back to the hardcoded defaults (max background concurrency `10`, max foreground concurrency `0` = unlimited, max nested concurrency `10`, default max turns unlimited, grace turns `5`, nested depth `2`, join mode `smart`, defaults enabled).
720
736
 
721
- **Nested depth** (`maxSubagentDepth`, default `2`): the hard ceiling on [nested delegation](#nested-subagents), counted from the main session (main = 0, its subagents = 1). `0` or `1` disables nesting project-wide regardless of any agent's `allowed_subagents`. Read when a subagent session is built, so a change applies to agents started after it.
737
+ **Nested depth** (`maxSubagentDepth`, default `2`): the hard ceiling on [nested delegation](#nested-subagents), counted from the main session (main = 0, its subagents = 1). `0` or `1` disables nested subagents entirely, even for agents that set `allowed_subagents` — see the [depth table](#nested-subagents). Read when a subagent session is built, so a change applies to agents started after it.
722
738
 
723
739
  **Fallback agent** (`fallbackSubagent`, default `general-purpose`): the agent used when a caller-supplied `subagent_type` doesn't resolve to exactly one enabled agent — unknown, disabled, or ambiguous because two agents differ only by case. Name any enabled agent to route those calls there instead, or set `none` for **strict**, fail-closed dispatch: the call is refused with an error listing the available types, and nothing spawns. Strict mode matters most for background and scheduled calls, which would otherwise start executing a substituted agent before the caller learns anything. Also settable from `/agents → Settings → Fallback agent`. The boolean `false` is accepted as a spelling of `none`, because it would otherwise be dropped as the wrong type and silently leave the permissive default in place. Every other value is read as an agent name, so a mistaken `off` fails loudly at dispatch rather than meaning one thing in the settings file and another in the resolver. A fallback agent that is itself unknown or disabled is a misconfiguration and is reported rather than quietly replaced. Note the default is unchanged and stays permissive by design: with `disableDefaultAgents` and no `general-purpose` of your own, an unresolvable type still resolves to a built-in config carrying _all_ tools — set `none` (or name one of your own agents) to close that.
724
740
 
@@ -823,7 +839,7 @@ EOF
823
839
 
824
840
  Every project now starts with concurrency 16 and grace 10, without ever touching the menu. Individual projects can still override via `/agents` → Settings.
825
841
 
826
- **Failure behavior:** missing file is silent; malformed JSON logs a `[pi-subagents] Ignoring malformed settings at …` warning to stderr; invalid/out-of-range field values are dropped per-field; write failures downgrade the `/agents` toast to a warning with `(session only; failed to persist)`.
842
+ **Failure behavior:** missing file is silent; malformed JSON logs a `[pi-subagents] Ignoring malformed settings at …` warning to stderr; invalid/out-of-range field values are dropped per-field; a successful save's `/agents` toast ends with `(saved to global settings)` or `(saved to project settings)`; write failures — including a target file that is malformed or not a JSON object, which is left untouched — downgrade it to a warning with `(session only; failed to persist)`.
827
843
 
828
844
  ## Events
829
845
 
@@ -1130,7 +1146,9 @@ src/
1130
1146
  conversation-viewer.ts # Live conversation overlay for viewing agent sessions
1131
1147
  viewer-keys.ts # Viewer scroll, expand and jump keys, resolved through user keybindings
1132
1148
  agent-mention.ts # `@` roster (running, resumable, and startable agents) + popup rows
1149
+ agents-menu.ts # /agents root menu, running agents, agent types and detail, create wizards
1133
1150
  schedule-menu.ts # /agents → Scheduled jobs submenu
1151
+ settings-menu.ts # /agents → Settings page: filter, focus, number editor, terminal-sized list
1134
1152
  select-item.ts # Collision-safe ctx.ui.select wrapper (numbered rows)
1135
1153
  workflow-card.ts # Inline workflow card (tool result and session entry)
1136
1154
  workflow-dialog.ts # /agents → Workflows two-pane inspector
@@ -263,17 +263,17 @@ Spawns one subagent and resolves to its final text — or, with `schema`, to a v
263
263
 
264
264
  **Returns `null` if the agent failed terminally _or_ if you skipped it from the inspector**, indistinguishably. Filter with `.filter(Boolean)` when a `null` would break a later stage, and be careful with in-script retry loops: retrying on `null` will re-run something you deliberately skipped.
265
265
 
266
- | Option | Type | Notes |
267
- | ----------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
268
- | `label` | string | Display name in the progress tree. Also the handle `resume` addresses |
269
- | `phase` | string | Put this agent in a named group, overriding the ambient `phase()`. **Use it inside `pipeline`/`parallel` stages**, where the ambient phase races |
270
- | `agentType` | string | Which agent definition to use. Defaults to `general-purpose`; built-ins are `general-purpose`, `Explore`, `Plan`, plus your custom agents |
271
- | `model` | string | `provider/modelId`, or fuzzy like `haiku` |
272
- | `effort` | string | `minimal`, `low`, `medium`, `high`, `xhigh`, `max`. Omitted, the agent definition's own `thinking` decides, then the parent's |
273
- | `isolation` | `"worktree"` | Run in a throwaway git worktree. Only when agents write files in parallel and would collide — it costs setup time and disk per agent. Only this option decides, as in Claude Code — an agent file's `isolation:` does not apply to workflow children |
274
- | `gate` | string | A shell command run after the agent finishes; a non-zero exit fails the agent and its output becomes the error |
275
- | `resume` | string | Continue the child that ran under that label instead of starting fresh |
276
- | `schema` | object | A JSON Schema with an object root. Resolves to the validated object instead of text |
266
+ | Option | Type | Notes |
267
+ | ----------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
268
+ | `label` | string | Display name in the progress tree. Also the handle `resume` addresses |
269
+ | `phase` | string | Put this agent in a named group, overriding the ambient `phase()`. **Use it inside `pipeline`/`parallel` stages**, where the ambient phase races |
270
+ | `agentType` | string | Which agent definition to use. Defaults to `general-purpose`; built-ins are `general-purpose`, `Explore`, `Plan`, plus your custom agents. The built-in `general-purpose` gets no nested `Agent` tool here; a custom agent with `allowed_subagents` keeps its own |
271
+ | `model` | string | `provider/modelId`, or fuzzy like `haiku` |
272
+ | `effort` | string | `minimal`, `low`, `medium`, `high`, `xhigh`, `max`. Omitted, the agent definition's own `thinking` decides, then the parent's |
273
+ | `isolation` | `"worktree"` | Run in a throwaway git worktree. Only when agents write files in parallel and would collide — it costs setup time and disk per agent. Only this option decides, as in Claude Code — an agent file's `isolation:` does not apply to workflow children |
274
+ | `gate` | string | A shell command run after the agent finishes; a non-zero exit fails the agent and its output becomes the error |
275
+ | `resume` | string | Continue the child that ran under that label instead of starting fresh |
276
+ | `schema` | object | A JSON Schema with an object root. Resolves to the validated object instead of text |
277
277
 
278
278
  Any other key is rejected **by name** at the call. Note that this checks option _keys_, not option _values_ — an `agentType` that names no known agent falls back to `general-purpose` silently.
279
279
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-subagents",
3
- "version": "0.24.0-local.1",
3
+ "version": "0.25.0-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.24.0",
73
- "reviewedVersion": "0.24.0",
72
+ "version": "0.25.0",
73
+ "reviewedVersion": "0.25.0",
74
74
  "repository": "https://github.com/tintinweb/pi-subagents",
75
- "commit": "f0b5304bbfcf4598007a85773a2eac8539536fdd",
75
+ "commit": "b8efc069f05efe50b58a4b74140116c1c9a9dcc1",
76
76
  "trackVersion": true
77
77
  }
78
78
  }
@@ -1894,6 +1894,8 @@ export class AgentManager {
1894
1894
  * Called on session start/switch so tasks from a prior session don't persist.
1895
1895
  * Pass skipUnconsumed=true to preserve records the LLM hasn't read yet
1896
1896
  * (resultConsumed=false). The cleanup timer only evicts consumed results.
1897
+ * A nested child is spared only while its parent stays: the parent is its
1898
+ * only reader, and nothing marks it consumed when the parent collects it.
1897
1899
  */
1898
1900
  clearCompleted(skipUnconsumed = false): void {
1899
1901
  for (const [id, record] of this.agents) {
@@ -1901,6 +1903,17 @@ export class AgentManager {
1901
1903
  if (skipUnconsumed && !record.resultConsumed) continue
1902
1904
  this.removeRecord(id, record)
1903
1905
  }
1906
+ // One pass reaches grandchildren too: the map is in spawn order, so a
1907
+ // parent is visited, and removed, before its children.
1908
+ for (const [id, record] of this.agents) {
1909
+ if (record.status === "running" || record.status === "queued") continue
1910
+ if (
1911
+ record.parentAgentId === undefined ||
1912
+ this.agents.has(record.parentAgentId)
1913
+ )
1914
+ continue
1915
+ this.removeRecord(id, record)
1916
+ }
1904
1917
  // Unconditional: both callers are session boundaries (`session_start` and
1905
1918
  // `session_before_switch`), and `skipUnconsumed` only spares records whose
1906
1919
  // results the LLM has yet to read — it does not make the sweep partial in
@@ -1005,6 +1005,57 @@ export async function runAgent(
1005
1005
  }
1006
1006
  }
1007
1007
 
1008
+ const disallowedSet = agentConfig?.disallowedTools
1009
+ ? new Set(agentConfig.disallowedTools)
1010
+ : undefined
1011
+
1012
+ // Nested delegation tools (opt-in, ownership-scoped). Empty unless the agent
1013
+ // set `allowed_subagents` and a nestedRuntime was provided — and never when
1014
+ // isolated. Their names collide with EXCLUDED_TOOL_NAMES by design, so the
1015
+ // scoping below re-admits them explicitly (registry deny + active-set narrow).
1016
+ // Decided before the prompt is built, which says so when the agent delegates.
1017
+ const effectiveMaxDepth =
1018
+ options.nestedRuntime?.maxSubagentDepth ?? getMaxSubagentDepth()
1019
+ // At (or past) the cap this agent can never spawn, so it can never own a child
1020
+ // to fetch from or steer either — inject nothing rather than three tools whose
1021
+ // every call is an error. This is also what makes `maxSubagentDepth` 0/1 mean
1022
+ // "nesting off" instead of "nesting always fails".
1023
+ const nestedRuntime =
1024
+ options.nestedRuntime && options.nestedRuntime.depth < effectiveMaxDepth
1025
+ ? options.nestedRuntime
1026
+ : undefined
1027
+ // A workflow agent running the built-in general-purpose (what an untyped
1028
+ // agent() gets) does not delegate: Claude Code's `workflow-subagent` drops the
1029
+ // Agent tool, and the workflow script is what fans out. A custom agent's own
1030
+ // `allowed_subagents` still applies.
1031
+ const builtinInWorkflow =
1032
+ options.workflow === true && agentConfig?.isDefault === true
1033
+ const nestedTools =
1034
+ agentConfig?.allowedSubagents &&
1035
+ nestedRuntime &&
1036
+ !isolated &&
1037
+ !builtinInWorkflow
1038
+ ? createNestedSubagentTools({
1039
+ manager: nestedRuntime.manager,
1040
+ pi: options.pi,
1041
+ parentAgentId: nestedRuntime.parentAgentId,
1042
+ depth: nestedRuntime.depth,
1043
+ maxSubagentDepth: effectiveMaxDepth,
1044
+ allowedSubagents: agentConfig.allowedSubagents,
1045
+ configCwd,
1046
+ })
1047
+ : []
1048
+ const nestedToolNames = new Set(nestedTools.map((tool) => tool.name))
1049
+ // Only where the built-in general-purpose can actually spawn — not in a
1050
+ // workflow, at the depth cap, isolated, or with `Agent` disallowed.
1051
+ if (
1052
+ agentConfig?.isDefault &&
1053
+ nestedToolNames.has("Agent") &&
1054
+ !disallowedSet?.has("Agent")
1055
+ ) {
1056
+ extras.delegationGuideline = true
1057
+ }
1058
+
1008
1059
  // Build system prompt from agent config
1009
1060
  let systemPrompt: string
1010
1061
  if (agentConfig) {
@@ -1267,38 +1318,6 @@ export async function runAgent(
1267
1318
  const thinkingLevel =
1268
1319
  options.thinkingLevel ?? agentConfig?.thinking ?? ctx.thinkingLevel
1269
1320
 
1270
- const disallowedSet = agentConfig?.disallowedTools
1271
- ? new Set(agentConfig.disallowedTools)
1272
- : undefined
1273
-
1274
- // Nested delegation tools (opt-in, ownership-scoped). Empty unless the agent
1275
- // set `allowed_subagents` and a nestedRuntime was provided — and never when
1276
- // isolated. Their names collide with EXCLUDED_TOOL_NAMES by design, so the
1277
- // scoping below re-admits them explicitly (registry deny + active-set narrow).
1278
- const effectiveMaxDepth =
1279
- options.nestedRuntime?.maxSubagentDepth ?? getMaxSubagentDepth()
1280
- // At (or past) the cap this agent can never spawn, so it can never own a child
1281
- // to fetch from or steer either — inject nothing rather than three tools whose
1282
- // every call is an error. This is also what makes `maxSubagentDepth` 0/1 mean
1283
- // "nesting off" instead of "nesting always fails".
1284
- const nestedRuntime =
1285
- options.nestedRuntime && options.nestedRuntime.depth < effectiveMaxDepth
1286
- ? options.nestedRuntime
1287
- : undefined
1288
- const nestedTools =
1289
- agentConfig?.allowedSubagents && nestedRuntime && !isolated
1290
- ? createNestedSubagentTools({
1291
- manager: nestedRuntime.manager,
1292
- pi: options.pi,
1293
- parentAgentId: nestedRuntime.parentAgentId,
1294
- depth: nestedRuntime.depth,
1295
- maxSubagentDepth: effectiveMaxDepth,
1296
- allowedSubagents: agentConfig.allowedSubagents,
1297
- configCwd,
1298
- })
1299
- : []
1300
- const nestedToolNames = new Set(nestedTools.map((tool) => tool.name))
1301
-
1302
1321
  // The `agent({ schema })` contract: this child reports its answer by calling
1303
1322
  // StructuredOutput, and `structuredJson` below is what the caller reads. The
1304
1323
  // schema was already compiled by whoever asked for it, so a bad one failed
@@ -21,6 +21,13 @@ export const DEFAULT_AGENTS: Map<string, AgentConfig> = new Map([
21
21
  // Setting them to false would lock callsite intent (see resolveAgentInvocationConfig in invocation-config.ts).
22
22
  extensions: true,
23
23
  skills: true,
24
+ // Claude Code's general-purpose (`tools: ["*"]`) keeps its Agent tool;
25
+ // Explore and Plan disallow it. Delegation grants this agent nothing it
26
+ // lacks — it already has every tool — so the privilege-boundary reason
27
+ // nesting is opt-in for custom agents does not apply here.
28
+ allowedSubagents: "all",
29
+ // Claude Code's closing "do not re-delegate" line is added by the runner
30
+ // (`PromptExtras.delegationGuideline`), only when this agent can spawn.
24
31
  systemPrompt: "",
25
32
  promptMode: "append",
26
33
  isDefault: true,