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
|
@@ -45,7 +45,7 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
45
45
|
debugger: {
|
|
46
46
|
runtimeExecutables: ["dart"],
|
|
47
47
|
adapterExecutables: ["dart"],
|
|
48
|
-
platforms: ["linux"],
|
|
48
|
+
platforms: ["linux", "win32"],
|
|
49
49
|
install: "Install Dart SDK 3.13.3 from the official Dart archive.",
|
|
50
50
|
},
|
|
51
51
|
},
|
|
@@ -60,7 +60,7 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
60
60
|
debugger: {
|
|
61
61
|
runtimeExecutables: ["python3"],
|
|
62
62
|
adapterExecutables: ["python3"],
|
|
63
|
-
platforms: ["linux"],
|
|
63
|
+
platforms: ["linux", "win32"],
|
|
64
64
|
install: "Install Python 3 and debugpy for that interpreter.",
|
|
65
65
|
},
|
|
66
66
|
},
|
|
@@ -75,8 +75,8 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
75
75
|
debugger: {
|
|
76
76
|
runtimeExecutables: ["go"],
|
|
77
77
|
adapterExecutables: ["dlv"],
|
|
78
|
-
platforms: ["linux"],
|
|
79
|
-
install: "
|
|
78
|
+
platforms: ["linux", "win32"],
|
|
79
|
+
install: "Install Go and Delve. Native Windows support requires amd64.",
|
|
80
80
|
},
|
|
81
81
|
},
|
|
82
82
|
{
|
|
@@ -85,14 +85,14 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
85
85
|
kind: "debugger",
|
|
86
86
|
languages: ["elixir"],
|
|
87
87
|
executables: ["elixir", "mix"],
|
|
88
|
-
dependencies: ["Elixir
|
|
88
|
+
dependencies: ["Elixir", "Erlang/OTP", "ElixirLS 0.31.1"],
|
|
89
89
|
documentation: "https://github.com/elixir-lsp/elixir-ls",
|
|
90
90
|
debugger: {
|
|
91
91
|
runtimeExecutables: ["elixir", "mix"],
|
|
92
|
-
adapterExecutables: ["debug_adapter.sh"],
|
|
93
|
-
platforms: ["linux"],
|
|
92
|
+
adapterExecutables: ["debug_adapter.sh", "debug_adapter.bat"],
|
|
93
|
+
platforms: ["linux", "win32"],
|
|
94
94
|
install:
|
|
95
|
-
"Install Erlang/OTP
|
|
95
|
+
"Install compatible Erlang/OTP and Elixir releases plus ElixirLS 0.31.1. Use debug_adapter.bat on Windows.",
|
|
96
96
|
},
|
|
97
97
|
},
|
|
98
98
|
{
|
|
@@ -101,13 +101,13 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
101
101
|
kind: "debugger",
|
|
102
102
|
languages: ["r"],
|
|
103
103
|
executables: ["R"],
|
|
104
|
-
dependencies: ["R 4.
|
|
104
|
+
dependencies: ["R 4.5.3", "R6 2.6.1", "jsonlite 2.0.0", "vscDebugger 0.5.9"],
|
|
105
105
|
documentation: "https://manuelhentschel.github.io/vscDebugger/",
|
|
106
106
|
debugger: {
|
|
107
107
|
runtimeExecutables: ["R"],
|
|
108
108
|
adapterExecutables: ["R"],
|
|
109
|
-
platforms: ["linux"],
|
|
110
|
-
install: "Install R 4.
|
|
109
|
+
platforms: ["linux", "win32"],
|
|
110
|
+
install: "Install R 4.5.3 and vscDebugger 0.5.9 for that R installation.",
|
|
111
111
|
},
|
|
112
112
|
},
|
|
113
113
|
{
|
|
@@ -157,8 +157,9 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
157
157
|
debugger: {
|
|
158
158
|
runtimeExecutables: ["dotnet"],
|
|
159
159
|
adapterExecutables: ["netcoredbg"],
|
|
160
|
-
platforms: ["linux"],
|
|
161
|
-
install:
|
|
160
|
+
platforms: ["linux", "win32"],
|
|
161
|
+
install:
|
|
162
|
+
"Install .NET SDK 8 and NetCoreDbg 3.2.0-1092. On Windows, ensure the selected dotnet SDK is on PATH.",
|
|
162
163
|
},
|
|
163
164
|
},
|
|
164
165
|
{
|
|
@@ -203,7 +204,7 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
203
204
|
debugger: {
|
|
204
205
|
runtimeExecutables: ["zig"],
|
|
205
206
|
adapterExecutables: ["lldb-dap-18", "lldb-dap"],
|
|
206
|
-
platforms: ["linux"],
|
|
207
|
+
platforms: ["linux", "win32"],
|
|
207
208
|
install:
|
|
208
209
|
"Install Zig 0.15.2 and LLDB 18, then compile the target in Debug mode with the LLVM backend (-fllvm) so LLDB can inspect locals.",
|
|
209
210
|
},
|
|
@@ -219,8 +220,8 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
219
220
|
debugger: {
|
|
220
221
|
runtimeExecutables: ["lua", "node"],
|
|
221
222
|
adapterExecutables: ["debugAdapter.js"],
|
|
222
|
-
platforms: ["linux"],
|
|
223
|
-
install: "Install Lua, Node 24, and local-lua-debugger-vscode 0.3.3.",
|
|
223
|
+
platforms: ["linux", "win32"],
|
|
224
|
+
install: "Install Lua 5.3, Node 24, and local-lua-debugger-vscode 0.3.3.",
|
|
224
225
|
},
|
|
225
226
|
},
|
|
226
227
|
{
|
|
@@ -234,7 +235,7 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
234
235
|
debugger: {
|
|
235
236
|
runtimeExecutables: ["pwsh"],
|
|
236
237
|
adapterExecutables: ["Start-EditorServices.ps1"],
|
|
237
|
-
platforms: ["linux"],
|
|
238
|
+
platforms: ["linux", "win32"],
|
|
238
239
|
install: "Install PowerShell 7.4.13 and PowerShellEditorServices 4.7.0.",
|
|
239
240
|
},
|
|
240
241
|
},
|
|
@@ -244,13 +245,13 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
244
245
|
kind: "debugger",
|
|
245
246
|
languages: ["ruby"],
|
|
246
247
|
executables: ["rdbg"],
|
|
247
|
-
dependencies: ["debug gem 1.11.
|
|
248
|
+
dependencies: ["debug gem 1.11.0 or newer"],
|
|
248
249
|
documentation: "https://github.com/ruby/debug",
|
|
249
250
|
debugger: {
|
|
250
251
|
runtimeExecutables: ["ruby"],
|
|
251
|
-
adapterExecutables: ["rdbg"],
|
|
252
|
-
platforms: ["linux"],
|
|
253
|
-
install: "Install Ruby and debug gem 1.11.
|
|
252
|
+
adapterExecutables: ["rdbg", "rdbg.bat"],
|
|
253
|
+
platforms: ["linux", "win32"],
|
|
254
|
+
install: "Install Ruby and debug gem 1.11.0 or newer.",
|
|
254
255
|
},
|
|
255
256
|
},
|
|
256
257
|
{
|
|
@@ -279,7 +280,7 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
279
280
|
debugger: {
|
|
280
281
|
runtimeExecutables: ["php", "node"],
|
|
281
282
|
adapterExecutables: ["phpDebug.js"],
|
|
282
|
-
platforms: ["linux"],
|
|
283
|
+
platforms: ["linux", "win32"],
|
|
283
284
|
install: "Install PHP with Xdebug, Node 24, and PHP Debug 1.40.1.",
|
|
284
285
|
},
|
|
285
286
|
},
|
|
@@ -294,7 +295,7 @@ export const DEBUGGER_RECIPES: readonly ToolRecipe[] = [
|
|
|
294
295
|
debugger: {
|
|
295
296
|
runtimeExecutables: ["node"],
|
|
296
297
|
adapterExecutables: ["dapDebugServer.js"],
|
|
297
|
-
platforms: ["linux"],
|
|
298
|
+
platforms: ["linux", "win32"],
|
|
298
299
|
install: "Install Node 24 and js-debug-dap v1.117.0 from the official release archive.",
|
|
299
300
|
},
|
|
300
301
|
},
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import spawn from "cross-spawn";
|
|
2
|
+
|
|
3
|
+
import type { ChildProcessWithoutNullStreams } from "node:child_process";
|
|
2
4
|
import net from "node:net";
|
|
3
5
|
import type { Readable, Writable } from "node:stream";
|
|
4
6
|
|
|
@@ -98,7 +100,8 @@ export class DapClient {
|
|
|
98
100
|
env: process.env,
|
|
99
101
|
stdio: ["pipe", "pipe", "pipe"],
|
|
100
102
|
});
|
|
101
|
-
|
|
103
|
+
const pipedChild = child as ChildProcessWithoutNullStreams;
|
|
104
|
+
return new DapClient(pipedChild.stdout, pipedChild.stdin, pipedChild);
|
|
102
105
|
}
|
|
103
106
|
|
|
104
107
|
/** Adopt a connected DAP socket, optionally after an out-of-band initialize request. */
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
type DoctorSetupInspection,
|
|
12
12
|
} from "pi-agent-doctor/api/plugin-protocol";
|
|
13
13
|
|
|
14
|
+
import { resolvePythonDebuggerCommand } from "./adapter-executables.js";
|
|
14
15
|
import {
|
|
15
16
|
DEBUGGER_LANGUAGE_MATRIX,
|
|
16
17
|
DEBUGGER_RECIPES,
|
|
@@ -37,7 +38,10 @@ export const debuggerDoctorPlugin: DoctorPlugin = {
|
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
/** Inspect debugger selection and classify missing Linux prerequisites. */
|
|
40
|
-
export async function inspectDebuggerSetup(
|
|
41
|
+
export async function inspectDebuggerSetup(
|
|
42
|
+
context: DoctorContext,
|
|
43
|
+
platform: NodeJS.Platform = process.platform,
|
|
44
|
+
): Promise<DoctorSetupInspection> {
|
|
41
45
|
const recipes = new Map(
|
|
42
46
|
[...context.detectedLanguageIds]
|
|
43
47
|
.map(debuggerRecipeForLanguage)
|
|
@@ -62,16 +66,22 @@ export async function inspectDebuggerSetup(context: DoctorContext): Promise<Doct
|
|
|
62
66
|
for (const recipe of recipes.values()) {
|
|
63
67
|
const debuggerRecipe = recipe.debugger;
|
|
64
68
|
if (debuggerRecipe === undefined) continue;
|
|
65
|
-
|
|
69
|
+
const supportedPlatform =
|
|
70
|
+
platform === "linux" || platform === "darwin" || platform === "win32" ? platform : undefined;
|
|
71
|
+
if (supportedPlatform === undefined || !debuggerRecipe.platforms.includes(supportedPlatform)) {
|
|
66
72
|
actions.push({
|
|
67
73
|
id: `debugger-${recipe.id}-platform`,
|
|
68
74
|
category: "unsupported-platform",
|
|
69
|
-
message: `${recipe.name} does not support the
|
|
75
|
+
message: `${recipe.name} does not support the ${platform} debugger recipe`,
|
|
70
76
|
});
|
|
71
77
|
continue;
|
|
72
78
|
}
|
|
79
|
+
const python =
|
|
80
|
+
recipe.id === "debugpy"
|
|
81
|
+
? await resolvePythonDebuggerCommand(context.cwd, context.env, platform)
|
|
82
|
+
: undefined;
|
|
73
83
|
const missingRuntime = await firstMissingExecutable(
|
|
74
|
-
debuggerRecipe.runtimeExecutables,
|
|
84
|
+
python === undefined ? debuggerRecipe.runtimeExecutables : [python.command],
|
|
75
85
|
context.cwd,
|
|
76
86
|
context.env,
|
|
77
87
|
);
|
|
@@ -83,7 +93,7 @@ export async function inspectDebuggerSetup(context: DoctorContext): Promise<Doct
|
|
|
83
93
|
});
|
|
84
94
|
continue;
|
|
85
95
|
}
|
|
86
|
-
if (!(await adapterInstalled(recipe.id, context.cwd, context.env))) {
|
|
96
|
+
if (!(await adapterInstalled(recipe.id, context.cwd, context.env, platform))) {
|
|
87
97
|
actions.push({
|
|
88
98
|
id: `debugger-${recipe.id}-adapter`,
|
|
89
99
|
category: "missing-adapter",
|
|
@@ -91,7 +101,7 @@ export async function inspectDebuggerSetup(context: DoctorContext): Promise<Doct
|
|
|
91
101
|
});
|
|
92
102
|
continue;
|
|
93
103
|
}
|
|
94
|
-
if (!(await adapterAvailable(recipe.id, context.cwd, context.env))) {
|
|
104
|
+
if (!(await adapterAvailable(recipe.id, context.cwd, context.env, platform))) {
|
|
95
105
|
actions.push({
|
|
96
106
|
id: `debugger-${recipe.id}-startup`,
|
|
97
107
|
category: "adapter-startup",
|
|
@@ -136,7 +146,12 @@ async function firstMissingExecutable(
|
|
|
136
146
|
}
|
|
137
147
|
return undefined;
|
|
138
148
|
}
|
|
139
|
-
async function adapterInstalled(
|
|
149
|
+
async function adapterInstalled(
|
|
150
|
+
id: string,
|
|
151
|
+
cwd: string,
|
|
152
|
+
env: NodeJS.ProcessEnv,
|
|
153
|
+
platform: NodeJS.Platform = process.platform,
|
|
154
|
+
): Promise<boolean> {
|
|
140
155
|
if (id === "elixir-ls-debug-adapter") {
|
|
141
156
|
try {
|
|
142
157
|
await access(env.PI_ELIXIR_LS_DEBUG_PATH ?? DEFAULT_ELIXIR_LS_DEBUG_PATH);
|
|
@@ -170,8 +185,11 @@ async function adapterInstalled(id: string, cwd: string, env: NodeJS.ProcessEnv)
|
|
|
170
185
|
}
|
|
171
186
|
if (id.startsWith("lldb-dap")) {
|
|
172
187
|
return (
|
|
173
|
-
(await isExecutableAvailable(
|
|
174
|
-
|
|
188
|
+
(await isExecutableAvailable(
|
|
189
|
+
env.PI_LLDB_DAP_PATH ?? (platform === "win32" ? "lldb-dap" : "lldb-dap-18"),
|
|
190
|
+
cwd,
|
|
191
|
+
env,
|
|
192
|
+
)) || (await isExecutableAvailable("lldb-dap", cwd, env))
|
|
175
193
|
);
|
|
176
194
|
}
|
|
177
195
|
if (id === "delve") return isExecutableAvailable(env.PI_DELVE_PATH ?? "dlv", cwd, env);
|
|
@@ -191,19 +209,34 @@ async function adapterInstalled(id: string, cwd: string, env: NodeJS.ProcessEnv)
|
|
|
191
209
|
}
|
|
192
210
|
if (id === "dart-debug-adapter")
|
|
193
211
|
return isExecutableAvailable(env.PI_DART_PATH ?? "dart", cwd, env);
|
|
212
|
+
const python = await resolvePythonDebuggerCommand(cwd, env, platform);
|
|
194
213
|
const probe = await probeExecutable(
|
|
195
|
-
|
|
196
|
-
[
|
|
214
|
+
python.command,
|
|
215
|
+
[
|
|
216
|
+
...python.args,
|
|
217
|
+
"-c",
|
|
218
|
+
"import importlib.util; raise SystemExit(importlib.util.find_spec('debugpy') is None)",
|
|
219
|
+
],
|
|
197
220
|
cwd,
|
|
198
221
|
env,
|
|
199
222
|
);
|
|
200
223
|
return probe.ok;
|
|
201
224
|
}
|
|
202
|
-
async function adapterAvailable(
|
|
203
|
-
|
|
225
|
+
async function adapterAvailable(
|
|
226
|
+
id: string,
|
|
227
|
+
cwd: string,
|
|
228
|
+
env: NodeJS.ProcessEnv,
|
|
229
|
+
platform: NodeJS.Platform = process.platform,
|
|
230
|
+
): Promise<boolean> {
|
|
231
|
+
return (await probeAdapter(id, cwd, env, platform)).ok;
|
|
204
232
|
}
|
|
205
233
|
|
|
206
|
-
async function probeAdapter(
|
|
234
|
+
async function probeAdapter(
|
|
235
|
+
id: string,
|
|
236
|
+
cwd: string,
|
|
237
|
+
env: NodeJS.ProcessEnv,
|
|
238
|
+
platform: NodeJS.Platform = process.platform,
|
|
239
|
+
) {
|
|
207
240
|
if (id === "elixir-ls-debug-adapter") {
|
|
208
241
|
return probeAdapterFile(env.PI_ELIXIR_LS_DEBUG_PATH ?? DEFAULT_ELIXIR_LS_DEBUG_PATH, cwd, env);
|
|
209
242
|
}
|
|
@@ -224,9 +257,10 @@ async function probeAdapter(id: string, cwd: string, env: NodeJS.ProcessEnv) {
|
|
|
224
257
|
return probeExecutable(env.PI_DART_PATH ?? "dart", ["--version"], cwd, env);
|
|
225
258
|
}
|
|
226
259
|
if (id === "debugpy") {
|
|
260
|
+
const python = await resolvePythonDebuggerCommand(cwd, env, platform);
|
|
227
261
|
return probeExecutable(
|
|
228
|
-
|
|
229
|
-
["-c", "import debugpy; print(debugpy.__version__)"],
|
|
262
|
+
python.command,
|
|
263
|
+
[...python.args, "-c", "import debugpy; print(debugpy.__version__)"],
|
|
230
264
|
cwd,
|
|
231
265
|
env,
|
|
232
266
|
);
|
|
@@ -266,7 +300,11 @@ async function probeAdapter(id: string, cwd: string, env: NodeJS.ProcessEnv) {
|
|
|
266
300
|
if (id.startsWith("lldb-dap")) {
|
|
267
301
|
const command =
|
|
268
302
|
env.PI_LLDB_DAP_PATH ??
|
|
269
|
-
(
|
|
303
|
+
(platform === "win32"
|
|
304
|
+
? "lldb-dap"
|
|
305
|
+
: (await isExecutableAvailable("lldb-dap-18", cwd, env))
|
|
306
|
+
? "lldb-dap-18"
|
|
307
|
+
: "lldb-dap");
|
|
270
308
|
return probeExecutable(command, ["--version"], cwd, env);
|
|
271
309
|
}
|
|
272
310
|
if (id === "rdbg") {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import spawn from "cross-spawn";
|
|
2
|
+
|
|
3
|
+
import type { ChildProcess } from "node:child_process";
|
|
2
4
|
import { randomBytes } from "node:crypto";
|
|
3
5
|
import { rmSync } from "node:fs";
|
|
4
6
|
import { mkdtemp, readFile, rm } from "node:fs/promises";
|
|
@@ -6,6 +8,8 @@ import net from "node:net";
|
|
|
6
8
|
import { tmpdir } from "node:os";
|
|
7
9
|
import path from "node:path";
|
|
8
10
|
|
|
11
|
+
import { resolvePythonDebuggerCommand } from "./adapter-executables.js";
|
|
12
|
+
import { sameFilePath } from "pi-agent-ide/api/path-identity";
|
|
9
13
|
import {
|
|
10
14
|
DapClient,
|
|
11
15
|
type DapEvent,
|
|
@@ -184,11 +188,10 @@ export class DebugSessionManager {
|
|
|
184
188
|
|
|
185
189
|
/** Find breakpoints for a file, optionally scoped to one debug session. */
|
|
186
190
|
breakpointsForFile(file: string, sessionSource?: string): readonly DebugBreakpoint[] {
|
|
187
|
-
const absolute = path.resolve(file);
|
|
188
191
|
return this.list()
|
|
189
192
|
.filter((session) => sessionSource === undefined || session.source === sessionSource)
|
|
190
193
|
.flatMap((session) => [...session.breakpoints.values()])
|
|
191
|
-
.filter((breakpoint) =>
|
|
194
|
+
.filter((breakpoint) => sameFilePath(breakpoint.file, file));
|
|
192
195
|
}
|
|
193
196
|
|
|
194
197
|
/** Return the source file represented by a session-owned source URI. */
|
|
@@ -262,7 +265,7 @@ export class DebugSessionManager {
|
|
|
262
265
|
path.join(tmpdir(), "pi-powershell-debug-"),
|
|
263
266
|
);
|
|
264
267
|
}
|
|
265
|
-
const recipe = adapterRecipe(session.options, session.adapterTemporaryDirectory);
|
|
268
|
+
const recipe = await adapterRecipe(session.options, session.adapterTemporaryDirectory);
|
|
266
269
|
const client =
|
|
267
270
|
session.options.adapter === "node"
|
|
268
271
|
? await this.#startNodeAdapter(session)
|
|
@@ -381,8 +384,8 @@ export class DebugSessionManager {
|
|
|
381
384
|
.request("disconnect", { terminateDebuggee: true }, { signal, timeoutMs: 500 })
|
|
382
385
|
.catch(() => {});
|
|
383
386
|
for (const client of session.clients ?? [session.client]) client.close();
|
|
384
|
-
session.adapterProcess?.kill();
|
|
385
387
|
}
|
|
388
|
+
await terminateOwnedAdapterProcess(session.adapterProcess);
|
|
386
389
|
await removeAdapterTemporaryDirectory(session);
|
|
387
390
|
session.status = "terminated";
|
|
388
391
|
this.#notify(session);
|
|
@@ -396,7 +399,7 @@ export class DebugSessionManager {
|
|
|
396
399
|
(session.client === undefined ? [] : [session.client])) {
|
|
397
400
|
client.close();
|
|
398
401
|
}
|
|
399
|
-
session.adapterProcess
|
|
402
|
+
void terminateOwnedAdapterProcess(session.adapterProcess);
|
|
400
403
|
if (session.adapterTemporaryDirectory !== undefined) {
|
|
401
404
|
rmSync(session.adapterTemporaryDirectory, { recursive: true, force: true });
|
|
402
405
|
}
|
|
@@ -426,6 +429,7 @@ export class DebugSessionManager {
|
|
|
426
429
|
stdio: ["ignore", "pipe", "pipe"],
|
|
427
430
|
},
|
|
428
431
|
);
|
|
432
|
+
traceAdapterProcess(session.adapterProcess, `rdbg:${String(port)}`);
|
|
429
433
|
await waitForAdapterReady(session.adapterProcess, "Debugger can attach via TCP/IP", "rdbg");
|
|
430
434
|
return DapClient.connect(port);
|
|
431
435
|
}
|
|
@@ -691,8 +695,8 @@ export class DebugSessionManager {
|
|
|
691
695
|
const breakpointFile =
|
|
692
696
|
loadedPath === undefined
|
|
693
697
|
? undefined
|
|
694
|
-
: [...session.breakpoints.values()].find(
|
|
695
|
-
(breakpoint
|
|
698
|
+
: [...session.breakpoints.values()].find((breakpoint) =>
|
|
699
|
+
sameFilePath(breakpoint.file, loadedPath),
|
|
696
700
|
)?.file;
|
|
697
701
|
if (breakpointFile !== undefined)
|
|
698
702
|
await this.#configureBreakpointFile(
|
|
@@ -713,7 +717,7 @@ export class DebugSessionManager {
|
|
|
713
717
|
typeof changed.line === "number" &&
|
|
714
718
|
changed.line === breakpoint.line &&
|
|
715
719
|
typeof changedSource.path === "string" &&
|
|
716
|
-
|
|
720
|
+
sameFilePath(changedSource.path, breakpoint.file)
|
|
717
721
|
) {
|
|
718
722
|
breakpoint.verified = true;
|
|
719
723
|
}
|
|
@@ -777,7 +781,7 @@ export class DebugSessionManager {
|
|
|
777
781
|
session.stop?.frame !== undefined &&
|
|
778
782
|
![...session.breakpoints.values()].some(
|
|
779
783
|
(breakpoint) =>
|
|
780
|
-
|
|
784
|
+
sameFilePath(breakpoint.file, session.stop?.frame?.source?.path ?? "") &&
|
|
781
785
|
breakpoint.line === session.stop?.frame?.line,
|
|
782
786
|
)
|
|
783
787
|
) {
|
|
@@ -802,10 +806,7 @@ export class DebugSessionManager {
|
|
|
802
806
|
.stackFrames?.[0];
|
|
803
807
|
if (frame?.source?.path !== undefined) {
|
|
804
808
|
for (const breakpoint of session.breakpoints.values()) {
|
|
805
|
-
if (
|
|
806
|
-
path.resolve(breakpoint.file) === path.resolve(frame.source.path) &&
|
|
807
|
-
breakpoint.line === frame.line
|
|
808
|
-
) {
|
|
809
|
+
if (sameFilePath(breakpoint.file, frame.source.path) && breakpoint.line === frame.line) {
|
|
809
810
|
breakpoint.verified = true;
|
|
810
811
|
}
|
|
811
812
|
}
|
|
@@ -1024,7 +1025,7 @@ function waitForAdapterReady(child: ChildProcess, marker: string, adapter: strin
|
|
|
1024
1025
|
const streams = [child.stdout, child.stderr].filter((stream) => stream !== null);
|
|
1025
1026
|
const timer = setTimeout(
|
|
1026
1027
|
() => reject(new Error(`Timed out starting ${adapter} server`)),
|
|
1027
|
-
5_000,
|
|
1028
|
+
process.platform === "win32" ? 15_000 : 5_000,
|
|
1028
1029
|
);
|
|
1029
1030
|
const cleanup = (): void => {
|
|
1030
1031
|
clearTimeout(timer);
|
|
@@ -1080,10 +1081,34 @@ async function connectWithRetry(port: number, adapter = "js-debug"): Promise<Dap
|
|
|
1080
1081
|
|
|
1081
1082
|
async function removeAdapterTemporaryDirectory(session: DebugSession): Promise<void> {
|
|
1082
1083
|
if (session.adapterTemporaryDirectory === undefined) return;
|
|
1083
|
-
await rm(session.adapterTemporaryDirectory, {
|
|
1084
|
+
await rm(session.adapterTemporaryDirectory, {
|
|
1085
|
+
recursive: true,
|
|
1086
|
+
force: true,
|
|
1087
|
+
maxRetries: process.platform === "win32" ? 10 : 0,
|
|
1088
|
+
retryDelay: 100,
|
|
1089
|
+
});
|
|
1084
1090
|
session.adapterTemporaryDirectory = undefined;
|
|
1085
1091
|
}
|
|
1086
1092
|
|
|
1093
|
+
async function terminateOwnedAdapterProcess(child: ChildProcess | undefined): Promise<void> {
|
|
1094
|
+
if (child === undefined || child.exitCode !== null || child.signalCode !== null) return;
|
|
1095
|
+
if (process.platform !== "win32" || child.pid === undefined) {
|
|
1096
|
+
child.kill();
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
await new Promise<void>((resolve) => {
|
|
1100
|
+
const killer = spawn("taskkill.exe", ["/pid", String(child.pid), "/t", "/f"], {
|
|
1101
|
+
stdio: "ignore",
|
|
1102
|
+
windowsHide: true,
|
|
1103
|
+
});
|
|
1104
|
+
killer.once("error", () => {
|
|
1105
|
+
child.kill();
|
|
1106
|
+
resolve();
|
|
1107
|
+
});
|
|
1108
|
+
killer.once("exit", () => resolve());
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1087
1112
|
interface AdapterRecipe {
|
|
1088
1113
|
readonly command: string;
|
|
1089
1114
|
readonly args: readonly string[];
|
|
@@ -1092,10 +1117,10 @@ interface AdapterRecipe {
|
|
|
1092
1117
|
readonly launch: Readonly<Record<string, unknown>>;
|
|
1093
1118
|
}
|
|
1094
1119
|
|
|
1095
|
-
function adapterRecipe(
|
|
1120
|
+
async function adapterRecipe(
|
|
1096
1121
|
options: DebugSessionOptions,
|
|
1097
1122
|
adapterTemporaryDirectory?: string,
|
|
1098
|
-
): AdapterRecipe {
|
|
1123
|
+
): Promise<AdapterRecipe> {
|
|
1099
1124
|
const common = {
|
|
1100
1125
|
name: "Pi Agent IDE debug session",
|
|
1101
1126
|
request: "launch",
|
|
@@ -1120,9 +1145,10 @@ function adapterRecipe(
|
|
|
1120
1145
|
};
|
|
1121
1146
|
}
|
|
1122
1147
|
if (options.adapter === "debugpy") {
|
|
1148
|
+
const python = await resolvePythonDebuggerCommand(options.cwd);
|
|
1123
1149
|
return {
|
|
1124
|
-
command:
|
|
1125
|
-
args: ["-m", "debugpy.adapter"],
|
|
1150
|
+
command: python.command,
|
|
1151
|
+
args: [...python.args, "-m", "debugpy.adapter"],
|
|
1126
1152
|
adapterID: "debugpy",
|
|
1127
1153
|
request: "launch",
|
|
1128
1154
|
launch: { ...common, type: "python", console: "internalConsole", justMyCode: false },
|
|
@@ -1158,7 +1184,10 @@ function adapterRecipe(
|
|
|
1158
1184
|
if (options.adapter === "elixir") {
|
|
1159
1185
|
return {
|
|
1160
1186
|
command:
|
|
1161
|
-
process.env.PI_ELIXIR_LS_DEBUG_PATH ??
|
|
1187
|
+
process.env.PI_ELIXIR_LS_DEBUG_PATH ??
|
|
1188
|
+
(process.platform === "win32"
|
|
1189
|
+
? "debug_adapter.bat"
|
|
1190
|
+
: "/opt/pi-debug-adapters/elixir-ls/debug_adapter.sh"),
|
|
1162
1191
|
args: [],
|
|
1163
1192
|
adapterID: "mix_task",
|
|
1164
1193
|
request: "launch",
|
|
@@ -1185,7 +1214,11 @@ function adapterRecipe(
|
|
|
1185
1214
|
}
|
|
1186
1215
|
if (options.adapter === "lldb-dap") {
|
|
1187
1216
|
return {
|
|
1188
|
-
command:
|
|
1217
|
+
command:
|
|
1218
|
+
path.extname(options.sourceFile).toLowerCase() === ".swift"
|
|
1219
|
+
? (process.env.PI_SWIFT_LLDB_DAP_PATH ?? process.env.PI_LLDB_DAP_PATH ?? "lldb-dap")
|
|
1220
|
+
: (process.env.PI_LLDB_DAP_PATH ??
|
|
1221
|
+
(process.platform === "win32" ? "lldb-dap" : "lldb-dap-18")),
|
|
1189
1222
|
args: [],
|
|
1190
1223
|
adapterID: "lldb-dap",
|
|
1191
1224
|
request: "launch",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-formatter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.
|
|
6
|
+
"pi-agent-doctor": "0.6.0"
|
|
7
7
|
},
|
|
8
8
|
"pi": {
|
|
9
9
|
"extensions": [
|
|
10
|
-
"./runtime/entry-
|
|
10
|
+
"./runtime/entry-31.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@earendil-works/pi-coding-agent": "*",
|
|
15
|
-
"pi-agent-ide": "0.
|
|
15
|
+
"pi-agent-ide": "0.6.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"pi-agent-ide": {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-languages",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.
|
|
6
|
+
"pi-agent-doctor": "0.6.0"
|
|
7
7
|
},
|
|
8
8
|
"pi": {
|
|
9
9
|
"extensions": [
|
|
10
|
-
"./runtime/entry-
|
|
10
|
+
"./runtime/entry-32.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-lint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.
|
|
7
|
-
"pi-agent-invariant": "0.
|
|
8
|
-
"pi-agent-read": "0.
|
|
9
|
-
"pi-agent-resource": "0.
|
|
10
|
-
"pi-agent-text": "0.
|
|
6
|
+
"pi-agent-doctor": "0.6.0",
|
|
7
|
+
"pi-agent-invariant": "0.6.0",
|
|
8
|
+
"pi-agent-read": "0.6.0",
|
|
9
|
+
"pi-agent-resource": "0.6.0",
|
|
10
|
+
"pi-agent-text": "0.6.0"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-33.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@earendil-works/pi-coding-agent": "*",
|
|
19
|
-
"pi-agent-ide": "0.
|
|
19
|
+
"pi-agent-ide": "0.6.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependenciesMeta": {
|
|
22
22
|
"pi-agent-ide": {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
|
|
4
|
+
import { sameFilePath } from "pi-agent-ide/api/path-identity";
|
|
3
5
|
import { runConfiguredProcess } from "pi-agent-ide/api/tool-config";
|
|
4
6
|
|
|
5
7
|
import { parseDiagnostics } from "./diagnostics.js";
|
|
@@ -66,7 +68,7 @@ export async function runConfiguredLinter(
|
|
|
66
68
|
const file = diagnostic.file.startsWith("file:")
|
|
67
69
|
? fileURLToPath(diagnostic.file)
|
|
68
70
|
: diagnostic.file;
|
|
69
|
-
return path.resolve(workingDirectory, file)
|
|
71
|
+
return sameFilePath(path.resolve(workingDirectory, file), context.filePath);
|
|
70
72
|
})
|
|
71
73
|
.map(({ file: _file, ...diagnostic }) => diagnostic);
|
|
72
74
|
return {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-lsp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"cross-spawn": "^7.0.6",
|
|
7
|
-
"pi-agent-doctor": "0.
|
|
8
|
-
"pi-agent-invariant": "0.
|
|
9
|
-
"pi-agent-read": "0.
|
|
10
|
-
"pi-agent-resource": "0.
|
|
11
|
-
"pi-agent-search": "0.
|
|
12
|
-
"pi-agent-text": "0.
|
|
13
|
-
"pi-agent-text-editor": "0.
|
|
7
|
+
"pi-agent-doctor": "0.6.0",
|
|
8
|
+
"pi-agent-invariant": "0.6.0",
|
|
9
|
+
"pi-agent-read": "0.6.0",
|
|
10
|
+
"pi-agent-resource": "0.6.0",
|
|
11
|
+
"pi-agent-search": "0.6.0",
|
|
12
|
+
"pi-agent-text": "0.6.0",
|
|
13
|
+
"pi-agent-text-editor": "0.6.0",
|
|
14
14
|
"vscode-jsonrpc": "^9.0.0",
|
|
15
15
|
"vscode-uri": "^3.1.0"
|
|
16
16
|
},
|
|
17
17
|
"pi": {
|
|
18
18
|
"extensions": [
|
|
19
|
-
"./runtime/entry-
|
|
19
|
+
"./runtime/entry-34.js"
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@earendil-works/pi-coding-agent": "*",
|
|
24
|
-
"pi-agent-ide": "0.
|
|
24
|
+
"pi-agent-ide": "0.6.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependenciesMeta": {
|
|
27
27
|
"pi-agent-ide": {
|
|
@@ -10,6 +10,10 @@ export interface AgentIdeProcess {
|
|
|
10
10
|
readonly title: string;
|
|
11
11
|
readonly description: string;
|
|
12
12
|
readonly status: AgentIdeProcessStatus;
|
|
13
|
+
/** Native process ID when the provider owns the process. */
|
|
14
|
+
readonly pid?: number;
|
|
15
|
+
/** True only when Agent IDE created and controls this process. */
|
|
16
|
+
readonly owned?: boolean;
|
|
13
17
|
renderSummary(theme: Theme): readonly string[];
|
|
14
18
|
renderDetail(theme: Theme): Component;
|
|
15
19
|
stop(): Promise<void>;
|