pi-agent-ide 0.9.0 → 0.9.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 +18 -0
- package/dist/{chunk-TVH2ND35.js → chunk-35LZOKEW.js} +1 -1
- package/dist/chunk-3LVBARLW.js +33 -0
- package/dist/chunk-4GBFIGH3.js +1 -1
- package/dist/{chunk-64JTD2DJ.js → chunk-5PC5INOL.js} +1 -1
- package/dist/{chunk-FKKAHI62.js → chunk-BT2CFM7D.js} +1 -1
- package/dist/{chunk-VN3XBH2Q.js → chunk-DVNL5NZE.js} +1 -1
- package/dist/{chunk-PLMHBXWI.js → chunk-FXPY3V4L.js} +1 -1
- package/dist/{chunk-AJZVKDYC.js → chunk-HGCJDIRR.js} +1 -1
- package/dist/{chunk-RVFMH77U.js → chunk-HISGZD3C.js} +43 -44
- package/dist/{chunk-KFBRL2V4.js → chunk-HKYVP2Q6.js} +1 -1
- package/dist/{chunk-TVXZE4KW.js → chunk-HRBUY2FF.js} +1 -1
- package/dist/{chunk-QM5WDEFI.js → chunk-IOGWZNWT.js} +1 -1
- package/dist/{chunk-HT7LZN5A.js → chunk-IUJUECXH.js} +1 -1
- package/dist/chunk-LXDF2NWX.js +1 -0
- package/dist/{chunk-TVSZYABY.js → chunk-MPNE25CY.js} +1 -1
- package/dist/{chunk-Y74EKJOY.js → chunk-O7V6G3OO.js} +1 -1
- package/dist/chunk-OUCVZBOR.js +28 -0
- package/dist/{chunk-WUO3UW4J.js → chunk-PCGBM2D6.js} +1 -1
- package/dist/{chunk-V4J3TLCV.js → chunk-RIZARTUM.js} +1 -1
- package/dist/{chunk-LTADNZKW.js → chunk-T3Z4KXOX.js} +1 -1
- package/dist/chunk-TSQ6FBTB.js +1 -0
- package/dist/{chunk-CVOYSEBE.js → chunk-VNWGT367.js} +1 -1
- package/dist/{chunk-FS3KCKFX.js → chunk-X2WFNMQR.js} +1 -1
- package/dist/{chunk-7SG756UO.js → chunk-XCPIIDFS.js} +1 -1
- package/dist/entry-0.js +1 -1
- package/dist/entry-1.js +1 -1
- package/dist/entry-10.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-12.js +1 -1
- package/dist/entry-13.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-15.js +1 -1
- package/dist/entry-16.js +1 -1
- package/dist/entry-17.js +1 -1
- package/dist/entry-18.js +1 -1
- package/dist/entry-19.js +1 -1
- package/dist/entry-2.js +1 -1
- package/dist/entry-20.js +1 -1
- package/dist/entry-21.js +1 -1
- package/dist/entry-22.js +1 -0
- package/dist/entry-24.js +1 -1
- package/dist/entry-25.js +1 -1
- package/dist/entry-26.js +1 -1
- package/dist/entry-27.js +1 -1
- package/dist/entry-28.js +1 -1
- package/dist/entry-29.js +1 -1
- package/dist/entry-3.js +1 -1
- package/dist/entry-30.js +1 -2
- package/dist/entry-31.js +2 -1
- package/dist/entry-32.js +1 -1
- package/dist/entry-33.js +1 -1
- package/dist/entry-34.js +1 -1
- package/dist/entry-35.js +1 -1
- package/dist/entry-36.js +1 -1
- package/dist/entry-37.js +1 -15
- package/dist/entry-38.js +15 -1
- package/dist/entry-39.js +1 -1
- package/dist/entry-4.js +1 -1
- package/dist/entry-40.js +1 -1
- package/dist/entry-41.js +1 -1
- package/dist/entry-42.js +1 -1
- package/dist/entry-43.js +1 -1
- package/dist/entry-44.js +1 -1
- package/dist/entry-45.js +1 -1
- package/dist/entry-46.js +1 -1
- package/dist/entry-47.js +1 -1
- package/dist/entry-48.js +1 -1
- package/dist/entry-49.js +1 -1
- package/dist/entry-5.js +1 -1
- package/dist/entry-50.js +1 -1
- package/dist/entry-51.js +1 -1
- package/dist/entry-52.js +1 -1
- package/dist/entry-53.js +1 -1
- package/dist/entry-54.js +1 -1
- package/dist/entry-55.js +1 -1
- package/dist/entry-56.js +1 -1
- package/dist/entry-57.js +1 -1
- package/dist/entry-58.js +1 -1
- package/dist/entry-59.js +1 -1
- package/dist/entry-6.js +1 -1
- package/dist/entry-60.js +1 -1
- package/dist/entry-61.js +1 -1
- package/dist/entry-62.js +1 -1
- package/dist/entry-63.js +1 -1
- package/dist/entry-64.js +1 -1
- package/dist/entry-65.js +1 -1
- package/dist/entry-66.js +1 -1
- package/dist/entry-67.js +1 -0
- package/dist/entry-68.js +0 -1
- package/dist/entry-69.js +1 -0
- package/dist/entry-7.js +1 -1
- package/dist/entry-70.js +0 -1
- package/dist/entry-71.js +1 -1
- package/dist/entry-72.js +1 -1
- package/dist/entry-73.js +1 -1
- package/dist/entry-74.js +1 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-76.js +1 -1
- package/dist/entry-77.js +1 -0
- package/dist/entry-78.js +0 -1
- package/dist/entry-79.js +1 -0
- package/dist/entry-8.js +1 -1
- package/dist/entry-80.js +0 -1
- package/dist/entry-81.js +1 -1
- package/dist/entry-82.js +1 -1
- package/dist/entry-83.js +1 -1
- package/dist/entry-84.js +1 -1
- package/dist/entry-85.js +1 -2
- package/dist/entry-86.js +2 -1
- package/dist/entry-87.js +1 -1
- package/dist/entry-88.js +1 -1
- package/dist/entry-89.js +1 -1
- package/dist/entry-9.js +1 -1
- package/dist/entry-90.js +1 -3
- package/dist/entry-91.js +3 -1
- package/dist/entry-92.js +1 -1
- package/dist/entry-93.js +1 -1
- package/dist/entry-94.js +1 -0
- package/dist/pi-agent-ide.js +13 -10
- package/docs/agent-guides/editing.md +3 -0
- package/docs/tools.md +2 -2
- package/node_modules/pi-agent-doctor/package.json +7 -7
- package/node_modules/pi-agent-documentation/package.json +2 -2
- package/node_modules/pi-agent-documentation/runtime/entry-30.js +1 -0
- package/node_modules/pi-agent-filesystem/package.json +8 -8
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-image/runtime/entry-32.js +2 -0
- package/node_modules/pi-agent-filesystem-jq/package.json +7 -7
- package/node_modules/pi-agent-filesystem-jq/runtime/entry-33.js +0 -1
- package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/runtime/entry-36.js +2 -0
- package/node_modules/pi-agent-ide-ast/package.json +15 -15
- package/node_modules/pi-agent-ide-ast/runtime/entry-37.js +0 -1
- package/node_modules/pi-agent-ide-ast/runtime/entry-38.js +2 -0
- package/node_modules/pi-agent-ide-changes/package.json +10 -10
- package/node_modules/pi-agent-ide-changes/runtime/entry-39.js +0 -1
- package/node_modules/pi-agent-ide-formatter/package.json +4 -4
- package/node_modules/pi-agent-ide-languages/package.json +3 -3
- package/node_modules/pi-agent-ide-lint/package.json +8 -8
- package/node_modules/pi-agent-ide-lsp/package.json +13 -13
- package/node_modules/pi-agent-ide-lsp/runtime/entry-44.js +2 -0
- package/node_modules/pi-agent-image/package.json +3 -3
- package/node_modules/pi-agent-invariant/package.json +2 -2
- package/node_modules/pi-agent-pdf/package.json +3 -3
- package/node_modules/pi-agent-read/package.json +12 -12
- package/node_modules/pi-agent-read/runtime/entry-51.js +0 -1
- package/node_modules/pi-agent-read/runtime/entry-52.js +2 -0
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-search/package.json +9 -9
- package/node_modules/pi-agent-search/runtime/entry-56.js +0 -1
- package/node_modules/pi-agent-search-text/package.json +15 -15
- package/node_modules/pi-agent-search-text/runtime/entry-58.js +1 -0
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text/runtime/entry-62.js +1 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-63.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-64.js +0 -1
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-65.js +2 -0
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-66.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-67.js +2 -0
- package/node_modules/pi-agent-text-editor/package.json +26 -26
- package/node_modules/pi-agent-text-editor/runtime/entry-83.js +0 -1
- package/node_modules/pi-agent-text-editor/src/core/result-transfer.ts +2 -6
- package/node_modules/pi-agent-text-editor/src/core/text-change-engine.ts +17 -36
- package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +40 -82
- package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +5 -9
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +1 -3
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +7 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +2 -8
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +6 -6
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-86.js +2 -0
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-ui/package.json +3 -3
- package/node_modules/pi-agent-tool-ui/runtime/entry-89.js +1 -0
- package/node_modules/pi-agent-web/package.json +8 -8
- package/node_modules/pi-agent-web-html/package.json +3 -3
- package/node_modules/pi-agent-web-image/package.json +4 -4
- package/node_modules/pi-agent-web-pdf/package.json +4 -4
- package/node_modules/pi-agent-web-text/package.json +4 -4
- package/node_modules/pi-agent-web-text/runtime/entry-94.js +2 -0
- package/package.json +60 -56
- package/src/api/capabilities.ts +60 -0
- package/src/composite/capabilities.ts +252 -0
- package/src/composite/capability-schemas.ts +53 -0
- package/src/composite/responses-tools.ts +27 -9
- package/src/composite/tool-availability.ts +28 -13
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +8 -8
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-32.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-33.js +0 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-36.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-31.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +8 -8
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-94.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-90.js +2 -0
- package/src/extensions/pi-agent-read/package.json +12 -12
- package/src/extensions/pi-agent-read/runtime/entry-51.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-52.js +2 -0
- package/src/extensions/pi-agent-search/package.json +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +15 -15
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-58.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-61.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-56.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-57.js +2 -0
- package/src/extensions/pi-agent-text-editor/package.json +26 -26
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +4 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-63.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-64.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-65.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-66.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-67.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +6 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-86.js +2 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-83.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-84.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/result-transfer.ts +2 -6
- package/src/extensions/pi-agent-text-editor/src/core/text-change-engine.ts +17 -36
- package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +40 -82
- package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +5 -9
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +1 -3
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +7 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +2 -8
- package/src/pi-agent-ide.ts +4 -1
- package/src/plugins/pi-agent-ide-ast/package.json +15 -15
- package/src/plugins/pi-agent-ide-ast/runtime/entry-37.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-38.js +2 -0
- package/src/plugins/pi-agent-ide-changes/package.json +10 -10
- package/src/plugins/pi-agent-ide-changes/runtime/entry-39.js +0 -1
- package/src/plugins/pi-agent-ide-debugger/index.ts +31 -26
- package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
- package/src/plugins/pi-agent-ide-languages/package.json +3 -3
- package/src/plugins/pi-agent-ide-lint/package.json +8 -8
- package/src/plugins/pi-agent-ide-lsp/package.json +13 -13
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-44.js +2 -0
- package/src/plugins/pi-agent-ide-terminal/index.ts +42 -0
- package/src/plugins/pi-agent-ide-terminal/src/resources.ts +0 -21
- package/src/plugins/pi-agent-ide-terminal/src/search.ts +0 -3
- package/dist/chunk-7URANI6I.js +0 -28
- package/dist/chunk-K4UTEMDU.js +0 -1
- package/dist/chunk-TNAUCNUT.js +0 -33
- package/dist/entry-23.js +0 -1
- package/node_modules/pi-agent-doctor/runtime/entry-23.js +0 -1
- package/node_modules/pi-agent-filesystem/runtime/entry-30.js +0 -2
- package/node_modules/pi-agent-filesystem-jq/runtime/entry-32.js +0 -1
- package/node_modules/pi-agent-ide-ast/runtime/entry-36.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-38.js +0 -1
- package/node_modules/pi-agent-image/runtime/entry-44.js +0 -1
- package/node_modules/pi-agent-resource/runtime/entry-52.js +0 -1
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-62.js +0 -2
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-63.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-65.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-67.js +0 -1
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-86.js +0 -1
- package/node_modules/pi-agent-web/runtime/entry-89.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-31.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-32.js +0 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-30.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-90.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-89.js +0 -2
- package/src/extensions/pi-agent-read/runtime/entry-47.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-57.js +0 -2
- package/src/extensions/pi-agent-search/runtime/entry-53.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-62.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-63.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-65.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-84.js +0 -2
- package/src/extensions/pi-agent-text-editor/runtime/entry-67.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-36.js +0 -1
- package/src/plugins/pi-agent-ide-changes/runtime/entry-38.js +0 -1
- /package/node_modules/{pi-agent-documentation → pi-agent-doctor}/runtime/entry-29.js +0 -0
- /package/node_modules/{pi-agent-filesystem-image → pi-agent-filesystem}/runtime/entry-31.js +0 -0
- /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-jq}/runtime/entry-34.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-40.js +0 -0
- /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-41.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-42.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-43.js +0 -0
- /package/node_modules/{pi-agent-invariant → pi-agent-image}/runtime/entry-45.js +0 -0
- /package/node_modules/{pi-agent-pdf → pi-agent-invariant}/runtime/entry-46.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-47.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-53.js +0 -0
- /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-57.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-61.js +0 -0
- /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor}/runtime/entry-84.js +0 -0
- /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-85.js +0 -0
- /package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-87.js +0 -0
- /package/node_modules/{pi-agent-web-html → pi-agent-web}/runtime/entry-90.js +0 -0
- /package/node_modules/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-91.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-92.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-93.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-pdf → pi-agent-filesystem-jq}/runtime/entry-34.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-35.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-91.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-92.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-93.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-85.js +0 -0
- /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-40.js +0 -0
- /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-41.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-42.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-43.js +0 -0
package/dist/entry-92.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-XE4W5YTE.js";import{J as e}from"./chunk-DDH3FP4G.js";import{a as t}from"./chunk-EI7MMDWY.js";var n={target:{provider:"web",capability:"read"},converter:r(),priority:100};async function i(o){await e(o,n)}t(i,"registerWebImage");export{i as default};
|
package/dist/entry-93.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as r}from"./chunk-RIOPUTUJ.js";import{J as e}from"./chunk-DDH3FP4G.js";import{a as t}from"./chunk-EI7MMDWY.js";var n={target:{provider:"web",capability:"read"},converter:r(),priority:200};async function i(o){await e(o,n)}t(i,"registerWebPdf");export{i as default};
|
package/dist/entry-94.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{J as e}from"./chunk-DDH3FP4G.js";import{p as r}from"./chunk-VDJSH3DQ.js";import{a as t}from"./chunk-EI7MMDWY.js";var n={target:{provider:"web",capability:"read"},converter:r(),priority:300};async function i(o){await e(o,n)}t(i,"registerWebText");export{i as default};
|
package/dist/pi-agent-ide.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
`)})}
|
|
1
|
+
import{a as j,b as L,c as $,d as ge,e as F,f as O}from"./chunk-W7CASEO3.js";import{a as ie}from"./chunk-H5Z54BEU.js";import{f as z}from"./chunk-WES2E4VR.js";import{a as ae}from"./chunk-YGGKGZO2.js";import"./chunk-5S74Z6Y4.js";import"./chunk-GS5ZRTUG.js";import"./chunk-MPT3R4BL.js";import{g as se}from"./chunk-KN6VPARZ.js";import"./chunk-BU7IZLKB.js";import"./chunk-S5PL5DFQ.js";import"./chunk-DDH3FP4G.js";import{a as Y,b as de,c as le}from"./chunk-TSQ6FBTB.js";import{a as ce,b as ue,c as fe,e as V,f as pe}from"./chunk-OJEIX7OZ.js";import{c as re}from"./chunk-RQ7JJ7GV.js";import"./chunk-ZC65Z3CK.js";import{a as s}from"./chunk-EI7MMDWY.js";var H={"ide.core":["IDE services","Shared services used by language, formatting and diagnostic modules."],"ide.tips":["Getting started tips","Show contextual guidance while setting up a project."],"ide.documentation":["Progressive agent documentation","Expose packaged guides and attach them on first relevant tool use."],"ide.doctor":["Setup doctor","Check external tools and help configure project support."],"ide.languages":["Language setup","Discover languages and their recommended toolchains."],"ide.processes":["Agent IDE processes","Show active terminal and debugger sessions in one shared process surface."],"ide.debugger":["Debugger sessions","Debug local programs through addressable DAP sessions and anchored breakpoints."],"ide.terminal":["Terminal sessions","Run and manage local interactive and background terminal processes."],"read.core":["Read tools","Read sources through the configured readers and views."],"read.filesystem":["Local files","Resolve files and folders from the local filesystem."],"read.ssh":["SSH files","Read and edit configured SSH file sources through existing tools."],"read.filesystem.jq":["JSON queries","Query local JSON files through jq read views."],"read.filesystem.image":["Local images","Read local images as visual content."],"read.filesystem.pdf":["Local PDFs","Extract readable content from local PDF documents."],"read.filesystem.text":["Local text","Read local text files with their source coordinates."],"read.web":["Web sources","Read remote sources over HTTP and HTTPS."],"read.web.html":["Web pages","Extract readable content from HTML pages."],"read.web.image":["Web images","Read remote images as visual content."],"read.web.pdf":["Web PDFs","Extract text from remote PDF documents."],"read.web.text":["Web text","Read remote plain-text sources."],"search.core":["Search tools","Run searches through the configured search providers."],"search.text":["Text search","Find text and files and register reusable search selections."],"editor.core":["Editing tools","Make guarded text and whole-file changes, directly or through native Codemode."],"editor.renderer":["Edit previews","Display changes in the shared colored diff panels."],"editor.anchor.constant":["File boundary selectors","Use begin and end to select file boundaries."],"editor.anchor.line-hash":["Checked line selectors","Select lines with hashes that detect stale content."],"editor.anchor.exact":["Exact text selectors","Locate edit ranges using unique source text."],"editor.stale-anchor":["Stale selection recovery","Provide recovery guidance when an edit selection is outdated."],"ide.ast":["Structural code support","Read code outlines and search or edit exact syntax-tree nodes."],"ide.formatter":["Code formatting","Run configured formatters after edits."],"ide.lint":["Lint checks","Run configured linters and collect their findings."],"ide.changes":["Git changes","Inspect and manage uncommitted changes and undo history."],"ide.lsp":["Language servers","Resolve symbols, rename references and collect language-server diagnostics."],"ide.diagnostics":["Diagnostic views","Show diagnostic findings through read views and sources."]};var _=[R("ide.core",()=>import("./chunk-RIZARTUM.js")),R("ide.tips",()=>import("./chunk-BB4A5UI3.js")),R("ide.doctor",()=>import("./chunk-IUJUECXH.js")),R("ide.languages",()=>import("./entry-42.js"),["ide.doctor"]),R("read.core",()=>import("./entry-52.js")),R("ide.documentation",async()=>{let{default:e}=await import("./chunk-LXDF2NWX.js");return{default:s(t=>e(t),"default")}},["read.core"]),R("read.filesystem",()=>import("./entry-31.js"),["read.core","editor.core"]),R("read.ssh",()=>import("./chunk-X2WFNMQR.js"),["read.filesystem"]),R("read.filesystem.jq",()=>import("./entry-34.js"),["read.filesystem","ide.documentation","ide.doctor"]),R("read.filesystem.image",()=>import("./entry-32.js"),["read.filesystem"]),R("read.filesystem.pdf",()=>import("./entry-35.js"),["read.filesystem"]),R("read.filesystem.text",()=>import("./entry-36.js"),["read.filesystem"]),R("read.web",()=>import("./chunk-IOGWZNWT.js"),["read.core"]),R("read.web.html",()=>import("./entry-91.js"),["read.web"]),R("read.web.image",()=>import("./entry-92.js"),["read.web"]),R("read.web.pdf",()=>import("./entry-93.js"),["read.web"]),R("read.web.text",()=>import("./entry-94.js"),["read.web"]),R("search.core",()=>import("./entry-57.js")),R("search.text",()=>import("./entry-58.js"),["search.core"]),R("editor.renderer",()=>import("./entry-85.js"),["editor.core"]),R("editor.core",()=>import("./entry-84.js")),R("editor.anchor.constant",()=>import("./entry-63.js"),["read.core","editor.core"]),R("editor.anchor.line-hash",()=>import("./entry-67.js"),["read.core","editor.core"]),R("editor.anchor.exact",()=>import("./entry-65.js"),["editor.core"]),R("editor.stale-anchor",()=>import("./entry-86.js"),["editor.core"]),R("ide.ast",()=>import("./entry-38.js"),["ide.core","read.core","search.core","editor.core"]),R("ide.formatter",()=>import("./chunk-O7V6G3OO.js"),["ide.core"]),R("ide.lint",()=>import("./chunk-DVNL5NZE.js"),["ide.core"]),R("ide.changes",()=>import("./chunk-4GBFIGH3.js"),["ide.core","read.core","editor.core"]),R("ide.lsp",()=>import("./chunk-VNWGT367.js"),["ide.core","read.core","search.core"]),R("ide.processes",()=>import("./chunk-XUYIK4TX.js")),R("ide.debugger",()=>import("./chunk-3LVBARLW.js"),["ide.processes","read.core","editor.core"]),R("ide.terminal",()=>import("./chunk-OUCVZBOR.js"),["ide.processes","read.core","search.core","editor.core","editor.anchor.constant"]),R("ide.diagnostics",()=>import("./chunk-T3Z4KXOX.js"),["ide.core","read.core"])];function R(e,t,d=[],l=!0){return{id:e,name:H[e][0],description:H[e][1],dependencies:d,async register(r,a){await(await t()).default(r,a)},...l?{}:{defaultEnabled:!1}}}s(R,"builtin");function G(e,t,d){return{kind:"choice",id:e,name:t,description:d,default:"compact",group:"ui",values:[{value:"full",label:"Full"},{value:"compact",label:"Compact"},{value:"disabled",label:"Disabled"}]}}s(G,"presentationPreference");var U=[{kind:"choice",id:"ui.codemode",name:"Show tool results from Codemode",description:"Show extra Agent IDE result panels using each tool's presentation setting. Off hides successful panels; errors stay visible. Codemode's own output and other tools are unchanged.",default:"off",group:"ui",values:[{value:"off",label:"Off"},{value:"on",label:"On"}]},G("ui.diffs","Diffs","Choose how mutation and comparison diffs are displayed."),G("ui.read","Read","Choose how Read calls and results are displayed."),G("ui.search","Search","Choose how Search calls and results are displayed."),G("ui.terminal","Terminal","Choose how shell commands and terminal output are displayed."),{kind:"choice",id:"processes.activity",name:"Active Agent IDE processes",description:"Choose detailed process cards, a compact active count, or no persistent Agent IDE process UI.",default:"detailed",group:"ui",values:[{value:"detailed",label:"Detailed cards"},{value:"compact",label:"Compact count"},{value:"off",label:"Off"}]}];function W(e,t,d=[]){let l=new Map;for(let p of e){if(l.has(p.id))throw new Error(`Duplicate Pi Agent IDE extension ID: ${p.id}`);l.set(p.id,p)}for(let p of e)for(let T of p.dependencies)if(!l.has(T))throw new Error(`Pi Agent IDE extension ${p.id} has unknown dependency ${T}`);let r=new Set;for(let p of t)l.has(p)&&r.add(p);for(let p of d)if(!l.has(p))throw new Error(`Unknown Pi Agent IDE extension ID in enabled: ${p}`);let a=Je(l,d,r),f=new Set;for(let p of e)(p.defaultEnabled===!1&&!a.has(p.id)||r.has(p.id))&&f.add(p.id);let w=!0;for(;w;){w=!1;for(let p of e)f.has(p.id)||p.dependencies.every(T=>!f.has(T))||(f.add(p.id),w=!0)}return{enabled:e.filter(p=>!f.has(p.id)),disabled:f}}s(W,"selectBuiltinExtensions");function Je(e,t,d){let l=new Set,r=[...t];for(;r.length>0;){let a=r.pop();if(!(l.has(a)||d.has(a))){l.add(a);for(let f of e.get(a)?.dependencies??[])l.has(f)||r.push(f)}}return l}s(Je,"collectForcedOn");import{Input as Qe}from"@earendil-works/pi-tui";import{mkdir as ze,readFile as Ye,writeFile as Ve}from"node:fs/promises";import He from"node:path";import{withFileMutationQueue as Xe}from"@earendil-works/pi-coding-agent";async function me(e,t,d=new Map,l=new Map,r){await Xe(e,async()=>{let a=await O(e),f={};try{f=JSON.parse(await Ye(e,"utf8"))}catch(h){if(!(h instanceof Error&&"code"in h&&h.code==="ENOENT"))throw h}let w=new Set(a.disabled),p=new Set(a.enabled);for(let[h,m]of t)w.delete(h),p.delete(h),m==="disabled"&&w.add(h),m==="enabled"&&p.add(h);let T={...a.preferences};for(let[h,m]of l)m===void 0?delete T[h]:T[h]=m;let I={...a.flags};for(let[h,m]of d)h==="pi-agent-ide-no-animations"&&delete f.noAnimations,h==="pi-agent-ide-no-post-processing"&&delete f.noPostProcessing,m===void 0?delete I[h]:I[h]=m;await ze(He.dirname(e),{recursive:!0}),await Ve(e,`${JSON.stringify({...f,disabled:[...w],enabled:[...p],...r===void 0?{}:{preset:r},...d.size>0?{flags:I}:{},...l.size>0?{preferences:T}:{}},null,2)}
|
|
2
|
+
`)})}s(me,"saveModuleChoices");import{getSettingsListTheme as Ke}from"@earendil-works/pi-coding-agent";import{matchesKey as q,SettingsList as Ze,truncateToWidth as he,visibleWidth as ye}from"@earendil-works/pi-tui";function be(e,t,d,l,r=""){let a=["extensions","behavior","ui"],f="extensions",w=s(v=>v==="extensions"?"modules":v==="behavior"?"features":"ui","itemKey"),p=s(v=>v==="extensions"?"modules":v==="behavior"?"features":"ui","changeKey"),T=s(()=>{let v=w(f),n=t()[v]??[];return new Ze(n,12,Ke(),(o,i)=>{d(p(f),o,i);for(let c of t()[v]??[]){let g=n.find(u=>u.id===c.id);g&&Object.assign(g,c)}},()=>l(!1),{enableSearch:!0})},"createList"),I=T(),h=s(v=>e.fg("borderMuted",v),"border"),m=s((v,n)=>{if(n<=1)return h("\u2502");let o=n-2,i=he(v,o);return`${h("\u2502")}${i}${" ".repeat(Math.max(0,o-ye(i)))}${h("\u2502")}`},"row"),y=s(v=>h(v<=1?"\u251C":`\u251C${"\u2500".repeat(Math.max(0,v-2))}\u2524`),"rule");return{render(v){let n=Math.max(1,v),o=Math.max(1,n-4),i=` Agent IDE settings${r?` \xB7 ${r}`:""} `,c=n<=1?h("\u256D"):`${h("\u256D\u2500")}${e.fg("accent",e.bold(he(i,Math.max(0,n-3),"")))}${h(`${"\u2500".repeat(Math.max(0,n-ye(i)-3))}\u256E`)}`,g={extensions:"Features",behavior:"Behavior",ui:"UI"},u=a.map(P=>P===f?e.fg("accent",e.bold(`[ ${g[P]} ]`)):e.fg("dim",` ${g[P]} `)).join(" "),x=I.render(o).map(P=>m(` ${P} `,n)),b=e.fg("dim"," Tab switch \xB7 Enter change \xB7 Ctrl+S save \xB7 Esc cancel ");return[c,m(` ${u} `,n),y(n),...x,y(n),m(b,n),h(n<=1?"\u2570":`\u2570${"\u2500".repeat(Math.max(0,n-2))}\u256F`)]},invalidate(){I.invalidate()},handleInput(v){q(v,"tab")||q(v,"shift+tab")?(f=a[(a.indexOf(f)+(q(v,"shift+tab")?2:1))%a.length]??"extensions",I=T()):q(v,"ctrl+s")?l(!0):I.handleInput(v)}}}s(be,"createSettingsPanel");function we(e,t=[],d=[]){e.registerCommand("agent-ide-settings",{description:"Configure Agent IDE modules and features",async handler(l,r){if(r.hasUI)try{let a=await r.ui.select("Agent IDE settings \u2014 save scope",["Project","Global"]);if(a===void 0)return;let f=$(process.env,void 0,r.cwd),w=a==="Project"?f.projectPath:f.globalPath,p=await O(w),T=await O(a==="Project"?f.globalPath:f.projectPath),I=new Map,h=new Map,m=new Map,y;if(!await r.ui.custom((n,o,i,c)=>{let g=be(o,()=>{let u=new Set(p.disabled),x=new Set(p.enabled);for(let[A,E]of I)u.delete(A),x.delete(A),E==="disabled"&&u.add(A),E==="enabled"&&x.add(A);let b=W(_,[...L(_,y??p.preset??"full"),...u,...L(_,T.preset??"full"),...T.disabled],[...x,...T.enabled]);return{modules:_.map(A=>({id:A.id,label:A.name??A.id,description:`${A.description??""} Effective: ${b.disabled.has(A.id)?"off":"on"}.${T.disabled.includes(A.id)?" Disabled in the other scope.":A.dependencies.some(E=>b.disabled.has(E))?" A dependency is disabled.":""}`,currentValue:I.get(A.id)??(p.disabled.includes(A.id)?"disabled":p.enabled.includes(A.id)?"enabled":"default"),values:["default","enabled","disabled"]})),features:[P(),...C("features"),...S("features")],ui:[...C("ui"),...S("ui")]};function P(){let A=y??p.preset??"full";return{id:"preset",label:"Preset",description:"Choose the built-in Agent IDE capability set. Reload required.",currentValue:j.find(E=>E.value===A)?.label??A,values:j.map(E=>E.label)}}function S(A){return d.filter(E=>E.group===A).map(E=>{let k=m.has(E.id)?m.get(E.id):p.preferences?.[E.id];return{id:E.id,label:E.name,description:`${E.description} Default: ${E.kind==="choice"?E.values.find(D=>D.value===E.default)?.label??E.default:E.default||"empty"}.`,currentValue:k===void 0?"default":E.kind==="choice"?E.values.find(D=>D.value===k)?.label??k:k,...E.kind==="choice"?{values:["default",...E.values.map(D=>D.label)]}:{submenu:s((D,ne)=>{let B=new Qe,oe=D==="default"?E.default:D;return oe.length>0&&B.handleInput(oe),B.focused=!0,B.onSubmit=qe=>ne(qe),B.onEscape=()=>ne(),B},"submenu")}}})}function C(A){return t.filter(E=>(E.group??"features")===A).map(E=>{let k=h.has(E.id)?h.get(E.id):F(p)[E.id];return{id:E.id,label:E.name,description:E.description,currentValue:k===void 0?"default":k?E.labels?.on??"enabled":E.labels?.off??"disabled",values:["default",E.labels?.off??"disabled",E.labels?.on??"enabled"]}})}},(u,x,b)=>{if(u==="modules")I.set(x,b);else if(x==="preset")y=j.find(P=>P.label===b)?.value;else if(d.some(P=>P.id===x)){let P=d.find(S=>S.id===x);m.set(x,b==="default"||b.length===0?void 0:P?.kind==="choice"?P.values.find(S=>S.label===b)?.value:b)}else h.set(x,b==="default"?void 0:b===(t.find(P=>P.id===x)?.labels?.on??"enabled"))},c,a);return{render:s(u=>g.render(u),"render"),invalidate:s(()=>g.invalidate(),"invalidate"),handleInput(u){g.handleInput(u),n.requestRender()}}})||I.size+h.size+m.size+(y===void 0?0:1)===0)return;if(await me(w,I,h,m,y),r.ui.notify(`Saved ${a.toLowerCase()} Agent IDE settings. Reload required.`,"info"),await r.ui.confirm("Reload Pi?","Reload extensions to apply settings. In-memory extension state may reset.")){await r.reload();return}}catch(a){r.ui.notify(a instanceof Error?a.message:String(a),"error")}}})}s(we,"registerModuleSettings");import{readFile as et}from"node:fs/promises";import X from"node:path";import{getMarkdownTheme as tt}from"@earendil-works/pi-coding-agent";import{Markdown as nt,matchesKey as M,ScrollView as ot,truncateToWidth as rt}from"@earendil-works/pi-tui";function it(){return et(X.join(X.dirname(X.dirname(import.meta.dirname)),"docs/settings-help.md"),"utf8")}s(it,"readSettingsHelp");function ve(e){e.registerCommand("agent-ide-help",{description:"Read the short Agent IDE settings guide",async handler(t,d){if(!(d.mode!=="tui"||!d.hasUI))try{let l=await it();await d.ui.custom((r,a,f,w)=>new K(l,a,()=>Math.max(5,Math.min(36,r.terminal.rows-4)),()=>r.requestRender(),w),{overlay:!0,overlayOptions:{width:92,margin:1}})}catch(l){d.ui.notify(l instanceof Error?l.message:String(l),"error")}}})}s(ve,"registerSettingsHelp");var K=class{constructor(t,d,l,r,a){this.content=t;this.theme=d;this.height=l;this.requestRender=r;this.done=a;this.markdown=this.createMarkdown(),this.scroll=new ot(this.markdown)}static{s(this,"SettingsHelpPanel")}markdown;scroll;createMarkdown(){return new nt(this.content,0,0,tt(),{color:s(t=>this.theme.fg("text",t),"color")})}invalidate(){this.markdown.invalidate()}handleInput(t){if(M(t,"escape")){this.done();return}M(t,"up")?this.scroll.scrollBy(-1):M(t,"down")?this.scroll.scrollBy(1):M(t,"pageUp")?this.scroll.scrollBy(-this.scroll.viewportHeight):M(t,"pageDown")||M(t,"space")?this.scroll.scrollBy(this.scroll.viewportHeight):M(t,"home")?this.scroll.scrollToStart():M(t,"end")&&this.scroll.scrollToEnd()}render(t){let d=Math.max(1,t-4),l=this.markdown.render(d),r=Math.max(1,this.height()-4);this.scroll.updateLayout(l.length,r,this.requestRender);let a=l.slice(this.scroll.scrollTop,this.scroll.scrollTop+r);for(;a.length<r;)a.push("");let f=this.theme.fg("border","\u2500".repeat(Math.max(0,t-2))),w=s(p=>this.theme.fg("border","\u2502 ")+rt(p,d,"\u2026",!0)+this.theme.fg("border"," \u2502"),"row");return[this.theme.fg("border","\u256D")+f+this.theme.fg("border","\u256E"),w(this.theme.fg("accent","Agent IDE settings help")),...a.map(w),w(this.theme.fg("muted","\u2191\u2193 scroll \xB7 PgUp/PgDn page \xB7 Home/End \xB7 Esc close")),this.theme.fg("border","\u2570")+f+this.theme.fg("border","\u256F")]}};function Ee(e,t){let d=[];return{definitions:d,register(l){if(d.some(r=>r.id===l.id))throw new Error(`Duplicate feature flag: ${l.id}`);d.push(l),e.registerFlag(l.id,{type:"boolean",description:l.description,default:t[l.id]??l.default})}}}s(Ee,"createFeatureFlags");function Ie(e,t=U){return{id:"ide-settings",description:"IDE settings and their scopes",triggers:[{tool:"read",resourcePrefixes:["docs:ide-settings"]}],get markdown(){let d={preferences:t,flags:e,modules:_.map(({id:r,name:a,description:f,defaultEnabled:w,dependencies:p})=>({id:r,name:a,description:f,default:w!==!1,dependencies:p})),presets:j};return`# IDE settings
|
|
3
3
|
|
|
4
4
|
This catalog describes supported settings, not current saved values or live runtime state. It is generated from the registrations used by /agent-ide-settings. Read both configuration scopes to inspect overrides. Reload or restart applies module and startup-only changes; built-in CLI flags may override their saved defaults for an invocation.
|
|
5
5
|
|
|
@@ -23,19 +23,22 @@ Choices carry their saved value and human label. Text settings carry a descripti
|
|
|
23
23
|
|
|
24
24
|
\`\`\`json
|
|
25
25
|
{
|
|
26
|
-
${Object.entries(
|
|
27
|
-
${
|
|
26
|
+
${Object.entries(d).map(([r,a])=>` "${r}": [
|
|
27
|
+
${a.map(f=>` ${JSON.stringify(f)}`).join(`,
|
|
28
28
|
`)}
|
|
29
29
|
]`).join(`,
|
|
30
30
|
`)}
|
|
31
31
|
}
|
|
32
32
|
\`\`\`
|
|
33
|
-
`}}}
|
|
34
|
-
`)}
|
|
33
|
+
`}}}s(Ie,"createIdeSettingsDocumentation");function xe(e){let t=new Set,d=new Set;for(let l of e)if(l.startsWith("-"))t.add(l.slice(1)),d.delete(l.slice(1));else{let r=l.startsWith("+")?l.slice(1):l;t.delete(r),d.add(r)}return{excluded:t,requested:d}}s(xe,"resolveToolSelection");function Se(e){let t=new Map,d=new Set;return{api:{...e,registerTool:s(r=>{let a=r.name.startsWith("ide_capability_");(r.namespace?.name.startsWith("ide_")===!0||a)&&t.set(r.name,{hide:s(()=>e.registerTool({...r,get description(){return r.description},get promptGuidelines(){return r.promptGuidelines},get parameters(){return r.parameters},exposure:"hidden"}),"hide"),restore:s(()=>e.registerTool(r),"restore")}),a&&(xe(e.getSettings().defaultTools??[]).excluded.has(r.name)?d.add(r.name):d.delete(r.name)),d.has(r.name)?t.get(r.name)?.hide():e.registerTool(r)},"registerTool")},reconcile(r=!1,a=[],f=!1){let{excluded:w,requested:p}=xe(e.getSettings().defaultTools??[]);for(let[y,v]of t)w.has(y)!==d.has(y)&&(w.has(y)?(v.hide(),d.add(y)):(v.restore(),d.delete(y)));let T=e.getAllTools().filter(y=>y.exposure!=="hidden"),I=new Set(e.getActiveTools());for(let y of T)r&&!f&&t.has(y.name)&&(p.has(y.name)||y.exposure==="deferred"&&a.includes(y.name))&&I.add(y.name);r&&!w.has("tool_search")&&T.some(y=>y.name==="tool_search")&&T.some(y=>t.has(y.name)&&y.exposure==="deferred")&&I.add("tool_search");let h=e.getActiveTools(),m=[...I].filter(y=>!d.has(y));(m.length!==h.length||m.some(y=>!h.includes(y)))&&e.setActiveTools(m)}}}s(Se,"createIdeToolAvailability");import{Type as st}from"typebox";import{Text as at}from"@earendil-works/pi-tui";function Te(e){return[...new Set(e.filter(t=>t!==void 0&&t!==""))].join(`
|
|
34
|
+
`)}s(Te,"joinUnique");function Ae(e,t){if(t.length===0)return e;let d=e.parameters;if(d.properties===void 0)throw new Error(`Capability target is not an object schema: ${e.name}`);let l={...d.properties};for(let r of t)for(let a of Object.keys(r.parameters??{}))if(!Object.hasOwn(l,a))throw new Error(`Unknown capability parameter: ${e.name}.${a}`);for(let[r,a]of Object.entries(l)){let f=t.map(w=>w.parameters?.[r]);f.some(w=>w!==void 0)&&(l[r]={...a,description:Te([typeof a.description=="string"?a.description:void 0,...f])})}return{...e,description:Te([e.description,...t.flatMap(r=>[r.description,...r.promptGuidelines??[]])]),parameters:{...e.parameters,properties:l},promptGuidelines:[...new Set([...e.promptGuidelines??[],...t.flatMap(r=>r.promptGuidelines??[])])]}}s(Ae,"composeCapabilitySchema");var Re="ide-capabilities/v1";function N(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}s(N,"record");function dt(e){if(!N(e)||typeof e.id!="string")throw new Error("Invalid IDE capability");if(e.version!==1||!/^[a-z][a-z0-9._-]*$/u.test(e.id))throw new Error("Invalid IDE capability identity");if(!Array.isArray(e.tools)||e.tools.some(t=>typeof t!="string"||!t))throw new Error("Invalid IDE capability tools");if(e.tools.length===0&&e.discovery===void 0)throw new Error("A capability needs an existing tool or a discovery loader");if(e.discovery!==void 0){let t=e.discovery;if(!N(t)||typeof t.name!="string"||!/^ide_capability_[a-z0-9_]+$/u.test(t.name)||typeof t.description!="string"||!t.description.trim())throw new Error("Invalid capability discovery metadata");if(t.namespace!==void 0&&(!N(t.namespace)||typeof t.namespace.name!="string"||typeof t.namespace.description!="string"))throw new Error("Invalid capability namespace")}if(!N(e.schemas))throw new Error("Invalid capability schemas");for(let t of Object.values(e.schemas))if(!N(t)||t.description!==void 0&&typeof t.description!="string"||t.parameters!==void 0&&(!N(t.parameters)||Object.values(t.parameters).some(d=>typeof d!="string"))||t.promptGuidelines!==void 0&&(!Array.isArray(t.promptGuidelines)||t.promptGuidelines.some(d=>typeof d!="string")))throw new Error("Invalid capability schema metadata")}s(dt,"validate");function Pe(e){let t=new Map,d=new Map,l=new Set,r=new Set,a=!1,f=s(()=>new Set(e.getAllTools().filter(n=>n.exposure!=="hidden").map(n=>n.name)),"visibleTools"),w=s(n=>[...n.tools,...n.discovery?[n.discovery.name]:[]],"triggers"),p=s((n,o)=>w(n).some(i=>o.has(i)),"available"),T=s(()=>{if(!a)return;let n=f(),o=[...d].map(([i,c])=>{let g=[...t.values()].filter(u=>r.has(u.id)&&p(u,n)).flatMap(u=>u.schemas[i]===void 0?[]:[u.schemas[i]]);return c(g)});for(let i of o)i()},"refresh"),I=s(n=>{let o,i=s(c=>{let g=Ae(n,c),u=JSON.stringify([g.description,g.parameters,g.promptGuidelines]);return()=>{u!==o&&(e.registerTool(g),o=u)}},"prepare");for(let c of t.values()){let g=c.schemas[n.name];g!==void 0&&i([g])}d.set(n.name,i),e.registerTool(n),T()},"registerTool"),h=s(n=>{let o=f(),i=!1;for(let c of t.values())!r.has(c.id)&&p(c,o)&&w(c).some(g=>n.includes(g)&&o.has(g))&&(r.add(c.id),i=!0);i&&(e.appendEntry(Re,{version:1,active:[...r]}),T())},"activate"),m=s(n=>{let o=n.discovery;if(!(o===void 0||l.has(o.name))){if(e.getAllTools().some(i=>i.name===o.name))throw new Error(`Capability loader name is already registered: ${o.name}`);e.registerTool({name:o.name,label:o.name,description:o.description,exposure:"deferred",namespace:o.namespace,parameters:st.Object({}),renderResult(i){return new at(i.content.flatMap(c=>c.type==="text"?[c.text]:[]).join(`
|
|
35
|
+
`),0,0)},async execute(){return h([o.name]),{content:[{type:"text",text:`Enabled capability ${n.id}.`}],details:{capability:n.id}}}}),l.add(o.name)}},"installLoader"),y=s(n=>{r=new Set;for(let o of n.sessionManager.getBranch())o.type!=="custom"||o.customType!==Re||!N(o.data)||o.data.version!==1||!Array.isArray(o.data.active)||(r=new Set(o.data.active.filter(i=>typeof i=="string")));T()},"restore"),v=e.events.on(de,n=>{let o=n;try{let i=o.capability;if(dt(i),t.has(i.id))throw new Error(`Duplicate capability: ${i.id}`);let c=i.discovery?.name;if(c!==void 0&&(d.has(c)||[...t.values()].some(u=>u.discovery?.name===c)||a&&e.getAllTools().some(u=>u.name===c)))throw new Error(`Capability loader name is already registered: ${c}`);for(let[u,x]of Object.entries(i.schemas))d.get(u)?.([x]);let g=structuredClone(i);a&&m(g),t.set(g.id,g),T(),o.accept()}catch(i){o.accept(i instanceof Error?i:new Error(String(i)))}});return e.on("session_shutdown",v),e.on("tool_call",n=>h([n.toolName])),e.on("tool_result",n=>{h([n.toolName]),!(n.toolName!=="tool_search"||n.isError||!N(n.details)||!Array.isArray(n.details.loaded))&&h(n.details.loaded.filter(o=>typeof o=="string"))}),e.events.emit(le,{version:1}),{api:{...e,registerTool:I},finalize(n){e.on("session_start",(o,i)=>{a=!0;let c=[];for(let g of t.values())try{m(g)}catch(u){t.delete(g.id),c.push(u instanceof Error?u.message:String(u))}if(n(),y(i),c.length>0)throw new Error(c.join(`
|
|
36
|
+
`))}),e.on("session_tree",(o,i)=>y(i)),e.on("session_compact",(o,i)=>y(i)),e.on("before_agent_start",T),e.on("turn_start",T)}}}s(Pe,"createIdeCapabilities");import{ToolExecutionComponent as ke}from"@earendil-works/pi-coding-agent";import{Container as Z,Spacer as _e,Text as J}from"@earendil-works/pi-tui";import{isDeepStrictEqual as lt}from"node:util";import{createCodemodeExtension as ct}from"@earendil-works/pi-coding-agent";function Ce(e,t){let d=s(r=>{if(!r.startsWith("mcp__"))return;let a=e.getAllTools(),f=a.find(p=>p.name===r);if(!f||f.namespace||f.exposure==="hidden")return;let w=a.filter(p=>(t.has(p.name)&&p.namespace?.name.startsWith("ide_")===!0||p.name==="codemode"&&p.sourceInfo.source==="builtin"&&p.sourceInfo.path==="builtin:codemode")&&p.exposure!=="hidden"&&p.description===f.description&<(p.parameters,f.parameters));return w.length===1?w[0]?.name:void 0},"source"),l;return e.registerToolRenderer((r,a)=>{let f=d(r);return f!=="codemode"?f===void 0?a():t.get(f):(l||ct()({...e,registerTool:s(w=>{let{renderShell:p,renderCall:T,renderResult:I}=w;l={renderShell:p,renderCall:T,renderResult:I}},"registerTool")}),l??a())}),e.on("before_agent_start",()=>{for(let r of e.getAllTools()){let a=d(r.name),f=a===void 0?void 0:t.get(a);if(!f)continue;let w=Object.getOwnPropertyDescriptors(f);delete w.namespace,w.name={value:r.name,enumerable:!0,configurable:!0,writable:!0},w.exposure={value:r.exposure==="model-only"?r.exposure:"deferred",enumerable:!0,configurable:!0,writable:!0};let p=s(h=>{let m=f.prepareLoadout?.(h);return h.declared.some(y=>y.name===f.name)?{...m,hiddenDeclarations:[...m?.hiddenDeclarations??[],r.name]}:m},"prepareLoadout");w.prepareLoadout={value:p,enumerable:!0,configurable:!0,writable:!0};let T=s(async(h,m,y,v,n)=>{let{result:o,isError:i}=await n.executeTool(f.name,m,{signal:y,onUpdate:v}),{usage:c,...g}=o;return{...g,isError:i}},"execute");w.execute={value:T,enumerable:!0,configurable:!0,writable:!0};let I=Object.defineProperties({},w);e.registerTool(I)}}),d}s(Ce,"registerIdeAliasCompatibility");var Q="ide-nested-results",De=256,Oe=512*1024,Me=8*1024,ut=32*1024,ft=s(()=>({argumentsTruncated:!1,resultsOmitted:!1,callsOmitted:!1,resultsUnavailable:!1}),"retained");function Ne(e){let t=e.retention,d=[t?.argumentsTruncated&&"arguments shortened",t?.resultsOmitted&&"result displays omitted",t?.callsOmitted&&"call panels omitted",t?.resultsUnavailable&&"results unavailable"].filter(Boolean);if(d.length>0)return`Nested IDE display: ${d.join("; ")}. Tool execution and parent output are unchanged.`;if(!t&&e.complete===!1)return"Nested IDE display is incomplete; omission details are unavailable."}s(Ne,"retentionWarning");function pt(e){let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let d=Math.floor(t),l=Math.floor(d/60);return l<60?`${l}m ${d%60}s`:`${Math.floor(l/60)}h ${l%60}m ${d%60}s`}s(pt,"formatToolDuration");function je(e,t=!1){let d=new Map,l=Ce(e,d),r=new Map,a=new Map,f=new Map,w,p=new WeakMap,T=new WeakMap,I=s(n=>{let o=d.get(n),i=o?.renderResult;if(!o||!i)return o;let c=T.get(o);if(!c){let g=new WeakMap;c={...o,renderResult(u,x,b,P){let S=P.lastComponent&&g.get(P.lastComponent),C=i.call(o,u,x,b,{...P,lastComponent:S??P.lastComponent});if(x.isPartial||P.durationMs===void 0)return C;let A=new Z;return A.addChild(C),A.addChild(new _e(1)),A.addChild(new J(b.fg("muted",`Took ${pt(P.durationMs)}`),0,0)),g.set(A,C),A}},T.set(o,c)}return c},"timedDefinition"),h=s((n,o,i)=>{o.result=i,o.resultOmitted=!1;try{let g=JSON.stringify(n);if(Buffer.byteLength(g)<=Oe){o.result=JSON.parse(JSON.stringify(i));return}}catch{}let c=i.details&&typeof i.details=="object"?Object.entries(i.details).filter(([g,u])=>(g==="source"||g==="fullOutputPath")&&typeof u=="string").map(([g,u])=>`${g}: ${String(u)}`):[];o.result={content:[{type:"text",text:["Result presentation omitted (history size limit or unsupported payload).",...c].join(`
|
|
37
|
+
`)}],details:void 0,isError:i.isError},o.resultOmitted=!0},"retainResult"),m=s(()=>{r.clear(),a.clear(),f.clear()},"clear");e.on("session_start",(n,o)=>{m(),o.mode==="tui"&&o.ui.setWidget(Q,i=>(w=i,{render:s(()=>[],"render"),invalidate:s(()=>{},"invalidate")}))}),e.on("session_tree",m),e.on("session_shutdown",m),e.on("tool_execution_start",(n,o)=>{if(n.parentToolCallId===void 0){let S=l(n.toolName);S!==void 0&&r.set(n.toolCallId,S);return}let i=a.get(n.parentToolCallId)??n.parentToolCallId;if(a.set(n.toolCallId,i),r.get(i)===n.toolName||!d.has(n.toolName))return;let c=f.get(i);if(c||(c={parentToolCallId:i,cwd:o.cwd,calls:[],retention:ft()},f.set(i,c)),c.calls.length>=De){c.retention.callsOmitted=!0;return}let g=JSON.stringify(n.args),u=ut-c.calls.reduce((S,C)=>S+Buffer.byteLength(JSON.stringify(C.args)),0)-(De-c.calls.length-1)*2,x=Buffer.byteLength(g)>Math.min(Me,u),b=x?Object.fromEntries(Object.entries(n.args).map(([S,C])=>[S,typeof C=="string"?C.slice(0,200)+(C.length>200?"\u2026 [omitted]":""):"[omitted]"])):JSON.parse(g),P=Buffer.byteLength(JSON.stringify(b))<=Math.min(Me,u)?b:{};c.calls.push({id:n.toolCallId,name:n.toolName,args:P,argumentsTruncated:x})}),e.on("tool_execution_end",n=>{r.delete(n.toolCallId);let o=a.get(n.toolCallId);if(o===void 0)return;a.delete(n.toolCallId);let i=f.get(o),c=i?.calls.find(g=>g.id===n.toolCallId);if(i&&c){typeof n.durationMs=="number"&&Number.isFinite(n.durationMs)&&(c.durationMs=n.durationMs);let g=n.result;h(i,c,{content:g.content.filter(u=>u.type!=="text"||!u.text.startsWith(`
|
|
35
38
|
|
|
36
39
|
---
|
|
37
40
|
|
|
38
|
-
# Guide:`)),details:
|
|
39
|
-
${
|
|
40
|
-
`)}`}],details:void 0,isError:
|
|
41
|
-
`)});let
|
|
41
|
+
# Guide:`)),details:g.details,isError:n.isError})}}),e.on("message_end",n=>{if(n.message.role!=="toolResult")return;let o=f.get(n.message.toolCallId);if(!o)return;f.delete(n.message.toolCallId);for(let[u,x]of a)x===o.parentToolCallId&&a.delete(u);let i=o.calls.filter(u=>!u.batched),c={...o,parentToolName:n.message.toolName,calls:[],retention:{...o.retention,argumentsTruncated:i.some(u=>u.argumentsTruncated===!0),resultsOmitted:i.some(u=>u.resultOmitted===!0),resultsUnavailable:i.some(u=>!u.result)}},g=Buffer.byteLength(JSON.stringify(c));for(let u of i){let x=JSON.stringify(u);if(g+=Buffer.byteLength(x)+(c.calls.length>0?1:0),g>Oe){c.retention.callsOmitted=!0;break}c.calls.push(JSON.parse(x))}e.appendEntry(Q,c)}),e.registerEntryRenderer(Q,s(function n(o,i,c){if(!Array.isArray(o.data?.calls))return;let g=t&&o.data.parentToolName==="codemode"&&!i.expanded,u=g?o.data.calls.filter(S=>S.result?.isError):o.data.calls;if(g&&u.length===0){let S=Ne(o.data);return S?new J(c.fg("warning",S),0,0):new Z}if(!w)return{render:s(S=>w?n(o,i,c)?.render(S)??[]:[],"render"),invalidate:s(()=>{o.data&&p.get(o.data)?.invalidate()},"invalidate")};let x=Ne(o.data),b=g?void 0:p.get(o.data);if(!b){b=new Z;for(let S of u){let C=new ke(S.name,S.id,S.renderArgs??S.args,{showImages:!0},S.resultOmitted||S.omitted||!S.result?void 0:I(S.name),w,o.data.cwd);S.result?C.updateResult({...S.result,...S.durationMs===void 0||S.groupedResult===!0?{}:{durationMs:S.durationMs}}):C.updateResult({content:[{type:"text",text:"Result unavailable in this saved display."}],isError:!0}),b.addChild(new _e(1)),b.addChild(C)}x&&b.addChild(new J(c.fg("warning",x),0,0)),g||p.set(o.data,b)}let P=b.children.at(-1);x&&P instanceof J&&P.setText(c.fg("warning",x));for(let S of b.children)S instanceof ke&&S.setExpanded(i.expanded);return b},"renderEntry"));let y=s(()=>{e.events.on(ae,n=>{let o=n,i=f.get(o.parentToolCallId);if(!i)return;let c=z(o.result.details),g=o.calls.findLast(x=>!o.unchangedCopyCalls?.includes(x)),u="callIdsByResult"in c&&Array.isArray(c.callIdsByResult)?c.callIdsByResult:[];for(let x of o.calls){let b=i.calls.find(A=>A.id===x);if(!b)continue;let P=c.results?.filter((A,E)=>(u[E]===x||u.length===0&&o.calls.length===1)&&A.data.errors?.some(k=>k.code==="POST_WRITE_FAILED"||k.code==="POST_EDIT_FAILED"))??[];if(b.postWriteFailure=P.length>0,b.postWriteFailure){b.batched=!1,delete b.renderArgs,h(i,b,{content:o.result.content,details:{results:P,effect:"applied"},isError:!0});continue}let S=o.mutationResults?.get(x),C=S?.details.metadata?.copyRollback;if(b.name==="copy"&&S&&(C==="restored"||C==="failed")){b.copyRollback=C,b.batched=!1,h(i,b,{content:S.content,details:z(S.details),isError:!0});continue}if(b.unchangedCopy=b.name==="copy"&&o.unchangedCopyCalls?.includes(x)===!0,b.batched=!b.unchangedCopy&&x!==g,b.groupedResult=!b.batched&&!b.unchangedCopy&&o.calls.filter(A=>!o.unchangedCopyCalls?.includes(A)).length>1,b.unchangedCopy)h(i,b,{content:[{type:"text",text:"No changes: destination already has this text."}],details:{},isError:!1});else if(b.batched)b.result=void 0;else{new Set(c.mutationRender?.map(E=>E.path)).size>1&&(b.renderArgs={}),b.rollback=c.results?.some(E=>E.data.rollback!==void 0)===!0;let A=b.result?.details?.metadata?.targetUnavailable;h(i,b,{content:o.result.content,details:typeof A=="string"?{...c,metadata:{...c.metadata,targetUnavailable:A}}:c,isError:o.result.isError===!0||b.rollback})}}}),e.on("tool_result",n=>{let o=n.details,i=f.get(n.toolCallId);if(i&&o&&typeof o=="object"&&"editorBatchResults"in o&&Array.isArray(o.editorBatchResults))for(let c of o.editorBatchResults)for(let g of c.data?.operations??[]){let u=i.calls.find(b=>b.id===g.id);if(!u)continue;let x=g.errors.map(b=>b.message);u.rollback||u.postWriteFailure||u.copyRollback!==void 0||u.unchangedCopy&&x.length===0&&g.effect==="not-applied"||(x.length>0||g.effect!=="applied")&&(u.batched=!1,delete u.renderArgs,h(i,u,{content:[{type:"text",text:`${u.name}: ${g.effect}.
|
|
42
|
+
${x.join(`
|
|
43
|
+
`)}`}],details:void 0,isError:x.length>0||g.effect==="unknown"}))}})},"finalize");return{api:{...e,registerTool:s(n=>{d.set(n.name,n),e.registerTool(n)},"registerTool")},finalize:y}}s(je,"createNestedIdeRendering");function ee(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}s(ee,"isRecord");function $e(e,t){let d=e.map(l=>!ee(l)||l.type!=="function"||typeof l.name!="string"||!t.has(l.name)||l.strict!==void 0?l:{...l,strict:!1});return d.some((l,r)=>l!==e[r])?d:e}s($e,"relaxed");function Be(e,t){if(!ee(e))return e;let d=e;if(Array.isArray(e.tools)){let r=$e(e.tools,t);r!==e.tools&&(d={...d,tools:r})}let l=e.input;if(Array.isArray(l)){let r=l.map(a=>{if(!ee(a)||a.type!=="additional_tools"||!Array.isArray(a.tools))return a;let f=$e(a.tools,t);return f===a.tools?a:{...a,tools:f}});r.some((a,f)=>a!==l[f])&&(d={...d,input:r})}return d}s(Be,"preserveResponsesToolOmission");function Le(e,t,d){let l=new Map,r=[],a=[];function f(I,h){pe(I,h);for(let m of h){let y=l.get(m.id);if(y)throw new Error(`Setting ${m.id} is already registered by ${y.owner}`)}for(let m of h)if(l.set(m.id,{owner:I,definition:m}),m.kind==="boolean"){let{kind:y,group:v,...n}=m;r.push({...n,...v==="ui"?{group:v}:{}})}else a.push({...m,group:m.group??"features"})}s(f,"register"),f("pi-agent-ide",[...t.map(I=>({...I,kind:"boolean"})),...d]);async function w(I,h){let m=l.get(I)?.definition;if(!m)throw new Error(`Unknown Agent IDE setting: ${I}`);let y=$(process.env,void 0,h),[v,n]=await Promise.all([O(y.globalPath),O(y.projectPath)]),o=m.kind==="boolean"?{...F(v),...F(n)}:{...v.preferences,...n.preferences},i=Object.hasOwn(o,I),c=i?o[I]:m.default;if(c===void 0||(m.kind==="boolean"?typeof c!="boolean":typeof c!="string"))throw new Error(`Invalid saved setting type: ${I}`);if(m.kind==="choice"&&!m.values.some(g=>g.value===c))throw new Error(`Invalid saved setting choice: ${I}`);return{value:c,overridden:i}}s(w,"read");let p=e.events.on(ce,I=>{let h=I;try{f(h.owner,h.definitions),h.accept()}catch(m){h.accept(m instanceof Error?m:new Error(String(m)))}}),T=e.events.on(ue,I=>{let h=I;h.accept(w(h.id,h.cwd))});return e.on("session_shutdown",()=>{p(),T()}),e.events.emit(fe,void 0),{flags:r,preferences:a,read:w}}s(Le,"createAgentIdeSettingsRegistry");import{VERSION as We}from"@earendil-works/pi-coding-agent";import{getCurrentTools as gt}from"@earendil-works/pi-ai";function Fe(e){let t=/^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/u.exec(e);if(t===null||te(t,[0,99,1])<0||Ue(t,[0,99,1]))throw new Error(`Pi Agent IDE requires Pi 0.99.1 or newer; this host is ${e}. Update Pi before loading the extension.`)}s(Fe,"assertSupportedHost");function Ge(e){let t=/^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?/u.exec(e);return t!==null&&te(t,[1,3,0])>=0&&!Ue(t,[1,3,0])}s(Ge,"hostOwnsToolLoadout");function te(e,t){return e.slice(1,4).map((d,l)=>Number(d)-(t[l]??0)).find(d=>d!==0)??0}s(te,"compareVersion");function Ue(e,t){return te(e,t)===0&&e[4]!==void 0}s(Ue,"isPrereleaseOf");async function mt(e){Fe(We);let t=await ge($()),d=t.preferences?.["ui.codemode"]!=="on",l=je(e,d),r=ie(l.api),a=Se(r.api),f=Pe(a.api),w=!1;e.on("session_shutdown",()=>{w=!0}),e.on("before_provider_request",(m,y)=>{if(w||y.model?.api!=="openai-responses")return;let v=new Set(e.getAllTools().filter(n=>n.namespace?.name.startsWith("ide_")).map(n=>n.name));return Be(m.payload,v)}),e.on("session_start",(m,y)=>{if(w=!1,Ge(We)){a.reconcile(!0,[],!0);return}let v=m.reason==="reload"?[]:gt(y.sessionManager.getBranch().flatMap(n=>n.type==="message"?[n.message]:[])).map(n=>n.name);a.reconcile(!0,v)}),e.on("before_agent_start",m=>{a.reconcile();let y=m.systemPromptOptions;y.toolSnippets.bash&&(y.toolSnippets.bash=y.toolSnippets.bash.replace("Execute bash commands (ls, grep, find, etc.)","Execute Bash commands"));let v=/^<rules>\n([\s\S]*?)\n<\/rules>$/mu.exec(m.systemPrompt)?.[1];v?.includes("- Use bash for file operations like ls, rg, find")&&(y.sections.rules=v.replace(/(?:^|\n)- Use bash for file operations like ls, rg, find(?=\n|$)/u,"").trim());let n=e.getAllTools().filter(u=>u.exposure!=="hidden"),o=e.getActiveTools(),i=o.includes("tool_search")?"Use tool_search to find":o.includes("codemode")?"Use searchTools inside codemode to find":"Enable native tool_search to find",c=n.filter(u=>u.namespace?.name==="ide_git").map(u=>u.name),g=[...c.length===0?[]:[`${i} ${c.join(" and ")} in ide_git when staging or unstaging selected Git changes.`],...n.some(u=>u.name==="debug"&&u.namespace?.name==="ide_debug")?[`${i} debug in ide_debug when creating a debugger session.`]:[]];y.sections.ide_discovery=g.join(`
|
|
44
|
+
`)});let p=Ee(e,{"pi-agent-ide-no-animations":t.noAnimations??!1,"pi-agent-ide-no-post-processing":t.noPostProcessing??!1,...t.flags});p.register({id:"pi-agent-ide-developer-mode",name:"Developer mode",description:"Enable development commands, including manual setup-hint previews.",default:!1}),p.register({id:"pi-agent-ide-no-animations",name:"Static edit previews",group:"ui",description:"Show edit results immediately, without animated playback.",default:!1}),p.register({id:"pi-agent-ide-no-post-processing",name:"Skip automatic post-processing",description:"Skip automatic formatting and diagnostics after edits. Explicit diagnostic reads still work.",default:!1}),p.register({id:"pi-agent-ide-no-diagnostic-buffer",name:"Immediate diagnostic notices",description:"Send findings immediately instead of combining reports received over five seconds.",group:"ui",default:!1}),p.register({id:"pi-agent-ide-code-review",name:"Jev code review",description:"Review saved edit fragments against project YAML rules in the background. Sends code to a connected Jev provider.",default:!1}),p.register({id:"pi-agent-ide-code-review-capture",name:"Capture code-review rules",description:"Use the packaged skill to propose reusable rules from user review feedback. Save only after confirmation.",default:!1});let T=Le(e,[...p.definitions,{id:"pi-agent-ide-yolo",name:"YOLO: allow all operations",description:"Skip existing operation confirmation dialogs unless an extension explicitly disables its YOLO setting. Safety checks and remote permissions still apply.",default:!1,labels:{on:"on",off:"off"}},{id:"pi-agent-ide-filesystem-yolo",name:"YOLO: filesystem operations",description:"Skip filesystem operation confirmations. Default inherits common YOLO; Off disables persistent permission, not remembered session grants. Protected paths stay protected.",default:!1,labels:{on:"on",off:"off"}}],U);re(e,{async isAllowed(m,y){if(m.yoloSetting===void 0)return!1;let v=await V(e.events,m.yoloSetting,y.cwd);if(typeof v.value!="boolean")throw new Error(`Operation approval needs a boolean YOLO setting: ${m.yoloSetting}`);return v.overridden?v.value:(await V(e.events,"pi-agent-ide-yolo",y.cwd)).value===!0}}),we(e,T.flags,T.preferences),ve(e),se(e,[Ie(T.flags,T.preferences)]);let I=L(_,t.preset??"full"),{enabled:h}=W(_,[...I,...t.disabled],t.enabled);for(let m of h)await m.register(f.api,{preferences:t.preferences??{}});f.finalize(()=>a.reconcile(!0,[],!0)),l.finalize(),r.finalize()}s(mt,"registerUnifiedPiAgentIde");export{mt as default};
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
- `LINE#HASH` from `read` with `views: ["anchors"]` selects a line. `scope-begin-HASH` / `scope-end-HASH` from the `ast` view select a syntax block. `SEARCH#…:line` selects a search match's line, `SEARCH#…:match` the match itself. `begin` and `end` select the first and last line.
|
|
6
6
|
- Without an anchor, use the shortest unique exact text.
|
|
7
|
+
- A whole line includes its own LF or CRLF, when present. An unterminated final line never includes the preceding separator. Empty Replace removes the same range as Delete.
|
|
8
|
+
- Copy and Move transfer the selected source text unchanged, including its line endings. Select the source independently of the destination.
|
|
9
|
+
- Insert adds text at the start or end of a selection. Whole-line selections add needed line breaks; exact selections keep their character boundaries. New Replace/Insert payloads follow the target's line-ending style.
|
|
7
10
|
- With `start` and `end`, the selection runs from the start of `start` to the end of `end`. Exact text keeps character boundaries; line anchors take whole lines. When both `start` and `end` match complete lines, such as BEGIN/END marker lines, the selection takes those lines whole.
|
|
8
11
|
- After an exact-text selector fails, exact text is blocked for that file until an anchor-based edit succeeds. Use one of the anchors the error returns; don't guess another string.
|
|
9
12
|
- Anchors and results go stale when their file changes. Read or search again before reusing them.
|
package/docs/tools.md
CHANGED
|
@@ -129,7 +129,7 @@ Every response that includes these values includes an `Anchors:` syntax legend a
|
|
|
129
129
|
|
|
130
130
|
These values are both edit anchors and typed text resources. `read` and mutation `path` fields accept each complete `SEARCH#...` value directly; no filesystem path is added before or around it. The text search resolver turns them into ordered Resource sources and character ranges; consumers use that typed result and do not parse the `SEARCH#` string themselves.
|
|
131
131
|
|
|
132
|
-
A `:line` range includes its LF or CRLF line ending. A whole-line replacement preserves that separator when the replacement text does not provide one. Insertion happens after the line by default and before it when `before: true`. A final line without a line ending selects through EOF and stays without a trailing separator when replaced, unless the replacement text provides a line ending. Whole-line deletion removes
|
|
132
|
+
A `:line` range includes its LF or CRLF line ending. A whole-line replacement preserves that separator when the replacement text does not provide one. Insertion happens after the line by default and before it when `before: true`. A final line without a line ending selects through EOF and stays without a trailing separator when replaced, unless the replacement text provides a line ending. Whole-line deletion removes only that line and its own terminator, when present. An unterminated final line never consumes the preceding separator. Empty Replace removes the same range as Delete. Adjacent whole-line deletions are coalesced. A `:match` range contains only the matched characters, so deleting it keeps surrounding text and line endings.
|
|
133
133
|
|
|
134
134
|
Per-result forms keep the search-time snapshot and fail as stale after their matched file changes. Complete `:all` forms rerun the original search recipe when a matched file changes, then select the current complete result set. Limited or otherwise incomplete searches omit the `:all` forms. A forged `:all` value for an incomplete search is rejected.
|
|
135
135
|
|
|
@@ -168,7 +168,7 @@ Use an ordinary path without text selectors for whole-file Write or whole-object
|
|
|
168
168
|
|
|
169
169
|
To save an image a Read returned, such as a terminal screenshot or image file, pass that Read result as Write `content`: the image value itself in Codemode, or the result's UUID or `RESULT#` reference in a direct call. Write saves the exact image bytes, and the file extension must match the image type (`.png`, `.jpg`/`.jpeg`, `.webp`, `.gif`). Several frames become numbered files: `<name>-01.png`, `<name>-02.png`… beside the path, or `frame-01.png`… inside a folder path. Any other text, including a UUID of a result without images, is not image content: plain text is written as before, and an image-less result reference is refused.
|
|
170
170
|
|
|
171
|
-
For selected-text work, a path identifies the source and anchors identify the span. Pass an unchanged Read, Search or mutation result when it already selects the wanted text. `replace` changes each selected range; `delete` removes those ranges while keeping the file; `insert` adds text
|
|
171
|
+
For selected-text work, a path identifies the source and anchors identify the span. Pass an unchanged Read, Search or mutation result when it already selects the wanted text. `replace` changes each selected range; `delete` removes those ranges while keeping the file; `insert` adds text at the selected range's start or end. Whole-line selections add needed line breaks; exact selections insert at their character boundaries. A directory listing or read-only view does not grant text-edit authority.
|
|
172
172
|
|
|
173
173
|
Narrow a result with Search rather than reconstructing boundaries from previews. Copy and Move can pair source and destination selections, with equal counts. With ordinary file paths, text transfers use `targetStart` as the insertion anchor or `targetStart`/`targetEnd` as the replacement range. These selectors do not apply to whole-object transfers.
|
|
174
174
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-doctor",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,27 +8,27 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
"./api/catalog": {
|
|
10
10
|
"types": "./src/catalog.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-24.js"
|
|
12
12
|
},
|
|
13
13
|
"./api/connect-plugin": {
|
|
14
14
|
"types": "./src/connect-plugin.ts",
|
|
15
|
-
"default": "./runtime/entry-
|
|
15
|
+
"default": "./runtime/entry-25.js"
|
|
16
16
|
},
|
|
17
17
|
"./api/evidence": {
|
|
18
18
|
"types": "./src/evidence.ts",
|
|
19
|
-
"default": "./runtime/entry-
|
|
19
|
+
"default": "./runtime/entry-26.js"
|
|
20
20
|
},
|
|
21
21
|
"./api/executable": {
|
|
22
22
|
"types": "./src/executable.ts",
|
|
23
|
-
"default": "./runtime/entry-
|
|
23
|
+
"default": "./runtime/entry-27.js"
|
|
24
24
|
},
|
|
25
25
|
"./api/project-probes": {
|
|
26
26
|
"types": "./src/project-probes.ts",
|
|
27
|
-
"default": "./runtime/entry-
|
|
27
|
+
"default": "./runtime/entry-28.js"
|
|
28
28
|
},
|
|
29
29
|
"./api/plugin-protocol": {
|
|
30
30
|
"types": "./src/plugin-protocol.ts",
|
|
31
|
-
"default": "./runtime/entry-
|
|
31
|
+
"default": "./runtime/entry-29.js"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-documentation",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./src/index.ts",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"types": "./src/index.ts",
|
|
9
|
-
"default": "./runtime/entry-
|
|
9
|
+
"default": "./runtime/entry-30.js"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../dist/entry-30.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.9.
|
|
10
|
-
"pi-agent-invariant": "0.9.
|
|
11
|
-
"pi-agent-read": "0.9.
|
|
12
|
-
"pi-agent-resource": "0.9.
|
|
13
|
-
"pi-agent-text": "0.9.
|
|
14
|
-
"pi-agent-text-editor": "0.9.
|
|
9
|
+
"pi-agent-image": "0.9.1",
|
|
10
|
+
"pi-agent-invariant": "0.9.1",
|
|
11
|
+
"pi-agent-read": "0.9.1",
|
|
12
|
+
"pi-agent-resource": "0.9.1",
|
|
13
|
+
"pi-agent-text": "0.9.1",
|
|
14
|
+
"pi-agent-text-editor": "0.9.1"
|
|
15
15
|
},
|
|
16
16
|
"pi": {
|
|
17
17
|
"extensions": [
|
|
18
|
-
"./runtime/entry-
|
|
18
|
+
"./runtime/entry-31.js"
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-image",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.9.
|
|
10
|
-
"pi-agent-resource": "0.9.
|
|
9
|
+
"pi-agent-image": "0.9.1",
|
|
10
|
+
"pi-agent-resource": "0.9.1"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-32.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-jq",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
"./api/jq": {
|
|
10
10
|
"types": "./src/api/jq.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-33.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"pi-agent-doctor": "0.9.
|
|
16
|
-
"pi-agent-documentation": "0.9.
|
|
17
|
-
"pi-agent-read": "0.9.
|
|
18
|
-
"pi-agent-text": "0.9.
|
|
15
|
+
"pi-agent-doctor": "0.9.1",
|
|
16
|
+
"pi-agent-documentation": "0.9.1",
|
|
17
|
+
"pi-agent-read": "0.9.1",
|
|
18
|
+
"pi-agent-text": "0.9.1"
|
|
19
19
|
},
|
|
20
20
|
"pi": {
|
|
21
21
|
"extensions": [
|
|
22
|
-
"./runtime/entry-
|
|
22
|
+
"./runtime/entry-34.js"
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-pdf",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-pdf": "0.9.
|
|
7
|
-
"pi-agent-resource": "0.9.
|
|
6
|
+
"pi-agent-pdf": "0.9.1",
|
|
7
|
+
"pi-agent-resource": "0.9.1"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-35.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-text",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-resource": "0.9.
|
|
10
|
-
"pi-agent-text": "0.9.
|
|
9
|
+
"pi-agent-resource": "0.9.1",
|
|
10
|
+
"pi-agent-text": "0.9.1"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-36.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|