@herbertgao/pi-extensions 2026.10.19 → 2026.11.1
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.
- package/CHANGELOG.md +759 -0
- package/README.md +21 -6
- package/THIRD_PARTY_NOTICES.md +53 -2
- package/extensions/clef.mjs +1 -1
- package/node_modules/@herbertgao/pi-agency/CHANGELOG.md +19 -0
- package/node_modules/@herbertgao/pi-agency/package.json +4 -2
- package/node_modules/@herbertgao/pi-agency/src/index.ts +1 -1
- package/node_modules/@herbertgao/pi-bark/CHANGELOG.md +52 -0
- package/node_modules/@herbertgao/pi-bark/package.json +2 -1
- package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +207 -0
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +7 -5
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +10 -7
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +20 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +61 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/core.ts +11 -16
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/index.ts +60 -11
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +29 -11
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer-layout.ts +54 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer.ts +23 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/session-tokens.ts +52 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +5 -4
- package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +13 -0
- package/node_modules/@herbertgao/pi-impeccable/package.json +2 -1
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +142 -45
- package/node_modules/@herbertgao/pi-subagents/docs/rpc.md +17 -7
- package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +111 -59
- package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +135 -117
- package/node_modules/@herbertgao/pi-subagents/src/cross-extension-rpc.ts +41 -14
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +110 -19
- package/node_modules/@herbertgao/pi-subagents/src/nested-tools.ts +8 -0
- package/node_modules/@herbertgao/pi-subagents/src/prompts.ts +31 -0
- package/node_modules/@herbertgao/sol-pi/CHANGELOG.md +84 -0
- package/node_modules/@herbertgao/sol-pi/README.md +3 -3
- package/node_modules/@herbertgao/sol-pi/THIRD_PARTY_NOTICES.md +4 -4
- package/node_modules/@herbertgao/sol-pi/agents-install.md +3 -3
- package/node_modules/@herbertgao/sol-pi/docs/compatibility.md +1 -1
- package/node_modules/@herbertgao/sol-pi/package.json +2 -1
- package/node_modules/@tintinweb/pi-tasks/CHANGELOG.md +270 -0
- package/node_modules/@tintinweb/pi-tasks/CONTRIBUTING.md +67 -0
- package/node_modules/@tintinweb/pi-tasks/CUSTOMIZING.md +289 -0
- package/node_modules/@tintinweb/pi-tasks/LICENSE +21 -0
- package/node_modules/@tintinweb/pi-tasks/README.md +417 -0
- package/node_modules/@tintinweb/pi-tasks/SECURITY.md +107 -0
- package/node_modules/@tintinweb/pi-tasks/dist/auto-clear.d.ts +64 -0
- package/node_modules/@tintinweb/pi-tasks/dist/auto-clear.js +129 -0
- package/node_modules/@tintinweb/pi-tasks/dist/index.d.ts +17 -0
- package/node_modules/@tintinweb/pi-tasks/dist/index.js +1338 -0
- package/node_modules/@tintinweb/pi-tasks/dist/process-tracker.d.ts +29 -0
- package/node_modules/@tintinweb/pi-tasks/dist/process-tracker.js +121 -0
- package/node_modules/@tintinweb/pi-tasks/dist/reminder-cadence.d.ts +39 -0
- package/node_modules/@tintinweb/pi-tasks/dist/reminder-cadence.js +61 -0
- package/node_modules/@tintinweb/pi-tasks/dist/task-glyphs.d.ts +48 -0
- package/node_modules/@tintinweb/pi-tasks/dist/task-glyphs.js +68 -0
- package/node_modules/@tintinweb/pi-tasks/dist/task-paths.d.ts +44 -0
- package/node_modules/@tintinweb/pi-tasks/dist/task-paths.js +60 -0
- package/node_modules/@tintinweb/pi-tasks/dist/task-sort.d.ts +23 -0
- package/node_modules/@tintinweb/pi-tasks/dist/task-sort.js +69 -0
- package/node_modules/@tintinweb/pi-tasks/dist/task-store.d.ts +61 -0
- package/node_modules/@tintinweb/pi-tasks/dist/task-store.js +397 -0
- package/node_modules/@tintinweb/pi-tasks/dist/tasks-config.d.ts +16 -0
- package/node_modules/@tintinweb/pi-tasks/dist/tasks-config.js +51 -0
- package/node_modules/@tintinweb/pi-tasks/dist/types.d.ts +36 -0
- package/node_modules/@tintinweb/pi-tasks/dist/types.js +4 -0
- package/node_modules/@tintinweb/pi-tasks/dist/ui/settings-menu.d.ts +15 -0
- package/node_modules/@tintinweb/pi-tasks/dist/ui/settings-menu.js +140 -0
- package/node_modules/@tintinweb/pi-tasks/dist/ui/task-widget.d.ts +69 -0
- package/node_modules/@tintinweb/pi-tasks/dist/ui/task-widget.js +278 -0
- package/node_modules/@tintinweb/pi-tasks/package.json +57 -0
- package/node_modules/@tintinweb/pi-tasks/src/auto-clear.ts +134 -0
- package/node_modules/@tintinweb/pi-tasks/src/index.ts +1417 -0
- package/node_modules/@tintinweb/pi-tasks/src/process-tracker.ts +140 -0
- package/node_modules/@tintinweb/pi-tasks/src/reminder-cadence.ts +90 -0
- package/node_modules/@tintinweb/pi-tasks/src/task-glyphs.ts +110 -0
- package/node_modules/@tintinweb/pi-tasks/src/task-paths.ts +65 -0
- package/node_modules/@tintinweb/pi-tasks/src/task-sort.ts +90 -0
- package/node_modules/@tintinweb/pi-tasks/src/task-store.ts +402 -0
- package/node_modules/@tintinweb/pi-tasks/src/tasks-config.ts +77 -0
- package/node_modules/@tintinweb/pi-tasks/src/types.ts +40 -0
- package/node_modules/@tintinweb/pi-tasks/src/ui/settings-menu.ts +174 -0
- package/node_modules/@tintinweb/pi-tasks/src/ui/task-widget.ts +325 -0
- package/node_modules/pi-commandcode-provider/CHANGELOG.md +330 -0
- package/node_modules/pi-commandcode-provider/CONTRIBUTING.md +192 -0
- package/node_modules/pi-commandcode-provider/LICENSE +21 -0
- package/node_modules/pi-commandcode-provider/README.md +243 -0
- package/node_modules/pi-commandcode-provider/RELEASE.md +194 -0
- package/node_modules/pi-commandcode-provider/index.ts +309 -0
- package/node_modules/pi-commandcode-provider/package.json +91 -0
- package/node_modules/pi-commandcode-provider/scripts/live-e2e-profile.mjs +87 -0
- package/node_modules/pi-commandcode-provider/scripts/pi-authenticated.mjs +50 -0
- package/node_modules/pi-commandcode-provider/scripts/pi-isolated.mjs +79 -0
- package/node_modules/pi-commandcode-provider/src/api-key.ts +69 -0
- package/node_modules/pi-commandcode-provider/src/auth-server.ts +229 -0
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog-overrides.ts +28 -0
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +260 -0
- package/node_modules/pi-commandcode-provider/src/converters.ts +477 -0
- package/node_modules/pi-commandcode-provider/src/core.ts +836 -0
- package/node_modules/pi-commandcode-provider/src/cost.ts +76 -0
- package/node_modules/pi-commandcode-provider/src/json-schema.ts +417 -0
- package/node_modules/pi-commandcode-provider/src/models.ts +515 -0
- package/node_modules/pi-commandcode-provider/src/oauth.ts +229 -0
- package/node_modules/pi-commandcode-provider/src/overflow.ts +120 -0
- package/node_modules/pi-commandcode-provider/src/pricing.ts +370 -0
- package/node_modules/pi-commandcode-provider/src/quota-command.ts +66 -0
- package/node_modules/pi-commandcode-provider/src/quota-format.ts +143 -0
- package/node_modules/pi-commandcode-provider/src/quota-types.ts +47 -0
- package/node_modules/pi-commandcode-provider/src/quota.ts +357 -0
- package/node_modules/pi-commandcode-provider/src/responses-stream.ts +249 -0
- package/node_modules/pi-commandcode-provider/src/runtime.ts +330 -0
- package/node_modules/pi-commandcode-provider/src/transcript.ts +56 -0
- package/node_modules/pi-commandcode-provider/src/transport.ts +147 -0
- package/node_modules/pi-commandcode-provider/src/types.ts +212 -0
- package/node_modules/pi-commandcode-provider/src/usage.ts +261 -0
- package/node_modules/pi-lens/CHANGELOG.md +149 -0
- package/node_modules/pi-lens/README.md +12 -2
- package/node_modules/pi-lens/config/markdownlint/run-no-fix.mjs +36 -0
- package/node_modules/pi-lens/dist/{chunk-WME2OQST.js → chunk-2453RRJ2.js} +11 -6
- package/node_modules/pi-lens/dist/{chunk-FZKFVUEC.js → chunk-2BKUFQKR.js} +276 -208
- package/node_modules/pi-lens/dist/chunk-2TS4GLOJ.js +31 -0
- package/node_modules/pi-lens/dist/{chunk-QHSNL7B2.js → chunk-2ZE3AUJQ.js} +12 -14
- package/node_modules/pi-lens/dist/{chunk-MPKRJBPK.js → chunk-35WKJWO5.js} +28 -30
- package/node_modules/pi-lens/dist/chunk-3JAHQBSY.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-4LM3VAZH.js → chunk-3O5EII3W.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-447YZL4S.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-H7OR7DFZ.js → chunk-4B2YFN4U.js} +25 -21
- package/node_modules/pi-lens/dist/{chunk-OSTKYB55.js → chunk-4BKU7PV3.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-RRV3FNNM.js → chunk-4LL2VRNY.js} +27 -28
- package/node_modules/pi-lens/dist/{chunk-BZARLRJW.js → chunk-4NBWFYWW.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-KKCK636N.js → chunk-4QG55RRC.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-RQS4QQSD.js → chunk-4W52ZKZX.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-Z2XAOKHK.js → chunk-565VRUP4.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-HWDAVBFU.js → chunk-57X2CDRX.js} +23 -23
- package/node_modules/pi-lens/dist/{chunk-MB6PXBUA.js → chunk-5F3XF3SX.js} +7 -15
- package/node_modules/pi-lens/dist/{chunk-O4BJFESU.js → chunk-5RNB4HVK.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-ZMAUPOMG.js → chunk-5T5A6YAJ.js} +35 -34
- package/node_modules/pi-lens/dist/{chunk-4ZYJHQMB.js → chunk-6FIRFP6A.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-4YHYPW2G.js → chunk-6GMGEKQN.js} +9 -5
- package/node_modules/pi-lens/dist/{chunk-4LOE5R5P.js → chunk-6LJOJ6EO.js} +20 -15
- package/node_modules/pi-lens/dist/{chunk-3YY7IXIL.js → chunk-6YUNI7B5.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-PKES3ISE.js → chunk-7ANZ7XDD.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-FB5SCCPT.js → chunk-7CGIDRIK.js} +16 -15
- package/node_modules/pi-lens/dist/{chunk-L3CMBQMH.js → chunk-7MAD5ZAY.js} +16 -17
- package/node_modules/pi-lens/dist/{chunk-WDBICWH3.js → chunk-7TNILKGY.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-RORGS5II.js → chunk-A5GRLYPZ.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-MNJIXFX4.js → chunk-AGGUWKRK.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-ABPKUVA4.js → chunk-BBET6HD6.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-L5JYIU47.js → chunk-BHWW6FAX.js} +14 -13
- package/node_modules/pi-lens/dist/{chunk-URCQWAQ4.js → chunk-BOPDQ7AZ.js} +23 -21
- package/node_modules/pi-lens/dist/{chunk-KDX35VXP.js → chunk-BQG2QFVO.js} +158 -133
- package/node_modules/pi-lens/dist/{chunk-CB4WHS4H.js → chunk-BUZIQDFS.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-2PHMIAKO.js → chunk-CM73PPGD.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-DH5JPM3K.js → chunk-CUDD35TW.js} +10 -9
- package/node_modules/pi-lens/dist/{chunk-AWDSEDER.js → chunk-CZL44WFN.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-N5WSK2K7.js → chunk-DIWK3LBC.js} +12 -15
- package/node_modules/pi-lens/dist/{chunk-24BILSZW.js → chunk-DYRZGUMA.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-PR6PO3ES.js → chunk-FHEV6T4L.js} +22 -18
- package/node_modules/pi-lens/dist/{chunk-DQZFQSR5.js → chunk-FRLAUP2B.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-RZOXUSPC.js → chunk-G5GV2Q7K.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-EKWX4WD3.js → chunk-G6JKM4O7.js} +7 -7
- package/node_modules/pi-lens/dist/chunk-GGYOZWHW.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-XT2HTCJ5.js → chunk-GIRBSBGL.js} +6 -5
- package/node_modules/pi-lens/dist/{chunk-PQJFG24Z.js → chunk-GMROJJRN.js} +1292 -946
- package/node_modules/pi-lens/dist/{chunk-U6VN4NVL.js → chunk-HHR7WGCI.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-TIQJPRDD.js → chunk-HKIL6DCL.js} +3 -2
- package/node_modules/pi-lens/dist/{chunk-SNDXCFRS.js → chunk-HUAM7QG3.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-QOE342SU.js → chunk-HXFUTMX2.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-U7BD2QL7.js → chunk-I22THIHI.js} +12 -12
- package/node_modules/pi-lens/dist/chunk-IE5D3RA5.js +58 -0
- package/node_modules/pi-lens/dist/{chunk-DPGEAHZT.js → chunk-IYVYZQRL.js} +10 -16
- package/node_modules/pi-lens/dist/{chunk-3F6BMY53.js → chunk-JBP7KESM.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-U5HPROLA.js → chunk-JE6HKLC7.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-ZE3KXHS7.js → chunk-JPRDTY5S.js} +85 -3
- package/node_modules/pi-lens/dist/{chunk-HO6LWE2E.js → chunk-JYLOYTZD.js} +17 -1
- package/node_modules/pi-lens/dist/{chunk-KW5JQPO5.js → chunk-JZRP4DGP.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-CPSR3AVL.js → chunk-KZ4ALBCH.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6IR3ZYIB.js → chunk-L3CLUGDY.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-LV4UMYVH.js → chunk-L4NEVZ4T.js} +28 -27
- package/node_modules/pi-lens/dist/chunk-LPYTPNOJ.js +22 -0
- package/node_modules/pi-lens/dist/{chunk-WGRJOXED.js → chunk-LSFXZLPW.js} +1016 -636
- package/node_modules/pi-lens/dist/{chunk-LBLBAFG3.js → chunk-MC6VB2E5.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-U2SDMG7C.js → chunk-NM2NWH55.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-T7A2HK2B.js → chunk-NSPVR3FN.js} +19 -18
- package/node_modules/pi-lens/dist/{chunk-ZGSJDWQU.js → chunk-O2ARHQKF.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-OXOI55RU.js → chunk-O4N5BQ3T.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-3FRLWYBG.js → chunk-OC7VWJBZ.js} +39 -40
- package/node_modules/pi-lens/dist/chunk-OFNMHPBT.js +89 -0
- package/node_modules/pi-lens/dist/{chunk-HR3OJ3TH.js → chunk-OWTG6UMO.js} +21 -21
- package/node_modules/pi-lens/dist/{chunk-75GAYVNO.js → chunk-OY7WZI7Q.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-ZJTT47IG.js → chunk-OZWXLJMX.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-F6X3YJWD.js → chunk-PIQQM32Y.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-PKLB2XJL.js +8 -0
- package/node_modules/pi-lens/dist/{chunk-EAOK7MIZ.js → chunk-PKSUMEPT.js} +17 -4
- package/node_modules/pi-lens/dist/{chunk-YISME6ON.js → chunk-PPKECBPP.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-4L36HG27.js → chunk-R2QQC33W.js} +14 -14
- package/node_modules/pi-lens/dist/{chunk-LUBPZN36.js → chunk-R4QWJQ2H.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-V63BC55Q.js → chunk-RGGH6M34.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-Y7F7IEE3.js → chunk-RZG472YW.js} +65 -7
- package/node_modules/pi-lens/dist/{chunk-PUZ3E2J4.js → chunk-SDFKOLSF.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-YHC2O2WO.js → chunk-SFLHSL5R.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-CCV2EU7T.js → chunk-SP4TFY5F.js} +14 -13
- package/node_modules/pi-lens/dist/{chunk-J6JP25XU.js → chunk-SQC7K3SP.js} +4 -3
- package/node_modules/pi-lens/dist/{chunk-3K2F6UDZ.js → chunk-T2S3FNNJ.js} +44 -42
- package/node_modules/pi-lens/dist/{chunk-2TF6RXWB.js → chunk-TV6RXRYH.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-GNSIWBAT.js → chunk-U3AS2FR6.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-F7K5IBZG.js → chunk-UHHLR2VY.js} +40 -40
- package/node_modules/pi-lens/dist/chunk-UYXV5NIS.js +20 -0
- package/node_modules/pi-lens/dist/{chunk-VSFLRN5Y.js → chunk-VLQ7UKZH.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-VUZWQ7UG.js → chunk-VN3L2JWZ.js} +46 -72
- package/node_modules/pi-lens/dist/{chunk-NA7SEXHE.js → chunk-VOP4PJKA.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-F5Z6URKM.js → chunk-VOXTCULR.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-LLS45EWB.js → chunk-VPLBLWFO.js} +6 -8
- package/node_modules/pi-lens/dist/chunk-W3BGKBBK.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-ZKXQKGWZ.js → chunk-WC6WRNQT.js} +4 -3
- package/node_modules/pi-lens/dist/{chunk-YVHBNSME.js → chunk-WMDUT4KH.js} +1148 -1132
- package/node_modules/pi-lens/dist/{chunk-KXF5R4UN.js → chunk-WQV6BI4Q.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-WXUDRAG6.js +24 -0
- package/node_modules/pi-lens/dist/{chunk-KPPJTH44.js → chunk-X35S7HSB.js} +28 -10
- package/node_modules/pi-lens/dist/{chunk-JMEKXFOL.js → chunk-X66YJ2SS.js} +40 -34
- package/node_modules/pi-lens/dist/{chunk-CE6VMBCB.js → chunk-XOMGO63G.js} +22 -21
- package/node_modules/pi-lens/dist/{chunk-LS3QJRUB.js → chunk-XWIME22V.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-R5MOQM2H.js → chunk-XYLC35E4.js} +119 -87
- package/node_modules/pi-lens/dist/{chunk-OE5ZBP7F.js → chunk-YHGYAEFH.js} +18 -18
- package/node_modules/pi-lens/dist/{chunk-7E2563GA.js → chunk-ZFORSIED.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-E7HJ56Y7.js → chunk-ZKLTNLAW.js} +64 -73
- package/node_modules/pi-lens/dist/chunk-ZONZ6YY3.js +74 -0
- package/node_modules/pi-lens/dist/chunk-ZSM35JF4.js +30 -0
- package/node_modules/pi-lens/dist/{chunk-RC2Z6K47.js → chunk-ZZDIOAAJ.js} +15 -6
- package/node_modules/pi-lens/dist/index.js +6993 -5396
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +10 -10
- package/node_modules/pi-lens/dist/mcp/cli.js +44 -42
- package/node_modules/pi-lens/dist/mcp/server.js +1627 -504
- package/node_modules/pi-lens/dist/mcp/worker.js +62 -61
- package/node_modules/pi-lens/dist/probes/installer.js +20 -19
- package/node_modules/pi-lens/docs/adr/0003-git-guard-latch-writer.md +11 -6
- package/node_modules/pi-lens/docs/agent-tools.md +18 -8
- package/node_modules/pi-lens/docs/alignment-families.md +29 -0
- package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +6 -4
- package/node_modules/pi-lens/docs/ci-bot-pr-checks.md +126 -0
- package/node_modules/pi-lens/docs/configuration.md +99 -3
- package/node_modules/pi-lens/docs/defect-shapes.md +55 -12
- package/node_modules/pi-lens/docs/engineering-principles.md +27 -2
- package/node_modules/pi-lens/docs/features.md +2 -2
- package/node_modules/pi-lens/docs/invariants/git-guard-host.md +7 -3
- package/node_modules/pi-lens/docs/invariants/language-config.md +15 -4
- package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +16 -2
- package/node_modules/pi-lens/docs/invariants/paths-os.md +4 -2
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +119 -39
- package/node_modules/pi-lens/docs/merge-queue-rollout.md +1 -1
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +24 -17
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +20 -11
- package/node_modules/pi-lens/docs/pi-lens-monitor.md +9 -0
- package/node_modules/pi-lens/docs/pi-lens-orchestration.md +4 -1
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +5 -5
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +6 -3
- package/node_modules/pi-lens/docs/public-api-stability.md +18 -2
- package/node_modules/pi-lens/docs/schema/pi-lens-config-v1.json +10 -0
- package/node_modules/pi-lens/docs/settings.md +10 -6
- package/node_modules/pi-lens/docs/word-index.md +17 -5
- package/node_modules/pi-lens/package.json +5 -3
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-accumulating-spread-js-test.yml +37 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/ts-redundant-filter-map-test.yml +12 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-js-test.yml +12 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-test.yml +25 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-accumulating-spread-js.yml +49 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/ts-redundant-filter-map.yml +9 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/filter-then-map-js.yml +17 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/filter-then-map.yml +36 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/self-scan-baseline.json +1 -1
- package/node_modules/pi-provider-qoder/README.md +22 -0
- package/node_modules/pi-provider-qoder/dist/index.js +375 -12
- package/node_modules/pi-provider-qoder/package.json +5 -2
- package/package.json +17 -13
- package/node_modules/@tifan/pi-preferred-thinking/README.md +0 -54
- package/node_modules/@tifan/pi-preferred-thinking/package.json +0 -43
- package/node_modules/@tifan/pi-preferred-thinking/src/index.ts +0 -236
- package/node_modules/pi-lens/dist/chunk-46TNM7XZ.js +0 -88
- package/node_modules/pi-lens/dist/chunk-72OKUXSD.js +0 -31
- package/node_modules/pi-lens/dist/chunk-7GLOLOSH.js +0 -57
- package/node_modules/pi-lens/dist/chunk-AKUUMGD5.js +0 -26
- package/node_modules/pi-lens/dist/chunk-ASUXV767.js +0 -22
- package/node_modules/pi-lens/dist/chunk-CTADOKYM.js +0 -25
- package/node_modules/pi-lens/dist/chunk-JJ2RRESP.js +0 -58
- package/node_modules/pi-lens/dist/chunk-LSC3VADM.js +0 -23
- package/node_modules/pi-lens/dist/chunk-SHLDT3OI.js +0 -27
- package/node_modules/pi-lens/dist/chunk-UF7RTZSO.js +0 -27
- package/node_modules/pi-lens/dist/chunk-W4WP2ERB.js +0 -30
- package/node_modules/pi-lens/dist/chunk-YES5CACN.js +0 -73
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cross-extension RPC handlers for the subagents extension.
|
|
3
3
|
*
|
|
4
|
-
* Exposes ping, spawn, stop, and
|
|
4
|
+
* Exposes ping, spawn, stop, consume, and steer RPCs over the pi.events event bus,
|
|
5
5
|
* using per-request scoped reply channels.
|
|
6
6
|
*
|
|
7
7
|
* Reply envelope follows pi-mono convention:
|
|
@@ -58,6 +58,11 @@ export interface SpawnCapable {
|
|
|
58
58
|
* one. False when there is no such agent, or it has not settled yet.
|
|
59
59
|
*/
|
|
60
60
|
consumeResult(id: string): boolean
|
|
61
|
+
/**
|
|
62
|
+
* Deliver a message to a running or queued agent's conversation — what
|
|
63
|
+
* `steer_subagent` does. False when the agent is unknown or has settled.
|
|
64
|
+
*/
|
|
65
|
+
steer(id: string, message: string): boolean
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
export interface RpcDeps {
|
|
@@ -72,6 +77,7 @@ export interface RpcHandle {
|
|
|
72
77
|
unsubSpawn: () => void
|
|
73
78
|
unsubStop: () => void
|
|
74
79
|
unsubConsume: () => void
|
|
80
|
+
unsubSteer: () => void
|
|
75
81
|
}
|
|
76
82
|
|
|
77
83
|
/**
|
|
@@ -100,7 +106,7 @@ function handleRpc<P extends { requestId: string }>(
|
|
|
100
106
|
}
|
|
101
107
|
|
|
102
108
|
/**
|
|
103
|
-
* Register ping, spawn, stop, and
|
|
109
|
+
* Register ping, spawn, stop, consume, and steer RPC handlers on the event bus.
|
|
104
110
|
* Returns unsub functions for cleanup.
|
|
105
111
|
*/
|
|
106
112
|
export function registerRpcHandlers(deps: RpcDeps): RpcHandle {
|
|
@@ -184,21 +190,25 @@ export function registerRpcHandlers(deps: RpcDeps): RpcHandle {
|
|
|
184
190
|
return { id }
|
|
185
191
|
})
|
|
186
192
|
|
|
193
|
+
// Only the session's own agents are this RPC's to stop or steer. A nested
|
|
194
|
+
// child or a workflow's agent is owned by something that is *waiting on it*,
|
|
195
|
+
// and aborting or redirecting it out from under that owner turns another
|
|
196
|
+
// extension's request into a failed step here. Defence in depth rather than
|
|
197
|
+
// a live hole: no RPC hands out agent ids, so a caller has no ordinary way to
|
|
198
|
+
// name one it does not own — but the guard is cheap and the id may leak some
|
|
199
|
+
// other way. Same refuse-what-we-should-not-touch stance as `consume` below.
|
|
200
|
+
const assertOwned = (agentId: string): void => {
|
|
201
|
+
const record = manager.getRecord(agentId)
|
|
202
|
+
if (!record) throw new Error("Agent not found")
|
|
203
|
+
if (!isTopLevelAgent(record))
|
|
204
|
+
throw new Error("Agent is owned by another agent or workflow")
|
|
205
|
+
}
|
|
206
|
+
|
|
187
207
|
const unsubStop = handleRpc<{ requestId: string; agentId: string }>(
|
|
188
208
|
events,
|
|
189
209
|
"subagents:rpc:stop",
|
|
190
210
|
({ agentId }) => {
|
|
191
|
-
|
|
192
|
-
if (!record) throw new Error("Agent not found")
|
|
193
|
-
// Only the session's own agents are this RPC's to stop. A nested child or
|
|
194
|
-
// a workflow's agent is owned by something that is *waiting on it*, and
|
|
195
|
-
// aborting it out from under that owner turns another extension's stop
|
|
196
|
-
// into a failed step here. Defence in depth rather than a live hole: no
|
|
197
|
-
// RPC hands out agent ids, so a caller has no ordinary way to name one it
|
|
198
|
-
// does not own — but the guard is cheap and the id may leak some other
|
|
199
|
-
// way. Same refuse-what-we-should-not-touch stance as `consume` below.
|
|
200
|
-
if (!isTopLevelAgent(record))
|
|
201
|
-
throw new Error("Agent is owned by another agent or workflow")
|
|
211
|
+
assertOwned(agentId)
|
|
202
212
|
// Not "not found" — the lookup above already proved it exists. `abort`
|
|
203
213
|
// returns false only for a record that is neither running nor queued,
|
|
204
214
|
// which is an agent that has already finished.
|
|
@@ -220,5 +230,22 @@ export function registerRpcHandlers(deps: RpcDeps): RpcHandle {
|
|
|
220
230
|
},
|
|
221
231
|
)
|
|
222
232
|
|
|
223
|
-
|
|
233
|
+
// An extension that spawned an agent over the bus and then learns something
|
|
234
|
+
// that agent needs — a second CI failure on the head it is already fixing, a
|
|
235
|
+
// review that landed mid-run — can hand it over instead of spawning a second
|
|
236
|
+
// agent for the same work or dropping the fact. Outside the ping version
|
|
237
|
+
// handshake, like consume: additive and best-effort.
|
|
238
|
+
const unsubSteer = handleRpc<{
|
|
239
|
+
requestId: string
|
|
240
|
+
agentId: string
|
|
241
|
+
message: unknown
|
|
242
|
+
}>(events, "subagents:rpc:steer", ({ agentId, message }) => {
|
|
243
|
+
if (typeof message !== "string" || message.trim().length === 0)
|
|
244
|
+
throw new Error("Steer message must be a non-empty string")
|
|
245
|
+
assertOwned(agentId)
|
|
246
|
+
if (!manager.steer(agentId, message))
|
|
247
|
+
throw new Error("Agent is not running")
|
|
248
|
+
})
|
|
249
|
+
|
|
250
|
+
return { unsubPing, unsubSpawn, unsubStop, unsubConsume, unsubSteer }
|
|
224
251
|
}
|
|
@@ -965,12 +965,59 @@ export default function (pi: ExtensionAPI) {
|
|
|
965
965
|
compactionCount: record.compactionCount,
|
|
966
966
|
})
|
|
967
967
|
},
|
|
968
|
-
(
|
|
968
|
+
(record, usage) => {
|
|
969
969
|
// Every assistant message from every agent — nested included, exactly once.
|
|
970
970
|
// Parked here until a tool result can carry it back to the parent session;
|
|
971
971
|
// see `PendingUsagePool`. Skipped entirely when the feature is off, so no
|
|
972
972
|
// pool grows in a session that will never drain it.
|
|
973
973
|
if (reportUsage) pendingUsage.add(usage)
|
|
974
|
+
// The same message, live, for anyone keeping their own ledger — a footer
|
|
975
|
+
// that breaks spend down by agent type and thinking level, say. This is the
|
|
976
|
+
// one place every agent's spend passes through, which is why it is emitted
|
|
977
|
+
// here and not from the lifecycle events: those fire for top-level agents
|
|
978
|
+
// only, once, at the end, so a workflow's children and nested agents would
|
|
979
|
+
// never be counted, and a running agent would read as free until it
|
|
980
|
+
// stopped. Deliberately ungated by `reportUsage` — that decides whether the
|
|
981
|
+
// parent session's own totals include this spend, not whether it happened.
|
|
982
|
+
//
|
|
983
|
+
// `model` and `thinking` are read off the record per message, not captured
|
|
984
|
+
// at spawn: the record is authoritative only once the session exists and pi
|
|
985
|
+
// has clamped the level to the model (see `onSessionCreated`).
|
|
986
|
+
const reported = toReportedUsage(usage)
|
|
987
|
+
if (!reported) return
|
|
988
|
+
// A key whose value is unknown is omitted, never `undefined`: `model` and
|
|
989
|
+
// `thinking` until the session has reported them, `parentAgentId` and
|
|
990
|
+
// `workflowId` on a top-level agent.
|
|
991
|
+
const invocation = record.invocation
|
|
992
|
+
pi.events.emit("subagents:usage", {
|
|
993
|
+
id: record.id,
|
|
994
|
+
type: record.type,
|
|
995
|
+
description: record.description,
|
|
996
|
+
...(invocation?.modelId !== undefined
|
|
997
|
+
? { model: invocation.modelId }
|
|
998
|
+
: {}),
|
|
999
|
+
...(invocation?.thinking !== undefined
|
|
1000
|
+
? { thinking: invocation.thinking }
|
|
1001
|
+
: {}),
|
|
1002
|
+
// Set only when the caller did not get the level it asked for (pi
|
|
1003
|
+
// clamped it to the model, or an agent file outranked it), so a ledger
|
|
1004
|
+
// can show `low (asked minimal)` instead of silently relabelling.
|
|
1005
|
+
...(invocation?.requestedThinking !== undefined
|
|
1006
|
+
? { requestedThinking: invocation.requestedThinking }
|
|
1007
|
+
: {}),
|
|
1008
|
+
depth: record.depth ?? 1,
|
|
1009
|
+
...(record.parentAgentId !== undefined
|
|
1010
|
+
? { parentAgentId: record.parentAgentId }
|
|
1011
|
+
: {}),
|
|
1012
|
+
...(record.workflowId !== undefined
|
|
1013
|
+
? { workflowId: record.workflowId }
|
|
1014
|
+
: {}),
|
|
1015
|
+
usage: reported,
|
|
1016
|
+
})
|
|
1017
|
+
},
|
|
1018
|
+
(record, message) => {
|
|
1019
|
+
if (!isTopLevelAgent(record)) return
|
|
1020
|
+
pi.events.emit("subagents:steered", { id: record.id, message })
|
|
974
1021
|
},
|
|
975
1022
|
)
|
|
976
1023
|
|
|
@@ -1180,6 +1227,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1180
1227
|
outbox.cancel(record.id)
|
|
1181
1228
|
return true
|
|
1182
1229
|
},
|
|
1230
|
+
steer: (id, message) => manager.steer(id, message),
|
|
1183
1231
|
},
|
|
1184
1232
|
})
|
|
1185
1233
|
// Broadcast readiness so extensions loaded alongside us can discover us.
|
|
@@ -1295,10 +1343,6 @@ export default function (pi: ExtensionAPI) {
|
|
|
1295
1343
|
// this message is still relayed even if the LLM read its last answer.
|
|
1296
1344
|
record.resultConsumed = false
|
|
1297
1345
|
manager.steer(record.id, mention.message)
|
|
1298
|
-
pi.events.emit("subagents:steered", {
|
|
1299
|
-
id: record.id,
|
|
1300
|
-
message: mention.message,
|
|
1301
|
-
})
|
|
1302
1346
|
ctx.ui.notify(`Sent to ${target}`, "info")
|
|
1303
1347
|
return { action: "handled" }
|
|
1304
1348
|
}
|
|
@@ -1308,17 +1352,15 @@ export default function (pi: ExtensionAPI) {
|
|
|
1308
1352
|
// agent, so its frontmatter is what governs — `output_transcript: false`
|
|
1309
1353
|
// must keep holding, since record.outputFile is the sole gate every
|
|
1310
1354
|
// downstream consumer keys off and a resume must not re-open it.
|
|
1311
|
-
const config = getAgentConfig(record.type)
|
|
1312
1355
|
const resumedRecord = await startBackgroundResume(
|
|
1313
1356
|
ctx,
|
|
1314
1357
|
record,
|
|
1315
1358
|
mention.message,
|
|
1316
1359
|
{
|
|
1317
1360
|
outputTranscript:
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
),
|
|
1361
|
+
getAgentConfig(record.type)?.outputTranscript ??
|
|
1362
|
+
getOutputTranscriptDefault(),
|
|
1363
|
+
maxTurns: resumeTurnLimit(record),
|
|
1322
1364
|
},
|
|
1323
1365
|
)
|
|
1324
1366
|
ctx.ui.notify(
|
|
@@ -1505,6 +1547,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1505
1547
|
rpcHandle?.unsubStop()
|
|
1506
1548
|
rpcHandle?.unsubPing()
|
|
1507
1549
|
rpcHandle?.unsubConsume()
|
|
1550
|
+
rpcHandle?.unsubSteer()
|
|
1508
1551
|
rpcHandle = undefined
|
|
1509
1552
|
currentCtx = undefined
|
|
1510
1553
|
// Only release the global slot if this activation claimed it — a child
|
|
@@ -1539,6 +1582,13 @@ export default function (pi: ExtensionAPI) {
|
|
|
1539
1582
|
// pi awaits this handler, and the process exits right after — unawaited, those
|
|
1540
1583
|
// handlers would never run. Internally bounded, so a hung one can't strand quit.
|
|
1541
1584
|
await manager.dispose(pi)
|
|
1585
|
+
// Every agent is stopped and every child session has shut down, so no more
|
|
1586
|
+
// `subagents:usage` can arrive. A ledger flushing in its own
|
|
1587
|
+
// `session_shutdown` may have run before this handler aborted the agents
|
|
1588
|
+
// (handlers run in load order) and missed their last messages; this is the
|
|
1589
|
+
// point after which a synchronous final flush is complete. Synchronous:
|
|
1590
|
+
// `emit` does not await listeners, and pi exits once this handler returns.
|
|
1591
|
+
pi.events.emit("subagents:disposed", {})
|
|
1542
1592
|
})
|
|
1543
1593
|
|
|
1544
1594
|
// Live widget: show running agents above editor.
|
|
@@ -1831,6 +1881,24 @@ export default function (pi: ExtensionAPI) {
|
|
|
1831
1881
|
}
|
|
1832
1882
|
}
|
|
1833
1883
|
|
|
1884
|
+
/**
|
|
1885
|
+
* The turn budget for resuming `record`, from its OWN type — resume ignores
|
|
1886
|
+
* `subagent_type`. Same precedence as a spawn, frontmatter authoritative:
|
|
1887
|
+
* the agent file's `max_turns`, else the call's, else the limit the agent
|
|
1888
|
+
* was spawned with, else the default (#368).
|
|
1889
|
+
*/
|
|
1890
|
+
function resumeTurnLimit(
|
|
1891
|
+
record: AgentRecord,
|
|
1892
|
+
explicit?: number,
|
|
1893
|
+
): number | undefined {
|
|
1894
|
+
return normalizeMaxTurns(
|
|
1895
|
+
getAgentConfig(record.type)?.maxTurns ??
|
|
1896
|
+
explicit ??
|
|
1897
|
+
record.invocation?.maxTurns ??
|
|
1898
|
+
getDefaultMaxTurns(),
|
|
1899
|
+
)
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1834
1902
|
/**
|
|
1835
1903
|
* Launch a detached resume of an existing agent and wire everything a
|
|
1836
1904
|
* re-running agent needs: transcript anchoring, activity tracking, join-mode
|
|
@@ -1886,6 +1954,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
1886
1954
|
// run_in_background in that same turn keep going.
|
|
1887
1955
|
const record = await manager.resume(id, prompt, undefined, {
|
|
1888
1956
|
isBackground: true,
|
|
1957
|
+
maxTurns: opts.maxTurns,
|
|
1958
|
+
onTurnEnd: bgCallbacks.onTurnEnd,
|
|
1889
1959
|
onToolActivity: bgCallbacks.onToolActivity,
|
|
1890
1960
|
onAssistantUsage: bgCallbacks.onAssistantUsage,
|
|
1891
1961
|
// Fires when the run actually starts — immediately, or on queue
|
|
@@ -2240,7 +2310,7 @@ Terse command-style prompts produce shallow, generic work.
|
|
|
2240
2310
|
resume: Type.Optional(
|
|
2241
2311
|
Type.String({
|
|
2242
2312
|
description:
|
|
2243
|
-
"Optional agent ID to resume from. Continues from previous context. Resumes detached like any other spawn; pass run_in_background: false to block and get the result inline. An agent can only be resumed once its current run has finished — use steer_subagent to reach one mid-run.",
|
|
2313
|
+
"Optional agent ID to resume from. Continues from previous context. Resumes detached like any other spawn; pass run_in_background: false to block and get the result inline. The resumed run gets a fresh max_turns budget. An agent can only be resumed once its current run has finished — use steer_subagent to reach one mid-run.",
|
|
2244
2314
|
}),
|
|
2245
2315
|
),
|
|
2246
2316
|
isolated: Type.Optional(
|
|
@@ -2692,6 +2762,9 @@ Terse command-style prompts produce shallow, generic work.
|
|
|
2692
2762
|
`Agent "${params.resume}" has no active session to resume.`,
|
|
2693
2763
|
)
|
|
2694
2764
|
}
|
|
2765
|
+
// Not `effectiveMaxTurns`: that was resolved for `subagent_type`, which
|
|
2766
|
+
// a resume ignores, so it may describe another agent.
|
|
2767
|
+
const resumeMaxTurns = resumeTurnLimit(existing, params.max_turns)
|
|
2695
2768
|
|
|
2696
2769
|
// Background resume: detached run that notifies on completion, mirroring
|
|
2697
2770
|
// a background spawn. Previously run_in_background was silently ignored
|
|
@@ -2717,7 +2790,7 @@ Terse command-style prompts produce shallow, generic work.
|
|
|
2717
2790
|
params.prompt,
|
|
2718
2791
|
{
|
|
2719
2792
|
outputTranscript,
|
|
2720
|
-
maxTurns:
|
|
2793
|
+
maxTurns: resumeMaxTurns,
|
|
2721
2794
|
toolCallId,
|
|
2722
2795
|
},
|
|
2723
2796
|
)
|
|
@@ -2747,11 +2820,29 @@ Terse command-style prompts produce shallow, generic work.
|
|
|
2747
2820
|
)
|
|
2748
2821
|
}
|
|
2749
2822
|
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2823
|
+
// Tracked like a foreground spawn, so the widget row and the result
|
|
2824
|
+
// card show THIS run's `↻N≤M` and tool activity rather than the
|
|
2825
|
+
// previous run's. The session predates this run, so it is seeded here.
|
|
2826
|
+
const { state: resumeState, callbacks: resumeCallbacks } =
|
|
2827
|
+
createActivityTracker(resumeMaxTurns)
|
|
2828
|
+
resumeState.session = existing.session
|
|
2829
|
+
agentActivity.set(existing.id, resumeState)
|
|
2830
|
+
widget.markRunning(existing.id)
|
|
2831
|
+
widget.ensureTimer()
|
|
2832
|
+
fleet.ensureTimer()
|
|
2833
|
+
fleet.update()
|
|
2834
|
+
let record: AgentRecord | undefined
|
|
2835
|
+
try {
|
|
2836
|
+
record = await manager.resume(params.resume, params.prompt, signal, {
|
|
2837
|
+
maxTurns: resumeMaxTurns,
|
|
2838
|
+
onTurnEnd: resumeCallbacks.onTurnEnd,
|
|
2839
|
+
onToolActivity: resumeCallbacks.onToolActivity,
|
|
2840
|
+
})
|
|
2841
|
+
} finally {
|
|
2842
|
+
agentActivity.delete(existing.id)
|
|
2843
|
+
widget.markFinished(existing.id)
|
|
2844
|
+
fleet.onAgentFinished(existing.id)
|
|
2845
|
+
}
|
|
2755
2846
|
if (!record) {
|
|
2756
2847
|
return textResult(`Failed to resume agent "${params.resume}".`)
|
|
2757
2848
|
}
|
|
@@ -2760,12 +2851,12 @@ Terse command-style prompts produce shallow, generic work.
|
|
|
2760
2851
|
if (record.status === "error") {
|
|
2761
2852
|
return textResult(
|
|
2762
2853
|
`Agent failed: ${record.error}${partialOutputSuffix(record)}`,
|
|
2763
|
-
buildDetails(detailBaseFor(record), record),
|
|
2854
|
+
buildDetails(detailBaseFor(record), record, resumeState),
|
|
2764
2855
|
)
|
|
2765
2856
|
}
|
|
2766
2857
|
return textResult(
|
|
2767
2858
|
record.result?.trim() || "No output.",
|
|
2768
|
-
buildDetails(detailBaseFor(record), record),
|
|
2859
|
+
buildDetails(detailBaseFor(record), record, resumeState),
|
|
2769
2860
|
)
|
|
2770
2861
|
}
|
|
2771
2862
|
|
|
@@ -112,6 +112,7 @@ export interface NestedAgentManager {
|
|
|
112
112
|
id: string,
|
|
113
113
|
prompt: string,
|
|
114
114
|
signal?: AbortSignal,
|
|
115
|
+
options?: { maxTurns?: number },
|
|
115
116
|
): Promise<AgentRecord | undefined>
|
|
116
117
|
}
|
|
117
118
|
|
|
@@ -242,10 +243,17 @@ export function createNestedSubagentTools(
|
|
|
242
243
|
true,
|
|
243
244
|
)
|
|
244
245
|
}
|
|
246
|
+
// Frontmatter authoritative, as on the spawn path; the manager falls
|
|
247
|
+
// back to the limit the child was spawned with, then the default.
|
|
245
248
|
const resumed = await context.manager.resume(
|
|
246
249
|
params.resume,
|
|
247
250
|
params.prompt,
|
|
248
251
|
signal,
|
|
252
|
+
{
|
|
253
|
+
maxTurns:
|
|
254
|
+
getAgentConfigIn(loadRegistry(), existing.type)?.maxTurns ??
|
|
255
|
+
params.max_turns,
|
|
256
|
+
},
|
|
249
257
|
)
|
|
250
258
|
return resumed
|
|
251
259
|
? textResult(
|
|
@@ -155,6 +155,37 @@ ${envBlock}`
|
|
|
155
155
|
)
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
/**
|
|
159
|
+
* The part of the parent's rendered system prompt that an append-mode child inherits.
|
|
160
|
+
*
|
|
161
|
+
* Pi renders a prompt as the preamble followed by tagged sections in a fixed order:
|
|
162
|
+
* `tools`, `rules`, `docs` (default preamble only), `addendum`, `project_context`,
|
|
163
|
+
* `skills`, `cwd`, then the sections extensions add during a turn. The child session renders its own `skills` (from its `skills:`
|
|
164
|
+
* setting), its own `cwd` and its own extension sections after the inherited text.
|
|
165
|
+
* Inheriting the parent's copies too listed them twice, showed the parent's skills to
|
|
166
|
+
* children configured with `skills: false` or a preload list, and left copies that
|
|
167
|
+
* section-editing extensions in the child cannot reach. It also made the result depend
|
|
168
|
+
* on timing: `getSystemPrompt()` includes the extension sections only while the
|
|
169
|
+
* parent's turn runs.
|
|
170
|
+
*
|
|
171
|
+
* Returns the text before the `skills` section, or before the `cwd` section when there
|
|
172
|
+
* are no skills. A prompt without the `cwd` section (for example, a forced prompt) is
|
|
173
|
+
* returned unchanged.
|
|
174
|
+
*
|
|
175
|
+
* @param rendered The parent's `ctx.getSystemPrompt()`.
|
|
176
|
+
* @param cwd The cwd the parent's prompt was rendered with.
|
|
177
|
+
*/
|
|
178
|
+
export function inheritableParentPrompt(rendered: string, cwd: string): string {
|
|
179
|
+
const cwdAt = rendered.lastIndexOf(
|
|
180
|
+
`\n\n<cwd>\n${cwd.replace(/\\/g, "/")}\n</cwd>`,
|
|
181
|
+
)
|
|
182
|
+
if (cwdAt < 0) return rendered
|
|
183
|
+
const head = rendered.slice(0, cwdAt)
|
|
184
|
+
if (!head.endsWith("\n</skills>")) return head
|
|
185
|
+
const skillsAt = head.lastIndexOf("\n\n<skills>\n")
|
|
186
|
+
return skillsAt < 0 ? head : head.slice(0, skillsAt)
|
|
187
|
+
}
|
|
188
|
+
|
|
158
189
|
/** Fallback base prompt when parent system prompt is unavailable in append mode. */
|
|
159
190
|
const genericBase = `# Role
|
|
160
191
|
You are a general-purpose coding agent for complex, multi-step tasks.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# @herbertgao/sol-pi
|
|
2
|
+
|
|
3
|
+
## 0.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#346](https://github.com/HerbertGao/pi-extensions/pull/346) [`641894f`](https://github.com/HerbertGao/pi-extensions/commit/641894ff5dc34a38ab41905f27a3077cc865ab91) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Document Pi 1.5.0 as the tested host and publish each package changelog so Pi can show Extension Updates after an update. Agency tools and clef keep the same TypeBox schemas, built from typebox because Pi 1.5 no longer re-exports Type. Peer ranges stay open. The BTW fullscreen handoff resolves `@narumitw/pi-tui-kit@0.68.1` inside the existing `^0.68.0` range.
|
|
8
|
+
|
|
9
|
+
## 0.4.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#301](https://github.com/HerbertGao/pi-extensions/pull/301) [`b79b640`](https://github.com/HerbertGao/pi-extensions/commit/b79b640048f3e871db5791cf2e6cb8cbb1a183c7) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Sync upstream Pi 1.x and codemode compatibility fixes: preserve fused edit details on command failures, inherit trusted Pi shell settings, leave nested structured results intact, and preserve system-message positions during observation packing. Correct compaction projection, request accounting, and failure continuation. Keep `update_plan` declared to the model in codemode-only mode and disallow calling it from codemode scripts so completion boundaries remain visible to Online Context Compact.
|
|
14
|
+
|
|
15
|
+
- [#301](https://github.com/HerbertGao/pi-extensions/pull/301) [`b79b640`](https://github.com/HerbertGao/pi-extensions/commit/b79b640048f3e871db5791cf2e6cb8cbb1a183c7) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Allow SoL-Pi initialization to retry on the next session after configuration loading fails. Malformed shell settings still report an error, but repairing them no longer leaves all enabled features permanently unregistered.
|
|
16
|
+
|
|
17
|
+
## 0.4.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#287](https://github.com/HerbertGao/pi-extensions/pull/287) [`3a0deb9`](https://github.com/HerbertGao/pi-extensions/commit/3a0deb96297aa6da94fe40724a3945ef16c34497) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Stop bundling resume-from and lower the Node engines floor to `>=22.19.0`, matching Pi. Node 24 was copied from resume-from's engines field; these packages do not use a Node 24-only API. Pi's bundled Node 22 can install the current release instead of silently selecting an older one.
|
|
22
|
+
|
|
23
|
+
## 0.4.0
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- [#258](https://github.com/HerbertGao/pi-extensions/pull/258) [`4f505b1`](https://github.com/HerbertGao/pi-extensions/commit/4f505b1456c5ea766121ee915f14ad29e48973e7) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Replay the locally customized extensions on the latest upstream code while keeping the scoped packages, host-provided Pi SDK, and local rich-diff and Action Fusion compatibility.
|
|
28
|
+
|
|
29
|
+
- Bring in pi-cc-extensions 0.9.10, including codemode call trees, expanded input highlighting, the persistent expanded-card background setting, and MCP status chips.
|
|
30
|
+
- Bring in the latest SoL-Pi mainline, including projection-based compaction economics, cache-debt accounting, compaction-rejection recovery, and temporary evidence archives for non-persistent sessions.
|
|
31
|
+
- Keep all four SoL-Pi features opt-in. Temporary evidence archives remain on disk for consumers and require cleanup by the host or caller.
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- [#258](https://github.com/HerbertGao/pi-extensions/pull/258) [`4f505b1`](https://github.com/HerbertGao/pi-extensions/commit/4f505b1456c5ea766121ee915f14ad29e48973e7) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Keep ccstyle write rich diffs when Action Fusion owns the write tool. Capture the bounded previous-file metadata inside Pi's mutation queue while retaining fused follow-up commands, file URL paths, and cancellation checks. Expanded edit/write diffs also retain sanitized follow-up command output. Third-party writers without the collaboration hook and custom write operations retain the existing ownership warning and fallback.
|
|
36
|
+
|
|
37
|
+
- [#258](https://github.com/HerbertGao/pi-extensions/pull/258) [`4f505b1`](https://github.com/HerbertGao/pi-extensions/commit/4f505b1456c5ea766121ee915f14ad29e48973e7) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Fix Action Fusion tool context compatibility with Pi 1.x and preserve failed follow-up reporting when Bash returns an error result instead of throwing. Successful file mutations remain intact when the follow-up command fails.
|
|
38
|
+
|
|
39
|
+
## 0.3.4
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- [#248](https://github.com/HerbertGao/pi-extensions/pull/248) [`c14c004`](https://github.com/HerbertGao/pi-extensions/commit/c14c0042a8e02862cd6718dd60e4ffb22314165c) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Use Pi 0.99+'s native MCP implementation instead of registering the removed `pi-mcp-adapter`, declare Pi-hosted packages as wildcard peers, update `@tifan/pi-handoff` to 2.2.2 for its Herdr startup retry fix, and pin `pi-typesafe` to 0.8.0.
|
|
44
|
+
|
|
45
|
+
## 0.3.3
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- [#244](https://github.com/HerbertGao/pi-extensions/pull/244) [`50c30b8`](https://github.com/HerbertGao/pi-extensions/commit/50c30b8bf73246d1d87e77d83232781ea62c4ba2) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Stop reporting "Online context compact continuation did not start" after every online compaction on Pi 0.87, which defers `agent_settled` follow-up turns and awaits them itself.
|
|
50
|
+
|
|
51
|
+
## 0.3.2
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- [#232](https://github.com/HerbertGao/pi-extensions/pull/232) [`9c3c40f`](https://github.com/HerbertGao/pi-extensions/commit/9c3c40f113c62437f76d300042fc59fbf15954c0) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Require the unified Pi 0.87.1 dependency line across published packages.
|
|
56
|
+
|
|
57
|
+
## 0.3.1
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- [#219](https://github.com/HerbertGao/pi-extensions/pull/219) [`6525a59`](https://github.com/HerbertGao/pi-extensions/commit/6525a5995b8bb815517e326f1eef78d25c0a3c5e) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Bundle `pi-multi-account@1.22.0` for automatic multi-account failover and rotation across supported Pi providers. Update the aggregate host to Pi 0.85.1 and widen the maintained child package compatibility ranges.
|
|
62
|
+
|
|
63
|
+
## 0.3.0
|
|
64
|
+
|
|
65
|
+
### Minor Changes
|
|
66
|
+
|
|
67
|
+
- [#200](https://github.com/HerbertGao/pi-extensions/pull/200) [`8b8673c`](https://github.com/HerbertGao/pi-extensions/commit/8b8673c5fc802427ab04419de7e13750f0db6ce2) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Remove the bundled `@czottmann/pi-automode` dependency.
|
|
68
|
+
|
|
69
|
+
Auto mode's enable/disable override lived only in the main session's entry stream, so a subagent session restored no override and fell back to the persisted disk default. Subagents therefore stayed subject to automode interception even after the main session disabled it, and its `permissions.ask` rules hard-blocked inside subagents because `ctx.hasUI` is false there. Removing the companion drops that guardrail entirely instead of propagating a session-scoped toggle across sessions.
|
|
70
|
+
|
|
71
|
+
- Drop `@czottmann/pi-automode` from aggregate dependencies, bundled dependencies, Pi extension entries, and Pi skill entries; remove its pin from `upstreams.json`.
|
|
72
|
+
- Remove the auto-mode real-Pi smoke and the aggregate assertions that verified its bundled manifest, license, extension entry, skills, status key, and `automode_inspect` registration.
|
|
73
|
+
- Restore SoL-Pi Action Fusion to its upstream form by removing the local `automode_inspect` guard, which existed only to defer nested `then_run` authorization to automode. The extension-owned `write` guard is unrelated to automode and is retained.
|
|
74
|
+
- Remove the bundled `examples/pi-footer.json` layout example and its aggregate verification, along with the Auto mode footer status row.
|
|
75
|
+
|
|
76
|
+
## 0.2.0
|
|
77
|
+
|
|
78
|
+
### Minor Changes
|
|
79
|
+
|
|
80
|
+
- [#164](https://github.com/HerbertGao/pi-extensions/pull/164) [`52558be`](https://github.com/HerbertGao/pi-extensions/commit/52558be6f06659cb9354b8d80a1e9321c35acbcb) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Import the MIT-licensed NVlabs/SoL-Pi efficiency mechanisms as a maintained package with upstream provenance, with guards for extension-owned writes, pi-automode, and active subagents.
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- [#177](https://github.com/HerbertGao/pi-extensions/pull/177) [`ceeece0`](https://github.com/HerbertGao/pi-extensions/commit/ceeece0b2db2ff962eec513a0b7f766471743057) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Sync the SoL-Pi Action Fusion file-URL resolution fix and its regression coverage from NVlabs/SoL-Pi.
|
|
@@ -69,14 +69,14 @@ Read our paper: [SoL-Pi: Recursively Scaling Auto-Research Loops for Efficient A
|
|
|
69
69
|
|
|
70
70
|
- Node.js 22.19.0 or newer
|
|
71
71
|
- npm
|
|
72
|
-
- `@earendil-works/pi-coding-agent` 1.
|
|
72
|
+
- `@earendil-works/pi-coding-agent` 1.5.0 (the monorepo's tested host; runtime peers remain `*`)
|
|
73
73
|
|
|
74
74
|
### Install
|
|
75
75
|
|
|
76
76
|
Install the tested Pi release:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
npm install --global @earendil-works/pi-coding-agent@1.
|
|
79
|
+
npm install --global @earendil-works/pi-coding-agent@1.5.0
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
Install this independently maintained package, or use `@herbertgao/pi-extensions` for the collection:
|
|
@@ -155,7 +155,7 @@ bun audit
|
|
|
155
155
|
node packages/sol-pi/scripts/check-pi-compat.mjs
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
-
For package-only checks, run `bun run --cwd packages/sol-pi typecheck` and `bun run --cwd packages/sol-pi test`, then inspect the package with `npm pack --dry-run` from `packages/sol-pi`. Root development dependencies provide Pi 1.
|
|
158
|
+
For package-only checks, run `bun run --cwd packages/sol-pi typecheck` and `bun run --cwd packages/sol-pi test`, then inspect the package with `npm pack --dry-run` from `packages/sol-pi`. Root development dependencies provide Pi 1.5.0; runtime Pi packages remain peer dependencies so Pi owns their installation and upgrades.
|
|
159
159
|
|
|
160
160
|
## Project Status
|
|
161
161
|
|
|
@@ -8,10 +8,10 @@ The following packages are supplied by the user's Pi installation and retain the
|
|
|
8
8
|
|
|
9
9
|
| Package | Development-tested version | License | Source |
|
|
10
10
|
| --- | ---: | --- | --- |
|
|
11
|
-
| `@earendil-works/pi-agent-core` | 1.
|
|
12
|
-
| `@earendil-works/pi-ai` | 1.
|
|
13
|
-
| `@earendil-works/pi-coding-agent` | 1.
|
|
14
|
-
| `@earendil-works/pi-tui` | 1.
|
|
11
|
+
| `@earendil-works/pi-agent-core` | 1.5.0 | MIT | <https://github.com/earendil-works/pi> |
|
|
12
|
+
| `@earendil-works/pi-ai` | 1.5.0 | MIT | <https://github.com/earendil-works/pi> |
|
|
13
|
+
| `@earendil-works/pi-coding-agent` | 1.5.0 | MIT | <https://github.com/earendil-works/pi> |
|
|
14
|
+
| `@earendil-works/pi-tui` | 1.5.0 | MIT | <https://github.com/earendil-works/pi> |
|
|
15
15
|
| `typebox` | 1.3.7 | MIT | <https://github.com/sinclairzx81/typebox> |
|
|
16
16
|
|
|
17
17
|
## Development-only dependencies
|
|
@@ -7,7 +7,7 @@ Installation and configuration are complete only when Pi remains unmodified, the
|
|
|
7
7
|
## Rules
|
|
8
8
|
|
|
9
9
|
- Do not modify, patch, fork, or vendor upstream Pi. SoL-Pi must load as a standalone extension through Pi's public package interface.
|
|
10
|
-
- Use Node.js 22.19.0 or newer and the tested Pi release `@earendil-works/pi-coding-agent@1.
|
|
10
|
+
- Use Node.js 22.19.0 or newer and the tested Pi release `@earendil-works/pi-coding-agent@1.5.0`. Treat a different Pi version as a compatibility change and rerun the full suite before using it.
|
|
11
11
|
- Do not clean, reset, switch, or overwrite unrelated repository changes.
|
|
12
12
|
- Do not print, log, commit, upload, or include any secret in a command line. Check only whether a credential is present.
|
|
13
13
|
- Keep SoL-Pi settings in `sol-pi.json`. The Evidence-Preserving Reducer provider/model route is a SoL-Pi setting; provider URLs, credentials, the main agent model, and shell behavior remain Pi settings.
|
|
@@ -57,11 +57,11 @@ Stop if any command fails. Do not hide a failure with `|| true` or replace the f
|
|
|
57
57
|
Install the tested Pi release without changing its source:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
npm install --global --ignore-scripts @earendil-works/pi-coding-agent@1.
|
|
60
|
+
npm install --global --ignore-scripts @earendil-works/pi-coding-agent@1.5.0
|
|
61
61
|
pi --version
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
Require `pi --version` to report `1.
|
|
64
|
+
Require `pi --version` to report `1.5.0`. Runtime peer ranges remain `*`; other hosts need their own validation.
|
|
65
65
|
|
|
66
66
|
For a project-local registration, run this from `target_project` and substitute the resolved absolute `sol_pi_root`:
|
|
67
67
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pi Compatibility
|
|
2
2
|
|
|
3
|
-
This monorepo tests `@herbertgao/sol-pi` against the root development host Pi 1.
|
|
3
|
+
This monorepo tests `@herbertgao/sol-pi` against the root development host Pi 1.5.0. Pi runtime peers remain `*`, so Pi owns installation and upgrades; that range is not a guarantee for every host. Upstream reports a 19-file/140-test suite and offline startup passing on 0.85.1 and 0.84.2, with earlier public-API checks on the 0.81.1 fork. Those are historical upstream results, not results for the locally adapted package. Its tests use Pi 1.x `ExtensionToolContext` for tool execution.
|
|
4
4
|
|
|
5
5
|
SoL-Pi imports only public package exports:
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herbertgao/sol-pi",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Token-efficient context and tool extensions for Pi, maintained from NVlabs/SoL-Pi.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"scripts/check-sol-pi-config.mjs",
|
|
33
33
|
"agents-install.md",
|
|
34
34
|
"README.md",
|
|
35
|
+
"CHANGELOG.md",
|
|
35
36
|
"LICENSE",
|
|
36
37
|
"CONTRIBUTING.md",
|
|
37
38
|
"SECURITY.md",
|