@herbertgao/pi-extensions 2026.10.19 → 2026.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -4
- package/THIRD_PARTY_NOTICES.md +53 -2
- 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/@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 +370 -11
- package/node_modules/pi-provider-qoder/package.json +5 -2
- package/package.json +11 -8
- 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
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
# @tintinweb/pi-tasks
|
|
2
|
+
|
|
3
|
+
A [pi](https://pi.dev) extension that brings **Claude Code-style task tracking and coordination** to pi. Track multi-step work with structured tasks, dependency management, and a persistent visual widget.
|
|
4
|
+
|
|
5
|
+
> **Status:** Early release.
|
|
6
|
+
|
|
7
|
+
<img width="600" alt="pi-tasks screenshot" src="https://github.com/tintinweb/pi-tasks/raw/master/media/screenshot.png" />
|
|
8
|
+
|
|
9
|
+
https://github.com/user-attachments/assets/1d0ee87a-e0a5-4bfa-a9b9-2f9144cb905b
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **7 LLM-callable tools** — `TaskCreate`, `TaskList`, `TaskGet`, `TaskUpdate`, `TaskOutput`, `TaskStop`, `TaskExecute` — matching Claude Code's exact tool specs and descriptions
|
|
16
|
+
- **Persistent widget** — live task list above the editor with `✔`/`◼`/`◻` status marks, task numbers (`#1`, `#2`, …), strikethrough for completed tasks, star spinner (`✳✽`) for active tasks with elapsed time and token counts. Every glyph is [configurable](CUSTOMIZING.md#task-glyphs)
|
|
17
|
+
- **System-reminder injection** — periodic `<system-reminder>` nudges injected into the upcoming LLM request (via the `context` hook, transient and never persisted) when task tools haven't been used recently, or when a task is left stuck `in_progress` after a text-only turn. Shaped after Claude Code's todo reminders — an empty-list nudge or a JSON echo of the current list (capped at 10 tasks)
|
|
18
|
+
- **Prompt guidelines** — workflow contract encoded in tool descriptions, nudging the LLM at the point of tool use
|
|
19
|
+
- **Dependency management** — bidirectional `blocks`/`blockedBy` relationships with warnings for cycles, self-deps, dangling references, and status changes that bypass open blockers
|
|
20
|
+
- **Shared task lists** — multiple pi sessions can share a file-backed task list for agent team coordination
|
|
21
|
+
- **File locking** — concurrent access is safe when multiple sessions share a task list
|
|
22
|
+
- **Background process tracking** — track spawned processes with output buffering, blocking wait, and graceful stop
|
|
23
|
+
- **Subagent integration** — tasks with `agentType` can be executed as subagents via `TaskExecute` (requires [@tintinweb/pi-subagents](https://github.com/tintinweb/pi-subagents)). Auto-cascade mode flows through the task DAG automatically when enabled.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pi install npm:@tintinweb/pi-tasks
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or load directly for development:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pi -e ./src/index.ts
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Widget
|
|
38
|
+
|
|
39
|
+
The extension renders a persistent widget above the editor:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
● 4 tasks (1 done, 1 in progress, 2 open)
|
|
43
|
+
✔ #1 Design the flux capacitor
|
|
44
|
+
✳ #2 Acquiring plutonium… (2m 49s · ↑ 4.1k ↓ 1.2k)
|
|
45
|
+
◻ #3 Install flux capacitor in DeLorean › blocked by #1
|
|
46
|
+
◻ #4 Test time travel at 88 mph › blocked by #2, #3
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
| Glyph | Meaning |
|
|
50
|
+
|------|---------|
|
|
51
|
+
| `✔` | Completed (strikethrough + dim) |
|
|
52
|
+
| `◼` | In-progress (not actively executing) |
|
|
53
|
+
| `◻` | Pending |
|
|
54
|
+
| `✳`/`✽` | Animated star spinner — actively executing task (shows `activeForm` text, elapsed time, token counts) |
|
|
55
|
+
|
|
56
|
+
### Widget display settings
|
|
57
|
+
|
|
58
|
+
How tasks are sorted and how many are shown can be configured via `/tasks` → Settings (saved as project overrides in `.pi/tasks-config.json`), except `glyphs`, which is set in the config file directly. All defaults preserve the original behaviour.
|
|
59
|
+
|
|
60
|
+
> **[→ Customizing the task widget](CUSTOMIZING.md)** — the full guide: global vs. project config, sort presets, writing your own sort order, and recipes.
|
|
61
|
+
|
|
62
|
+
| Setting | Values | Default | Behaviour |
|
|
63
|
+
|---------|--------|---------|-----------|
|
|
64
|
+
| `sortOrder` | `id` / `status` / `active` / `recent` / `oldest`, or a [sort spec](CUSTOMIZING.md#writing-your-own-sort-order) | `id` | `id` = creation order; `status` groups completed → in-progress → pending; `active` is the reverse grouping (in-progress → pending → completed); `recent`/`oldest` = by last-updated time |
|
|
65
|
+
| `collapseCompleted` | `true` / `false` | `false` | When `true`, completed tasks are replaced by a single `✔ N completed` line at the bottom |
|
|
66
|
+
| `maxVisible` | `5`–`100` | `10` | Caps how many task lines the widget shows (ignored when `showAll` is on) |
|
|
67
|
+
| `showAll` | `true` / `false` | `false` | When `true`, every listed task is shown regardless of `maxVisible` |
|
|
68
|
+
| `hiddenAt` | `bottom` / `top` | `bottom` | When the list overflows `maxVisible`, where the `… and N more` collapse happens. `top` pairs well with `sortOrder: status` to keep active work visible and fold completed tasks away |
|
|
69
|
+
| `glyphs` | a [glyph set](CUSTOMIZING.md#task-glyphs) | `✔` / `◼` / `◻` + star spinner | Every character the widget is drawn with — status marks, spinner frames, header bullet, overflow and truncation markers, token arrows. Config file only |
|
|
70
|
+
|
|
71
|
+
> Note: the widget's `status` order is completed-first (so finished work collapses at the top with `hiddenAt: top`), which is the reverse of the `TaskList` tool's pending-first order. Use `active` for pending-first.
|
|
72
|
+
|
|
73
|
+
`collapseCompleted` and the visible limit are independent: collapsing decides what goes in the list, and `maxVisible` / `showAll` / `hiddenAt` then apply to whatever remains.
|
|
74
|
+
|
|
75
|
+
For an order the presets don't cover, `sortOrder` also accepts a **sort spec** — an ordered list of comparison keys, written into `tasks-config.json`:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"sortOrder": [
|
|
80
|
+
{ "field": "status", "rank": ["in_progress", "pending", "completed"] },
|
|
81
|
+
{ "field": "id" }
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
See [Writing your own sort order](CUSTOMIZING.md#writing-your-own-sort-order) for the full key reference and recipes.
|
|
87
|
+
|
|
88
|
+
> Configuration is data, never code. There is deliberately no executable config file, so nothing in a cloned repository's `.pi/` can run on your machine.
|
|
89
|
+
|
|
90
|
+
## Tools
|
|
91
|
+
|
|
92
|
+
### `TaskCreate`
|
|
93
|
+
|
|
94
|
+
Create a structured task. Used proactively for complex multi-step work.
|
|
95
|
+
|
|
96
|
+
| Parameter | Type | Required | Description |
|
|
97
|
+
|-----------|------|----------|-------------|
|
|
98
|
+
| `subject` | string | yes | Brief imperative title |
|
|
99
|
+
| `description` | string | yes | Detailed context and acceptance criteria |
|
|
100
|
+
| `activeForm` | string | no | Present continuous form for spinner (e.g., "Running tests") |
|
|
101
|
+
| `agentType` | string | no | Agent type for subagent execution (e.g., `"general-purpose"`, `"Explore"`) |
|
|
102
|
+
| `metadata` | object | no | Arbitrary key-value pairs |
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
→ Task #1 created successfully: Fix authentication bug
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `TaskList`
|
|
109
|
+
|
|
110
|
+
List all tasks with status, owner, and blocked-by info.
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
#1 [pending] Fix authentication bug
|
|
114
|
+
#2 [in_progress] Write unit tests (agent-1)
|
|
115
|
+
#3 [pending] Update docs [blocked by #1, #2]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Sort order: pending first, then in-progress, then completed (each group by ID).
|
|
119
|
+
|
|
120
|
+
### `TaskGet`
|
|
121
|
+
|
|
122
|
+
Get full details for a specific task.
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Task #2: Write unit tests
|
|
126
|
+
Status: in_progress
|
|
127
|
+
Owner: agent-1
|
|
128
|
+
Description: Add tests for the auth module
|
|
129
|
+
Blocked by: #1
|
|
130
|
+
Blocks: #3
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Shows owner (if set) and open (non-completed) dependency edges. Non-empty metadata is displayed as JSON.
|
|
134
|
+
|
|
135
|
+
### `TaskUpdate`
|
|
136
|
+
|
|
137
|
+
Update task fields, status, metadata, and dependencies.
|
|
138
|
+
|
|
139
|
+
| Parameter | Type | Description |
|
|
140
|
+
|-----------|------|-------------|
|
|
141
|
+
| `taskId` | string | Task ID (required) |
|
|
142
|
+
| `status` | `pending` / `in_progress` / `completed` / `deleted` | New status |
|
|
143
|
+
| `subject` | string | New title |
|
|
144
|
+
| `description` | string | New description |
|
|
145
|
+
| `activeForm` | string | Spinner text |
|
|
146
|
+
| `owner` | string | Agent name |
|
|
147
|
+
| `metadata` | object | Shallow merge (null values delete keys) |
|
|
148
|
+
| `addBlocks` | string[] | Task IDs this task blocks |
|
|
149
|
+
| `addBlockedBy` | string[] | Task IDs that block this task |
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
→ Updated task #1 status
|
|
153
|
+
→ Updated task #2 owner, status
|
|
154
|
+
→ Updated task #3 blocks
|
|
155
|
+
→ Updated task #3 blocks (warning: cycle: #3 and #1 block each other)
|
|
156
|
+
→ Updated task #1 deleted
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Setting `status: "deleted"` permanently removes the task.
|
|
160
|
+
|
|
161
|
+
Dependencies are bidirectional: `addBlocks: ["3"]` on task 1 also adds `blockedBy: ["1"]` to task 3.
|
|
162
|
+
|
|
163
|
+
### `TaskOutput`
|
|
164
|
+
|
|
165
|
+
Retrieve output from a background task process.
|
|
166
|
+
|
|
167
|
+
| Parameter | Type | Default | Description |
|
|
168
|
+
|-----------|------|---------|-------------|
|
|
169
|
+
| `task_id` | string | — | Task ID or agent ID (required) |
|
|
170
|
+
| `block` | boolean | `true` | Wait for completion |
|
|
171
|
+
| `timeout` | number | `30000` | Max wait time in ms (max 600000) |
|
|
172
|
+
|
|
173
|
+
Both task IDs and agent IDs (including partial prefixes) are accepted — agent IDs are resolved via the internal `agentTaskMap`.
|
|
174
|
+
|
|
175
|
+
For a subagent task that has finished, the tool returns the agent's stored result (or its error) under the status line, so joining a task and reading what it produced is one call. Doing so also [consumes the result](#joining-a-subagent).
|
|
176
|
+
|
|
177
|
+
### `TaskStop`
|
|
178
|
+
|
|
179
|
+
Stop a running background task process. Sends SIGTERM, waits 5 seconds, then SIGKILL. For subagent tasks, sends a stop RPC and reports whether the stop was confirmed (`Task #N stopped`) or not (`stop requested — not confirmed`); the task is marked `completed` either way, and a later lifecycle event from the agent still settles its real outcome.
|
|
180
|
+
|
|
181
|
+
| Parameter | Type | Description |
|
|
182
|
+
|-----------|------|-------------|
|
|
183
|
+
| `task_id` | string | Task ID or agent ID to stop |
|
|
184
|
+
|
|
185
|
+
### `TaskExecute`
|
|
186
|
+
|
|
187
|
+
Execute one or more tasks as background subagents. Requires [@tintinweb/pi-subagents](https://github.com/tintinweb/pi-subagents).
|
|
188
|
+
|
|
189
|
+
| Parameter | Type | Description |
|
|
190
|
+
|-----------|------|-------------|
|
|
191
|
+
| `task_ids` | string[] | Task IDs to execute (required) |
|
|
192
|
+
| `additional_context` | string | Extra context appended to each agent's prompt |
|
|
193
|
+
| `model` | string | Model override (e.g., `"sonnet"`, `"haiku"`) |
|
|
194
|
+
| `max_turns` | number | Max turns per agent |
|
|
195
|
+
|
|
196
|
+
Tasks must be `pending`, have `agentType` set, and all `blockedBy` dependencies `completed`. Each task spawns as an independent background subagent.
|
|
197
|
+
|
|
198
|
+
With **auto-cascade** enabled (via `/tasks` → Settings), completed tasks automatically trigger execution of their unblocked dependents — flowing through the DAG like a build system. Each cascaded agent receives its prerequisites' stored results in the prompt, so it can build directly on what came before without re-fetching.
|
|
199
|
+
|
|
200
|
+
## Task Lifecycle
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
pending → in_progress → completed
|
|
204
|
+
→ deleted (permanently removed)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Tasks are created as `pending`. Mark `in_progress` before starting work, `completed` when done. `deleted` removes entirely — IDs never reset.
|
|
208
|
+
|
|
209
|
+
## Dependency Management
|
|
210
|
+
|
|
211
|
+
- **Bidirectional edges:** `addBlocks`/`addBlockedBy` maintain both sides automatically
|
|
212
|
+
- **Dependency warnings:** cycles, self-dependencies, and references to non-existent tasks are stored but produce warnings in the tool response. So does `TaskUpdate` moving a task to `in_progress` or `completed` while a blocker is unfinished — `TaskExecute` refuses that, `TaskUpdate` applies it and warns
|
|
213
|
+
- **Display-time filtering:** `TaskList` only shows non-completed blockers in `[blocked by ...]`
|
|
214
|
+
- **Raw data preserved:** `TaskGet` shows ALL edges, including completed blockers
|
|
215
|
+
- **Cleanup on deletion:** removing a task cleans up all edges pointing to it
|
|
216
|
+
|
|
217
|
+
## Task Storage
|
|
218
|
+
|
|
219
|
+
Task storage is controlled by the `taskScope` setting (`/tasks` → Settings → Task storage):
|
|
220
|
+
|
|
221
|
+
| Mode | File | Behaviour |
|
|
222
|
+
|------|------|-----------|
|
|
223
|
+
| `memory` | *(none)* | In-memory only — tasks lost when session ends |
|
|
224
|
+
| `session` **(default)** | `<workspace>/.pi/tasks/tasks-<sessionId>.json` | Per-session file — isolated between sessions, survives resume |
|
|
225
|
+
| `session-global` | `<agent-dir>/tasks/sessions/<project-key>/tasks-<sessionId>.json` | The same, kept outside the workspace so repositories stay clean |
|
|
226
|
+
| `project` | `<workspace>/.pi/tasks/tasks.json` | Shared across all sessions in the project |
|
|
227
|
+
|
|
228
|
+
`<workspace>` is the directory pi reports for the session — the same one its file tools operate in. That is normally where you started pi; it differs only when a session is opened by an explicit path from another project, or when a host serves sessions from elsewhere.
|
|
229
|
+
|
|
230
|
+
`session-global` exists because a per-session file keyed by a session ID is runtime state, not project content: it means nothing to anyone else who clones the repository, and it costs a `.gitignore` rule per project. `<agent-dir>` is `~/.pi/agent` unless pi is configured otherwise, the same directory the [global settings](#global-defaults) live in. `<project-key>` encodes the workspace path the way pi encodes it for its own session logs (`/Users/me/work/repo` → `--Users-me-work-repo--`), so a project's task files sit under the same name as its transcripts and same-ID sessions in different workspaces cannot collide.
|
|
231
|
+
|
|
232
|
+
Under either session scope, tasks stay in memory whenever pi is not persisting the session (`pi --no-session`) — there is no session for the file to belong to, so none is written. `project` scope still writes its shared list, since that belongs to the project rather than the session.
|
|
233
|
+
|
|
234
|
+
Switching to `session-global` never moves or deletes anything. It changes where *new* session files are created; a session that already has a file in `<workspace>/.pi/tasks/` keeps using it, so resuming that session still finds its tasks and switching back to `session` strands nothing. To empty an existing `.pi/tasks/`, clear those sessions' tasks as usual — the file is removed once its list is empty.
|
|
235
|
+
|
|
236
|
+
Picking `session-global` from `/tasks` → Settings saves it as a *project* override in `<workspace>/.pi/tasks-config.json`, so that repository still gets a `.pi/` — holding config rather than task data. To apply it everywhere and leave repositories alone, set it once as a [global default](#global-defaults) instead:
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"taskScope": "session-global"
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
On new session start, if all persisted tasks are completed they are auto-cleared for a clean slate. On session resume, all tasks (including completed) are shown so the user can review progress. Empty session files are automatically deleted when all tasks are cleared.
|
|
245
|
+
|
|
246
|
+
### Auto-clear completed tasks
|
|
247
|
+
|
|
248
|
+
The `autoClearCompleted` setting controls automatic cleanup of completed tasks:
|
|
249
|
+
|
|
250
|
+
| Mode | Behaviour |
|
|
251
|
+
|------|-----------|
|
|
252
|
+
| `never` | Completed tasks stay visible until manually cleared via `/tasks` → Clear completed |
|
|
253
|
+
| `on_list_complete` **(default)** | Cleared once all tasks are done and a few idle turns pass |
|
|
254
|
+
| `on_task_complete` | Each completed task cleared individually after a few turns |
|
|
255
|
+
|
|
256
|
+
Both auto-clear modes use a turn-based delay for non-jarring UX — tasks linger briefly so you see the completion before they disappear.
|
|
257
|
+
|
|
258
|
+
In either mode, a list with nothing left to do is also retired when a *later* batch of work begins, however long it has been sitting there. The turn delay only runs while the conversation does, so a list completed just before the agent stopped would otherwise still be on screen when the next task arrived, and that task would join it. The finished list stays visible while you read it and through any follow-up question, and goes when the agent starts new work. Tasks the agent adds to a list it is still working through are unaffected, and task IDs stay monotonic and are never reused.
|
|
259
|
+
|
|
260
|
+
Settings (`taskScope`, `autoCascade`, `autoClearCompleted`, plus the [widget display settings](#widget-display-settings) `sortOrder` / `collapseCompleted` / `maxVisible` / `showAll` / `hiddenAt`) changed through `/tasks` are saved as project overrides in `<workspace>/.pi/tasks-config.json`. `glyphs` is config-file only — see [CUSTOMIZING.md](CUSTOMIZING.md#task-glyphs).
|
|
261
|
+
|
|
262
|
+
### Global defaults
|
|
263
|
+
|
|
264
|
+
Put settings that should apply across projects in `<agent-dir>/tasks-config.json` (`~/.pi/agent/tasks-config.json` by default). The agent directory follows pi's configured agent path. Project settings in `<workspace>/.pi/tasks-config.json` take precedence key by key.
|
|
265
|
+
|
|
266
|
+
For example, enable auto-cascade by default for every project:
|
|
267
|
+
|
|
268
|
+
```json
|
|
269
|
+
{
|
|
270
|
+
"autoCascade": true
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
The `/tasks` settings menu writes only project overrides. Changing another setting in a project does not copy global defaults into that project's config.
|
|
275
|
+
|
|
276
|
+
See [Customizing the task widget](CUSTOMIZING.md#where-config-lives) for worked examples of how the two files merge.
|
|
277
|
+
|
|
278
|
+
### Override via environment variables
|
|
279
|
+
|
|
280
|
+
| Variable | Value | Behaviour |
|
|
281
|
+
|----------|-------|-----------|
|
|
282
|
+
| `PI_TASKS` | `off` | In-memory only (CI/automation) |
|
|
283
|
+
| `PI_TASKS` | `sprint-1` | Named shared list at `~/.pi/tasks/sprint-1.json` |
|
|
284
|
+
| `PI_TASKS` | `/abs/path/tasks.json` | Explicit absolute file path |
|
|
285
|
+
| `PI_TASKS` | `./tasks.json` | Relative path resolved from the session workspace |
|
|
286
|
+
| *(unset)* | | Uses `taskScope` setting (default: `session`) |
|
|
287
|
+
| `PI_TASKS_DEBUG` | `1` | Trace RPC communication (request/reply/timeout) and spawn errors to stderr |
|
|
288
|
+
|
|
289
|
+
Named and explicit paths use a file-locked store with stale-lock detection — safe for multiple pi sessions coordinating on the same task list.
|
|
290
|
+
|
|
291
|
+
**CI example** (`.envrc`):
|
|
292
|
+
```bash
|
|
293
|
+
export PI_TASKS=off
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Shared team list** (`.envrc`):
|
|
297
|
+
```bash
|
|
298
|
+
export PI_TASKS=my-project
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## `/tasks` Command
|
|
302
|
+
|
|
303
|
+
Interactive menu:
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
Tasks
|
|
307
|
+
├─ View all tasks (4)
|
|
308
|
+
├─ Create task
|
|
309
|
+
├─ Clear completed (1)
|
|
310
|
+
├─ Clear all (4)
|
|
311
|
+
└─ Settings
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
- **View all tasks** — select a task to see details and take actions (start, complete, delete)
|
|
315
|
+
- **Create task** — input prompts for subject and description
|
|
316
|
+
- **Clear completed** — remove all completed tasks
|
|
317
|
+
- **Clear all** — remove all tasks regardless of status
|
|
318
|
+
- **Settings** — configure project overrides for task storage, auto-cascade, auto-clear completed tasks, and [widget display](#widget-display-settings) (sort order, max visible, show all, hidden position)
|
|
319
|
+
|
|
320
|
+
## Cross-extension Communication with [`@tintinweb/pi-subagents`](https://github.com/tintinweb/pi-subagents)
|
|
321
|
+
|
|
322
|
+
[`pi-tasks`](https://github.com/tintinweb/pi-tasks) communicates with [`@tintinweb/pi-subagents`](https://github.com/tintinweb/pi-subagents) via pi's eventbus using a scoped request/reply RPC protocol. No shared global state — just events.
|
|
323
|
+
|
|
324
|
+
### Presence Detection
|
|
325
|
+
|
|
326
|
+
Load order doesn't matter. Two handshake paths ensure detection regardless of which extension loads first:
|
|
327
|
+
|
|
328
|
+
1. **Ping on init** — [`pi-tasks`](https://github.com/tintinweb/pi-tasks) emits `subagents:rpc:ping` with a unique `requestId` and listens for `subagents:rpc:ping:reply:{requestId}`. If [`pi-subagents`](https://github.com/tintinweb/pi-subagents) is already loaded, it replies immediately.
|
|
329
|
+
2. **Ready broadcast** — [`pi-subagents`](https://github.com/tintinweb/pi-subagents) emits `subagents:ready` when it initializes. If [`pi-tasks`](https://github.com/tintinweb/pi-tasks) loaded first, it picks this up.
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
┌─────────────┐ ┌──────────────────┐
|
|
333
|
+
│ pi-tasks │ │ pi-subagents │
|
|
334
|
+
└──────┬──────┘ └────────┬─────────┘
|
|
335
|
+
│ │
|
|
336
|
+
│──── subagents:rpc:ping ───────────▶│
|
|
337
|
+
│◀─── subagents:rpc:ping:reply ──────│
|
|
338
|
+
│ │
|
|
339
|
+
│◀─── subagents:ready ───────────────│ (broadcast on init)
|
|
340
|
+
│ │
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Spawning Subagents
|
|
344
|
+
|
|
345
|
+
When `TaskExecute` runs, it sends a spawn RPC with a scoped reply channel:
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
pi-tasks pi-subagents
|
|
349
|
+
│ │
|
|
350
|
+
│── subagents:rpc:spawn ─────────────────▶│ { requestId, type, prompt, options }
|
|
351
|
+
│◀─ subagents:rpc:spawn:reply:{reqId} ───│ { id } (or { error })
|
|
352
|
+
│ │
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
The returned `id` is stored in an in-memory `agentTaskMap` (agentId → taskId) for O(1) completion lookup. A 30-second timeout rejects the Promise if no reply arrives, but the task stays `in_progress` and the reply listener is kept for five more minutes: a late reply links the agent to the task, and a reply for a task that was reset, retried or left behind by a session switch stops that agent instead. If nothing arrives, reset the task with `TaskUpdate status=pending` before retrying.
|
|
356
|
+
|
|
357
|
+
### Lifecycle Events
|
|
358
|
+
|
|
359
|
+
[`pi-subagents`](https://github.com/tintinweb/pi-subagents) emits lifecycle events that [`pi-tasks`](https://github.com/tintinweb/pi-tasks) listens to:
|
|
360
|
+
|
|
361
|
+
| Event | Payload | Action |
|
|
362
|
+
|-------|---------|--------|
|
|
363
|
+
| `subagents:completed` | `{ id, result? }` | Mark task `completed`, trigger auto-cascade if enabled |
|
|
364
|
+
| `subagents:failed` | `{ id, error?, status }` | Revert task to `pending`, store error in metadata |
|
|
365
|
+
|
|
366
|
+
### Joining a Subagent
|
|
367
|
+
|
|
368
|
+
`TaskOutput` waits on those same lifecycle events and then returns the stored result. Handing it to the model *consumes* it: pi-tasks says so over the bus, and pi-subagents drops the completion notification it was holding for that agent, which would otherwise arrive after the model had already answered and cost a turn to dismiss.
|
|
369
|
+
|
|
370
|
+
```
|
|
371
|
+
pi-tasks pi-subagents
|
|
372
|
+
│ │
|
|
373
|
+
│◀─ subagents:completed ─────────────────│ { id, result }
|
|
374
|
+
│── subagents:rpc:consume ───────────────▶│ { requestId, agentId }
|
|
375
|
+
│ │
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
Fire-and-forget, and deliberately outside the version handshake — a [`pi-subagents`](https://github.com/tintinweb/pi-subagents) without the handler keeps notifying, exactly as before. An agent that is still running is never consumed: nothing has been read from it yet, and its notification is the only thing that will announce it.
|
|
379
|
+
|
|
380
|
+
### Standalone Mode
|
|
381
|
+
|
|
382
|
+
If [`pi-subagents`](https://github.com/tintinweb/pi-subagents) is not installed, everything works except `TaskExecute`, which returns a friendly message explaining the agent can fall back to plain Agent-tool spawns — with the caveat that pi-tasks won't track those (status stays `pending`, auto-cascade won't fire, `TaskOutput` stays empty). All core task tools (create, list, get, update, dependencies, widget, system-reminder injection) function independently.
|
|
383
|
+
|
|
384
|
+
## Architecture
|
|
385
|
+
|
|
386
|
+
```
|
|
387
|
+
src/
|
|
388
|
+
├── index.ts # Extension entry: 7 tools + /tasks command + widget + subagent integration
|
|
389
|
+
├── types.ts # Task, TaskStatus, BackgroundProcess types
|
|
390
|
+
├── task-store.ts # File-backed store with CRUD, dependencies, locking
|
|
391
|
+
├── auto-clear.ts # Turn-based auto-clearing of completed tasks (AutoClearManager)
|
|
392
|
+
├── tasks-config.ts # Global defaults and project override persistence
|
|
393
|
+
├── task-paths.ts # Where session task files live, per taskScope
|
|
394
|
+
├── task-glyphs.ts # Glyph defaults and config validation
|
|
395
|
+
├── task-sort.ts # Widget ordering: sort presets and sort specs
|
|
396
|
+
├── reminder-cadence.ts # Pure cadence logic for system-reminder injection
|
|
397
|
+
├── process-tracker.ts # Background process output buffering and stop
|
|
398
|
+
└── ui/
|
|
399
|
+
├── task-widget.ts # Persistent widget with status glyphs and spinner
|
|
400
|
+
└── settings-menu.ts # /tasks → Settings panel (SettingsList TUI component)
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
## Future Work
|
|
404
|
+
|
|
405
|
+
- **Background Bash auto-task creation** — Claude Code auto-creates tasks when `Bash` runs with `run_in_background: true`. Pi's bash tool currently lacks a `run_in_background` parameter (only `command` + `timeout`), so there's nothing to hook into. Once pi adds background execution support to its bash tool, we can use the `tool_call` event to detect it and auto-create tasks via `TaskStore`/`ProcessTracker`.
|
|
406
|
+
|
|
407
|
+
## Development
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
npm install
|
|
411
|
+
npm run typecheck # TypeScript validation
|
|
412
|
+
npm test # Run unit tests
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
## License
|
|
416
|
+
|
|
417
|
+
MIT — [tintinweb](https://github.com/tintinweb)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
This document explains the security model behind `@tintinweb/pi-tasks` and where
|
|
4
|
+
the boundaries are.
|
|
5
|
+
|
|
6
|
+
`pi-tasks` is a [pi](https://pi.dev) extension. It tracks tasks, coordinates them
|
|
7
|
+
across pi sessions through file-backed task lists, tracks background processes,
|
|
8
|
+
and can hand tasks to sub-agents (via `@tintinweb/pi-subagents`). All of that
|
|
9
|
+
runs locally within the same security boundary as the user running pi, and
|
|
10
|
+
inherits pi's trust model. It is the responsibility of the user to monitor those
|
|
11
|
+
operations or to contain them within a container, virtual machine, or other
|
|
12
|
+
sandbox solution.
|
|
13
|
+
|
|
14
|
+
Tasks, their tracked processes, and any sub-agents they execute run with the
|
|
15
|
+
local user account's privileges and can use the tools they are granted (reading
|
|
16
|
+
and writing files, running commands, network access, etc.). They treat the local
|
|
17
|
+
user account and files writable by that account as inside the same trust boundary
|
|
18
|
+
as the pi process itself. If an attacker can modify files under the user's home
|
|
19
|
+
directory, workspace, shell startup files, environment, pi configuration, or this
|
|
20
|
+
extension's state and configuration (`.pi/tasks/`, `.pi/tasks-config.json`,
|
|
21
|
+
`<agent-dir>/tasks-config.json`), they can generally influence pi, its tasks, or
|
|
22
|
+
other local developer tools. Reports that depend on such prior local write access
|
|
23
|
+
are not security vulnerabilities unless they demonstrate how `pi-tasks` grants
|
|
24
|
+
that write access or crosses an operating-system privilege boundary.
|
|
25
|
+
|
|
26
|
+
Shared task lists are a deliberate feature: several pi sessions can point at the
|
|
27
|
+
same task file to coordinate. Everything written into that file — task content,
|
|
28
|
+
outputs, agent types — is trusted input from the sessions sharing it, and is
|
|
29
|
+
rendered and fed back to the model as such. File locking exists for concurrency
|
|
30
|
+
correctness, not as a security control.
|
|
31
|
+
|
|
32
|
+
`pi-tasks` relies on the user only loading trustworthy task files, agent
|
|
33
|
+
definitions (`.pi/agents/*.md`), skills, and tools, and only using pi within
|
|
34
|
+
trusted repositories. Files like `AGENTS.md`, task descriptions, task output,
|
|
35
|
+
custom agent frontmatter/system prompts, or instructions embedded in repository
|
|
36
|
+
content and comments can be used to prompt-inject the coding agent trivially, and
|
|
37
|
+
this cannot be protected against.
|
|
38
|
+
|
|
39
|
+
## Reporting a Vulnerability
|
|
40
|
+
|
|
41
|
+
If you believe you found a security vulnerability in `pi-tasks`, please report it
|
|
42
|
+
privately by opening a draft advisory through
|
|
43
|
+
[GitHub Security Advisories](https://github.com/tintinweb/pi-tasks/security/advisories/new)
|
|
44
|
+
for this repository.
|
|
45
|
+
|
|
46
|
+
Please include:
|
|
47
|
+
|
|
48
|
+
- A description of the issue and its impact
|
|
49
|
+
- Steps to reproduce, proof of concept, or relevant logs
|
|
50
|
+
- Affected version, commit, or configuration
|
|
51
|
+
- Any known mitigations
|
|
52
|
+
|
|
53
|
+
Do not open a public issue for security-sensitive reports. Reports will be
|
|
54
|
+
reviewed and disclosure coordinated as appropriate.
|
|
55
|
+
|
|
56
|
+
## Scope
|
|
57
|
+
|
|
58
|
+
Security issues in the published npm package and the code in this repository are
|
|
59
|
+
in scope — for example, a flaw in `pi-tasks` that crosses an operating-system
|
|
60
|
+
privilege boundary, or that causes the extension to escape the task directory it
|
|
61
|
+
is configured to use, or to bypass a restriction it claims to enforce.
|
|
62
|
+
|
|
63
|
+
## Out Of Scope
|
|
64
|
+
|
|
65
|
+
- Local code execution or sandboxing behavior (tracked processes and executed
|
|
66
|
+
sub-agents intentionally do not have a sandbox and run with the user's
|
|
67
|
+
privileges)
|
|
68
|
+
- Behavior of pi itself, or of other pi extensions, skills, or tools installed by
|
|
69
|
+
the user (report those to their respective projects)
|
|
70
|
+
- Risks from working in untrusted repositories
|
|
71
|
+
- Risks from installing or loading untrusted task files, agent definitions,
|
|
72
|
+
skills, extensions, packages, or tools
|
|
73
|
+
- Risks from sharing a task list with sessions or users you do not trust
|
|
74
|
+
- Issues caused by non-trustworthy MITM proxies
|
|
75
|
+
- Public internet exposure of a pi installation
|
|
76
|
+
- Prompt injection attacks (including via `AGENTS.md`, task descriptions, task
|
|
77
|
+
output, agent frontmatter, custom system prompts, repository content, or
|
|
78
|
+
context inheritance)
|
|
79
|
+
- Exposed secrets that are third-party/user-controlled credentials
|
|
80
|
+
- Reports requiring the ability to create, modify, delete, or replace files,
|
|
81
|
+
directories, symlinks, environment variables, shell configuration, or other
|
|
82
|
+
user-controlled local state on the target machine. This includes `.pi/tasks/`,
|
|
83
|
+
`.pi/tasks-config.json`, `<agent-dir>/tasks-config.json`, `.pi/agents/`,
|
|
84
|
+
extension configuration, workspace files, `AGENTS.md`, skills, dotfiles, and
|
|
85
|
+
files synchronized through NFS, roaming profiles, or dotfile managers, unless
|
|
86
|
+
the report shows how `pi-tasks` itself grants that access.
|
|
87
|
+
- Issues caused by intentionally weakened user configuration
|
|
88
|
+
- Resource/DOS claims that require trusted local input/config
|
|
89
|
+
- Reports about malicious model output
|
|
90
|
+
- User-approved or user-initiated local actions presented as vulnerabilities
|
|
91
|
+
|
|
92
|
+
## Notes for Reporters
|
|
93
|
+
|
|
94
|
+
The most useful reports show a current, reproducible security boundary bypass
|
|
95
|
+
with demonstrated impact. Reports that only show expected local-agent behavior,
|
|
96
|
+
prompt injection, or a malicious trusted task file/agent definition are not
|
|
97
|
+
security vulnerabilities under this model.
|
|
98
|
+
|
|
99
|
+
For example, a report showing that malicious contents written to a shared task
|
|
100
|
+
file or to extension configuration cause the agent to execute commands, load
|
|
101
|
+
attacker-controlled tools, or send credentials to an attacker-controlled endpoint
|
|
102
|
+
is out of scope.
|
|
103
|
+
|
|
104
|
+
When possible, include the exact affected path, package version or commit SHA,
|
|
105
|
+
configuration, and a proof of concept against the latest release or latest
|
|
106
|
+
`master`. For dependency reports, include evidence that the shipped dependency is
|
|
107
|
+
affected and that the issue is reachable through `pi-tasks`.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* auto-clear.ts — Turn-based auto-clearing of completed tasks.
|
|
3
|
+
*
|
|
4
|
+
* Two modes:
|
|
5
|
+
* - "on_task_complete": each completed task gets its own REMINDER_INTERVAL countdown, deleted individually
|
|
6
|
+
* - "on_list_complete": countdown starts when ALL tasks are completed, cleared as a batch
|
|
7
|
+
*
|
|
8
|
+
* Both use the same turn delay (REMINDER_INTERVAL) for consistency.
|
|
9
|
+
*
|
|
10
|
+
* Both countdowns are measured in turns and only tick at `turn_start`, so they stop
|
|
11
|
+
* the moment the agent does. That is fine while the conversation continues — the
|
|
12
|
+
* turns keep coming — but a run that ends right after its last completion, which is
|
|
13
|
+
* the usual shape, leaves the finished list sitting there with its countdown frozen,
|
|
14
|
+
* and the next batch of work is then added to it.
|
|
15
|
+
*
|
|
16
|
+
* `startNewBatch()` covers that case. It has to tell a new batch from the same batch
|
|
17
|
+
* still being built, and the store cannot: an agent adding its next task to a list it
|
|
18
|
+
* has just finished looks identical either way. The run boundary is what separates
|
|
19
|
+
* them — work added within the run that completed the list belongs to it, work added
|
|
20
|
+
* after that run ended does not — so the sweep is armed by `onRunEnded()`.
|
|
21
|
+
*/
|
|
22
|
+
import type { TaskStore } from "./task-store.js";
|
|
23
|
+
export type AutoClearMode = "never" | "on_list_complete" | "on_task_complete";
|
|
24
|
+
export declare class AutoClearManager {
|
|
25
|
+
private getStore;
|
|
26
|
+
private getMode;
|
|
27
|
+
/** How many turns completed tasks linger before auto-clearing. */
|
|
28
|
+
private clearDelayTurns;
|
|
29
|
+
/** Per-task: turn when task was marked completed ("on_task_complete" mode). */
|
|
30
|
+
private completedAtTurn;
|
|
31
|
+
/** Turn when ALL tasks became completed ("on_list_complete" mode). */
|
|
32
|
+
private allCompletedAtTurn;
|
|
33
|
+
/** An agent run has ended since the current list was last added to. */
|
|
34
|
+
private runEnded;
|
|
35
|
+
constructor(getStore: () => TaskStore, getMode: () => AutoClearMode,
|
|
36
|
+
/** How many turns completed tasks linger before auto-clearing. */
|
|
37
|
+
clearDelayTurns?: number);
|
|
38
|
+
/** Record a task completion. Call AFTER cascade logic. */
|
|
39
|
+
trackCompletion(taskId: string, currentTurn: number): void;
|
|
40
|
+
/** Check if all tasks are completed and start/reset the batch countdown. */
|
|
41
|
+
private checkAllCompleted;
|
|
42
|
+
/** Reset batch countdown (e.g., when a new task is created or task goes non-completed). */
|
|
43
|
+
resetBatchCountdown(): void;
|
|
44
|
+
/** No automatic retry, compaction or queued continuation is coming, so the list as
|
|
45
|
+
* it stands is this run's final one. Also true of a list carried into a resumed or
|
|
46
|
+
* forked session: the run that produced it ended with the session before. */
|
|
47
|
+
onRunEnded(): void;
|
|
48
|
+
/** A task is about to be created. If a run has ended since this list was last added
|
|
49
|
+
* to and there is nothing left to do on it, the list belongs to the batch before
|
|
50
|
+
* this one — retire it, so the new task starts on a clean list instead of being
|
|
51
|
+
* appended to rows the user already saw finished.
|
|
52
|
+
*
|
|
53
|
+
* Left alone otherwise: a list with unfinished work in it, and a list the agent is
|
|
54
|
+
* still building inside the same run (create, complete, create again), which would
|
|
55
|
+
* otherwise lose every step as soon as the next one was added. */
|
|
56
|
+
startNewBatch(): void;
|
|
57
|
+
/** Reset all tracking state (e.g., on new session). */
|
|
58
|
+
reset(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Called on each turn start. Deletes tasks whose linger period has expired.
|
|
61
|
+
* Returns true if any tasks were cleared.
|
|
62
|
+
*/
|
|
63
|
+
onTurnStart(currentTurn: number): boolean;
|
|
64
|
+
}
|