@herbertgao/pi-extensions 2026.11.13 → 2026.11.14

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 (175) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +4 -4
  3. package/node_modules/@herbertgao/pi-inline-skill-commands/README.md +6 -2
  4. package/node_modules/@herbertgao/pi-inline-skill-commands/package.json +1 -1
  5. package/node_modules/@herbertgao/pi-inline-skill-commands/src/index.ts +41 -15
  6. package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +10 -0
  7. package/node_modules/@herbertgao/pi-subagents/README.md +37 -7
  8. package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +113 -34
  9. package/node_modules/@herbertgao/pi-subagents/package.json +9 -4
  10. package/node_modules/@herbertgao/pi-subagents/skills/workflow-authoring/SKILL.md +147 -0
  11. package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +48 -32
  12. package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +16 -8
  13. package/node_modules/@herbertgao/pi-subagents/src/custom-agents.ts +16 -6
  14. package/node_modules/@herbertgao/pi-subagents/src/index.ts +99 -7
  15. package/node_modules/@herbertgao/pi-subagents/src/mention.ts +5 -7
  16. package/node_modules/@herbertgao/pi-subagents/src/settings.ts +26 -0
  17. package/node_modules/@herbertgao/pi-subagents/src/structured-output.ts +13 -5
  18. package/node_modules/@herbertgao/pi-subagents/src/ui/fleet-list.ts +55 -8
  19. package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-card-redraw.ts +86 -0
  20. package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-card.ts +5 -5
  21. package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-dialog.ts +478 -115
  22. package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-menu.ts +77 -6
  23. package/node_modules/@herbertgao/pi-subagents/src/workflow/agent-detail.ts +148 -0
  24. package/node_modules/@herbertgao/pi-subagents/src/workflow/host.ts +88 -14
  25. package/node_modules/@herbertgao/pi-subagents/src/workflow/journal.ts +8 -0
  26. package/node_modules/@herbertgao/pi-subagents/src/workflow/json-schema.ts +507 -57
  27. package/node_modules/@herbertgao/pi-subagents/src/workflow/progress.ts +41 -11
  28. package/node_modules/@herbertgao/pi-subagents/src/workflow/runtime.ts +106 -34
  29. package/node_modules/@herbertgao/pi-subagents/src/workflow/task.ts +43 -5
  30. package/node_modules/@herbertgao/pi-subagents/src/workflow/tool-description.ts +93 -153
  31. package/node_modules/@herbertgao/pi-subagents/src/workflow/worker-source.ts +283 -71
  32. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +288 -177
  33. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
  34. package/node_modules/@pi-plugins/fast-mode/package.json +7 -7
  35. package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
  36. package/node_modules/pi-lens/CHANGELOG.md +132 -0
  37. package/node_modules/pi-lens/README.md +2 -0
  38. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +1 -0
  39. package/node_modules/pi-lens/dist/{chunk-LGH2HHZG.js → chunk-25CAONWT.js} +36 -25
  40. package/node_modules/pi-lens/dist/{chunk-ZQSSO7LO.js → chunk-2DWNYVUN.js} +3 -3
  41. package/node_modules/pi-lens/dist/{chunk-YCR6ZYTE.js → chunk-2RQREVGO.js} +1 -1
  42. package/node_modules/pi-lens/dist/{chunk-VWEBZ2JV.js → chunk-2XALJI2K.js} +40 -40
  43. package/node_modules/pi-lens/dist/{chunk-PQXUZYTQ.js → chunk-2YQ5LI7R.js} +4 -4
  44. package/node_modules/pi-lens/dist/{chunk-VSQT6IHZ.js → chunk-35UJUF27.js} +18 -4
  45. package/node_modules/pi-lens/dist/{chunk-OLWGYBYT.js → chunk-3IWMNN2S.js} +17 -17
  46. package/node_modules/pi-lens/dist/chunk-3UTDLQWO.js +88 -0
  47. package/node_modules/pi-lens/dist/chunk-3Z7Z3B7V.js +27 -0
  48. package/node_modules/pi-lens/dist/{chunk-UNP6Y4JV.js → chunk-4E4OCW3L.js} +16 -16
  49. package/node_modules/pi-lens/dist/{chunk-37IDWT6O.js → chunk-4GLSO2EM.js} +13 -11
  50. package/node_modules/pi-lens/dist/{chunk-QV3JPCMK.js → chunk-5HVDD7IA.js} +1 -1
  51. package/node_modules/pi-lens/dist/{chunk-ZRQMENT4.js → chunk-62PIU4TO.js} +1 -1
  52. package/node_modules/pi-lens/dist/{chunk-3TSMQZG6.js → chunk-6MDWNZ7E.js} +2 -2
  53. package/node_modules/pi-lens/dist/{chunk-WLD6BGON.js → chunk-6MWX2J5H.js} +4 -0
  54. package/node_modules/pi-lens/dist/{chunk-SCU62JLX.js → chunk-6MZLS6CK.js} +7 -7
  55. package/node_modules/pi-lens/dist/{chunk-B42AIWPJ.js → chunk-7BWPQZHE.js} +3 -3
  56. package/node_modules/pi-lens/dist/{chunk-I3NZVAMN.js → chunk-7JMEPY6P.js} +10 -10
  57. package/node_modules/pi-lens/dist/{chunk-7DPXUPRF.js → chunk-7ORBRDFY.js} +2 -2
  58. package/node_modules/pi-lens/dist/{chunk-6E5QLMWI.js → chunk-7WAQ3K26.js} +23 -23
  59. package/node_modules/pi-lens/dist/{chunk-2H5GHZKC.js → chunk-AB26NAHA.js} +7 -7
  60. package/node_modules/pi-lens/dist/{chunk-BBSDJTOV.js → chunk-AFSG6YUB.js} +13 -13
  61. package/node_modules/pi-lens/dist/{chunk-XDNWR7SG.js → chunk-ALTHJUZO.js} +2 -2
  62. package/node_modules/pi-lens/dist/{chunk-UN72ZAJ5.js → chunk-AOEVZXR6.js} +9 -9
  63. package/node_modules/pi-lens/dist/{chunk-HRLF35WL.js → chunk-ARTCVE6I.js} +9 -9
  64. package/node_modules/pi-lens/dist/{chunk-LQQNFCQJ.js → chunk-B2QO7GHY.js} +1 -1
  65. package/node_modules/pi-lens/dist/{chunk-I2FYOZNW.js → chunk-BJGWP4UX.js} +10 -10
  66. package/node_modules/pi-lens/dist/{chunk-G53LBDNU.js → chunk-BKJ6WZKP.js} +6 -6
  67. package/node_modules/pi-lens/dist/{chunk-P5MSLVUW.js → chunk-BQ72NQQM.js} +11 -11
  68. package/node_modules/pi-lens/dist/{chunk-K7O6AHSJ.js → chunk-BWGNVM33.js} +11 -11
  69. package/node_modules/pi-lens/dist/{chunk-ADYQRETD.js → chunk-BYIEU4E4.js} +2 -2
  70. package/node_modules/pi-lens/dist/{chunk-7ZVTFLCC.js → chunk-CDAJQBKJ.js} +11 -11
  71. package/node_modules/pi-lens/dist/{chunk-BKWFDWYM.js → chunk-D3UQWOCB.js} +16 -16
  72. package/node_modules/pi-lens/dist/{chunk-3PAS2ERX.js → chunk-DHFJS2I4.js} +8 -8
  73. package/node_modules/pi-lens/dist/{chunk-KNSOA43J.js → chunk-DKXIUGNA.js} +2 -2
  74. package/node_modules/pi-lens/dist/{chunk-LOEJFTF2.js → chunk-DLGJYQML.js} +2 -2
  75. package/node_modules/pi-lens/dist/{chunk-VGRGW4UL.js → chunk-DNJJVKJZ.js} +31 -31
  76. package/node_modules/pi-lens/dist/{chunk-5HBQL7DH.js → chunk-EBXCYEII.js} +3 -3
  77. package/node_modules/pi-lens/dist/chunk-EH6EHFW2.js +73 -0
  78. package/node_modules/pi-lens/dist/{chunk-W26QZ3OM.js → chunk-EKQDQPX6.js} +10 -10
  79. package/node_modules/pi-lens/dist/{chunk-TWEOJE3D.js → chunk-EXHSWN3P.js} +844 -377
  80. package/node_modules/pi-lens/dist/{chunk-4IZZEN63.js → chunk-F7BFIENK.js} +33 -33
  81. package/node_modules/pi-lens/dist/{chunk-ZI7YHV6I.js → chunk-FD4LJQ6Y.js} +5 -5
  82. package/node_modules/pi-lens/dist/{chunk-RIH3UBK4.js → chunk-GFCPPCNR.js} +11 -11
  83. package/node_modules/pi-lens/dist/{chunk-5JB4WENL.js → chunk-GIK6VUCY.js} +1 -1
  84. package/node_modules/pi-lens/dist/{chunk-PPQHMSPH.js → chunk-GNK2IHVG.js} +15 -15
  85. package/node_modules/pi-lens/dist/{chunk-CXQYK4YT.js → chunk-H6DNTQ4V.js} +2 -2
  86. package/node_modules/pi-lens/dist/{chunk-NGNBJIUO.js → chunk-HERQPNY6.js} +8 -8
  87. package/node_modules/pi-lens/dist/{chunk-INBK3HIT.js → chunk-HFIFEH46.js} +3 -3
  88. package/node_modules/pi-lens/dist/{chunk-J2ZB5MDS.js → chunk-HKRESBMC.js} +20 -20
  89. package/node_modules/pi-lens/dist/{chunk-AZG5UJYY.js → chunk-HMXWZUQW.js} +1 -1
  90. package/node_modules/pi-lens/dist/{chunk-XSC3BCN3.js → chunk-HOWHAKXO.js} +6 -6
  91. package/node_modules/pi-lens/dist/{chunk-7CLWC2UH.js → chunk-HUWW77QY.js} +1 -1
  92. package/node_modules/pi-lens/dist/{chunk-KZ732ZVW.js → chunk-IO6P3NBP.js} +1 -1
  93. package/node_modules/pi-lens/dist/{chunk-7WKVCZI4.js → chunk-J7VNGHLN.js} +2 -2
  94. package/node_modules/pi-lens/dist/{chunk-QE7BJQ6K.js → chunk-JGCBMCCS.js} +8 -8
  95. package/node_modules/pi-lens/dist/{chunk-PFJLYRO3.js → chunk-KIQSNH3F.js} +34 -34
  96. package/node_modules/pi-lens/dist/{chunk-JGUDT5KD.js → chunk-KSQJBGRO.js} +5 -5
  97. package/node_modules/pi-lens/dist/{chunk-RJ3APNIP.js → chunk-KXKM2DFP.js} +4 -4
  98. package/node_modules/pi-lens/dist/chunk-L3Q72QGQ.js +25 -0
  99. package/node_modules/pi-lens/dist/{chunk-6GLMMGCX.js → chunk-LDPY22FS.js} +2 -2
  100. package/node_modules/pi-lens/dist/{chunk-3PO4YYOX.js → chunk-M3QGXGY4.js} +3793 -3814
  101. package/node_modules/pi-lens/dist/{chunk-NNEQOC3U.js → chunk-MET776XM.js} +9 -7
  102. package/node_modules/pi-lens/dist/{chunk-X33QECRJ.js → chunk-MKQFSW2Q.js} +2 -2
  103. package/node_modules/pi-lens/dist/{chunk-7U36VQL6.js → chunk-MKW7ZUTT.js} +3 -3
  104. package/node_modules/pi-lens/dist/{chunk-PQF6YGYB.js → chunk-N2U644ZW.js} +4 -18
  105. package/node_modules/pi-lens/dist/{chunk-DI4AZZNY.js → chunk-NAACKIKT.js} +2 -2
  106. package/node_modules/pi-lens/dist/{chunk-O6LCSHHI.js → chunk-NHHS5T52.js} +1 -1
  107. package/node_modules/pi-lens/dist/{chunk-DCA2MXVQ.js → chunk-NIZKGBOU.js} +51 -27
  108. package/node_modules/pi-lens/dist/{chunk-PKWEBMCA.js → chunk-NNDZ7DOP.js} +194 -111
  109. package/node_modules/pi-lens/dist/{chunk-Q7J3JYJ2.js → chunk-NZ7NSKIW.js} +13 -13
  110. package/node_modules/pi-lens/dist/{chunk-S6MCMD27.js → chunk-OG3UCAHV.js} +3 -3
  111. package/node_modules/pi-lens/dist/{chunk-3QXFUP6T.js → chunk-OHTHVILU.js} +12 -12
  112. package/node_modules/pi-lens/dist/{chunk-NHA5K226.js → chunk-P7EV5ISR.js} +17 -2
  113. package/node_modules/pi-lens/dist/{chunk-L6BDRYUK.js → chunk-PVV27TOX.js} +5 -5
  114. package/node_modules/pi-lens/dist/{chunk-HIRBC72R.js → chunk-Q32RJDYC.js} +4 -4
  115. package/node_modules/pi-lens/dist/{chunk-QE5DJ7MX.js → chunk-Q4UQNTLB.js} +4 -4
  116. package/node_modules/pi-lens/dist/{chunk-SDYLT45T.js → chunk-QQGZY2BR.js} +2 -2
  117. package/node_modules/pi-lens/dist/{chunk-QMWKSYWB.js → chunk-S247BOH2.js} +4 -4
  118. package/node_modules/pi-lens/dist/{chunk-ARTYCUGF.js → chunk-S7KUDW73.js} +121 -18
  119. package/node_modules/pi-lens/dist/{chunk-6CFSDLHE.js → chunk-SJ2SR432.js} +17 -17
  120. package/node_modules/pi-lens/dist/{chunk-CQY2HEH7.js → chunk-SL4G67AP.js} +2 -2
  121. package/node_modules/pi-lens/dist/{chunk-LVLPA32Q.js → chunk-T2D2WWP6.js} +48 -11
  122. package/node_modules/pi-lens/dist/{chunk-HIJ4CHFF.js → chunk-T7KHGEJ5.js} +3 -3
  123. package/node_modules/pi-lens/dist/{chunk-74AMPWNC.js → chunk-TABDCX35.js} +2 -2
  124. package/node_modules/pi-lens/dist/chunk-TFSBHRL2.js +25 -0
  125. package/node_modules/pi-lens/dist/{chunk-KNJH6WJQ.js → chunk-TQKWR5AZ.js} +7 -7
  126. package/node_modules/pi-lens/dist/chunk-TWAQFMLW.js +110 -0
  127. package/node_modules/pi-lens/dist/{chunk-TKOFTLGB.js → chunk-UARVPNAU.js} +33 -33
  128. package/node_modules/pi-lens/dist/chunk-UWBD3JMH.js +56 -0
  129. package/node_modules/pi-lens/dist/{chunk-K4Z7MK6T.js → chunk-VEF3GFOL.js} +15 -15
  130. package/node_modules/pi-lens/dist/{chunk-4DAHGU3V.js → chunk-W2JPGW7Q.js} +27 -25
  131. package/node_modules/pi-lens/dist/{chunk-CZJGAOKL.js → chunk-W2YHHNY3.js} +7 -7
  132. package/node_modules/pi-lens/dist/{chunk-R4L7KZ7R.js → chunk-WA6U2URH.js} +9 -9
  133. package/node_modules/pi-lens/dist/{chunk-OZQQ3AIR.js → chunk-WAK2AXQQ.js} +9 -9
  134. package/node_modules/pi-lens/dist/{chunk-DFKOA74L.js → chunk-WH6O4IFD.js} +10 -10
  135. package/node_modules/pi-lens/dist/{chunk-27JQHK7Y.js → chunk-WJ7GY5WJ.js} +1 -1
  136. package/node_modules/pi-lens/dist/{chunk-KXGTLAUW.js → chunk-WWZLT6AM.js} +2 -2
  137. package/node_modules/pi-lens/dist/{chunk-O2MHF7QM.js → chunk-XRLZ75YY.js} +38 -38
  138. package/node_modules/pi-lens/dist/chunk-XWWFESYZ.js +27 -0
  139. package/node_modules/pi-lens/dist/chunk-XZSXSM4K.js +27 -0
  140. package/node_modules/pi-lens/dist/{chunk-C5PLBTNR.js → chunk-Y2LIOCA7.js} +1 -1
  141. package/node_modules/pi-lens/dist/{chunk-AXAR5ZW2.js → chunk-YIEHUKX2.js} +84 -169
  142. package/node_modules/pi-lens/dist/{chunk-B2OXE4AH.js → chunk-YOMLAKU6.js} +182 -180
  143. package/node_modules/pi-lens/dist/{chunk-MOAVEPC4.js → chunk-YV7XVYSJ.js} +11 -11
  144. package/node_modules/pi-lens/dist/{chunk-ZULZS2I6.js → chunk-ZVQUYCBU.js} +996 -365
  145. package/node_modules/pi-lens/dist/index.js +4911 -2376
  146. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +8 -8
  147. package/node_modules/pi-lens/dist/mcp/cli.js +40 -40
  148. package/node_modules/pi-lens/dist/mcp/server.js +321 -234
  149. package/node_modules/pi-lens/dist/mcp/worker.js +58 -58
  150. package/node_modules/pi-lens/dist/probes/installer.js +21 -21
  151. package/node_modules/pi-lens/docs/ci-bot-pr-checks.md +18 -9
  152. package/node_modules/pi-lens/docs/ci.md +7 -0
  153. package/node_modules/pi-lens/docs/defect-shapes.md +43 -28
  154. package/node_modules/pi-lens/docs/globalconfig.md +1 -0
  155. package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +15 -0
  156. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +3 -3
  157. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +3 -2
  158. package/node_modules/pi-lens/docs/module-report-read-symbol.md +6 -2
  159. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +3 -2
  160. package/node_modules/pi-lens/docs/pi-lens-orchestration.md +2 -1
  161. package/node_modules/pi-lens/docs/pi-lens-subagent.md +2 -1
  162. package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
  163. package/node_modules/pi-lens/docs/settings.md +1 -0
  164. package/node_modules/pi-lens/docs/usage.md +1 -0
  165. package/node_modules/pi-lens/package.json +1 -1
  166. package/package.json +7 -5
  167. package/node_modules/pi-lens/dist/chunk-2H7NFZ4Q.js +0 -25
  168. package/node_modules/pi-lens/dist/chunk-5YJXF2IS.js +0 -56
  169. package/node_modules/pi-lens/dist/chunk-GCSDF5IE.js +0 -27
  170. package/node_modules/pi-lens/dist/chunk-H5API74E.js +0 -67
  171. package/node_modules/pi-lens/dist/chunk-HBX55MWO.js +0 -27
  172. package/node_modules/pi-lens/dist/chunk-JOIKBUQN.js +0 -88
  173. package/node_modules/pi-lens/dist/chunk-M2YMBT5G.js +0 -73
  174. package/node_modules/pi-lens/dist/chunk-MJRGPEQ5.js +0 -25
  175. package/node_modules/pi-lens/dist/chunk-TFKN5EIR.js +0 -27
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @herbertgao/pi-extensions
2
2
 
