pi-agent-ide 0.5.1 → 0.6.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/CHANGELOG.md +42 -0
- package/README.md +10 -4
- package/dist/chunk-22CLOM2D.js +1 -0
- package/dist/{chunk-LY6U5EAD.js → chunk-2527OQ4Y.js} +1 -1
- package/dist/chunk-3XJ3KDPZ.js +16 -0
- package/dist/chunk-5JELU6RV.js +7 -0
- package/dist/chunk-DDKHZZDO.js +5 -0
- package/dist/chunk-FEDVTZJG.js +1 -0
- package/dist/chunk-HSM6R7IB.js +27 -0
- package/dist/chunk-K5G4FDXD.js +1 -0
- package/dist/chunk-M5IVSCR2.js +1 -0
- package/dist/chunk-OYWIZII6.js +1 -0
- package/dist/{chunk-7ALCBKCW.js → chunk-PCZH7GOX.js} +11 -11
- package/dist/{chunk-DQXPQOF7.js → chunk-SQ7ZTGOP.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 -0
- package/dist/entry-18.js +1 -1
- package/dist/entry-19.js +1 -1
- package/dist/entry-20.js +1 -1
- package/dist/entry-21.js +1 -1
- package/dist/entry-22.js +1 -2
- package/dist/entry-23.js +2 -1
- 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 -12
- package/dist/entry-28.js +12 -1
- package/dist/entry-29.js +1 -1
- package/dist/entry-30.js +1 -1
- package/dist/entry-31.js +1 -1
- package/dist/entry-32.js +1 -4
- package/dist/entry-33.js +3 -8
- package/dist/entry-34.js +9 -1
- package/dist/entry-35.js +1 -1
- package/dist/entry-36.js +1 -1
- package/dist/entry-37.js +1 -1
- package/dist/entry-38.js +1 -1
- package/dist/entry-39.js +1 -1
- package/dist/entry-40.js +1 -1
- package/dist/entry-41.js +1 -18
- package/dist/entry-42.js +18 -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 -7
- package/dist/entry-47.js +7 -11
- package/dist/entry-48.js +11 -1
- package/dist/entry-49.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 -0
- package/dist/entry-57.js +0 -1
- package/dist/entry-58.js +1 -0
- package/dist/entry-59.js +0 -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 -0
- package/dist/entry-66.js +0 -1
- package/dist/entry-67.js +1 -0
- package/dist/entry-68.js +0 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-70.js +1 -1
- package/dist/entry-71.js +1 -203
- package/dist/entry-72.js +254 -25
- package/dist/entry-73.js +30 -2
- package/dist/entry-74.js +2 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-76.js +1 -3
- package/dist/entry-77.js +3 -3
- package/dist/entry-78.js +3 -1
- package/dist/entry-79.js +1 -1
- package/dist/entry-80.js +1 -1
- package/dist/entry-81.js +1 -0
- package/dist/pi-agent-ide.js +3 -3
- package/docs/configuration.md +3 -1
- package/docs/tools.md +12 -0
- package/node_modules/pi-agent-doctor/package.json +6 -6
- package/node_modules/pi-agent-doctor/runtime/entry-22.js +1 -0
- package/node_modules/pi-agent-filesystem/package.json +7 -7
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- 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-26.js +2 -0
- package/node_modules/pi-agent-ide-ast/package.json +12 -11
- package/node_modules/pi-agent-ide-ast/runtime/entry-27.js +0 -1
- package/node_modules/pi-agent-ide-ast/runtime/entry-28.js +2 -0
- package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +8 -6
- package/node_modules/pi-agent-ide-changes/package.json +8 -8
- package/node_modules/pi-agent-ide-changes/runtime/entry-29.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-lint/src/command-linter.ts +3 -1
- package/node_modules/pi-agent-ide-lsp/package.json +10 -10
- package/node_modules/pi-agent-ide-lsp/runtime/entry-34.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 +11 -11
- package/node_modules/pi-agent-read/runtime/entry-41.js +0 -1
- package/node_modules/pi-agent-read/runtime/entry-42.js +2 -0
- package/node_modules/pi-agent-read/src/api/read-parameters.ts +2 -2
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +11 -6
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-search/package.json +7 -7
- package/node_modules/pi-agent-search/runtime/entry-46.js +0 -1
- package/node_modules/pi-agent-search-text/package.json +9 -9
- package/node_modules/pi-agent-search-text/runtime/entry-48.js +1 -0
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text/runtime/entry-50.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-51.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/index.ts +3 -3
- package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-52.js +0 -1
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-53.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/src/config.ts +2 -2
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-54.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-55.js +2 -0
- package/node_modules/pi-agent-text-editor/package.json +25 -25
- package/node_modules/pi-agent-text-editor/runtime/entry-71.js +0 -1
- package/node_modules/pi-agent-text-editor/src/core/apply/execution.ts +125 -3
- package/node_modules/pi-agent-text-editor/src/core/apply/mixed-source.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +14 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/output.ts +32 -3
- package/node_modules/pi-agent-text-editor/src/core/apply/prompt.ts +21 -19
- package/node_modules/pi-agent-text-editor/src/core/apply/renderer.ts +37 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/runtime.ts +85 -34
- package/node_modules/pi-agent-text-editor/src/core/apply/tool.ts +2 -3
- package/node_modules/pi-agent-text-editor/src/core/apply/transaction.ts +589 -241
- package/node_modules/pi-agent-text-editor/src/core/post-edit-scope.ts +5 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-config.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +9 -1
- package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +53 -0
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +11 -41
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +8 -18
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +11 -41
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -19
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-74.js +2 -0
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-ui/package.json +2 -2
- package/node_modules/pi-agent-tool-ui/runtime/entry-76.js +1 -0
- package/node_modules/pi-agent-web/package.json +7 -7
- 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-81.js +2 -0
- package/package.json +43 -38
- package/src/api/path-identity.ts +15 -0
- package/src/composite/builtin-extensions.ts +7 -2
- package/src/composite/module-labels.ts +4 -0
- package/src/composite/module-settings.ts +34 -14
- package/src/composite/preferences.ts +46 -3
- package/src/composite/selection.ts +5 -1
- package/src/doctor/inventory.ts +7 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
- 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-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-26.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-23.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
- 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-81.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-77.js +2 -0
- package/src/extensions/pi-agent-read/package.json +11 -11
- package/src/extensions/pi-agent-read/runtime/entry-41.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-42.js +2 -0
- package/src/extensions/pi-agent-read/src/api/read-parameters.ts +2 -2
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +11 -6
- package/src/extensions/pi-agent-search/package.json +7 -7
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-48.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-49.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-46.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-47.js +2 -0
- package/src/extensions/pi-agent-text-editor/package.json +25 -25
- 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-51.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.ts +3 -3
- 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-52.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-53.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/config.ts +2 -2
- 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-54.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-55.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 +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-74.js +2 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-71.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-72.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/execution.ts +125 -3
- package/src/extensions/pi-agent-text-editor/src/core/apply/mixed-source.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +14 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/output.ts +32 -3
- package/src/extensions/pi-agent-text-editor/src/core/apply/prompt.ts +21 -19
- package/src/extensions/pi-agent-text-editor/src/core/apply/renderer.ts +37 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/runtime.ts +85 -34
- package/src/extensions/pi-agent-text-editor/src/core/apply/tool.ts +2 -3
- package/src/extensions/pi-agent-text-editor/src/core/apply/transaction.ts +589 -241
- package/src/extensions/pi-agent-text-editor/src/core/post-edit-scope.ts +5 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-config.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +9 -1
- package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +53 -0
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +11 -41
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +8 -18
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +11 -41
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -19
- package/src/pi-agent-ide.ts +15 -2
- package/src/plugins/pi-agent-ide-ast/package.json +12 -11
- package/src/plugins/pi-agent-ide-ast/runtime/entry-27.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-28.js +2 -0
- package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +8 -6
- package/src/plugins/pi-agent-ide-changes/package.json +8 -8
- package/src/plugins/pi-agent-ide-changes/runtime/entry-29.js +0 -1
- package/src/plugins/pi-agent-ide-debugger/index.ts +2 -8
- package/src/plugins/pi-agent-ide-debugger/src/adapter-executables.ts +31 -0
- package/src/plugins/pi-agent-ide-debugger/src/breakpoint-view.ts +3 -1
- package/src/plugins/pi-agent-ide-debugger/src/catalog.ts +24 -23
- package/src/plugins/pi-agent-ide-debugger/src/dap-client.ts +5 -2
- package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +55 -17
- package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +55 -22
- 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-lint/src/command-linter.ts +3 -1
- package/src/plugins/pi-agent-ide-lsp/package.json +10 -10
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-34.js +2 -0
- package/src/plugins/pi-agent-ide-processes/src/registry.ts +4 -0
- package/src/plugins/pi-agent-ide-processes/src/ui.ts +18 -9
- package/src/plugins/pi-agent-ide-terminal/src/process-provider.ts +1 -0
- package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +1 -0
- package/src/plugins/pi-agent-ide-terminal/src/tools.ts +2 -2
- package/src/plugins/pi-agent-ide-terminal/src/types.ts +1 -0
- package/src/plugins/pi-agent-ide-vision/index.ts +232 -0
- package/src/plugins/pi-agent-ide-vision/src/vision.ts +530 -0
- package/src/plugins/pi-agent-ide-vision/src/windows-display-capture.ps1 +30 -0
- package/src/plugins/pi-agent-ide-vision/src/windows-window-capture.ps1 +33 -0
- package/dist/chunk-5PLV4HLG.js +0 -1
- package/dist/chunk-G725MARR.js +0 -16
- package/dist/chunk-HKXDP2FD.js +0 -7
- package/dist/chunk-IRECDTJG.js +0 -27
- package/dist/chunk-J4RTW44E.js +0 -1
- package/dist/chunk-NZYDMBM6.js +0 -1
- package/dist/chunk-WGGIQ7IJ.js +0 -1
- package/dist/entry-17.js +0 -1
- package/node_modules/pi-agent-doctor/runtime/entry-17.js +0 -1
- package/node_modules/pi-agent-filesystem/runtime/entry-22.js +0 -2
- package/node_modules/pi-agent-ide-ast/runtime/entry-26.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-28.js +0 -1
- package/node_modules/pi-agent-image/runtime/entry-34.js +0 -1
- package/node_modules/pi-agent-resource/runtime/entry-42.js +0 -1
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-50.js +0 -2
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-51.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-53.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-55.js +0 -1
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-74.js +0 -1
- package/node_modules/pi-agent-web/runtime/entry-76.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-23.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-22.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-77.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-76.js +0 -2
- package/src/extensions/pi-agent-read/runtime/entry-37.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-47.js +0 -2
- package/src/extensions/pi-agent-search/runtime/entry-43.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-50.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-51.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-53.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-72.js +0 -2
- package/src/extensions/pi-agent-text-editor/runtime/entry-55.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-26.js +0 -1
- package/src/plugins/pi-agent-ide-changes/runtime/entry-28.js +0 -1
- /package/node_modules/{pi-agent-filesystem-image → pi-agent-filesystem}/runtime/entry-23.js +0 -0
- /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-24.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-25.js +0 -0
- /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-30.js +0 -0
- /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-31.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-32.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-33.js +0 -0
- /package/node_modules/{pi-agent-invariant → pi-agent-image}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-pdf → pi-agent-invariant}/runtime/entry-36.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-37.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-43.js +0 -0
- /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-47.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-49.js +0 -0
- /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor}/runtime/entry-72.js +0 -0
- /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-73.js +0 -0
- /package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-75.js +0 -0
- /package/node_modules/{pi-agent-web-html → pi-agent-web}/runtime/entry-77.js +0 -0
- /package/node_modules/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-78.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-79.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-80.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-24.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-25.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-78.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-79.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-80.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-73.js +0 -0
- /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-30.js +0 -0
- /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-31.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-32.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-33.js +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DynamicBorder,
|
|
3
2
|
type ExtensionAPI,
|
|
4
3
|
type ExtensionContext,
|
|
5
4
|
type Theme,
|
|
@@ -148,19 +147,24 @@ export class AgentIdeProcessesUi {
|
|
|
148
147
|
invalidate: () => list.invalidate(),
|
|
149
148
|
render(width: number) {
|
|
150
149
|
const container = new Container();
|
|
151
|
-
|
|
150
|
+
|
|
152
151
|
if (page === "list") {
|
|
153
|
-
container.addChild(
|
|
154
|
-
new Text(theme.fg("accent", theme.bold("Agent IDE processes")), 1, 0),
|
|
155
|
-
);
|
|
156
152
|
container.addChild(list);
|
|
157
153
|
container.addChild(
|
|
158
|
-
new Text(
|
|
154
|
+
new Text(
|
|
155
|
+
theme.fg(
|
|
156
|
+
"dim",
|
|
157
|
+
active.length === 0 ? "esc close" : "enter view · d stop · esc close",
|
|
158
|
+
),
|
|
159
|
+
1,
|
|
160
|
+
0,
|
|
161
|
+
),
|
|
159
162
|
);
|
|
160
163
|
} else if (selected === undefined) {
|
|
161
164
|
container.addChild(
|
|
162
165
|
new Text(theme.fg("warning", "Process is no longer active."), 1, 0),
|
|
163
166
|
);
|
|
167
|
+
container.addChild(new Text(theme.fg("dim", "esc back"), 1, 0));
|
|
164
168
|
} else {
|
|
165
169
|
container.addChild(selected.renderDetail(theme));
|
|
166
170
|
container.addChild(
|
|
@@ -180,8 +184,13 @@ export class AgentIdeProcessesUi {
|
|
|
180
184
|
),
|
|
181
185
|
);
|
|
182
186
|
}
|
|
183
|
-
|
|
184
|
-
|
|
187
|
+
const accent = (text: string): string => theme.fg("accent", text);
|
|
188
|
+
const innerWidth = Math.max(1, width - 2);
|
|
189
|
+
return [
|
|
190
|
+
borderTop("Agent IDE Processes", `${active.length} active`, width, accent),
|
|
191
|
+
...container.render(innerWidth).map((line) => borderLine(line, width, accent)),
|
|
192
|
+
borderBottom(width, accent),
|
|
193
|
+
];
|
|
185
194
|
},
|
|
186
195
|
handleInput(data: string) {
|
|
187
196
|
if (page === "list") {
|
|
@@ -193,7 +202,7 @@ export class AgentIdeProcessesUi {
|
|
|
193
202
|
} else list.handleInput(data);
|
|
194
203
|
} else if (page === "detail") {
|
|
195
204
|
if (matchesKey(data, Key.escape)) page = "list";
|
|
196
|
-
else if (data === "d") page = "confirm";
|
|
205
|
+
else if (data === "d" && selected !== undefined) page = "confirm";
|
|
197
206
|
else if (data === "i" && selected?.sendInput !== undefined) page = "input";
|
|
198
207
|
} else if (page === "input") {
|
|
199
208
|
if (matchesKey(data, Key.escape)) page = "detail";
|
|
@@ -21,6 +21,7 @@ export function terminalProcessProvider(manager: TerminalSessionManager): AgentI
|
|
|
21
21
|
title: snapshot.shell.toLocaleLowerCase(),
|
|
22
22
|
description: snapshot.command,
|
|
23
23
|
status: snapshot.status === "stopping" ? ("stopping" as const) : ("running" as const),
|
|
24
|
+
...(snapshot.pid === undefined ? {} : { pid: snapshot.pid, owned: true }),
|
|
24
25
|
renderSummary: (theme) => renderActiveTerminal(snapshot, theme).split("\n"),
|
|
25
26
|
renderDetail: (theme) => renderTerminalResult(snapshot, true, theme),
|
|
26
27
|
sendInput: (data) => manager.write(snapshot.source, data),
|
|
@@ -65,6 +65,7 @@ export class TerminalSessionManager {
|
|
|
65
65
|
cwd: session.cwd,
|
|
66
66
|
shell: session.shell.displayName,
|
|
67
67
|
shellFamily: session.shell.family,
|
|
68
|
+
...(session.process === undefined ? {} : { pid: session.process.pid }),
|
|
68
69
|
background: session.background,
|
|
69
70
|
status: session.status,
|
|
70
71
|
...(session.waitReason === undefined ? {} : { waitReason: session.waitReason }),
|
|
@@ -65,9 +65,9 @@ export function registerTerminalTools(
|
|
|
65
65
|
promptSnippet: `Execute ${profile.displayName} commands in synchronous or background terminal sessions`,
|
|
66
66
|
promptGuidelines: [
|
|
67
67
|
`Write commands for ${profile.displayName}; commands are not translated between shell languages.`,
|
|
68
|
-
`Use ${toolName} with background for servers, watchers, and long builds.
|
|
68
|
+
`Use ${toolName} with background for servers, watchers, and long builds. After a session enters background, do not poll it continuously; continue other work or wait for completion. Keep short tasks in the foreground. Enable periodic or verbose output for long-running commands. Use the returned shell: source with read, write, insert, and delete.`,
|
|
69
69
|
],
|
|
70
|
-
description: `Use ${toolName} to execute a command in the user's configured ${profile.displayName} shell (${profile.executable}). Every call creates an addressable terminal session. Set background to true to continue without waiting. A foreground wait automatically returns the live session as background on timeout, a stable interactive prompt, or turn abort. Background completion is delivered automatically and wakes the agent
|
|
70
|
+
description: `Use ${toolName} to execute a command in the user's configured ${profile.displayName} shell (${profile.executable}). Every call creates an addressable terminal session. Set background to true to continue without waiting. A foreground wait automatically returns the live session as background on timeout, a stable interactive prompt, or turn abort. Background completion is delivered automatically and wakes the agent. Silent background sessions are treated as potentially stale after two minutes and wake an idle agent for inspection. Sessions survive extension reloads and keep the same shell: source. Output uses the shared Read limits, keeps the tail, and links a complete log file when truncated. ${shellSyntaxGuidance(profile)}`,
|
|
71
71
|
parameters: runParameters,
|
|
72
72
|
async execute(_toolCallId, input, signal, onUpdate, context) {
|
|
73
73
|
ui.bind(context);
|
|
@@ -57,6 +57,7 @@ export interface TerminalSessionSnapshot {
|
|
|
57
57
|
readonly cwd: string;
|
|
58
58
|
readonly shell: string;
|
|
59
59
|
readonly shellFamily: ShellProfile["family"];
|
|
60
|
+
readonly pid?: number;
|
|
60
61
|
readonly background: boolean;
|
|
61
62
|
readonly status: TerminalSessionStatus;
|
|
62
63
|
readonly waitReason?: TerminalWaitReason;
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
import type { BuiltinExtensionContext } from "#src/composite/selection.js";
|
|
4
|
+
import { connectReadPlugin } from "pi-agent-read/api/connect-plugin";
|
|
5
|
+
import { READ_API_VERSION, READ_PROTOCOL } from "pi-agent-read/api/plugin-protocol";
|
|
6
|
+
import type { ReadRequest, ReadToolResult } from "pi-agent-read/api/tools/read";
|
|
7
|
+
import { connectSearchPlugin } from "pi-agent-search/api/connect-plugin";
|
|
8
|
+
import { SEARCH_API_VERSION, SEARCH_PROTOCOL } from "pi-agent-search/api/plugin-protocol";
|
|
9
|
+
|
|
10
|
+
import { agentIdeProcessRegistry } from "#src/plugins/pi-agent-ide-processes/src/registry.js";
|
|
11
|
+
import {
|
|
12
|
+
captureImages,
|
|
13
|
+
configureVision,
|
|
14
|
+
createCaptureBackend,
|
|
15
|
+
getVisionDefaults,
|
|
16
|
+
isExecutableAllowed,
|
|
17
|
+
listProcesses,
|
|
18
|
+
parseDisplaySource,
|
|
19
|
+
parseVisionView,
|
|
20
|
+
readProcess,
|
|
21
|
+
type VisionOptions,
|
|
22
|
+
} from "#src/plugins/pi-agent-ide-vision/src/vision.js";
|
|
23
|
+
|
|
24
|
+
/** Register process discovery and guarded visual capture resources. */
|
|
25
|
+
export default async function registerVision(
|
|
26
|
+
pi: ExtensionAPI,
|
|
27
|
+
context?: BuiltinExtensionContext,
|
|
28
|
+
): Promise<void> {
|
|
29
|
+
const preferences = context?.preferences ?? {};
|
|
30
|
+
configureVision({
|
|
31
|
+
durationSeconds: preferences["vision.sequenceDurationSeconds"],
|
|
32
|
+
intervalSeconds: preferences["vision.sequenceIntervalSeconds"],
|
|
33
|
+
scale: preferences["vision.imageScale"],
|
|
34
|
+
allowedExecutables: preferences["vision.allowedExecutables"],
|
|
35
|
+
});
|
|
36
|
+
const registry = agentIdeProcessRegistry(pi);
|
|
37
|
+
const backend = createCaptureBackend();
|
|
38
|
+
await Promise.all([
|
|
39
|
+
connectReadPlugin(pi, {
|
|
40
|
+
protocol: READ_PROTOCOL,
|
|
41
|
+
apiVersion: READ_API_VERSION,
|
|
42
|
+
id: "vision",
|
|
43
|
+
setup(api) {
|
|
44
|
+
for (const view of ["image", "sequence"]) {
|
|
45
|
+
api.addView({
|
|
46
|
+
view,
|
|
47
|
+
presenter: { id: `vision-${view}`, present: (document) => document },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
api.addHandler({
|
|
51
|
+
stage: "pre-read",
|
|
52
|
+
async handler(context) {
|
|
53
|
+
const source = context.request.path;
|
|
54
|
+
if (source === undefined) return { kind: "continue", context };
|
|
55
|
+
const displayIndex = parseDisplaySource(source);
|
|
56
|
+
if (displayIndex !== undefined) {
|
|
57
|
+
if (pi.getFlag("pi-agent-ide-vision-displays") !== true) {
|
|
58
|
+
return failed(
|
|
59
|
+
source,
|
|
60
|
+
"Display capture is disabled. Enable --pi-agent-ide-vision-displays to allow it.",
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
const content = await captureImages(
|
|
65
|
+
() => backend.captureDisplay(displayIndex, context.resolverContext.signal),
|
|
66
|
+
options(context.request),
|
|
67
|
+
context.resolverContext.signal,
|
|
68
|
+
);
|
|
69
|
+
return returned(source, content);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
return failed(source, errorMessage(error));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const processPid = prefixedPid(source, "process:");
|
|
75
|
+
if (processPid !== undefined) {
|
|
76
|
+
const metadata = await readProcess(processPid, registry);
|
|
77
|
+
return returned(source, [{ type: "text", text: formatProcess(metadata) }]);
|
|
78
|
+
}
|
|
79
|
+
const windowPid = prefixedPid(source, "window:");
|
|
80
|
+
if (windowPid !== undefined) {
|
|
81
|
+
const metadata = await readProcess(windowPid, registry);
|
|
82
|
+
if (
|
|
83
|
+
!metadata.owned &&
|
|
84
|
+
!isExecutableAllowed(metadata.command) &&
|
|
85
|
+
pi.getFlag("pi-agent-ide-vision-arbitrary-windows") !== true
|
|
86
|
+
) {
|
|
87
|
+
return failed(
|
|
88
|
+
source,
|
|
89
|
+
`Window capture for PID ${windowPid} is denied because the process is neither Agent IDE-owned nor allowlisted by executable name. Enable --pi-agent-ide-vision-arbitrary-windows to allow it.`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
const content = await captureImages(
|
|
95
|
+
() => backend.captureWindow(windowPid, context.resolverContext.signal),
|
|
96
|
+
options(context.request),
|
|
97
|
+
context.resolverContext.signal,
|
|
98
|
+
);
|
|
99
|
+
return returned(source, content);
|
|
100
|
+
} catch (error) {
|
|
101
|
+
return failed(source, errorMessage(error));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (/^https?:\/\//iu.test(source) && requestsScreenshot(context.request)) {
|
|
105
|
+
const url = new URL(source);
|
|
106
|
+
try {
|
|
107
|
+
const content = await captureImages(
|
|
108
|
+
() => backend.captureUrl(url, context.resolverContext.signal),
|
|
109
|
+
options(context.request),
|
|
110
|
+
context.resolverContext.signal,
|
|
111
|
+
);
|
|
112
|
+
return returned(url.href, content);
|
|
113
|
+
} catch (error) {
|
|
114
|
+
return failed(url.href, errorMessage(error));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return { kind: "continue", context };
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
const defaults = getVisionDefaults();
|
|
121
|
+
api.describe(
|
|
122
|
+
`Process metadata: process:PID. Visual capture: window:PID and display: or display:#N. HTTP(S) sources accept image and sequence screenshots. Use named view parameters such as sequence:duration=2,interval=0.5,scale=0.5 and image:scale=0.5,region=0.25,0.25,0.5,0.5. Duration is limited to 10 seconds and sequences to 20 frames. Defaults: duration=${defaults.durationSeconds}, interval=${defaults.intervalSeconds}, scale=${defaults.scale}. Region uses normalized x,y,width,height and runs before scaling. For captures, limit is a square grid cell size in output pixels and offset is one zero-based row-major cell index; limit without offset selects cell 0, while offset without limit is invalid. Omit both for the bounded transformed image.`,
|
|
123
|
+
);
|
|
124
|
+
api.addPromptGuideline(
|
|
125
|
+
"Use search with process:<query> before reading process:PID or window:PID. Capture arbitrary desktop windows and full displays only when their dedicated flags are enabled; Agent IDE-owned terminal processes are allowed by default. Use a bounded sequence view only when one image is insufficient; set named duration, interval, scale and region parameters when the defaults do not fit. Use limit and offset to select one image grid cell.",
|
|
126
|
+
);
|
|
127
|
+
},
|
|
128
|
+
}),
|
|
129
|
+
connectSearchPlugin(pi, {
|
|
130
|
+
protocol: SEARCH_PROTOCOL,
|
|
131
|
+
apiVersion: SEARCH_API_VERSION,
|
|
132
|
+
id: "vision-processes",
|
|
133
|
+
setup(api) {
|
|
134
|
+
api.addResolver({
|
|
135
|
+
priority: -100,
|
|
136
|
+
resolver: {
|
|
137
|
+
id: "processes",
|
|
138
|
+
async tryResolve(request) {
|
|
139
|
+
const match = /^process:(.*)$/isu.exec(request.query);
|
|
140
|
+
if (match === null) return { kind: "not-handled" as const };
|
|
141
|
+
const query = (match[1] ?? "").trim().toLowerCase();
|
|
142
|
+
const matches = (await listProcesses(registry))
|
|
143
|
+
.filter(
|
|
144
|
+
(item) =>
|
|
145
|
+
query.length === 0 ||
|
|
146
|
+
String(item.pid) === query ||
|
|
147
|
+
item.command.toLowerCase().includes(query),
|
|
148
|
+
)
|
|
149
|
+
.slice(0, Math.min(request.limit ?? 50, 100));
|
|
150
|
+
return { kind: "resolved" as const, payload: matches };
|
|
151
|
+
},
|
|
152
|
+
format(payload) {
|
|
153
|
+
const processes = payload as Awaited<ReturnType<typeof listProcesses>>;
|
|
154
|
+
return {
|
|
155
|
+
content: [
|
|
156
|
+
{
|
|
157
|
+
type: "text" as const,
|
|
158
|
+
text:
|
|
159
|
+
processes.length === 0
|
|
160
|
+
? "No matching processes."
|
|
161
|
+
: processes.map(formatProcess).join("\n\n"),
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
details: { count: processes.length, processes },
|
|
165
|
+
};
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
api.describe(
|
|
170
|
+
"process:<query> finds running processes by PID or command for process:PID metadata reads and guarded window:PID capture.",
|
|
171
|
+
);
|
|
172
|
+
api.addPromptGuideline(
|
|
173
|
+
"Use process:<query> to discover a PID before selecting a process or window source.",
|
|
174
|
+
);
|
|
175
|
+
},
|
|
176
|
+
}),
|
|
177
|
+
]);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function prefixedPid(source: string, prefix: string): number | undefined {
|
|
181
|
+
if (!source.startsWith(prefix)) return undefined;
|
|
182
|
+
const value = source.slice(prefix.length);
|
|
183
|
+
if (!/^\d+$/u.test(value)) throw new Error(`${prefix} sources require a numeric PID`);
|
|
184
|
+
return Number(value);
|
|
185
|
+
}
|
|
186
|
+
function options(request: ReadRequest): VisionOptions {
|
|
187
|
+
const selected = parseVisionView(request.views, getVisionDefaults()) ?? {
|
|
188
|
+
mode: "image" as const,
|
|
189
|
+
...getVisionDefaults(),
|
|
190
|
+
};
|
|
191
|
+
return {
|
|
192
|
+
...selected,
|
|
193
|
+
...(request.limit === undefined ? {} : { cellSize: request.limit }),
|
|
194
|
+
...(request.offset === undefined ? {} : { cellIndex: request.offset }),
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function requestsScreenshot(request: ReadRequest): boolean {
|
|
198
|
+
return request.views?.some((view) => /^(?:image|sequence)(?::|$)/u.test(view)) === true;
|
|
199
|
+
}
|
|
200
|
+
function returned(source: string, content: ReadToolResult["content"]) {
|
|
201
|
+
return {
|
|
202
|
+
kind: "return" as const,
|
|
203
|
+
result: { content, details: { source, resolvedBy: "vision" } },
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function failed(source: string, message: string) {
|
|
207
|
+
return {
|
|
208
|
+
kind: "return" as const,
|
|
209
|
+
result: {
|
|
210
|
+
content: [{ type: "text" as const, text: message }],
|
|
211
|
+
details: {
|
|
212
|
+
source,
|
|
213
|
+
resolvedBy: "vision",
|
|
214
|
+
failure: { code: "READ_FAILED" as const, source, resolverId: "vision", message },
|
|
215
|
+
},
|
|
216
|
+
isError: true,
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
function errorMessage(error: unknown): string {
|
|
221
|
+
return error instanceof Error ? error.message : String(error);
|
|
222
|
+
}
|
|
223
|
+
function formatProcess(item: Awaited<ReturnType<typeof readProcess>>): string {
|
|
224
|
+
return [
|
|
225
|
+
`PID: ${item.pid}`,
|
|
226
|
+
`Command: ${item.command}`,
|
|
227
|
+
`Owned by Agent IDE: ${item.owned ? "yes" : "no"}`,
|
|
228
|
+
...(item.parentPid === undefined ? [] : [`Parent PID: ${item.parentPid}`]),
|
|
229
|
+
...(item.started === undefined ? [] : [`Started: ${item.started}`]),
|
|
230
|
+
...(item.source === undefined ? [] : [`Agent IDE source: ${item.source}`]),
|
|
231
|
+
].join("\n");
|
|
232
|
+
}
|