3
+ ## 2026.11.14
4
+
5
+ ### Patch Changes
6
+
7
+ - [#390](https://github.com/HerbertGao/pi-extensions/pull/390) [`41ed7b5`](https://github.com/HerbertGao/pi-extensions/commit/41ed7b581cf97b537939972049182036fbd9ee3b) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Pin fast-mode 0.1.16 and pi-lens 4.5.1. Fast-mode bundles Effect 4.1.4. pi-lens can show diagnostic counts in the footer when asked, and Esc cancels a hung language-server request.
8
+
9
+ - Updated dependencies [[`77a7633`](https://github.com/HerbertGao/pi-extensions/commit/77a7633b71ce4ffe288fde8c7a4e00786e27c81d), [`41ed7b5`](https://github.com/HerbertGao/pi-extensions/commit/41ed7b581cf97b537939972049182036fbd9ee3b), [`41ed7b5`](https://github.com/HerbertGao/pi-extensions/commit/41ed7b581cf97b537939972049182036fbd9ee3b)]:
10
+ - @herbertgao/pi-inline-skill-commands@0.1.1
11
+ - @herbertgao/pi-subagents@0.25.0
12
+
3
13
  ## 2026.11.13
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -27,7 +27,7 @@ The package bundles 7 active `@herbertgao/*` child packages—`pi-agency`, `pi-b
27
27
  - `@juicesharp/rpiv-ask-user-question@2.15.0`
28
28
  - `@narumitw/pi-btw@0.63.8`
29
29
  - `@narumitw/pi-caffeinate@0.49.15`
30
- - `@pi-plugins/fast-mode@0.1.15`
30
+ - `@pi-plugins/fast-mode@0.1.16`
31
31
  - `@tifan/pi-copy-response@0.2.7`
32
32
  - `@tifan/pi-handoff@2.2.2`
33
33
  - `@tifan/pi-mermaid-open@0.2.2`
@@ -36,7 +36,7 @@ The package bundles 7 active `@herbertgao/*` child packages—`pi-agency`, `pi-b
36
36
  - `@tintinweb/pi-tasks@0.9.1`
37
37
  - `pi-typesafe@0.14.0`
38
38
  - `pi-next-cue@1.0.8`
39
- - `pi-lens@4.5.0`
39
+ - `pi-lens@4.5.1`
40
40
  - `pi-web-access@0.48.0`
41
41
 
42
42
  Pi loads their extensions and skills through `node_modules/` paths inside one package root. The upstream companions are pinned and bundled, not forked or renamed.
@@ -57,7 +57,7 @@ Impeccable `4.9.2` is vendored as `@herbertgao/pi-impeccable` and loaded with `/
57
57
 
58
58
  `@herbertgao/pi-bark` sends localized Bark pushes when a user-facing Pi run fully settles or `@juicesharp/rpiv-ask-user-question` needs an answer. Notifications include emoji-labeled machine/path metadata and support the bundled official Pi badge through Bark's `icon` parameter. Configure it in `$PI_CODING_AGENT_DIR/bark.json` (normally `~/.pi/agent/bark.json`); see the [package README](../pi-bark/README.md). Without a valid endpoint it stays inactive.
59
59
 
60
- `@herbertgao/pi-inline-skill-commands` completes and expands Pi's native `/skill:<name>` commands inside a larger prompt. At token boundaries the dropdown lists only skills, completion keeps the surrounding text, and submission expands the skill where it was typed. Commands at the start of the prompt stay native, ordinary commands such as `/model` remain start-only, and no `/<name>` aliases are added, so skill entries are not duplicated. It uses `CustomEditor`'s private autocomplete trigger to fire on `/`; see the [package README](../pi-inline-skill-commands/README.md).
60
+ `@herbertgao/pi-inline-skill-commands` completes and expands Pi's native `/skill:<name>` commands inside a larger prompt. At token boundaries the dropdown lists only skills and completion keeps the surrounding text. Submission renders the same collapsed skill block a start-of-prompt command produces and keeps your sentence, command included, beneath it. Commands at the start of the prompt stay native, ordinary commands such as `/model` remain start-only, and no `/<name>` aliases are added, so skill entries are not duplicated. It uses `CustomEditor`'s private autocomplete trigger to fire on `/`; see the [package README](../pi-inline-skill-commands/README.md).
61
61
 
62
62
  `@narumitw/pi-caffeinate@0.49.15` uses the host platform's sleep inhibitor during each Pi agent run. On macOS, `/caffeinate sleep` keeps the system awake while allowing the display to sleep; `/caffeinate display` also keeps the display awake. It releases the inhibitor when the run or session ends. Its D-Bus dependency remains on the normal socket transport under Node; Bun on Linux/macOS can use FFI and an in-process reader thread for Unix file-descriptor transport, and that thread can be unreferenced so the connection need not keep the process alive. It falls back when FFI is unavailable. No daemon or build step is added. The published extension source is unchanged from 0.49.13 aside from the manifest. It declares `@narumitw/pi-tui-kit@^0.70.0` and `dbus-native@^0.16.3`. BTW `0.63.8` requires the same kit range, so the aggregate resolves one `0.70.0` install for both.
63
63
 
@@ -65,7 +65,7 @@ Impeccable `4.9.2` is vendored as `@herbertgao/pi-impeccable` and loaded with `/
65
65
 
66
66
  `clef` asks Cloudflare Clef-flash an on-demand yes/no, choice, or score and prints the questions and answers in the transcript, plus a one-line notice. It is not a permission gate. `pi-typesafe@0.14.0` provides `/typesafe` and `typesafe_evaluate` for explicit structured decisions; `/typesafe enable` or `PI_TYPESAFE_ENABLED=1` is still required for agent tool calls. The default backend remains `https://api.typesafe.ai`. `PI_TYPESAFE_BACKEND` and `PI_TYPESAFE_MODEL` select the session backend and model, and `/typesafe login` stores a key for the named backend. Only HTTP 401 refuses that key, and only for 15 minutes; a 403 refuses one request and leaves the key usable. Nace.AI (`https://console.nace.ai`, `NACE_API_KEY`, default model `drex-v2.0`) is a judgment backend. Daily request, token, and USD caps are opt-in. OpenRouter, Command Code, Liquid, SubQ, Nace.AI, and a named endpoint stay explicit and use that backend's own key. The promoted SDK is `@typesafe-ai/sdk@0.7.0`. Under Bun, the judge transport reads each response body once and replays it, so the SDK can still read the result after Bun marks the original body used.
67
67
 
68
- `@herbertgao/sol-pi` adds opt-in Action Fusion, ObservationPack, Evidence-Preserving Reducer, and Online Context Compact; see its [configuration guide](../sol-pi/docs/configuration.md). `pi-lens@4.5.0` publishes a public LSP config schema, reads user-level custom rule directories (project before user before built-in), normalizes argv-style server entries, downgrades `throw-new-error` to a warning, and counts Docker, JSON, and Jedi servers in idle eviction; language routing and the retained multi-root diagnostic facts are unchanged. `.mts` and `.cts` use the TypeScript rules. Groovy files still classify as Groovy, and the vendored Groovy grammar lists classes and methods. `--no-read-expansion` turns off read widening without disabling the read-before-edit guard. It promotes `@ast-grep/cli` to `0.51.1` and `@ast-grep/napi` to `^0.51.0`. A blank `PI_LENS_*` number falls back to the default, and an explicit `0` is a value. An edit that raises a named function past the high-complexity threshold and past the default branch names that function on one line; a function the edit improved, or that is still no worse than the default branch, is not named. `ast_grep_replace` no longer requests strict JSON-schema sampling; `lens_diagnostic_mark` still does. A language server for a project outside the session folder starts only when Pi would trust that project. Four MCP tools advertise only `path`. A session rooted at `/` keeps `lsp.disabledServers`. Concatenated SQL passed to `.execute()` is an advisory full-analysis finding; a parameterized `execute(sql, values)` call stays quiet. Keeping injected findings in later requests is opt-in. A workspace edit through a dangling symlink is refused, and a symlink that resolves outside the workspace is refused; the fallback Biome config no longer names a nursery rule. An identity `filter(x => x).map(...)` stays a warning, and a non-identity `filter(fn).map(...)` is no longer flagged. An async array callback with a block body is not flagged for a missing return. A sync block callback that does not return still is. A reduce that copies its accumulator with `Object.assign` is a warning. A directory whose name starts with `..` stays inside its project. `.groovy`, `.gvy`, `.gy`, `.gsh`, `Jenkinsfile`, `build.gradle`, and `settings.gradle` classify as Groovy; `build.gradle.kts` does not. `minimatch` is `^11.0.4` and `vscode-jsonrpc` is `^10.0.0`. `pi-web-access@0.48.0` provides configurable web search and fetch tools; its `toolActivation` defaults to `auto`, choosing eager or dynamic tool activation per model. `toolActivation: "none"` stays opt-in and still requires deferred exposure. Field extraction, 9router, empty or off-topic search fallback, and plain HTTP gateway URLs stay off unless configured. An unknown tool-call provider name fails instead of selecting a provider automatically, and DuckDuckGo searches stay spaced apart after a bot check. It adds structured search/fetch data for codemode and an optional, manually started `pi-web-access-mcp` stdio CLI; installing the aggregate does not start that server. Degoog, Keenable, Ceramic, Linkup, DeepSeek fetch, Cloudflare search, SearchApi, Outcrawl, Sofya, cloro, Autom, SpecStream, and Tabstack are explicit-only, excluded from automatic and `all` selection. DuckDuckGo searches in one process start at least 10 seconds apart and at most 10 in any 10 minutes. `lockProxy: true` rejects a tool-call proxy other than the configured one. A GitHub repository README is returned up to 100K characters, and a clone with no `githubClone.clonePath` goes under the OS temp directory. Optional `fetchContent.curl` and Exa/Tabstack fetch routing stay off unless configured. Provider gateway base URLs are opt-in and are not configured by the aggregate. OpenAI search now defaults to `gpt-6-luna`, results and clone cleanup are scoped per extension instance, and the promoted `@modelcontextprotocol/sdk@^1.32.1` moves the bundle off GHSA-6qxp-vccf-f47h. Perplexity search now uses the Search API's ranked pages and snippets rather than a Sonar-generated answer; requests requiring prose still use Sonar. `pi-antigravity@0.14.0` reads Pi 0.86+ transcript system messages, so Antigravity requests carry Pi's system prompt and tools; it also registers `google_search`, `read_url_content`, and `generate_image` tools that use the signed-in Antigravity account. Those tools stay direct unless `ANTIGRAVITY_DEFER_TOOLS=1`. `ANTIGRAVITY_NO_FETCH_TOOL=1` skips `read_url_content`. A private or credentialed fetch URL is rejected before a request. The User-Agent is `antigravity/cli/1.5.5`. A model removed by catalog refresh is not filled back in from the bootstrap list. Image saves reject symlink destinations. The aggregate keeps host `typebox` and `undici@^8.11.2`. `pi-provider-qoder@0.6.12` registers the `qoder` and `qoder-cn` model providers. A tool-call argument stream that is cut off before a usable call is reported as a retryable server error. Startup logs one line when the npm registry has a newer release; `PI_PROVIDER_QODER_SKIP_UPDATE_CHECK=1` skips that lookup. A queued model-busy response reports its wait instead of being ignored; a ready busy response stays retryable. A queued wait that does not fit in a safe millisecond count uses `retryAfterSeconds` instead. Agent chat prefers the account's remote-agent node and, on daily chat limit code 110, tries the next node. The chosen node is cached for one hour. Sign in with `/login qoder` (browser or a personal access token from [qoder.com/account/integrations](https://qoder.com/account/integrations)) or `/login qoder-cn` (token from [qoder.com.cn/account/integrations](https://qoder.com.cn/account/integrations)). `QODER_PERSONAL_ACCESS_TOKEN` and `QODERCN_PERSONAL_ACCESS_TOKEN` log those providers in at startup. `/qoder-usage footer on` replaces the status-bar footer for that session, so leave it off while the pi-cc footer is in use. `pi-commandcode-provider@0.8.4` registers `commandcode` beside `qoder`, `qoder-cn`, and `antigravity`. Inference uses the Provider API only. `/login` lists those subscription providers and runs only the one you select. `@tifan/pi-preferred-thinking` is no longer bundled. Per-model thinking levels come from Pi. Deprecated `@tifan/pi-titlebar-spinner` is no longer bundled; Rename remains the single owner of Herdr tab naming. `@tifan/pi-handoff` imports `@tifan/pi-rename/naming` when it generates a session name, so Rename stays installed and its `/rename` command stays registered.
68
+ `@herbertgao/sol-pi` adds opt-in Action Fusion, ObservationPack, Evidence-Preserving Reducer, and Online Context Compact; see its [configuration guide](../sol-pi/docs/configuration.md). `pi-lens@4.5.1` publishes a public LSP config schema, reads user-level custom rule directories (project before user before built-in), normalizes argv-style server entries, downgrades `throw-new-error` to a warning, and counts Docker, JSON, and Jedi servers in idle eviction; language routing and the retained multi-root diagnostic facts are unchanged. `.mts` and `.cts` use the TypeScript rules. Groovy files still classify as Groovy, and the vendored Groovy grammar lists classes and methods. `--no-read-expansion` turns off read widening without disabling the read-before-edit guard. It promotes `@ast-grep/cli` to `0.51.1` and `@ast-grep/napi` to `^0.51.0`. A blank `PI_LENS_*` number falls back to the default, and an explicit `0` is a value. An edit that raises a named function past the high-complexity threshold and past the default branch names that function on one line; a function the edit improved, or that is still no worse than the default branch, is not named. `ast_grep_replace` no longer requests strict JSON-schema sampling; `lens_diagnostic_mark` still does. A language server for a project outside the session folder starts only when Pi would trust that project. Four MCP tools advertise only `path`. A session rooted at `/` keeps `lsp.disabledServers`. Concatenated SQL passed to `.execute()` is an advisory full-analysis finding; a parameterized `execute(sql, values)` call stays quiet. Keeping injected findings in later requests is opt-in. A workspace edit through a dangling symlink is refused, and a symlink that resolves outside the workspace is refused; the fallback Biome config no longer names a nursery rule. An identity `filter(x => x).map(...)` stays a warning, and a non-identity `filter(fn).map(...)` is no longer flagged. An async array callback with a block body is not flagged for a missing return. A sync block callback that does not return still is. `--lens-issues-status` can show diagnostic counts in the footer and stays off unless set. Esc cancels a hung language-server request instead of leaving that server busy. A reduce that copies its accumulator with `Object.assign` is a warning. A directory whose name starts with `..` stays inside its project. `.groovy`, `.gvy`, `.gy`, `.gsh`, `Jenkinsfile`, `build.gradle`, and `settings.gradle` classify as Groovy; `build.gradle.kts` does not. `minimatch` is `^11.0.4` and `vscode-jsonrpc` is `^10.0.0`. `pi-web-access@0.48.0` provides configurable web search and fetch tools; its `toolActivation` defaults to `auto`, choosing eager or dynamic tool activation per model. `toolActivation: "none"` stays opt-in and still requires deferred exposure. Field extraction, 9router, empty or off-topic search fallback, and plain HTTP gateway URLs stay off unless configured. An unknown tool-call provider name fails instead of selecting a provider automatically, and DuckDuckGo searches stay spaced apart after a bot check. It adds structured search/fetch data for codemode and an optional, manually started `pi-web-access-mcp` stdio CLI; installing the aggregate does not start that server. Degoog, Keenable, Ceramic, Linkup, DeepSeek fetch, Cloudflare search, SearchApi, Outcrawl, Sofya, cloro, Autom, SpecStream, and Tabstack are explicit-only, excluded from automatic and `all` selection. DuckDuckGo searches in one process start at least 10 seconds apart and at most 10 in any 10 minutes. `lockProxy: true` rejects a tool-call proxy other than the configured one. A GitHub repository README is returned up to 100K characters, and a clone with no `githubClone.clonePath` goes under the OS temp directory. Optional `fetchContent.curl` and Exa/Tabstack fetch routing stay off unless configured. Provider gateway base URLs are opt-in and are not configured by the aggregate. OpenAI search now defaults to `gpt-6-luna`, results and clone cleanup are scoped per extension instance, and the promoted `@modelcontextprotocol/sdk@^1.32.1` moves the bundle off GHSA-6qxp-vccf-f47h. Perplexity search now uses the Search API's ranked pages and snippets rather than a Sonar-generated answer; requests requiring prose still use Sonar. `pi-antigravity@0.14.0` reads Pi 0.86+ transcript system messages, so Antigravity requests carry Pi's system prompt and tools; it also registers `google_search`, `read_url_content`, and `generate_image` tools that use the signed-in Antigravity account. Those tools stay direct unless `ANTIGRAVITY_DEFER_TOOLS=1`. `ANTIGRAVITY_NO_FETCH_TOOL=1` skips `read_url_content`. A private or credentialed fetch URL is rejected before a request. The User-Agent is `antigravity/cli/1.5.5`. A model removed by catalog refresh is not filled back in from the bootstrap list. Image saves reject symlink destinations. The aggregate keeps host `typebox` and `undici@^8.11.2`. `pi-provider-qoder@0.6.12` registers the `qoder` and `qoder-cn` model providers. A tool-call argument stream that is cut off before a usable call is reported as a retryable server error. Startup logs one line when the npm registry has a newer release; `PI_PROVIDER_QODER_SKIP_UPDATE_CHECK=1` skips that lookup. A queued model-busy response reports its wait instead of being ignored; a ready busy response stays retryable. A queued wait that does not fit in a safe millisecond count uses `retryAfterSeconds` instead. Agent chat prefers the account's remote-agent node and, on daily chat limit code 110, tries the next node. The chosen node is cached for one hour. Sign in with `/login qoder` (browser or a personal access token from [qoder.com/account/integrations](https://qoder.com/account/integrations)) or `/login qoder-cn` (token from [qoder.com.cn/account/integrations](https://qoder.com.cn/account/integrations)). `QODER_PERSONAL_ACCESS_TOKEN` and `QODERCN_PERSONAL_ACCESS_TOKEN` log those providers in at startup. `/qoder-usage footer on` replaces the status-bar footer for that session, so leave it off while the pi-cc footer is in use. `pi-commandcode-provider@0.8.4` registers `commandcode` beside `qoder`, `qoder-cn`, and `antigravity`. Inference uses the Provider API only. `/login` lists those subscription providers and runs only the one you select. `@tifan/pi-preferred-thinking` is no longer bundled. Per-model thinking levels come from Pi. Deprecated `@tifan/pi-titlebar-spinner` is no longer bundled; Rename remains the single owner of Herdr tab naming. `@tifan/pi-handoff` imports `@tifan/pi-rename/naming` when it generates a session name, so Rename stays installed and its `/rename` command stays registered.
69
69
 
70
70
  `pi-stash` is no longer bundled: `/btw` already preserves the main editor draft while handling side questions outside the main conversation. Prior `@herbertgao/pi-stash` releases remain available but are no longer maintained here.
71
71
 
@@ -1,11 +1,13 @@
1
1
  # @herbertgao/pi-inline-skill-commands
2
2
 
3
- Use Pi's native `/skill:name` commands within a larger prompt. At token boundaries, autocomplete lists only skills and completion preserves the surrounding text. Submitting expands the skill and retains the text before and after the command.
3
+ Use Pi's native `/skill:name` commands within a larger prompt. At token boundaries, autocomplete lists only skills and completion preserves the surrounding text. Submitting expands the skill as the same collapsed invocation block a start-of-prompt command produces, and keeps your original sentence, command included, as the request below it.
4
4
 
5
5
  ```text
6
6
  Please use /skill:pdf-tools to extract report.pdf
7
7
  ```
8
8
 
9
+ That prompt renders as the collapsed skill block followed by `Please use /skill:pdf-tools to extract report.pdf`, so the sentence stays readable and the skill still loads.
10
+
9
11
  Commands at the start of the prompt remain entirely native. This package does not add `/<name>` aliases or a second skill list, so it does not duplicate Pi's native skill entries. Ordinary commands such as `/model` remain start-only. URL and path slashes do not trigger skill completion.
10
12
 
11
13
  ## Install
@@ -20,7 +22,7 @@ For a local checkout:
20
22
  pi install /absolute/path/to/pi-extensions/packages/pi-inline-skill-commands
21
23
  ```
22
24
 
23
- Restart Pi or run `/reload` after installation. The package is standalone and is not included in the `@herbertgao/pi-extensions` aggregate.
25
+ Restart Pi or run `/reload` after installation. If `@herbertgao/pi-extensions` already provides this extension, do not install the standalone package as well.
24
26
 
25
27
  ## Compatibility
26
28
 
@@ -28,6 +30,8 @@ Pi currently filters `/` out of extension-provided autocomplete trigger characte
28
30
 
29
31
  Skill discovery and the native start-of-prompt behavior use Pi's public APIs. Submission expansion reconstructs a snapshot of configured, default-directory, and package skills. Pi does not expose the active resource loader to extensions, so CLI-only `--skill` paths and skill paths injected dynamically by other extensions are not expanded by this package. Use the same `/reload` workflow after changing skills as with native skill commands.
30
32
 
33
+ Only a command after other text is expanded here. A prompt that starts with `/skill:name` goes to Pi's native path, which expands just that first command, so a second command later in the same message stays literal. Expansion also matches only names Pi actually loaded, longest first: an unknown longer token such as `/skill:test_x` is left alone rather than expanding a shorter `test`.
34
+
31
35
  ## License
32
36
 
33
37
  [MIT](LICENSE)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-inline-skill-commands",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Complete and expand Pi's native /skill:name commands within a larger prompt.",
5
5
  "keywords": [
6
6
  "autocomplete",
@@ -14,12 +14,29 @@ import type {
14
14
  EditorComponent,
15
15
  } from "@earendil-works/pi-tui"
16
16
 
17
- const MID_SKILL_TOKEN =
18
- /(?:^|[\s\u3000\u00a0\u2007\u202f\u203f\u2060\ufeff,。!?;:、()【】《》「」『』([{<`])(\/[^\s/]*)$/
19
- const MID_SKILL_COMMAND =
20
- /(^|[\s\u3000\u00a0\u2007\u202f\u203f\u2060\ufeff,。!?;:、()【】《》「」『』([{<`])(\/skill:([a-z0-9-]{1,64}))(?=\s|$)/
17
+ const MID_SKILL_BOUNDARY =
18
+ "[\\s\\u3000\\u00a0\\u2007\\u202f\\u203f\\u2060\\ufeff,。!?;:、()【】《》「」『』([{<`]"
19
+ const MID_SKILL_TOKEN = new RegExp(`(?:^|${MID_SKILL_BOUNDARY})(\\/[^\\s/]*)$`)
20
+ const MID_SKILL_COMMAND = new RegExp(`(^|${MID_SKILL_BOUNDARY})\\/skill:`)
21
21
 
22
- type SkillDefinition = Pick<Skill, "name" | "filePath">
22
+ function escapeRegExp(value: string): string {
23
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
24
+ }
25
+
26
+ /**
27
+ * Match only names Pi actually loaded, longest first, so `/skill:test_x` never falls back
28
+ * to a shorter `test`. The lookahead still allows sentence punctuation (`.`, `,`, `,`).
29
+ */
30
+ function buildSkillCommandPattern(skills: SkillMap): RegExp {
31
+ const names = [...skills.keys()]
32
+ .toSorted((a, b) => b.length - a.length)
33
+ .map(escapeRegExp)
34
+ return new RegExp(
35
+ `(^|${MID_SKILL_BOUNDARY})(\\/skill:(${names.join("|")}))(?!\\.?[A-Za-z0-9_-])`,
36
+ )
37
+ }
38
+
39
+ type SkillDefinition = Pick<Skill, "name" | "filePath" | "baseDir">
23
40
  type SkillMap = ReadonlyMap<string, SkillDefinition>
24
41
 
25
42
  interface TriggerableEditor extends EditorComponent {
@@ -115,23 +132,24 @@ export function expandMidSkillCommand(
115
132
  text: string,
116
133
  skills: SkillMap,
117
134
  ): string | undefined {
118
- const match = MID_SKILL_COMMAND.exec(text)
135
+ // Idempotent: a second copy of this handler must not nest another skill block.
136
+ if (text.startsWith("<skill ") || skills.size === 0) return undefined
137
+ const match = buildSkillCommandPattern(skills).exec(text)
119
138
  if (!match) return undefined
120
139
 
121
140
  const boundary = match[1] ?? ""
122
- const command = match[2] ?? ""
123
- const commandIndex = match.index + boundary.length
124
- const prefix = text.slice(0, commandIndex)
141
+ const prefix = text.slice(0, match.index + boundary.length)
125
142
  if (!prefix.trim()) return undefined
126
143
 
127
144
  const skill = skills.get(match[3] ?? "")
128
145
  if (!skill) return undefined
129
146
 
130
147
  const content = stripFrontmatter(readFileSync(skill.filePath, "utf-8")).trim()
131
- const args = text.slice(commandIndex + command.length).trim()
132
- let expansion = `<skill name="${skill.name}" location="${skill.filePath}">\n${content}\n</skill>`
133
- if (args) expansion += `\n\n${args}`
134
- return prefix + expansion
148
+ // Pi collapses a skill invocation only when the block starts the message. Keep the block
149
+ // first and the original sentence, command included, as the user message. The references
150
+ // line matches Pi's own expansion so both paths feed the model the same skill text.
151
+ const block = `<skill name="${skill.name}" location="${skill.filePath}">\nReferences are relative to ${skill.baseDir}.\n\n${content}\n</skill>`
152
+ return `${block}\n\n${text.trim()}`
135
153
  }
136
154
 
137
155
  export function wrapMidSkillTrigger<T extends EditorComponent>(editor: T): T {
@@ -157,7 +175,8 @@ export function wrapMidSkillTrigger<T extends EditorComponent>(editor: T): T {
157
175
  }
158
176
 
159
177
  function installMidSkillTrigger(): void {
160
- // SAFETY: CustomEditor has these runtime members; the private trigger is feature-checked before use.
178
+ // SAFETY: `handleInput` is an own property of CustomEditor.prototype and is replaced here;
179
+ // the trigger members come from Editor.prototype and are feature-checked before use.
161
180
  const prototype = CustomEditor.prototype as unknown as TriggerableEditor
162
181
  if (prototype.inlineSkillCommandsTriggerInstalled) return
163
182
  wrapMidSkillTrigger(prototype)
@@ -179,7 +198,14 @@ async function loadSessionSkills(ctx: ExtensionContext): Promise<SkillMap> {
179
198
  noContextFiles: true,
180
199
  })
181
200
  await loader.reload()
182
- return new Map(loader.getSkills().skills.map((skill) => [skill.name, skill]))
201
+ return new Map(
202
+ loader
203
+ .getSkills()
204
+ .skills.map((skill) => [
205
+ skill.name,
206
+ { name: skill.name, filePath: skill.filePath, baseDir: skill.baseDir },
207
+ ]),
208
+ )
183
209
  }
184
210
 
185
211
  export default function piInlineSkillCommands(pi: ExtensionAPI): void {
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.26.0-local.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#390](https://github.com/HerbertGao/pi-extensions/pull/390) [`41ed7b5`](https://github.com/HerbertGao/pi-extensions/commit/41ed7b581cf97b537939972049182036fbd9ee3b) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Replay upstream pi-subagents 0.26.0. Asking for a number of agents runs those agents in parallel unless you ask for a workflow. A workflow schema is checked before the agent starts, a failed call can explain why, and the script reference can move into a skill. Unconsumed results and a failed worktree cleanup still stay recoverable.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#390](https://github.com/HerbertGao/pi-extensions/pull/390) [`41ed7b5`](https://github.com/HerbertGao/pi-extensions/commit/41ed7b581cf97b537939972049182036fbd9ee3b) Thanks [@HerbertGao](https://github.com/HerbertGao)! - A background workflow card scheduled while fullscreen does not redraw again after the session leaves fullscreen. That extra redraw was clearing scrollback.
12
+
3
13
  ## 0.25.0-local.1
4
14
 
5
15
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  # @herbertgao/pi-subagents
2
2
 
3
- A [pi](https://pi.dev) extension that brings **Claude Code-style autonomous sub-agents and workflow orchestration** to pi. Spawn specialized agents that run in isolated sessions — each with its own tools, system prompt, model, and thinking level. Run them in the background (the default) or block on them, steer them mid-run, resume completed sessions, and define your own custom agent types. When the orchestration shouldn't be improvised, hand a deterministic JavaScript script to the `SubagentWorkflow` tool — `agent()`, `parallel()`, `pipeline()` — and scripts written for Claude Code's `Workflow` tool run here unchanged.
3
+ A [pi](https://pi.dev) extension that brings **Claude Code-style autonomous sub-agents and workflow orchestration** to pi. Spawn specialized agents that run in isolated sessions — each with its own tools, system prompt, model, and thinking level. Run them in the background (the default) or block on them, steer them mid-run, resume completed sessions, and define your own custom agent types. When the orchestration shouldn't be improvised, hand a deterministic JavaScript script to the `SubagentWorkflow` tool — `agent()`, `parallel()`, `pipeline()` — and scripts written for Claude Code's `Workflow` tool run here, with a short list of [differences](https://github.com/HerbertGao/pi-extensions/blob/master/packages/pi-subagents/docs/workflows.md#coming-from-claude-code).
4
4
 
5
5
  <img width="600" alt="pi-subagents screenshot" src="https://raw.githubusercontent.com/HerbertGao/pi-extensions/master/packages/pi-subagents/media/screenshot.png" />
6
6
 
@@ -19,7 +19,7 @@ https://github.com/user-attachments/assets/8685261b-9338-4fea-8dfe-1c590d5df543
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** — 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
- - **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)**
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, with the [listed differences](https://github.com/HerbertGao/pi-extensions/blob/master/packages/pi-subagents/docs/workflows.md#coming-from-claude-code): same globals and strict mode, the return value copied the same way, `disallowedTools`, `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. The script-writing reference ships as the `workflow-authoring` skill (`/skill:workflow-authoring`) and is part of the tool description by default; [`workflowToolExposure: "skill"`](#persistent-settings) swaps it for a pointer to the skill, about 4k tokens lighter per session, and `"deferred"` leaves the tool out of the spec until pi's `tool_search` loads it. **[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
24
24
  - **Session resume** — pick up where an agent left off, preserving full conversation context. Resumes detached by default and notifies you on completion, just like a fresh spawn; pass `run_in_background: false` to block and get the result inline
25
25
  - **Graceful turn limits** — agents get a "wrap up" warning before hard abort, producing clean partial results instead of cut-off output
@@ -146,7 +146,7 @@ While subagents are running, a Claude Code-style navigable list renders **below*
146
146
  esc to interrupt · ← for agents · ↓ to manage
147
147
 
148
148
  ● main
149
- ○ workflow audit-src 12/40 agents · 32s · ↓ 26.4k tokens
149
+ ○ workflow audit ▰▰▰▰▰▰▰▱▱▱▱▱▱▱▱▱▱▱▱▱ 3/9 agents · Fixing (1/2) 32s · ↓ 26.4k tokens
150
150
  ❯ ○ general-purpose Review the auth module 41s · ↓ 13.1k tokens
151
151
  ├ ○ Explore Find session handling 28s · ↓ 22.7k tokens
152
152
  └ ○ Explore Find token refresh 27s · ↓ 19.4k tokens
@@ -155,7 +155,7 @@ While subagents are running, a Claude Code-style navigable list renders **below*
155
155
 
156
156
  Subagents spawned by a subagent (nested delegation) are listed indented under their parent with `├`/`└`, and can be opened, steered and stopped like any other row. Each row's tokens and cost are that agent's own; a parent's figure excludes its children, which have rows of their own. Outside FleetView a parent still reports the rolled-up total, since nested children appear nowhere else.
157
157
 
158
- Running [workflows](#subagentworkflow) appear as a single `workflow` row above the agents, carrying their agent counts in place of a description. `Enter` on one opens the same two-pane inspector `/agents → Workflows` does, rather than a conversation overlay. A run's own agents are _not_ listed separately — they belong to the run, which reports for them, so they are filtered out of the fleet list, the above-editor widget, the `/agents` menus and `@handle` resolution (nested children are filtered from all of those but the fleet list). They are also outside the `maxConcurrent` pool: the run has its own concurrency cap, and routing a fan-out through the session pool as well would let one workflow starve everything else. The agents are ordered earliest-launched first, and only agents you can actually open are shown (pending/queued agents with no session yet appear once they start). At an **empty prompt**, press `↓` (or `←`) to move focus from the prompt into the list — the selected row is marked with the `❯` cursor. `●` marks the view in front (`main`, or the agent whose overlay is open), `○` the rest. The selected row renders in the theme's primary text color rather than the muted/dim treatment of the others; an agent with a configured `color` shows its badge there too, bolded. `↑`/`↓` move the selection, `Enter` opens the selected agent's live conversation overlay (it auto-updates as the agent works), and `Esc` (or `↑` above `main`) returns to the prompt. Selecting `main` returns to the normal view. Inside the overlay, press `Enter` to steer the running agent — type a message and `Enter` to send it (`Esc` or an empty submit returns), and it redirects the agent the same way the `steer_subagent` tool does. On a running foreground `Agent` call, press `b` to hand that run to the background; the hint only shows where the handoff is available. A viewer stays open when its agent finishes so you can read the final output, and finished agents linger in the list for a few seconds before dropping out. Typing anything at a non-empty prompt behaves normally — the list only captures arrow keys when the prompt is empty. In fullscreen mode the mouse works too: hovering a row moves the `❯` cursor to it, and clicking a row opens it as `Enter` would (under tmux or screen, pi tracks clicks but not hover; regular mode has no mouse). Disable it entirely via `/agents → Settings → Fleet view`.
158
+ Running [workflows](#subagentworkflow) appear as a single row above the agents: a `workflow` label where an agent has its type, the run's name, then a twenty-cell progress bar of finished agents, the `done/total agents` count, and the phases with work outstanding (`Fixing (1/2)`, or `Fixing & Testing` when a pipeline has two in flight) in place of a description. `Enter` on one opens the same two-pane inspector `/agents → Workflows` does, rather than a conversation overlay. A run's own agents are _not_ listed separately — they belong to the run, which reports for them, so they are filtered out of the fleet list, the above-editor widget, the `/agents` menus and `@handle` resolution (nested children are filtered from all of those but the fleet list). They are also outside the `maxConcurrent` pool: the run has its own concurrency cap, and routing a fan-out through the session pool as well would let one workflow starve everything else. The agents are ordered earliest-launched first, and only agents you can actually open are shown (pending/queued agents with no session yet appear once they start). At an **empty prompt**, press `↓` (or `←`) to move focus from the prompt into the list — the selected row is marked with the `❯` cursor. `●` marks the view in front (`main`, or the agent whose overlay is open), `○` the rest. The selected row renders in the theme's primary text color rather than the muted/dim treatment of the others; an agent with a configured `color` shows its badge there too, bolded. `↑`/`↓` move the selection, `Enter` opens the selected agent's live conversation overlay (it auto-updates as the agent works), and `Esc` (or `↑` above `main`) returns to the prompt. Selecting `main` returns to the normal view. Inside the overlay, press `Enter` to steer the running agent — type a message and `Enter` to send it (`Esc` or an empty submit returns), and it redirects the agent the same way the `steer_subagent` tool does. On a running foreground `Agent` call, press `b` to hand that run to the background; the hint only shows where the handoff is available. A viewer stays open when its agent finishes so you can read the final output, and finished agents linger in the list for a few seconds before dropping out. Typing anything at a non-empty prompt behaves normally — the list only captures arrow keys when the prompt is empty. In fullscreen mode the mouse works too: hovering a row moves the `❯` cursor to it, and clicking a row opens it as `Enter` would (under tmux or screen, pi tracks clicks but not hover; regular mode has no mouse). Disable it entirely via `/agents → Settings → Fleet view`.
159
159
 
160
160
  ### Fullscreen conversation observer
161
161
 
@@ -554,6 +554,8 @@ return await pipeline(
554
554
 
555
555
  Concurrency is capped at `max(1, min(16, cpus - 2))` — the run's own limit, independent of the session's `maxConcurrent` pool, which its agents do not enter. There are 1000 agents per run and 4096 items per `parallel`/`pipeline` call.
556
556
 
557
+ A failed `agent()` call returns `null`. The completion notification lists every failure in `<failures>`, as Claude Code's does, and a script can read the reason itself with [`agentError(label)`](docs/workflows.md#agenterrorlabel), a pi addition.
558
+
557
559
  **Full guide:** [`docs/workflows.md`](https://github.com/HerbertGao/pi-extensions/blob/master/packages/pi-subagents/docs/workflows.md) — how the model writes the script for you, how to edit and re-run it, how to save one as a reusable named workflow, plus the complete `agent()` option reference, recipes and troubleshooting.
558
560
 
559
561
  ### `get_subagent_result`
@@ -600,7 +602,29 @@ Send a steering message to a running agent. The message interrupts after the cur
600
602
  ↑↓ select · ⏎ open · f filter · x stop · esc close · c convo
601
603
  ```
602
604
 
603
- The overview puts the phases on the left (a phase shows its number until it finishes, then `✔`/`✘`) and the selected phase's agents on the right. `⏎` opens one: the agents move to the left pane and the right becomes that agent's **Prompt**, **Activity** and **Outcome**, with `⏎` now expanding the prompt and `esc` going back a level rather than closing. `↑↓` (or `j`/`k`) move and `f` cycles the state filter, naming it in the pane title. The dialog opens as a centered overlay, like the conversation viewer in regular mode; the frame sizes itself to what it holds, between six rows and twenty-two, so a three-agent run is not twenty rows of nothing and a two-hundred-agent one scrolls inside the pane. Long titles truncate with `…` rather than tearing it. With more than one workflow in the session it asks which, newest first.
605
+ The overview puts the phases on the left (a phase shows its number until it finishes, then `✔`/`✘`) and the selected phase's agents on the right. `⏎` opens one: the agents move to the left pane and the right becomes that agent's **Prompt**, **Activity** and **Outcome**, and `esc` goes back a level rather than closing. At the overview `↑↓` (or `j`/`k`) move and `f` cycles the state filter, naming it in the pane title. In the agent view `↑↓` (or `j`/`k`) move between agents. `→` expands the detail and moves focus into it, its title turning the accent colour; `↑↓` then scroll it, and the bottom edge reads `1–12 of 26 ↓` when it runs on. `PgUp`/`PgDn` (or `shift+↑`/`shift+↓`) page it and `Home`/`End` jump to either end, the conversation viewer's keys, with or without focus. `←` or `esc` hand focus back to the agent list and fold the detail back to its compact view:
606
+
607
+ ```
608
+ ╭ Audit · 2 agents ┬ audit:src/a.ts ────────────────────────────────────────────────╮
609
+ │ ❯ ✔ audit:src/a.…│ ✔ Completed · anthropic/claude-opus-5 │
610
+ │ ⠋ audit:src/b.…│ 18.4k tok · 3 tool calls · 42s │
611
+ │ │ │
612
+ │ │ Prompt · 19 lines · ⏎ expand │
613
+ │ │ Audit src/a.ts for routes missing auth checks. │
614
+ │ │ step 0 │
615
+ │ │ step 1 │
616
+ │ │ step 2 │
617
+ │ │ … 15 more lines │
618
+ │ │ │
619
+ │ │ Activity · 3 tool calls · ⏎ expand │
620
+ │ │ ⏺ Read(src/a.ts) │
621
+ ╰──────────────────┴───────────────────────────────────────────────── 1–12 of 26 ↓ ─╯
622
+ ↑↓ agent · → scroll · ⏎ expand · p pause · x stop · esc back · c convo
623
+ ```
624
+
625
+ Collapsed, Activity lists the agent's most recent tool calls, one row each, with the glyph turning green or red as each result arrives. `⏎` (or `e`) expands all three sections at once: the full prompt, the transcript (assistant text, each call, and the first lines of its result), and the full outcome, pretty-printed when the agent returned structured output. These come from the child's session, so they are complete rather than the 200-character previews the progress log carries. Once a record is swept, ten minutes after it finishes, the sections fall back to those previews. The dialog opens as a centered overlay, like the conversation viewer in regular mode. It takes 85% of the terminal's height and keeps that height whatever it holds, so moving the selection or expanding the detail never makes it jump; resizing the terminal resizes it, and a two-hundred-agent run scrolls inside the pane. Long titles truncate with `…` rather than tearing it. With more than one workflow in the session it asks which, newest first.
626
+
627
+ A running agent's tool-call and token counts update as it works: tool calls on completion, tokens when each assistant message ends. **Activity** is plain text; `c` opens the conversation viewer, which renders each tool call the way pi's own transcript does.
604
628
 
605
629
  The run itself takes five keys, and the footer offers each only while it can actually do something:
606
630
 
@@ -719,7 +743,7 @@ When on, each subagent spawn's effective model is validated against pi's own `en
719
743
 
720
744
  ## Persistent Settings
721
745
 
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:
746
+ 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, workflow tool exposure skill/inline/deferred, 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:
723
747
 
724
748
  - **Global:** `~/.pi/agent/subagents.json` — your machine-wide defaults.
725
749
  - **Project:** `<cwd>/.pi/subagents.json` — per-project overrides.
@@ -810,7 +834,7 @@ Leaving it unset is not quite the same as `true`. Unset means _auto_: on, unless
810
834
 
811
835
  The match is on the exact tool names `Workflow` (Claude Code's) and `SubagentWorkflow` (ours), never a substring, so a `list_workflows` or `github_workflow_run` from some CI integration does not silently take the feature down. The check runs at `session_start` and nowhere earlier, because `getAllTools` throws during extension loading and load order means a check at registration time could not see an extension that has not loaded yet — so the tool is registered first and withdrawn from the active set through `setActiveTools`, which rebuilds the system prompt before any turn runs. When the other extension took the `SubagentWorkflow` name itself, pi's first-registration-wins rule already dropped ours, so there is nothing to withdraw and only the menu and the CLI flag come down.
812
836
 
813
- **Tool description** (`toolDescriptionMode`, default `"full"`): which Agent tool description the LLM sees. `"full"` is the rich Claude Code-style prompt (~1,400 tokens with the default agents); `"compact"` is ~75% smaller — one-line agent type list, terse usage notes — for small/local models where tool-spec tokens are expensive. Per-option details stay in the parameter descriptions in every mode (the parameter schema is never customizable). Applies on the next pi session.
837
+ **Tool description** (`toolDescriptionMode`, default `"full"`): which Agent tool description the LLM sees. `"full"` is the rich Claude Code-style prompt (~1,400 tokens with the default agents); `"compact"` is ~75% smaller — one-line agent type list, terse usage notes — for small/local models where tool-spec tokens are expensive. Per-option details stay in the parameter descriptions in every mode (the parameter schema is never customizable). Applies on the next pi session. For the `SubagentWorkflow` tool, the token saving is [`workflowToolExposure`](#persistent-settings) `"skill"` or `"deferred"`, below.
814
838
 
815
839
  `"custom"` registers your own description from `<cwd>/.pi/agent-tool-description.md` (project) or `<agentDir>/agent-tool-description.md` (global; project wins). The file is read once at tool registration, so edits also apply on the next pi session. Dynamic parts stay live via placeholders — a static agent list would go stale the moment you add a custom agent:
816
840
 
@@ -825,6 +849,8 @@ Placeholders: `{{typeList}}` (full per-agent descriptions), `{{compactTypeList}}
825
849
 
826
850
  **Starting point:** copy [`examples/agent-tool-description.md`](examples/agent-tool-description.md) — it reproduces the default full description exactly (a CI test keeps it in sync), so you can trim from a known-good baseline instead of writing from scratch.
827
851
 
852
+ **Workflow tool exposure** (`workflowToolExposure`, default `"inline"`): where the [`SubagentWorkflow`](#subagentworkflow) script reference reaches the model. `"inline"` puts it in the tool description, so the model has it whenever it writes a script. `"skill"` saves about 4k tokens every session: the description carries one line pointing at the bundled `skills/workflow-authoring/SKILL.md` by its path in the installed package instead, and the model has to choose to read it — a model that skips it writes the script without the reference, and it needs a `read` tool. `"deferred"` keeps the tool out of the tool spec entirely until pi's `tool_search` loads it, then carries the inline reference. It needs `tool_search` active (`"defaultTools": ["+tool_search"]` in pi's settings; pi ships it off), and the model only finds the tool by searching for it, so it also cannot see the opt-in rule until then. An explicit `--tools` list must name `SubagentWorkflow` as well as `tool_search`, or pi leaves the tool out entirely (`--tools +tool_search` keeps the default set). Applies on the next pi session.
853
+
828
854
  **Example — global defaults for a beefy machine:**
829
855
 
830
856
  ```bash
@@ -1080,6 +1106,8 @@ This is useful for creating agents that inherit extension tools but should not h
1080
1106
  docs/ # Long-form guides (shipped to npm; README links out to them)
1081
1107
  workflows.md # SubagentWorkflow: writing, editing, saving and re-running scripts
1082
1108
  rpc.md # Cross-extension integration: pi.events, subagents:rpc:*, manager registry
1109
+ skills/
1110
+ workflow-authoring/ # SKILL.md: the SubagentWorkflow script reference, pointed at by the tool description
1083
1111
  examples/
1084
1112
  workflows/ # Runnable examples, executed by test/workflow-examples.test.ts
1085
1113
  agent-tool-description.md
@@ -1136,6 +1164,7 @@ src/
1136
1164
  worker-source.ts # The sandbox: vm context, determinism prelude, script globals
1137
1165
  runtime.ts # Worker lifecycle, RPC bridge, semaphore, caps, gate/resume
1138
1166
  progress.ts # Progress event log and every derived view of it (pure)
1167
+ agent-detail.ts # A child's transcript folded into the inspector's Prompt/Activity/Outcome (pure)
1139
1168
  host.ts # WorkflowHost adapter over AgentManager
1140
1169
  task.ts # local_workflow task record and batched progress updates
1141
1170
  tool-description.ts # Model-facing description carrying the orchestration patterns
@@ -1151,6 +1180,7 @@ src/
1151
1180
  settings-menu.ts # /agents → Settings page: filter, focus, number editor, terminal-sized list
1152
1181
  select-item.ts # Collision-safe ctx.ui.select wrapper (numbered rows)
1153
1182
  workflow-card.ts # Inline workflow card (tool result and session entry)
1183
+ workflow-card-redraw.ts # When a background run's inline card redraws (per renderer mode)
1154
1184
  workflow-dialog.ts # /agents → Workflows two-pane inspector
1155
1185
  ```
1156
1186