pi-agent-ide 0.7.3 → 0.8.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 +27 -0
- package/README.md +63 -17
- package/dist/{chunk-2ZMMRINH.js → chunk-2K65BSXS.js} +1 -1
- package/dist/chunk-3G54ZL2L.js +1 -0
- package/dist/chunk-3ZGDMTMD.js +25 -0
- package/dist/{chunk-ZIWPKIBZ.js → chunk-4OYVLXWD.js} +1 -1
- package/dist/chunk-4W7GH3T7.js +10 -0
- package/dist/chunk-4XPUN4QN.js +2 -0
- package/dist/chunk-5KFVDYCI.js +1 -0
- package/dist/chunk-6EDOLYOV.js +1 -0
- package/dist/chunk-756K3LJY.js +1 -0
- package/dist/chunk-75SWXD2Z.js +9 -0
- package/dist/chunk-7HDK3NRQ.js +1 -0
- package/dist/chunk-7JV4VN73.js +1 -0
- package/dist/chunk-7NS3QUIE.js +9 -0
- package/dist/chunk-7TJ6DWW3.js +2 -0
- package/dist/chunk-ABFCAOU5.js +1 -0
- package/dist/chunk-BIG45IPN.js +2 -0
- package/dist/chunk-BQ67M4NC.js +3 -0
- package/dist/chunk-BXGMMZT3.js +1 -0
- package/dist/chunk-CPZJPGLG.js +1 -0
- package/dist/chunk-CSXHCSTH.js +9 -0
- package/dist/chunk-CTJV77FR.js +1 -0
- package/dist/chunk-DUUOCBS3.js +3 -0
- package/dist/chunk-E4HPRLRB.js +1 -0
- package/dist/chunk-EY65TFHJ.js +1 -0
- package/dist/{chunk-WLZIUMJL.js → chunk-GW6NZQTQ.js} +1 -1
- package/dist/chunk-HCN5W76B.js +1 -0
- package/dist/chunk-ICDI27GZ.js +1 -0
- package/dist/{chunk-TXOTNK6B.js → chunk-IH5NW5JX.js} +1 -1
- package/dist/chunk-IMGIDBCC.js +1 -0
- package/dist/chunk-IUSLSROY.js +1 -0
- package/dist/chunk-KL776TGR.js +1 -0
- package/dist/chunk-L2B4DTVS.js +1 -0
- package/dist/chunk-LEKC4GQK.js +5 -0
- package/dist/chunk-MKEC3U2M.js +4 -0
- package/dist/chunk-MOJ5RR35.js +1 -0
- package/dist/{chunk-H445SHSJ.js → chunk-MZXX353D.js} +1 -1
- package/dist/{chunk-ZTYWHL2F.js → chunk-N7LMRL64.js} +1 -1
- package/dist/chunk-NULNW6GK.js +1 -0
- package/dist/chunk-O36UC74T.js +1 -0
- package/dist/chunk-OFILFO6D.js +1 -0
- package/dist/chunk-OJX3RJ5A.js +1 -0
- package/dist/chunk-OLI3JPHJ.js +28 -0
- package/dist/{chunk-S6QRG3TQ.js → chunk-OM4LYD3S.js} +1 -1
- package/dist/chunk-PNP2KNGP.js +5 -0
- package/dist/chunk-QP2QSQ4U.js +2 -0
- package/dist/chunk-R2U5WXYR.js +1 -0
- package/dist/chunk-R5XJSEOE.js +3 -0
- package/dist/{chunk-7UGNGK7Y.js → chunk-RAZP42IQ.js} +1 -1
- package/dist/chunk-S72FVLUX.js +1 -0
- package/dist/chunk-SBLKPTL3.js +1 -0
- package/dist/chunk-SBNR4WZF.js +1 -0
- package/dist/chunk-SSWUUBIR.js +1 -0
- package/dist/chunk-T4FTT3U4.js +1 -0
- package/dist/chunk-TOYN4W4F.js +1 -0
- package/dist/chunk-TWWND6NI.js +1 -0
- package/dist/chunk-UBH6X3D3.js +1 -0
- package/dist/{chunk-QFTBY67N.js → chunk-UEVGZUII.js} +3 -3
- package/dist/chunk-UUJJRXHG.js +29 -0
- package/dist/chunk-VDP5CQHM.js +3 -0
- package/dist/chunk-WE42GBGU.js +4 -0
- package/dist/chunk-XZDOVPRC.js +1 -0
- package/dist/chunk-YJ6T3PEP.js +1 -0
- package/dist/chunk-Z3PGADVA.js +3 -0
- package/dist/{chunk-QDLTO5PH.js → chunk-ZAWRSA7N.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-13.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-15.js +1 -1
- package/dist/entry-17.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 -1
- package/dist/entry-23.js +1 -1
- package/dist/entry-24.js +1 -1
- package/dist/entry-25.js +1 -2
- package/dist/entry-26.js +2 -1
- package/dist/entry-27.js +1 -2
- package/dist/entry-28.js +4 -1
- package/dist/entry-29.js +1 -1
- package/dist/entry-30.js +1 -1
- package/dist/entry-31.js +1 -17
- package/dist/entry-32.js +18 -1
- package/dist/entry-33.js +1 -3
- package/dist/entry-34.js +1 -1
- package/dist/entry-35.js +1 -1
- package/dist/entry-36.js +1 -4
- package/dist/entry-37.js +1 -9
- package/dist/entry-38.js +1 -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 -25
- package/dist/entry-46.js +25 -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-50.js +1 -3
- package/dist/entry-51.js +3 -13
- package/dist/entry-52.js +13 -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-60.js +1 -1
- package/dist/entry-61.js +1 -0
- package/dist/entry-62.js +0 -1
- package/dist/entry-63.js +1 -0
- package/dist/entry-64.js +0 -1
- package/dist/entry-65.js +1 -1
- package/dist/entry-66.js +1 -1
- package/dist/entry-67.js +1 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-70.js +1 -1
- package/dist/entry-71.js +1 -0
- package/dist/entry-72.js +0 -1
- package/dist/entry-73.js +1 -0
- package/dist/entry-74.js +0 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-76.js +1 -1
- package/dist/entry-77.js +1 -80
- package/dist/entry-78.js +76 -15
- package/dist/entry-79.js +21 -2
- package/dist/entry-8.js +1 -1
- package/dist/entry-80.js +2 -1
- package/dist/entry-81.js +1 -1
- package/dist/entry-82.js +1 -5
- package/dist/entry-83.js +1 -3
- package/dist/entry-84.js +3 -1
- package/dist/entry-85.js +1 -1
- package/dist/entry-86.js +1 -1
- package/dist/entry-87.js +1 -0
- package/dist/pi-agent-ide.js +19 -19
- package/docs/agent-guides/debugger.md +2 -0
- package/docs/agent-guides/editing.md +1 -1
- package/docs/agent-guides/search-code.md +4 -1
- package/docs/agent-guides/ssh.md +58 -0
- package/docs/agent-guides/vision.md +6 -0
- package/docs/configuration.md +34 -0
- package/docs/tools.md +21 -14
- package/docs/user-hooks.md +5 -3
- package/node_modules/pi-agent-doctor/package.json +6 -2
- package/node_modules/pi-agent-doctor/src/evidence.ts +49 -4
- package/node_modules/pi-agent-doctor/src/executable.ts +46 -16
- package/node_modules/pi-agent-doctor/src/fixtures/executable-probe.ts +78 -0
- package/node_modules/pi-agent-doctor/src/fixtures/probe-executable-wait.mjs +10 -0
- package/node_modules/pi-agent-doctor/src/plugin-protocol.ts +6 -0
- package/node_modules/pi-agent-doctor/src/project-probes.ts +73 -0
- package/node_modules/pi-agent-doctor/src/workspace.ts +106 -0
- package/node_modules/pi-agent-documentation/package.json +2 -2
- package/node_modules/pi-agent-documentation/runtime/entry-25.js +1 -0
- package/node_modules/pi-agent-filesystem/package.json +8 -8
- package/node_modules/pi-agent-filesystem/src/resolver.ts +23 -7
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-jq/index.ts +33 -6
- package/node_modules/pi-agent-filesystem-jq/package.json +6 -6
- package/node_modules/pi-agent-filesystem-jq/src/jq.ts +67 -0
- 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-30.js +2 -0
- package/node_modules/pi-agent-ide-ast/package.json +15 -15
- package/node_modules/pi-agent-ide-ast/runtime/entry-31.js +0 -1
- package/node_modules/pi-agent-ide-ast/runtime/entry-32.js +2 -0
- package/node_modules/pi-agent-ide-ast/src/ast/manager.ts +2 -1
- package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +10 -3
- package/node_modules/pi-agent-ide-ast/src/ast/read-text.ts +4 -1
- package/node_modules/pi-agent-ide-ast/src/ast/selection.ts +3 -3
- package/node_modules/pi-agent-ide-ast/src/doctor-plugin.ts +13 -10
- package/node_modules/pi-agent-ide-ast/src/extension.ts +17 -1
- package/node_modules/pi-agent-ide-ast/src/outline-resolver.ts +32 -4
- package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +2 -2
- package/node_modules/pi-agent-ide-ast/src/scope-handler.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/search-presentation.ts +4 -3
- package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +100 -42
- package/node_modules/pi-agent-ide-ast/src/select-presentation.ts +3 -2
- package/node_modules/pi-agent-ide-ast/src/tool-select.ts +2 -1
- package/node_modules/pi-agent-ide-changes/index.ts +10 -2
- package/node_modules/pi-agent-ide-changes/package.json +10 -10
- package/node_modules/pi-agent-ide-changes/runtime/entry-33.js +0 -1
- package/node_modules/pi-agent-ide-changes/src/change-anchor.ts +7 -2
- package/node_modules/pi-agent-ide-changes/src/changes/change-service.ts +18 -1
- package/node_modules/pi-agent-ide-changes/src/changes/change-types.ts +3 -0
- package/node_modules/pi-agent-ide-changes/src/changes/git-changes-backend.ts +59 -7
- package/node_modules/pi-agent-ide-changes/src/changes/git-paths.ts +49 -0
- package/node_modules/pi-agent-ide-changes/src/current-change-presenter.ts +10 -2
- package/node_modules/pi-agent-ide-changes/src/doctor-plugin.ts +13 -14
- package/node_modules/pi-agent-ide-changes/src/last-text-transaction-store.ts +2 -1
- package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +47 -11
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +6 -1
- package/node_modules/pi-agent-ide-formatter/index.ts +14 -2
- package/node_modules/pi-agent-ide-formatter/package.json +4 -4
- package/node_modules/pi-agent-ide-formatter/src/doctor-plugin.ts +47 -35
- package/node_modules/pi-agent-ide-formatter/src/formatter.ts +41 -11
- package/node_modules/pi-agent-ide-formatter/src/registry.ts +9 -28
- package/node_modules/pi-agent-ide-languages/package.json +3 -3
- package/node_modules/pi-agent-ide-lint/index.ts +35 -4
- package/node_modules/pi-agent-ide-lint/package.json +8 -8
- package/node_modules/pi-agent-ide-lint/src/command-linter.ts +14 -10
- package/node_modules/pi-agent-ide-lint/src/doctor-plugin.ts +47 -39
- package/node_modules/pi-agent-ide-lint/src/registry.ts +9 -25
- package/node_modules/pi-agent-ide-lsp/index.ts +107 -25
- package/node_modules/pi-agent-ide-lsp/package.json +10 -10
- package/node_modules/pi-agent-ide-lsp/runtime/entry-38.js +2 -0
- package/node_modules/pi-agent-ide-lsp/src/code-view-resolvers.ts +6 -2
- package/node_modules/pi-agent-ide-lsp/src/declaration-targets.ts +5 -1
- package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +5 -3
- package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +27 -11
- package/node_modules/pi-agent-ide-lsp/src/lsp/abort.ts +62 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +245 -103
- package/node_modules/pi-agent-ide-lsp/src/lsp/code-views.ts +26 -45
- package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/document-uri.ts +40 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/file-watchers.ts +8 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +24 -17
- package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +255 -56
- package/node_modules/pi-agent-ide-lsp/src/lsp/navigation.ts +51 -11
- package/node_modules/pi-agent-ide-lsp/src/lsp/owner-transport.ts +67 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +149 -18
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +79 -31
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbols.ts +15 -12
- package/node_modules/pi-agent-ide-lsp/src/lsp/workspace-owner.ts +16 -0
- package/node_modules/pi-agent-ide-lsp/src/rename-plan.ts +67 -46
- package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +50 -19
- 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-45.js +0 -1
- package/node_modules/pi-agent-read/runtime/entry-46.js +2 -0
- package/node_modules/pi-agent-read/src/api/tools/read.ts +4 -2
- package/node_modules/pi-agent-read/src/core/extension.ts +4 -1
- package/node_modules/pi-agent-read/src/core/tools/read/raw-read.ts +143 -69
- package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +25 -1
- package/node_modules/pi-agent-read/src/core/tools/read/result-target.ts +67 -44
- package/node_modules/pi-agent-read/src/core/tools/read/structured-result.ts +8 -3
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +20 -5
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-resource/src/content-conversion/content-host.ts +75 -16
- package/node_modules/pi-agent-resource/src/index.ts +3 -0
- package/node_modules/pi-agent-resource/src/resource-error.ts +17 -0
- package/node_modules/pi-agent-resource/src/resource.ts +23 -0
- package/node_modules/pi-agent-resource/src/result-targets.ts +16 -2
- package/node_modules/pi-agent-resource/src/validation.ts +2 -1
- package/node_modules/pi-agent-search/package.json +9 -9
- package/node_modules/pi-agent-search/runtime/entry-50.js +0 -1
- package/node_modules/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +6 -2
- package/node_modules/pi-agent-search/src/api/search.ts +44 -2
- package/node_modules/pi-agent-search/src/core/extension.ts +2 -3
- package/node_modules/pi-agent-search/src/core/search-core.ts +78 -8
- package/node_modules/pi-agent-search-text/index.ts +35 -1
- package/node_modules/pi-agent-search-text/package.json +14 -12
- package/node_modules/pi-agent-search-text/runtime/entry-52.js +1 -0
- package/node_modules/pi-agent-search-text/src/doctor-plugin.ts +10 -5
- package/node_modules/pi-agent-search-text/src/file-search.ts +26 -3
- package/node_modules/pi-agent-search-text/src/fuzzy-search.ts +54 -3
- package/node_modules/pi-agent-search-text/src/resolvers.ts +22 -5
- package/node_modules/pi-agent-search-text/src/scoped-search.ts +4 -5
- package/node_modules/pi-agent-search-text/src/search-backend.ts +110 -12
- package/node_modules/pi-agent-search-text/src/search-recipe.ts +5 -1
- package/node_modules/pi-agent-search-text/src/search-result.ts +1 -0
- package/node_modules/pi-agent-search-text/src/search-session.ts +100 -24
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text/runtime/entry-56.js +1 -0
- package/node_modules/pi-agent-text/src/text-document.ts +2 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-57.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-58.js +0 -1
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-59.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-60.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-61.js +2 -0
- package/node_modules/pi-agent-text-anchor-line-hash/src/read-handler.ts +3 -1
- package/node_modules/pi-agent-text-editor/package.json +26 -26
- package/node_modules/pi-agent-text-editor/runtime/entry-77.js +0 -1
- package/node_modules/pi-agent-text-editor/src/api/delete-guard.ts +29 -2
- package/node_modules/pi-agent-text-editor/src/api/edit-completion.ts +3 -0
- package/node_modules/pi-agent-text-editor/src/api/file-operations.ts +55 -0
- package/node_modules/pi-agent-text-editor/src/api/file-transfers.ts +41 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-guard.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/native-files.ts +127 -0
- package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +20 -1
- package/node_modules/pi-agent-text-editor/src/api/post-edit.ts +1 -0
- package/node_modules/pi-agent-text-editor/src/core/delete-policy.ts +94 -80
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +14 -2
- package/node_modules/pi-agent-text-editor/src/core/file-operation-guards.ts +81 -0
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +21 -4
- package/node_modules/pi-agent-text-editor/src/core/file-operations.ts +123 -27
- package/node_modules/pi-agent-text-editor/src/core/file-result-targets.ts +30 -1
- package/node_modules/pi-agent-text-editor/src/core/file-transfers.ts +147 -105
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result-targets.ts +91 -14
- package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +72 -7
- package/node_modules/pi-agent-text-editor/src/core/temporary-directories.ts +40 -20
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +4 -3
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +307 -32
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +79 -23
- package/node_modules/pi-agent-text-editor/src/core/write-agent-result.ts +4 -1
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +117 -27
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-80.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-82.js +1 -0
- package/node_modules/pi-agent-web/index.ts +28 -4
- package/node_modules/pi-agent-web/package.json +8 -8
- package/node_modules/pi-agent-web/src/doctor-plugin.ts +21 -6
- package/node_modules/pi-agent-web/src/resolver.ts +12 -2
- package/node_modules/pi-agent-web/src/search.ts +2 -1
- 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-87.js +2 -0
- package/package.json +35 -35
- package/src/api/doctor-runtime.ts +80 -0
- package/src/api/doctor.ts +6 -0
- package/src/api/hooks.ts +3 -0
- package/src/api/plugin-protocol.ts +11 -1
- package/src/api/tool-config.ts +143 -24
- package/src/backend/config.ts +85 -0
- package/src/backend/configured-process.ts +59 -0
- package/src/backend/dap-java-transport.ts +112 -0
- package/src/backend/dap-java-worker.py +218 -0
- package/src/backend/dap-node-transport.ts +112 -0
- package/src/backend/dap-powershell-worker.py +44 -0
- package/src/backend/dap-r-worker.py +210 -0
- package/src/backend/dap-tcp-transport.ts +42 -0
- package/src/backend/dap-tcp-worker.py +125 -0
- package/src/backend/dap-transport.ts +69 -0
- package/src/backend/dap-unix-worker.py +63 -0
- package/src/backend/debugger-registration.ts +62 -0
- package/src/backend/debugger-workspace-owner.ts +413 -0
- package/src/backend/doctor-inventory-worker.py +54 -0
- package/src/backend/doctor-probe-worker.py +140 -0
- package/src/backend/doctor-registration.ts +18 -0
- package/src/backend/doctor-workspace.ts +381 -0
- package/src/backend/file-operation-resolver.ts +58 -0
- package/src/backend/file-revision.ts +13 -0
- package/src/backend/file-transfer.ts +302 -0
- package/src/backend/file-watch-worker.py +119 -0
- package/src/backend/formatter-registration.ts +114 -0
- package/src/backend/git-registration.ts +60 -0
- package/src/backend/identity.ts +47 -0
- package/src/backend/index.ts +12 -0
- package/src/backend/lint-registration.ts +102 -0
- package/src/backend/lsp-file-watchers.ts +220 -0
- package/src/backend/lsp-registration.ts +83 -0
- package/src/backend/lsp-transport.ts +87 -0
- package/src/backend/lsp-workspace-owner.ts +50 -0
- package/src/backend/object-transfer.ts +299 -0
- package/src/backend/owned-command.ts +105 -0
- package/src/backend/owned-process-stop.ts +36 -0
- package/src/backend/owned-read-command.ts +20 -0
- package/src/backend/process-environment.ts +77 -0
- package/src/backend/process-metadata-worker.py +98 -0
- package/src/backend/process-metadata.ts +99 -0
- package/src/backend/recipe-evidence-worker.py +26 -0
- package/src/backend/recipe-evidence.ts +77 -0
- package/src/backend/registration.ts +124 -0
- package/src/backend/registry.ts +29 -0
- package/src/backend/resource-resolver.ts +147 -0
- package/src/backend/search-environment.ts +100 -0
- package/src/backend/ssh-channel-worker.py +306 -0
- package/src/backend/ssh-channel.ts +376 -0
- package/src/backend/ssh-transfer-worker.py +99 -0
- package/src/backend/ssh-transport.ts +54 -0
- package/src/backend/ssh-worker.py +730 -0
- package/src/backend/ssh.ts +610 -0
- package/src/backend/tool-config-access.ts +63 -0
- package/src/backend/tool-project.ts +71 -0
- package/src/backend/vision-capture-worker.py +319 -0
- package/src/backend/vision-capture.ts +165 -0
- package/src/backend/vision-registration.ts +104 -0
- package/src/backend/web-browser-worker.mjs +182 -0
- package/src/backend/web-browser.ts +128 -0
- package/src/backend/web-http-worker.py +62 -0
- package/src/backend/web-http.ts +79 -0
- package/src/backend/web-owner.ts +68 -0
- package/src/backend/web-registration.ts +14 -0
- package/src/code-view/diagnostic-view.ts +2 -2
- package/src/code-view/reference.ts +9 -0
- package/src/composite/builtin-extensions.ts +9 -14
- package/src/composite/module-labels.ts +1 -0
- package/src/composite/nested-tool-rendering.ts +10 -1
- package/src/core/diagnostic-store.ts +32 -10
- package/src/core/ide-core.ts +22 -2
- package/src/doctor/arguments.ts +19 -0
- package/src/doctor/config-writer.ts +72 -29
- package/src/doctor/discovery.ts +53 -15
- package/src/doctor/extension.ts +27 -10
- package/src/doctor/run.ts +42 -7
- 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-jq/index.ts +33 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +6 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/src/jq.ts +67 -0
- 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-30.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-26.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/src/resolver.ts +23 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +28 -4
- 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-87.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-83.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/doctor-plugin.ts +21 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/resolver.ts +12 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/search.ts +2 -1
- package/src/extensions/pi-agent-read/package.json +12 -12
- package/src/extensions/pi-agent-read/runtime/entry-45.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-46.js +2 -0
- package/src/extensions/pi-agent-read/src/api/tools/read.ts +4 -2
- package/src/extensions/pi-agent-read/src/core/extension.ts +4 -1
- package/src/extensions/pi-agent-read/src/core/tools/read/raw-read.ts +143 -69
- package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +25 -1
- package/src/extensions/pi-agent-read/src/core/tools/read/result-target.ts +67 -44
- package/src/extensions/pi-agent-read/src/core/tools/read/structured-result.ts +8 -3
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +20 -5
- package/src/extensions/pi-agent-search/package.json +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +35 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +14 -12
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-52.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-55.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/doctor-plugin.ts +10 -5
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/file-search.ts +26 -3
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/fuzzy-search.ts +54 -3
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +22 -5
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/scoped-search.ts +4 -5
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-backend.ts +110 -12
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +5 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +100 -24
- package/src/extensions/pi-agent-search/runtime/entry-50.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-51.js +2 -0
- package/src/extensions/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/search-parameters.ts +6 -2
- package/src/extensions/pi-agent-search/src/api/search.ts +44 -2
- package/src/extensions/pi-agent-search/src/core/extension.ts +2 -3
- package/src/extensions/pi-agent-search/src/core/search-core.ts +78 -8
- 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-57.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-58.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-59.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-60.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-61.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/read-handler.ts +3 -1
- 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-renderer/src/renderer.ts +117 -27
- 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-80.js +2 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-77.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-78.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/delete-guard.ts +29 -2
- package/src/extensions/pi-agent-text-editor/src/api/edit-completion.ts +3 -0
- package/src/extensions/pi-agent-text-editor/src/api/file-operations.ts +55 -0
- package/src/extensions/pi-agent-text-editor/src/api/file-transfers.ts +41 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-guard.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/native-files.ts +127 -0
- package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +20 -1
- package/src/extensions/pi-agent-text-editor/src/api/post-edit.ts +1 -0
- package/src/extensions/pi-agent-text-editor/src/core/delete-policy.ts +94 -80
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +14 -2
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-guards.ts +81 -0
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +21 -4
- package/src/extensions/pi-agent-text-editor/src/core/file-operations.ts +123 -27
- package/src/extensions/pi-agent-text-editor/src/core/file-result-targets.ts +30 -1
- package/src/extensions/pi-agent-text-editor/src/core/file-transfers.ts +147 -105
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result-targets.ts +91 -14
- package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +72 -7
- package/src/extensions/pi-agent-text-editor/src/core/temporary-directories.ts +40 -20
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +4 -3
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +307 -32
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +79 -23
- package/src/extensions/pi-agent-text-editor/src/core/write-agent-result.ts +4 -1
- package/src/plugins/pi-agent-ide-ast/package.json +15 -15
- package/src/plugins/pi-agent-ide-ast/runtime/entry-31.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-32.js +2 -0
- package/src/plugins/pi-agent-ide-ast/src/ast/manager.ts +2 -1
- package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +10 -3
- package/src/plugins/pi-agent-ide-ast/src/ast/read-text.ts +4 -1
- package/src/plugins/pi-agent-ide-ast/src/ast/selection.ts +3 -3
- package/src/plugins/pi-agent-ide-ast/src/doctor-plugin.ts +13 -10
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +17 -1
- package/src/plugins/pi-agent-ide-ast/src/outline-resolver.ts +32 -4
- package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +2 -2
- package/src/plugins/pi-agent-ide-ast/src/scope-handler.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/search-presentation.ts +4 -3
- package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +100 -42
- package/src/plugins/pi-agent-ide-ast/src/select-presentation.ts +3 -2
- package/src/plugins/pi-agent-ide-ast/src/tool-select.ts +2 -1
- package/src/plugins/pi-agent-ide-changes/index.ts +10 -2
- package/src/plugins/pi-agent-ide-changes/package.json +10 -10
- package/src/plugins/pi-agent-ide-changes/runtime/entry-33.js +0 -1
- package/src/plugins/pi-agent-ide-changes/src/change-anchor.ts +7 -2
- package/src/plugins/pi-agent-ide-changes/src/changes/change-service.ts +18 -1
- package/src/plugins/pi-agent-ide-changes/src/changes/change-types.ts +3 -0
- package/src/plugins/pi-agent-ide-changes/src/changes/git-changes-backend.ts +59 -7
- package/src/plugins/pi-agent-ide-changes/src/changes/git-paths.ts +49 -0
- package/src/plugins/pi-agent-ide-changes/src/current-change-presenter.ts +10 -2
- package/src/plugins/pi-agent-ide-changes/src/doctor-plugin.ts +13 -14
- package/src/plugins/pi-agent-ide-changes/src/last-text-transaction-store.ts +2 -1
- package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +47 -11
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +6 -1
- package/src/plugins/pi-agent-ide-debugger/index.ts +62 -25
- package/src/plugins/pi-agent-ide-debugger/src/adapter-executables.ts +3 -1
- package/src/plugins/pi-agent-ide-debugger/src/dap-client.ts +33 -0
- package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +150 -171
- package/src/plugins/pi-agent-ide-debugger/src/process-provider.ts +2 -0
- package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +152 -58
- package/src/plugins/pi-agent-ide-debugger/src/workspace-owner.ts +28 -0
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +4 -1
- package/src/plugins/pi-agent-ide-formatter/index.ts +14 -2
- package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
- package/src/plugins/pi-agent-ide-formatter/src/doctor-plugin.ts +47 -35
- package/src/plugins/pi-agent-ide-formatter/src/formatter.ts +41 -11
- package/src/plugins/pi-agent-ide-formatter/src/registry.ts +9 -28
- package/src/plugins/pi-agent-ide-languages/package.json +3 -3
- package/src/plugins/pi-agent-ide-lint/index.ts +35 -4
- package/src/plugins/pi-agent-ide-lint/package.json +8 -8
- package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +14 -10
- package/src/plugins/pi-agent-ide-lint/src/doctor-plugin.ts +47 -39
- package/src/plugins/pi-agent-ide-lint/src/registry.ts +9 -25
- package/src/plugins/pi-agent-ide-lsp/index.ts +107 -25
- package/src/plugins/pi-agent-ide-lsp/package.json +10 -10
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-38.js +2 -0
- package/src/plugins/pi-agent-ide-lsp/src/code-view-resolvers.ts +6 -2
- package/src/plugins/pi-agent-ide-lsp/src/declaration-targets.ts +5 -1
- package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +5 -3
- package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +27 -11
- package/src/plugins/pi-agent-ide-lsp/src/lsp/abort.ts +62 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +245 -103
- package/src/plugins/pi-agent-ide-lsp/src/lsp/code-views.ts +26 -45
- package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/document-uri.ts +40 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/file-watchers.ts +8 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +24 -17
- package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +255 -56
- package/src/plugins/pi-agent-ide-lsp/src/lsp/navigation.ts +51 -11
- package/src/plugins/pi-agent-ide-lsp/src/lsp/owner-transport.ts +67 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +149 -18
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +79 -31
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbols.ts +15 -12
- package/src/plugins/pi-agent-ide-lsp/src/lsp/workspace-owner.ts +16 -0
- package/src/plugins/pi-agent-ide-lsp/src/rename-plan.ts +67 -46
- package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +50 -19
- package/src/plugins/pi-agent-ide-processes/src/registry.ts +8 -1
- package/src/plugins/pi-agent-ide-terminal/index.ts +7 -0
- package/src/plugins/pi-agent-ide-terminal/src/process-provider.ts +5 -1
- package/src/plugins/pi-agent-ide-terminal/src/resources.ts +5 -2
- package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +161 -42
- package/src/plugins/pi-agent-ide-terminal/src/shell-profile.ts +7 -0
- package/src/plugins/pi-agent-ide-terminal/src/shell-result.ts +11 -0
- package/src/plugins/pi-agent-ide-terminal/src/tools.ts +33 -8
- package/src/plugins/pi-agent-ide-terminal/src/types.ts +5 -0
- package/src/plugins/pi-agent-ide-vision/index.ts +170 -9
- package/src/plugins/pi-agent-ide-vision/src/doctor-plugin.ts +47 -0
- package/src/plugins/pi-agent-ide-vision/src/vision.ts +42 -1
- package/src/post-edit/gate.ts +4 -1
- package/src/toolchain/types.ts +2 -0
- package/dist/chunk-3YK4XMWB.js +0 -0
- package/dist/chunk-5JELU6RV.js +0 -7
- package/dist/chunk-6U5OU77O.js +0 -3
- package/dist/chunk-7LD2OQH3.js +0 -14
- package/dist/chunk-BYZSBXUK.js +0 -2
- package/dist/chunk-CEX73RI5.js +0 -28
- package/dist/chunk-DZWTKF2K.js +0 -1
- package/dist/chunk-EOKEQ3YH.js +0 -25
- package/dist/chunk-HZ5BNF3A.js +0 -1
- package/dist/chunk-IG56UGSO.js +0 -2
- package/dist/chunk-KVHDMIZS.js +0 -3
- package/dist/chunk-M5IVSCR2.js +0 -1
- package/dist/chunk-M5MJP7Z2.js +0 -1
- package/dist/chunk-MGCHOGQD.js +0 -1
- package/dist/chunk-N34ATN52.js +0 -1
- package/dist/chunk-NHKPP2AI.js +0 -28
- package/dist/chunk-OB46OPMZ.js +0 -1
- package/dist/chunk-Q6CZ6GBR.js +0 -3
- package/dist/chunk-QIK2E64R.js +0 -1
- package/dist/chunk-SBP3ABH4.js +0 -5
- package/dist/chunk-STBJO3Z3.js +0 -2
- package/dist/chunk-T6LX2RX5.js +0 -1
- package/dist/chunk-WZI4YC2O.js +0 -1
- package/node_modules/pi-agent-filesystem/runtime/entry-25.js +0 -2
- package/node_modules/pi-agent-ide-ast/runtime/entry-30.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-32.js +0 -1
- package/node_modules/pi-agent-image/runtime/entry-38.js +0 -1
- package/node_modules/pi-agent-resource/runtime/entry-46.js +0 -1
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-56.js +0 -2
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-57.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-59.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-61.js +0 -1
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-80.js +0 -1
- package/node_modules/pi-agent-web/runtime/entry-82.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-26.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-25.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-83.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-82.js +0 -2
- package/src/extensions/pi-agent-read/runtime/entry-41.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-51.js +0 -2
- package/src/extensions/pi-agent-search/runtime/entry-47.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-56.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-57.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-59.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-78.js +0 -2
- package/src/extensions/pi-agent-text-editor/runtime/entry-61.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-30.js +0 -1
- package/src/plugins/pi-agent-ide-changes/runtime/entry-32.js +0 -1
- /package/node_modules/{pi-agent-documentation → pi-agent-doctor}/runtime/entry-24.js +0 -0
- /package/node_modules/{pi-agent-filesystem-image → pi-agent-filesystem}/runtime/entry-26.js +0 -0
- /package/node_modules/{pi-agent-filesystem-jq → pi-agent-filesystem-image}/runtime/entry-27.js +0 -0
- /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-jq}/runtime/entry-28.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-29.js +0 -0
- /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-34.js +0 -0
- /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-36.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-37.js +0 -0
- /package/node_modules/{pi-agent-invariant → pi-agent-image}/runtime/entry-39.js +0 -0
- /package/node_modules/{pi-agent-pdf → pi-agent-invariant}/runtime/entry-40.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-41.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-47.js +0 -0
- /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-51.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-55.js +0 -0
- /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor}/runtime/entry-78.js +0 -0
- /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-79.js +0 -0
- /package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-81.js +0 -0
- /package/node_modules/{pi-agent-web-html → pi-agent-web}/runtime/entry-83.js +0 -0
- /package/node_modules/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-84.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-85.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-86.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-jq → pi-agent-filesystem-image}/runtime/entry-27.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-pdf → pi-agent-filesystem-jq}/runtime/entry-28.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-29.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-84.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-85.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-86.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-79.js +0 -0
- /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-34.js +0 -0
- /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-35.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-36.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-37.js +0 -0
package/dist/chunk-Q6CZ6GBR.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as U}from"./chunk-PLKYHUNT.js";import{m as T}from"./chunk-ZPT5D4VP.js";import{a as x}from"./chunk-ZC65Z3CK.js";import{a as l}from"./chunk-EI7MMDWY.js";import{createHash as ke}from"node:crypto";import{open as Ce,readFile as oe}from"node:fs/promises";import f from"node:path";import{spawn as me}from"node:child_process";import{stat as pe}from"node:fs/promises";import C from"node:path";import{createInterface as ge}from"node:readline";import{existsSync as le}from"node:fs";import ue from"node:os";import K from"node:path";function V(e=process.env.PI_CODING_AGENT_DIR??K.join(ue.homedir(),".pi","agent"),t=process.platform){let r=K.join(e,"bin",t==="win32"?"rg.exe":"rg");return le(r)?r:"rg"}l(V,"resolveRipgrepExecutable");function O(e,t=!1){let r=P(e);return B(r)?F(E(new M(e,r).parse(),t)):t?e:D(e)}l(O,"compileSearchQuery");function _(e,t=!1){let r=P(e);return B(r)?E(new M(e,r).parse(),t):void 0}l(_,"compileSearchCondition");function k(e,t){if(e.kind==="term")return t(e.value);let r=k(e.left,t);if(e.kind==="or")return r||k(e.right,t);let n=k(e.right,t);return r&&(e.kind==="not"?!n:n)}l(k,"satisfiesSearchCondition");function Y(e){if(B(P(e)))return;let t=[...new Set(e.trim().split(/\s+/u).filter(Boolean))];return t.length>1?`(?:${t.map(D).join("|")})`:void 0}l(Y,"compileSearchFallbackQuery");function B(e){return e.some(t=>t.quoted===!0||t.type==="and"||t.type==="or"||t.type==="not")}l(B,"containsBooleanSyntax");var M=class{static{l(this,"BooleanQueryParser")}#t;#n;#i=0;constructor(t,r){this.#t=t,this.#n=r}parse(){let t=this.#s(),r=this.#e();if(r.type!=="end"){let n=r.type==="right"?"unexpected ')'.":`unexpected ${fe(r)}.`;throw w(r.offset,n)}return t}#s(){let t=this.#r();for(;this.#e().type==="or";){let r=this.#o(),n=this.#a(`after ${r.value}`);t={kind:"or",left:t,right:this.#c(n)}}return t}#r(){return this.#c(this.#a())}#c(t){let r=t;for(;;){let n=this.#e();if(n.type==="and"||n.type==="not"){this.#o();let o=this.#a(`after ${n.value}`);r={kind:n.type,left:r,right:o};continue}if(n.type==="term"||n.type==="left"){r={kind:"and",left:r,right:this.#a()};continue}return r}}#a(t){let r=this.#e();if(r.type==="term")return this.#o(),{kind:"term",value:r.value,quoted:r.quoted};if(r.type==="left"){if(this.#o(),this.#e().type==="right"||this.#e().type==="end")throw w(this.#e().offset,"expected a term after '('.");let o=this.#s();if(this.#e().type!=="right")throw w(this.#e().offset,"expected ')'.");return this.#o(),o}if(t===void 0&&(r.type==="and"||r.type==="or"||r.type==="not"))throw w(r.offset,`expected a term before ${r.value}.`);let n=t===void 0?"":` ${t}`;throw w(r.offset,`expected a term${n}.`)}#e(){return this.#n[this.#i]??{type:"end",value:"",offset:this.#t.length}}#o(){let t=this.#e();return this.#i+=1,t}};function P(e){let t=[],r=0;for(;r<e.length;){let n=e.charAt(r);if(/\s/u.test(n)){r+=1;continue}if(n==="("&&de(e,r)){t.push({type:"left",value:n,offset:r}),r+=1;continue}if(n===")"){t.push({type:"right",value:n,offset:r}),r+=1;continue}if(X(e,r)){let i=e.charAt(r+1)==="|"?2:1;t.push({type:"or",value:e.slice(r,r+i),offset:r}),r+=i;continue}if(n==="'"||n==='"'){let i=r,c=n,a="";for(r+=1;r<e.length&&e.charAt(r)!==c;)e.charAt(r)==="\\"&&(e.charAt(r+1)===c||e.charAt(r+1)==="\\")&&(r+=1),a+=e.charAt(r++);if(r>=e.length)throw w(i,`unterminated ${c==="'"?"single":"double"}-quoted term.`);if(r+=1,a.length===0)throw w(i,"quoted terms must not be empty.");t.push({type:"term",value:a,offset:i,quoted:!0});continue}let o=r;for(;r<e.length;){let i=e.charAt(r);if(/\s/u.test(i)||i===")"||X(e,r))break;i==="\\"&&r+1<e.length?r+=2:i==="["||i==="("?r=W(e,r)??r+1:r+=1}let s=e.slice(o,r);t.push({type:he(s),value:s,offset:o})}return t.push({type:"end",value:"",offset:e.length}),t}l(P,"tokenize");function X(e,t){return e.charAt(t)==="|"&&(e.charAt(t+1)==="|"||/\s/u.test(e.charAt(t-1))&&/\s/u.test(e.charAt(t+1)))}l(X,"isBooleanPipe");function W(e,t){let r=e.charAt(t)==="["?"]":")",n=t+1;for(;n<e.length;){let o=e.charAt(n);if(o==="\\")n+=2;else{if(o===r)return n+1;if(r===")"&&(o==="("||o==="[")){let s=W(e,n);if(s===void 0)return;n=s}else n+=1}}}l(W,"regexBlockEnd");function de(e,t){let r=W(e,t);if(r===void 0)return!0;let n=e.slice(t+1,r-1);return n.trim().length===0?!0:B(P(n))}l(de,"isBooleanGroup");function he(e){return e==="AND"?"and":e==="OR"?"or":e==="NOT"?"not":"term"}l(he,"operatorType");function fe(e){return e.value.length>0?JSON.stringify(e.value):"the end of the query"}l(fe,"quoteToken");function w(e,t){return new SyntaxError(`Invalid Boolean search query at column ${String(e+1)}: ${t}`)}l(w,"syntaxError");function E(e,t){return e.kind==="term"?{kind:"term",value:t&&!e.quoted?e.value:D(e.value)}:{kind:e.kind,left:E(e.left,t),right:E(e.right,t)}}l(E,"compileTerms");function F(e){if(e.kind==="term")return e.value;let t=F(e.left);return e.kind==="not"?t:`(?:${t}|${F(e.right)})`}l(F,"matchPattern");function D(e){return e.replace(/[\\^$.*+?()[\]{}|]/gu,"\\$&")}l(D,"escapeRegex");async function $(e,t,r,n){if(e.query.length===0)throw new Error("Search query must not be empty.");if(/\r|\n/u.test(e.query))throw new Error("Search supports one-line patterns only.");return e.condition!==void 0?ye(e,t,r):ee(e,t,r,void 0,n)}l($,"searchText");async function Se(e,t){let r=C.resolve(t,we(e.path??".")),n=(await pe(r)).isDirectory();return{cwd:n?r:C.dirname(r),target:n?".":C.basename(r),arguments:["--no-config","--no-ignore-parent","--color=never",...Z(e.include).flatMap(o=>["--glob",o]),...Z(e.exclude).flatMap(o=>["--glob",`!${o}`])]}}l(Se,"ripgrepScope");async function Ge(e,t,r,n){if(e.condition!==void 0)throw new Error("Boolean scoped search is not available yet.");if(/\r|\n/u.test(e.query))throw new Error("Search supports one-line patterns only.");let o=await I(["--json","--no-config","--color=never","--with-filename","--line-number",...e.regex===!0?["--engine","auto"]:["--fixed-strings"],e.caseSensitive===!0?"--case-sensitive":"--ignore-case",...e.wholeWord===!0?["--word-regexp"]:[],"--",e.query,"-"],r,n,void 0,void 0,t.length===0?`
|
|
2
|
-
`:t);return t.length===0?{...o,matches:o.matches.filter(s=>s.lineNumber===1&&s.startColumn===0&&s.endColumn===0)}:o}l(Ge,"searchTextContent");async function ee(e,t,r,n,o){let s=await Se(e,t),i=s.cwd,c=["--json","--with-filename","--line-number",e.caseSensitive===!0?"--case-sensitive":"--ignore-case",...e.wholeWord===!0?["--word-regexp"]:[],...s.arguments,"--",e.query,s.target];if(e.regex!==!0)return I(["--fixed-strings",...c],i,r,n,o);try{return await I(["--engine","auto",...c],i,r,n,o)}catch(a){if(!be(a))throw a instanceof Error&&/PCRE2 is not available|does not support PCRE2/iu.test(a.message)?new Error("This regex requires PCRE2. Install ripgrep with PCRE2 support or simplify the regex.",{cause:a}):a;try{return await I(["--engine","default",...c],i,r,n,o)}catch(u){throw r?.aborted?u:new AggregateError([a,u],"Regex exceeded the PCRE2 match limit and cannot run with the default engine. Narrow the search or simplify the regex.",{cause:u})}}}l(ee,"searchPattern");async function ye(e,t,r){let n=e.condition;if(n===void 0)throw new Error("Boolean search requires a line condition.");let o=new Set;function s(h){if(h.kind==="term"){o.add(h.value);return}s(h.left),s(h.right)}l(s,"collect"),s(n);let{condition:i,...c}=e,a=new Map,u=l(h=>JSON.stringify([h.source,h.lineNumber]),"lineKey");for(let h of o){r?.throwIfAborted();let m=new Set;await ee({...c,query:h,regex:!0,wholeWord:!1},t,r,(y,A)=>m.add(JSON.stringify([y,A]))),a.set(h,m)}let d=await $(c,t,r),g=new Set,p=d.matches.filter(h=>{let m=u(h);return g.has(m)||!k(n,y=>a.get(y)?.has(m)===!0)?!1:(g.add(m),!0)});return{...d,matches:p}}l(ye,"searchBoolean");function I(e,t,r,n,o,s){return new Promise((i,c)=>{let a=me(V(),e,{stdio:["pipe","pipe","pipe"],cwd:t}),u=0,d=!1;o!==void 0&&a.stdout.on("data",S=>{u+=S.length,u>o.bytes&&(d=!0,a.kill())});let g=ge({input:a.stdout});a.stdin.on("error",()=>{}),a.stdin.end(s);let p=[],h="",m,y=l(()=>{a.kill()},"abort"),A=l(()=>{r?.removeEventListener("abort",y),g.close()},"cleanup");a.stderr.setEncoding("utf8"),a.stderr.on("data",S=>{h+=S}),g.on("line",S=>{if(!(d||m!==void 0||S.length===0))try{let b=JSON.parse(S);if(b.type!=="match")return;if(n!==void 0){let{path:N,line_number:G}=b.data;N.text!==void 0&&Number.isSafeInteger(G)&&n(C.resolve(t,N.text),G);return}for(let N of xe(b,t)){if(o!==void 0&&p.length===o.matches){d=!0,a.kill();break}p.push(N)}}catch(b){m=b,a.kill()}}),a.once("error",S=>{A(),c(S)}),a.once("close",S=>{if(A(),r?.aborted===!0){let b=new Error("Search was aborted.");b.name="AbortError",c(b);return}if(m!==void 0){c(new Error("Unable to parse ripgrep search output.",{cause:m}));return}if(!d&&S!==0&&S!==1){c(new Error(h.trim()||`ripgrep exited with code ${String(S)}.`));return}p.sort(Te),i({matches:p,complete:!d})}),r?.addEventListener("abort",y,{once:!0}),r?.aborted===!0&&y()})}l(I,"runRipgrep");function be(e){return e instanceof Error&&/PCRE2: error matching: match limit exceeded/iu.test(e.message)}l(be,"isPcre2MatchLimitError");function xe(e,t){let r=e.data.path.text,n=e.data.lines.text;if(r===void 0||n===void 0||!Number.isSafeInteger(e.data.line_number))return[];let o=n.replace(/(?:\r\n|\n)$/u,""),s=Buffer.from(n),i=[];for(let c of e.data.submatches){if(c.start<0||c.end<c.start||c.end>s.length)continue;let a=s.subarray(0,c.start).toString("utf8").length,u=s.subarray(0,c.end).toString("utf8").length;i.push({source:C.resolve(t,r),lineNumber:e.data.line_number,startColumn:a,endColumn:u,matchedText:o.slice(a,u),lineText:o})}return i}l(xe,"matchesFromEvent");function Z(e){if(e===void 0)return[];let t=[],r=0,n="";for(let o of e){if(o==="{"?r+=1:o==="}"&&(r=Math.max(0,r-1)),r===0&&(o===","||/\s/u.test(o))){n.length>0&&(t.push(n),n="");continue}n+=o}return n.length>0&&t.push(n),t}l(Z,"splitGlobList");function we(e){return e.startsWith("@")?e.slice(1):e}l(we,"stripFilePrefix");function Te(e,t){return e.source.localeCompare(t.source)||e.lineNumber-t.lineNumber||e.startColumn-t.startColumn||e.endColumn-t.endColumn}l(Te,"compareMatches");function Ye(e){let t=O(e.query),r=O(e.query,!0),n=Y(e.query),o=[],s=_(e.query),i=_(e.query,!0);return(r!==t||JSON.stringify(s)!==JSON.stringify(i))&&o.push({query:r,mode:"regex",condition:i}),n!==void 0&&n!==t&&n!==r&&o.push({query:n,mode:"words"}),{...e,query:t,regex:!0,condition:s,fallbacks:o}}l(Ye,"createSearchRecipe");async function J(e,t,r){let n=e.query,o=await $(e,t,r),s=[];for(let i of e.fallbacks??[]){if(o.matches.length>0||!o.complete)break;r?.throwIfAborted();try{o=await $({...e,query:i.query,regex:!0,condition:i.condition},t,r),n=i.query,s.push(i.mode==="regex"?"Search fallback: no literal matches; tried unquoted terms as regex.":"Search fallback: no matches in earlier modes; tried separate words. Use these matches as location hints; refine the query before editing.")}catch(c){if(i.mode!=="regex"||!Re(c)||r?.aborted)throw c;s.push("Search fallback: invalid regex skipped; literal search found no matches.")}}return{...o,query:n,notices:s}}l(J,"runSearchRecipe");function Re(e){return e instanceof Error&&/regex parse error:|PCRE2: error compiling pattern/iu.test(e.message)}l(Re,"isRegexSyntaxError");var ve=/^SEARCH#([A-F0-9]{4,64}):(all|[1-9]\d*):(line|match)$/u,ie=4;function ct(e,t,r,n){return se(e,t,r,n).slice(0,ie)}l(ct,"createSearchSessionId");function se(e,t,r,n){let o=r===void 0?Pe(t.map(a=>a.source)):f.resolve(r),s=t.map(a=>({match:a,source:f.relative(o,f.resolve(a.source))})).sort((a,u)=>a.source.localeCompare(u.source)||Q(a.match,u.match)).map(({match:a,source:u})=>[u,a.lineNumber,a.startColumn,a.endLineNumber??a.lineNumber,a.endColumn,a.matchedText,a.lineText]),{limit:i,...c}=ae(n??{query:e,regex:!0},o);return ke("sha256").update(JSON.stringify([e,o,c,s])).digest("hex").toUpperCase()}l(se,"createSearchSessionIdentity");function Ae(e,t){if(!/^[A-F0-9]{64}$/u.test(e))throw new Error("Search session identity must be a 64-character uppercase hexadecimal value.");for(let r=ie;r<=e.length;r+=1){let n=e.slice(0,r);if(!t.has(n))return n}throw new Error("Could not allocate a unique search session id.")}l(Ae,"allocateSearchSessionId");function ae(e,t){return{query:e.query,path:f.resolve(t,e.path??"."),include:e.include??"",exclude:e.exclude??"",caseSensitive:e.caseSensitive===!0,wholeWord:e.wholeWord===!0,limit:e.limit??50,regex:e.regex===!0,condition:e.condition,fallbacks:e.fallbacks??[]}}l(ae,"normalizeRecipe");var H=class extends Error{static{l(this,"SearchSnapshotChangedError")}constructor(t){super(`Search result in ${t} changed before its anchors were registered.`),this.name="SearchSnapshotChangedError"}},te=class{constructor(t=se,r){this.createIdentity=t;this.resultTargets=r}static{l(this,"SearchSessionStore")}#t=new Map;#n=new Map;async register(t,r,n,o,s,i={query:t,regex:!0},c,a){let u=r.map(y=>({...y,source:f.resolve(y.source)})).sort(Q),d=await re(u,s,a),g=this.createIdentity(t,u,o,i),h=this.#n.get(g)??Ae(g,new Set(this.#t.keys())),m={id:h,query:t,matches:u,complete:n,contentBySource:d,...Ne(this.resultTargets,u,d,o,n),...a===void 0?{}:{snapshotByteBudget:a},recipe:i,...c!==void 0&&{refresh:c},cwd:f.resolve(o)};return this.#n.set(g,h),this.#t.set(h,m),m}async registerIfCurrent(t,r,n,o,s,i,c,a){try{return await this.register(t,r,n,o,s,i,c,a)}catch(u){if(u instanceof H)return;throw u}}async observeAfterEdit(t,r){let n=new Set(t.flatMap(s=>{let i=typeof s=="string"?j(s):void 0;return i===void 0?[]:[i.id]})),o=[];for(let s of n){let i=this.#t.get(s);if(i===void 0)continue;let c={sessionId:s,query:i.recipe.originalQuery??i.query,scope:ae(i.recipe,i.cwd)};try{let a=i.refresh===void 0?await J(i.recipe,i.cwd,r):await i.refresh(r);o.push({...c,matches:a.matches.length,complete:a.complete,notices:a.notices})}catch(a){o.push({...c,error:a instanceof Error?a.message:String(a)})}}return o}anchorResolver(){return{id:"search",description:["`SEARCH#HASH:N:line` selects one result's full line; `SEARCH#HASH:N:match` selects its exact match.","`SEARCH#HASH:all:line` selects each unique containing line; `SEARCH#HASH:all:match` selects every exact match.","Omit `path` when `all` spans files."].join(`
|
|
3
|
-
`),renderFull(t){return t},renderCompact(t){let r=j(t);return r===void 0?"selected result":r.selector==="all"?r.mode==="match"?"all matches":"all lines":r.mode==="match"?`match ${String(r.selector)}`:`line ${String(r.selector)}`},tryResolve:l((t,r)=>this.#i(t,r.source,r.signal),"tryResolve")}}resourceResolver(){return{id:"search-targets",tryResolve:l((t,r)=>this.#s(t,r.cwd),"tryResolve")}}async#i(t,r,n){let o=j(t);if(o===void 0)return{kind:"not-handled"};let s=this.#t.get(o.id);if(s===void 0)return v();if(o.selector==="all"&&!s.complete)return R();let i=f.resolve(r),c=s;if(o.selector==="all"){if(s.refreshedComplete?.complete===!0)c=s.refreshedComplete;else if(s.refreshedComplete!==void 0&&(c=await this.#r(s,n),!c.complete))return R()}let a=L(c,o.selector,o.mode),u=a.filter(p=>p.source===i);if(u.length===0)return{kind:"rejected",rejection:{code:"missing",reason:"search anchor does not select this resource"}};let d=await q(i,n);if(d===void 0)return v(x(u[0]).lineNumber);if(o.selector==="all"&&d!==c.contentBySource.get(i)){if(c=await this.#r(s,n),!c.complete)return R();a=L(c,o.selector,o.mode),u=a.filter(p=>p.source===i)}if(u.length===0)return{kind:"rejected",rejection:{code:"missing",reason:"search anchor does not select this resource"}};if(o.selector!=="all"&&d!==s.contentBySource.get(i))return v(x(u[0]).lineNumber);let g=T(i,d);return{kind:"resolved",anchor:new U(t,i,u.map(p=>z(g,p,o.mode)))}}async#s(t,r){let n=j(t);if(n===void 0)return{kind:"not-handled"};let o=this.#t.get(n.id);if(o===void 0)return v();if(n.selector==="all"&&!o.complete)return R();let s=o;if(n.selector==="all"){if(o.refreshedComplete?.complete===!0)s=o.refreshedComplete;else if(o.refreshedComplete!==void 0&&(s=await this.#r(o),!s.complete))return R();let u=new Set(L(s,n.selector,n.mode).map(d=>d.source));for(let d of u)if(await q(d)!==s.contentBySource.get(d)){if(s=await this.#r(o),!s.complete)return R();break}}let i=L(s,n.selector,n.mode);if(n.selector!=="all"){let u=i[0]?.source;if(u!==void 0&&await q(u)!==s.contentBySource.get(u))return v(i[0]?.lineNumber)}let c=new Map;for(let u of i){let d=c.get(u.source)??[];d.push(z(T(u.source,s.contentBySource.get(u.source)??u.lineText),u,n.mode)),c.set(u.source,d)}let a=[...c].map(([u,d])=>({source:u,ranges:d,expectedContent:s.contentBySource.get(u)}));return a.length===0?{kind:"rejected",rejection:{code:"missing",reason:"search anchor has no matches"}}:{kind:"resolved",targets:a}}async#r(t,r){let n=t.refresh===void 0?await J(t.recipe,t.cwd,r):await t.refresh(r),o=n.matches.map(i=>({...i,source:f.resolve(i.source)})).sort(Q),s={matches:o,complete:n.complete,contentBySource:await re(o,r,t.snapshotByteBudget)};return this.#t.set(t.id,{...t,refreshedComplete:s}),s}};function Ne(e,t,r,n,o){if(e===void 0)return{};let s=new Map([...r].map(([c,a])=>[c,T(c,a)])),i=t.map(c=>({source:c.source,expectedContent:x(r.get(c.source)),ranges:[z(x(s.get(c.source)),c,"match")]}));return{target:e.register(i,n,o),matchTargets:i.slice(0,100).map(c=>e.register([c],n,o))}}l(Ne,"registerResultReferences");function j(e){let t=ve.exec(e);if(t!==null)return{id:x(t[1]),selector:t[2]==="all"?"all":Number(t[2]),mode:t[3]==="line"?"line":"match"}}l(j,"parseSearchAnchor");function L(e,t,r){let n=t==="all"?e.matches:[e.matches[t-1]].filter(Me);if(r==="match"||t!=="all")return n;let o=new Set;return n.flatMap(s=>{let i=T(s.source,e.contentBySource.get(s.source)??s.lineText),c=ce(s);return i.lines.slice(s.lineNumber-1,c).flatMap(a=>{let u=`${s.source}\0${String(a.lineNumber)}`;return o.has(u)?[]:(o.add(u),[{...s,lineNumber:a.lineNumber,endLineNumber:a.lineNumber,startColumn:0,endColumn:a.content.length,lineText:a.content,matchedText:a.content}])})})}l(L,"selectMatches");function Me(e){return e!==void 0}l(Me,"isMatch");function ce(e){let t=e.endLineNumber??e.lineNumber;return t>e.lineNumber&&e.endColumn===0?t-1:t}l(ce,"lastContainingLine");function z(e,t,r){if(r==="match")return{start:{lineNumber:t.lineNumber,column:t.startColumn},end:{lineNumber:t.endLineNumber??t.lineNumber,column:t.endColumn}};let n=ce(t),o=x(e.lines[n-1]);return{start:{lineNumber:t.lineNumber,column:0},end:{lineNumber:n+(o.lineEnding.length>0?1:0),column:o.lineEnding.length>0?0:o.content.length},linewise:!0}}l(z,"selectionRange");function Ee(e,t){let r=t.endLineNumber??t.lineNumber;return e.lines.slice(t.lineNumber-1,r).map(n=>{let o=n.lineNumber===t.lineNumber?t.startColumn:0,s=n.lineNumber===r?t.endColumn:n.content.length;return n.content.slice(o,s)+(n.lineNumber===r?"":n.lineEnding)}).join("")}l(Ee,"matchedSourceText");async function re(e,t,r){let n=[...new Set(e.map(i=>i.source))];if(r!==void 0){let i=new Map,c=r;for(let a of n){let u=await Be(a,c,t);c-=Buffer.byteLength(u),ne(a,u,e),i.set(a,u)}return i}let o=await Promise.allSettled(n.map(async i=>{let c=await oe(i,{encoding:"utf8",...t!==void 0&&{signal:t}});return ne(i,c,e),[i,c]})),s=new Map;for(let i of o){if(i.status==="rejected")throw i.reason;s.set(...i.value)}return s}l(re,"snapshotContents");function ne(e,t,r){let n=T(e,t);for(let o of r.filter(s=>s.source===e))if(n.lines[o.lineNumber-1]?.content!==o.lineText||Ee(n,o)!==o.matchedText)throw new H(e)}l(ne,"validateSnapshot");async function Be(e,t,r){r?.throwIfAborted();let n=await Ce(e,"r");try{let o=await n.stat();if(!o.isFile()||o.size>t)throw new Error("Candidate snapshot byte budget reached.");let s=Buffer.alloc(Math.min(o.size+1,t+1)),i=0;for(;i<s.length;){r?.throwIfAborted();let c=await n.read(s,i,s.length-i,i);if(c.bytesRead===0)break;i+=c.bytesRead}if(r?.throwIfAborted(),i>o.size||i>t)throw new Error("Candidate file grew during snapshot capture.");return s.subarray(0,i).toString("utf8")}finally{await n.close()}}l(Be,"readBoundedSnapshot");async function q(e,t){try{return await oe(e,{encoding:"utf8",...t!==void 0&&{signal:t}})}catch{return}}l(q,"readCurrent");function v(e=1){return{kind:"rejected",rejection:{code:"stale",reason:"search anchor is stale",contextRange:{offset:Math.max(1,e-2),limit:5}}}}l(v,"staleAnchor");function R(){return{kind:"rejected",rejection:{code:"missing",reason:"search did not register an all anchor because its result was limited"}}}l(R,"missingCompleteAnchor");function Pe(e){if(e.length===0)return".";let t=f.dirname(f.resolve(x(e[0])));for(let r of e.slice(1)){let n=f.resolve(r);for(;!Ie(t,n);){let o=f.dirname(t);if(o===t)return t;t=o}}return t}l(Pe,"commonSourceDirectory");function Ie(e,t){let r=f.relative(e,t);return r!==".."&&!r.startsWith(`..${f.sep}`)&&!f.isAbsolute(r)}l(Ie,"isWithin");function Q(e,t){return e.source.localeCompare(t.source)||e.lineNumber-t.lineNumber||e.startColumn-t.startColumn||(e.endLineNumber??e.lineNumber)-(t.endLineNumber??t.lineNumber)||e.endColumn-t.endColumn}l(Q,"compareMatches");export{V as a,$ as b,Se as c,Ge as d,Ye as e,J as f,ct as g,se as h,Ae as i,H as j,te as k};
|
package/dist/chunk-QIK2E64R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-EI7MMDWY.js";var t="pi-agent-ide",r=4,s="pi-agent-ide/core/ready",a="pi-agent-ide/plugin/register";function d(e){return n(e)&&e.protocol===t&&e.apiVersion===4}o(d,"isIdeCoreReady");function i(e){return n(e)&&e.protocol===t&&e.apiVersion===4&&typeof e.id=="string"&&e.id.length>0&&typeof e.setup=="function"}o(i,"isIdePlugin");function c(e){return n(e)&&i(e.plugin)&&typeof e.accept=="function"}o(c,"isIdePluginRegistrationRequest");function n(e){return typeof e=="object"&&e!==null}o(n,"isUnknownRecord");export{t as a,r as b,s as c,a as d,d as e,i as f,c as g};
|
package/dist/chunk-SBP3ABH4.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as _}from"./chunk-M5IVSCR2.js";import{e as M,f as V}from"./chunk-T7I2VX3J.js";import{a as O}from"./chunk-BU7IZLKB.js";import{a as T,b as k}from"./chunk-S5PL5DFQ.js";import{a as z}from"./chunk-ZTYWHL2F.js";import{a as W,b as L}from"./chunk-7UGNGK7Y.js";import{a as U}from"./chunk-PS2B6THP.js";import{a as c}from"./chunk-EI7MMDWY.js";import{execFile as te}from"node:child_process";import re from"node:os";import{promisify as oe}from"node:util";import{createCanvas as B,loadImage as se}from"@napi-rs/canvas";var f=oe(te),x=20*1024*1024,H={durationSeconds:2,intervalSeconds:.5,scale:.5},j=new Set;function G(e){let n=A({mode:"sequence",durationSeconds:Number(e.durationSeconds??2),intervalSeconds:Number(e.intervalSeconds??.5),scale:Number(e.scale??.5)});H={durationSeconds:n.durationSeconds,intervalSeconds:n.intervalSeconds,scale:n.scale},j=new Set((e.allowedExecutables??"").split(",").map(o=>o.trim().toLowerCase()).filter(Boolean))}c(G,"configureVision");function h(){return H}c(h,"getVisionDefaults");function X(e){let n=e.includes("\\")?e.slice(e.lastIndexOf("\\")+1):e,o=n.trim().split(/\s+/u)[0]??"",r=o.slice(o.lastIndexOf("/")+1);return j.has((e.includes("\\")?n:r).toLowerCase())}c(X,"isExecutableAllowed");function Y(e,n){let o=e?.filter(s=>/^(?:image|sequence)(?::|$)/u.test(s))??[];if(o.length===0)return;if(o.length>1)throw new Error("Use only one image or sequence view");let r=o[0],i=r.indexOf(":"),a=r.slice(0,i<0?void 0:i),t={};if(i>=0&&ie(r.slice(i+1),t),a==="image"&&(t.duration!==void 0||t.interval!==void 0))throw new Error("duration and interval are supported only by the sequence view");return A({mode:a,durationSeconds:t.duration??n.durationSeconds,intervalSeconds:t.interval??n.intervalSeconds,scale:t.scale??n.scale,...t.region===void 0?{}:{region:t.region}})}c(Y,"parseVisionView");function ie(e,n){if(e.length===0)throw new Error("View parameters cannot be empty");let o=e.split(",");for(let r=0;r<o.length;r+=1){let i=o[r],a=i.indexOf("=");if(a<=0)throw new Error(`Invalid view parameter ${i}`);let t=i.slice(0,a),s=i.slice(a+1);if(t==="region"){let u=[s,o[r+1],o[r+2],o[r+3]].map(Number);if(u.some(l=>!Number.isFinite(l)))throw new Error("region requires x,y,width,height values");n.region={x:u[0],y:u[1],width:u[2],height:u[3]},r+=3;continue}if(t!=="duration"&&t!=="interval"&&t!=="scale")throw new Error(`Unknown view parameter ${t}`);let d=Number(s);if(!Number.isFinite(d))throw new Error(`View parameter ${t} must be a number`);if(n[t]!==void 0)throw new Error(`Duplicate view parameter ${t}`);n[t]=d}}c(ie,"parseViewParameters");function J(e){if(!e.startsWith("display:"))return;if(e==="display:")return 0;let n=/^display:#(\d+)$/u.exec(e);if(n===null)throw new Error("Display sources use display: or display:#N with a zero-based index");let o=Number(n[1]);if(!Number.isSafeInteger(o))throw new Error("Display sources use display: or display:#N with a zero-based index");return o}c(J,"parseDisplaySource");async function I(e){let n=new Map(e.list().flatMap(i=>i.pid===void 0?[]:[[i.pid,i]]));if(process.platform!=="linux"&&process.platform!=="darwin")return[...n].map(([i,a])=>({pid:i,command:a.description,owned:!0,source:a.source,host:"local"}));let{stdout:o}=await f("ps",["-eo","pid=,ppid=,lstart=,args="],{maxBuffer:4*1024*1024}),r=o.split(`
|
|
2
|
-
`).flatMap(i=>{let a=/^\s*(\d+)\s+(\d+)\s+(\S+\s+\S+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+(.*)$/u.exec(i);if(a===null)return[];let t=Number(a[1]),s=n.get(t);return[{pid:t,parentPid:Number(a[2]),started:a[3],command:a[4]??"",owned:s!==void 0,host:"local",...s===void 0?{}:{source:s.source}}]});return P()?[...r,...await ae()]:r}c(I,"listProcesses");async function ae(){try{let{stdout:e}=await f("powershell.exe",["-NoLogo","-NoProfile","-NonInteractive","-Command","Get-Process | Select-Object Id,ProcessName,Path,StartTime | ConvertTo-Json -Compress"],{maxBuffer:4194304}),n=JSON.parse(e);return(Array.isArray(n)?n:[n]).flatMap(r=>{if(typeof r!="object"||r===null||!("Id"in r)||typeof r.Id!="number")return[];let i="ProcessName"in r&&typeof r.ProcessName=="string"?r.ProcessName:"Windows process",a="Path"in r&&typeof r.Path=="string"?r.Path:void 0,t="StartTime"in r&&typeof r.StartTime=="string"?r.StartTime:void 0;return[{pid:r.Id,command:a??i,owned:!1,host:"windows",...t===void 0?{}:{started:t}}]})}catch{return[]}}c(ae,"listWindowsProcesses");async function E(e,n){if(!Number.isSafeInteger(e)||e<=0)throw new Error("Process PID must be a positive integer");let o=(await I(n)).find(r=>r.pid===e);if(o===void 0)throw new Error(`Process ${e} is not running`);return o}c(E,"readProcess");function A(e){let n=e.scale??1;if(!(n>0&&n<=1))throw new Error("Image scale must be greater than 0 and at most 1");let o=e.durationSeconds??0,r=e.intervalSeconds??1;if(e.mode==="sequence"){if(!(o>0&&o<=10))throw new Error("Sequence duration must be greater than 0 and at most 10 seconds");if(!(r>0))throw new Error("Sequence interval must be greater than 0 seconds");if(Math.floor(o/r)+1>20)throw new Error("Sequence capture is limited to 20 frames")}if(e.region!==void 0){let{x:i,y:a,width:t,height:s}=e.region;if(i<0||a<0||t<=0||s<=0||i+t>1||a+s>1)throw new Error("Image region x,y,width,height must fit within normalized bounds 0..1")}if(e.cellIndex!==void 0&&e.cellSize===void 0)throw new Error("Image offset requires limit to set the square grid cell size");if(e.cellSize!==void 0&&(!Number.isSafeInteger(e.cellSize)||e.cellSize<=0))throw new Error("Image limit must be a positive integer pixel size");if(e.cellIndex!==void 0&&(!Number.isSafeInteger(e.cellIndex)||e.cellIndex<0))throw new Error("Image offset must be a zero-based cell index");return e}c(A,"validateVisionOptions");async function y(e,n,o){let r=A(n),i=r.mode==="image"?1:Math.floor(r.durationSeconds/r.intervalSeconds)+1,a=[],t=0;for(let s=0;s<i;s+=1){o?.throwIfAborted(),s>0&&await pe(r.intervalSeconds*1e3,o);let d=await e();if(t+=d.byteLength,t>x)throw new Error("Captured images exceed the 20MB aggregate limit");for(let u of await ce(d,r))a.push({type:"image",data:Buffer.from(u).toString("base64"),mimeType:"image/png"})}return a}c(y,"captureImages");async function ce(e,n){let o=await se(e),r=n.region??{x:0,y:0,width:1,height:1},i=Math.round(r.x*o.width),a=Math.round(r.y*o.height),t=Math.max(1,Math.round(r.width*o.width)),s=Math.max(1,Math.round(r.height*o.height)),d=n.scale??1,u=Math.max(1,Math.round(t*d)),l=Math.max(1,Math.round(s*d)),m=B(u,l);if(m.getContext("2d").drawImage(o,i,a,t,s,0,0,u,l),n.cellSize===void 0)return[await m.encode("png")];let p=Math.ceil(u/n.cellSize),N=Math.ceil(l/n.cellSize),g=n.cellIndex??0;if(g>=p*N)throw new Error(`Image cell offset ${g} exceeds the ${p}x${N} grid`);let ee=g%p,ne=Math.floor(g/p),q=ee*n.cellSize,$=ne*n.cellSize,v=Math.min(n.cellSize,u-q),S=Math.min(n.cellSize,l-$),C=B(v,S);return C.getContext("2d").drawImage(m,q,$,v,S,0,0,v,S),[await C.encode("png")]}c(ce,"selectImage");function de(e,n){return e&&n==="windows"}c(de,"usesWindowsHostWindowCapture");function K(){return{async captureWindow(e,n,o){if(o?.throwIfAborted(),de(P(),n))return ue(e,o);if(process.platform!=="linux"&&process.platform!=="darwin")throw new Error(`Window capture is unsupported on ${process.platform}`);let{Window:r}=await import("node-screenshots"),i;try{i=r.all()}catch(s){throw new Error(`Desktop window enumeration is unavailable: ${F(s)}`,{cause:s})}let a=i.find(s=>{try{return s.pid()===e}catch{return!1}});if(a===void 0)throw new Error(`No capturable desktop window belongs to PID ${e}`);let t=await a.captureImage();return o?.throwIfAborted(),new Uint8Array(await t.toPng())},async captureDisplay(e,n){if(n?.throwIfAborted(),P())return le(e,n);if(process.platform!=="linux"&&process.platform!=="darwin"&&process.platform!=="win32")throw new Error(`Display capture is unsupported on ${process.platform}`);let{Monitor:o}=await import("node-screenshots"),r;try{r=o.all()}catch(t){throw new Error(`Desktop display enumeration is unavailable: ${F(t)}`,{cause:t})}let i=r[e];if(i===void 0)throw new Error(`Display index ${e} is unavailable; found ${r.length} display(s)`);let a=await i.captureImage();return n?.throwIfAborted(),new Uint8Array(await a.toPng())},async captureUrl(e,n){if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Error("Web screenshots require an HTTP(S) URL");let{chromium:o}=await import("playwright-core"),r=await me(),i=await o.launch({executablePath:r,headless:!0,chromiumSandbox:!1,timeout:3e4}),a=c(()=>{i.close()},"abort");n?.addEventListener("abort",a,{once:!0});try{let t=await i.newPage({viewport:{width:1280,height:720}});return await t.goto(e.href,{waitUntil:"domcontentloaded",timeout:3e4}),await t.waitForLoadState("networkidle",{timeout:1500}).catch(()=>{}),n?.throwIfAborted(),new Uint8Array(await t.screenshot({type:"png",fullPage:!0}))}finally{n?.removeEventListener("abort",a),await i.close().catch(()=>{})}}}}c(K,"createCaptureBackend");async function ue(e,n){let o=new URL("windows-window-capture.ps1",new URL("../src/plugins/pi-agent-ide-vision/src/vision.ts",import.meta.url).href);n?.throwIfAborted();let{stdout:r}=await f("wslpath",["-w",o.pathname],{signal:n}),{stdout:i}=await f("powershell.exe",["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-File",r.trim(),"-ProcessId",String(e)],{encoding:"buffer",maxBuffer:x,signal:n});return new Uint8Array(i)}c(ue,"captureWslWindow");async function le(e,n){let o=new URL("windows-display-capture.ps1",new URL("../src/plugins/pi-agent-ide-vision/src/vision.ts",import.meta.url).href);n?.throwIfAborted();let{stdout:r}=await f("wslpath",["-w",o.pathname],{signal:n}),{stdout:i}=await f("powershell.exe",["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-File",r.trim(),"-DisplayIndex",String(e)],{encoding:"buffer",maxBuffer:x,signal:n});return new Uint8Array(i)}c(le,"captureWslDisplay");function P(){return process.platform==="linux"&&(process.env.WSL_DISTRO_NAME!==void 0||re.release().toLowerCase().includes("microsoft"))}c(P,"isWsl");async function me(){let e=process.env.PI_AGENT_IDE_BROWSER_PATH;if(e!==void 0)return e;let{stdout:n}=await f("bash",["-lc","command -v google-chrome-stable || command -v google-chrome || command -v chromium || command -v chromium-browser"]),o=n.trim();if(o.length===0)throw new Error("No Chrome or Chromium executable was found; set PI_AGENT_IDE_BROWSER_PATH");return o}c(me,"resolveBrowser");function pe(e,n){return new Promise((o,r)=>{let i=setTimeout(o,e),a=c(()=>{clearTimeout(i),r(n?.reason??new Error("Capture aborted"))},"abort");n?.addEventListener("abort",a,{once:!0}),i.unref()})}c(pe,"delay");function F(e){return e instanceof Error?e.message:String(e)}c(F,"errorMessage");async function fe(e,n){V(e,[await M({id:"vision",description:"Window, display, image, and sequence capture",triggers:[{tool:"read",resourcePrefixes:["window:","display:"]}]})]);let o=n?.preferences??{};G({durationSeconds:o["vision.sequenceDurationSeconds"],intervalSeconds:o["vision.sequenceIntervalSeconds"],scale:o["vision.imageScale"],allowedExecutables:o["vision.allowedExecutables"]});let r=_(e),i=K();await Promise.all([O(e,{protocol:T,apiVersion:k,id:"vision",setup(a){for(let t of["image","sequence"])a.addView({contentKind:"any",view:t,presenter:{id:`vision-${t}`,present:c(s=>s,"present")}});a.addHandler({stage:"pre-read",async handler(t){let s=t.request.path;if(s===void 0)return{kind:"continue",context:t};let d=J(s);if(d!==void 0){if(e.getFlag("pi-agent-ide-vision-displays")!==!0)return w(s,"Display capture is disabled. Enable --pi-agent-ide-vision-displays to allow it.");try{let m=await y(()=>i.captureDisplay(d,t.resolverContext.signal),R(t.request),t.resolverContext.signal);return b(s,m)}catch(m){return w(s,D(m))}}let u=Q(s,"process:");if(u!==void 0){let m=await E(u,r);return b(s,[{type:"text",text:Z(m)}])}let l=Q(s,"window:");if(l!==void 0){let m=await E(l,r);if(!m.owned&&!X(m.command)&&e.getFlag("pi-agent-ide-vision-arbitrary-windows")!==!0)return w(s,`Window capture for PID ${l} 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.`);try{let p=await y(()=>i.captureWindow(l,m.host,t.resolverContext.signal),R(t.request),t.resolverContext.signal);return b(s,p)}catch(p){return w(s,D(p))}}if(/^https?:\/\//iu.test(s)&&we(t.request)){let m=new URL(s);try{let p=await y(()=>i.captureUrl(m,t.resolverContext.signal),R(t.request),t.resolverContext.signal);return b(m.href,p)}catch(p){return w(m.href,D(p))}}return{kind:"continue",context:t}}}),a.describe({path:c(()=>`process:PID \u2014 process metadata. window:PID \u2014 capture a window of an IDE-owned or allowlisted process${e.getFlag("pi-agent-ide-vision-arbitrary-windows")===!0?"; arbitrary windows are enabled":"; other processes require --pi-agent-ide-vision-arbitrary-windows"}. display: or display:#N \u2014 display capture with a zero-based index; ${e.getFlag("pi-agent-ide-vision-displays")===!0?"enabled":"requires --pi-agent-ide-vision-displays"}. HTTP(S) URLs accept image or sequence screenshots.`,"path"),views:c(()=>{let t=h();return`image or image:scale=S,region=X,Y,W,H \u2014 one screenshot. sequence or sequence:duration=D,interval=I,scale=S,region=X,Y,W,H \u2014 timed frames. Only one image/sequence view per request. duration and interval are seconds and only valid for sequence: 0 < D <= 10, I > 0, at most 20 frames (floor(D/I)+1). Scale satisfies 0 < S <= 1. Region uses normalized x,y,width,height: x,y >= 0, width,height > 0, and the rectangle must fit in 0..1; crop runs before scaling. Settings are optional; defaults: duration=${t.durationSeconds}, interval=${t.intervalSeconds}, scale=${t.scale}.`},"views"),offset:"For window:, display: and HTTP(S) image/sequence captures, a non-negative integer zero-based row-major grid cell index in the transformed image. Requires limit; omit to select cell 0 when limit is set.",limit:"For window:, display: and HTTP(S) image/sequence captures, a positive integer square grid cell size in output pixels. Omit both offset and limit for the bounded transformed image."})}}),z(e,{protocol:W,apiVersion:L,id:"vision-processes",setup(a){a.addResolver({priority:-100,resolver:{id:"processes",readResources:c(t=>/^process:/iu.test(t.query)?void 0:[],"readResources"),toScriptData(t){return{kind:"custom",resolverId:"processes",value:{processes:t.map(d=>({pid:d.pid,command:d.command}))}}},async tryResolve(t){let s=/^process:(.*)$/isu.exec(t.query);if(s===null)return{kind:"not-handled"};let d=(s[1]??"").trim().toLowerCase();return{kind:"resolved",payload:(await I(r)).filter(l=>d.length===0||String(l.pid)===d||l.command.toLowerCase().includes(d)).slice(0,Math.min(t.limit??50,100))}},renderResult(t,s,d){let u=t.details;return new U({summary:`${u.processes.length} processes shown`,rows:u.processes.length?u.processes.map(l=>({kind:"note",text:`${l.pid} ${l.command}`})):[{kind:"note",text:"No matching processes"}]},d,s.expanded)},format(t){let s=t;return{content:[{type:"text",text:s.length===0?"No matching processes.":s.map(Z).join(`
|
|
3
|
-
|
|
4
|
-
`)}],details:{count:s.length,processes:s}}}}}),a.describe("process:<query> finds running processes by PID or command for process:PID metadata reads and guarded window:PID capture.")}})])}c(fe,"registerVision");function Q(e,n){if(!e.startsWith(n))return;let o=e.slice(n.length);if(!/^\d+$/u.test(o))throw new Error(`${n} sources require a numeric PID`);return Number(o)}c(Q,"prefixedPid");function R(e){return{...Y(e.views,h())??{mode:"image",...h()},...e.limit===void 0?{}:{cellSize:e.limit},...e.offset===void 0?{}:{cellIndex:e.offset}}}c(R,"options");function we(e){return e.views?.some(n=>/^(?:image|sequence)(?::|$)/u.test(n))===!0}c(we,"requestsScreenshot");function b(e,n){return{kind:"return",result:{content:n,script:{kind:"native",source:e,blocks:n},details:{source:e,resolvedBy:"vision"}}}}c(b,"returned");function w(e,n){return{kind:"return",result:{content:[{type:"text",text:n}],details:{source:e,resolvedBy:"vision",failure:{code:"READ_FAILED",source:e,resolverId:"vision",message:n}},isError:!0}}}c(w,"failed");function D(e){return e instanceof Error?e.message:String(e)}c(D,"errorMessage");function Z(e){return[`PID: ${e.pid}`,`Command: ${e.command}`,`Owned by Agent IDE: ${e.owned?"yes":"no"}`,...e.parentPid===void 0?[]:[`Parent PID: ${e.parentPid}`],...e.started===void 0?[]:[`Started: ${e.started}`],...e.source===void 0?[]:[`Agent IDE source: ${e.source}`]].join(`
|
|
5
|
-
`)}c(Z,"formatProcess");export{fe as default};
|
package/dist/chunk-STBJO3Z3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as k,e as m}from"./chunk-OB46OPMZ.js";import{a as b,b as v}from"./chunk-PS2B6THP.js";import{a as s}from"./chunk-EI7MMDWY.js";import h from"node:path";import{pathToFileURL as $}from"node:url";function T(e,n,t,o,i,a=[],l=[]){let c=a.map(r=>({kind:"note",text:r}));c.push(...v(e.flatMap(r=>{let f=h.isAbsolute(r.source),D=f&&i?h.relative(i,r.source)||h.basename(r.source):r.source,z=f?$(r.source).href:/^https?:/iu.test(r.source)?r.source:void 0,R=r.endLineNumber??r.lineNumber;return(R===r.lineNumber?[r.lineText]:[r.lineText,...r.matchedText.split(/\r\n|\n|\r/u).slice(1)]).slice(0,20).map((x,g)=>({source:r.source,label:D,...z===void 0?{}:{link:z},...f?{}:{badge:/^https?:/iu.test(r.source)?"WEB":"SH"},lineNumber:r.lineNumber+g,text:x,ranges:[{from:g?0:r.startColumn,to:r.lineNumber+g===R?r.endColumn:x.length}]}))}))),e.length||c.push({kind:"note",text:"No matches found"}),e.some(r=>(r.endLineNumber??r.lineNumber)-r.lineNumber>=20)&&c.push({kind:"note",text:"\u2026 source preview shortened"}),c.push(...l.map(r=>({kind:"note",text:r,expandedOnly:!0})));let u=`${e.length}${n?"":"+"}`,p=new Set(e.map(r=>r.source)),A=e.every(r=>h.isAbsolute(r.source));return new b({summary:`${u} ${e.length===1?"match":"matches"} in ${p.size} ${A?p.size===1?"file":"files":p.size===1?"source":"sources"}`,rows:c},t,o)}s(T,"renderSearchMatches");function N(e,n){return e.targets.some(t=>t.source===n.source&&t.ranges.some(o=>(o.start.lineNumber<n.lineNumber||o.start.lineNumber===n.lineNumber&&o.start.column<=n.startColumn)&&(o.end.lineNumber>(n.endLineNumber??n.lineNumber)||o.end.lineNumber===(n.endLineNumber??n.lineNumber)&&o.end.column>=n.endColumn)))}s(N,"containsSearchMatch");import{Value as I}from"typebox/value";var d={candidates:5,previewMatches:3,identifiers:2e4,identifierLength:80,vocabularyBytes:8*1024*1024,matchesPerCandidate:200,verificationBytes:4*1024*1024,timeoutMs:2e3};function L(e){return I.Check(k,e)}s(L,"isFuzzyResultData");function y(e){return e.length>=5&&e.length<=d.identifierLength&&/^[A-Za-z_$][A-Za-z0-9_$]*$/u.test(e)&&/[A-Za-z]/u.test(e)}s(y,"isFuzzyQuery");var S=class{static{s(this,"FuzzyVocabulary")}names=new Set;bytes=0;limited=!1;account(n){return this.bytes+=n,this.bytes>d.vocabularyBytes&&(this.limited=!0),!this.limited}add(n){if(!(this.limited||!y(n)||this.names.has(n))){if(this.names.size===d.identifiers){this.limited=!0;return}this.names.add(n)}}addText(n){if(this.account(Buffer.byteLength(n))){for(let t of n.matchAll(/[A-Za-z_$][A-Za-z0-9_$]*/gu))if(this.add(t[0]),this.limited)break}}};function C(e){return e.replace(/([A-Z]+)([A-Z][a-z])/gu,"$1 $2").replace(/([a-z0-9])([A-Z])/gu,"$1 $2").split(/[^A-Za-z0-9]+/u).filter(Boolean).map(n=>n.toLowerCase())}s(C,"splitName");function w(e,n){return e.length===n.length&&e.every((t,o)=>t===n[o])}s(w,"same");function M(e,n){if(e.length<5||n.length<5||Math.abs(e.length-n.length)>1||/\d/u.test(e+n))return!1;let t=0;for(;t<Math.min(e.length,n.length)&&e[t]===n[t];)t++;if(e.length===n.length)return e.slice(t+1)===n.slice(t+1)||e[t]===n[t+1]&&e[t+1]===n[t]&&e.slice(t+2)===n.slice(t+2);let o=e.length<n.length?e:n,i=e.length<n.length?n:e;return o.slice(t)===i.slice(t+1)}s(M,"oneTypo");function P(e,n){if(e.join("")===n.join(""))return{kind:"normalized",reason:"same spelling with different case or separators"};let t=e.length<n.length?e:n,o=e.length<n.length?n:e;if(o.length===t.length+1&&t.length>=2&&t.every(l=>l.length>=3)){let l=w(t,o.slice(1)),c=w(t,o.slice(0,-1));if(l||c)return{kind:"component",reason:`${e.length>n.length?"remove":"add"} ${l?"leading":"trailing"} component '${l?o[0]:o.at(-1)}'`}}if(e.length!==n.length)return;let i=e.flatMap((l,c)=>{let u=n[c];return u!==void 0&&l!==u?[{word:l,other:u}]:[]}),a=i[0];if(!(i.length!==1||!a||!M(a.word,a.other)))return{kind:"typo",reason:`one character edit: '${a.word}' \u2192 '${a.other}'`}}s(P,"relation");var F={normalized:0,component:1,typo:2};function E(e,n){if(!y(e))return[];let t=C(e);if(t.length===0)return[];let o=[];for(let i of new Set(n)){if(i===e||!y(i))continue;let a=P(t,C(i));a&&o.push({identifier:i,...a})}return o.sort((i,a)=>F[i.kind]-F[a.kind]||(i.identifier<a.identifier?-1:i.identifier>a.identifier?1:0)).slice(0,d.candidates)}s(E,"rankFuzzyIdentifiers");function _(e,n,t){return{identifier:e.identifier,kind:e.kind,reason:e.reason,matchCount:e.matches.length,fileCount:new Set(e.matches.map(o=>o.source)).size,selection:{...m(e.matches.slice(0,d.previewMatches),e.complete,n,t),truncated:e.matches.length>d.previewMatches}}}s(_,"fuzzyCandidateData");function O(e){let n=e.selection.complete?"":"+",t=e.selection.all?.line??e.selection.matches[0]?.references?.line,o=e.selection.matches[0],i=t??o?.source;return[`Possible name: ${e.identifier} (${e.reason})`,`${e.matchCount}${n} ${e.matchCount===1&&e.selection.complete?"match":"matches"} in ${e.fileCount}${n} ${e.fileCount===1&&e.selection.complete?"file":"files"}`,`Exact alternative: ${JSON.stringify(e.identifier)} (case-sensitive, whole identifier)`,...e.selection.complete?[]:["Capture limit reached; no complete all reference. Inspect the returned location; do not treat this candidate as a complete match set."],...i?[`Read: ${i}${t||!o?"":` \xB7 line ${o.range.startLine}`}`]:[]].join(`
|
|
2
|
-
`)}s(O,"formatFuzzyCandidate");export{T as a,N as b,d as c,L as d,y as e,S as f,E as g,_ as h,O as i};
|
package/dist/chunk-T6LX2RX5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-EI7MMDWY.js";var n="pi-agent-ide-doctor",r=1,i="pi-agent-ide-doctor/core/ready",a="pi-agent-ide-doctor/plugin/register";function c(o){return t(o)&&o.protocol===n&&o.apiVersion===1}e(c,"isDoctorCoreReady");function d(o){return!t(o)||typeof o.accept!="function"||!t(o.plugin)?!1:o.plugin.protocol===n&&o.plugin.apiVersion===1&&typeof o.plugin.id=="string"&&o.plugin.id.length>0&&typeof o.plugin.setup=="function"}e(d,"isDoctorPluginRegistrationRequest");function t(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}e(t,"isRecord");export{n as a,r as b,i as c,a as d,c as e,d as f};
|
package/dist/chunk-WZI4YC2O.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-EI7MMDWY.js";import{access as R,readFile as b,readdir as P}from"node:fs/promises";import u from"node:path";async function D(e,t){let o=new Map,c=s(i=>{let n=o.get(i);return n===void 0&&(n=b(u.join(e,i),"utf8").catch(()=>{}),o.set(i,n)),n},"content"),w=y(await c("package.json")),l=new Set;for(let i of["dependencies","devDependencies","peerDependencies","optionalDependencies"]){let n=w?.[i];if(p(n))for(let d of Object.keys(n))l.add(d)}let k=await Promise.all(t.map(async i=>{let n;for(let r of i.configFiles??[])if(await v(e,r)){n=r;break}if(n===void 0)for(let[r,h]of Object.entries(i.configSections??{})){let a=await c(r);if(a===void 0)continue;let g=r.endsWith(".json")?y(a):void 0;if(h.some(f=>g===void 0?a.split(/\r?\n/).some(j=>{let m=/^\s*\[([^\]]+)\]/.exec(j)?.[1]?.trim();return m===f||m?.startsWith(`${f}.`)===!0}):x(g,f)!==void 0)){n=r;break}}let d=i.dependencies?.find(r=>l.has(r));return[i.id,{score:(n===void 0?0:6)+(d===void 0?0:4),...n!==void 0&&{config:n},...d!==void 0&&{dependency:d}}]}));return new Map(k)}s(D,"inspectRecipeEvidence");async function v(e,t){if(!t.includes("*"))try{return await R(u.join(e,t)),!0}catch{return!1}try{return(await P(e)).some(c=>u.matchesGlob(c,t))}catch{return!1}}s(v,"hasProjectMarker");function p(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}s(p,"isRecord");function y(e){try{let t=JSON.parse(e??"");return p(t)?t:void 0}catch{return}}s(y,"parseJson");function x(e,t){let o=e;for(let c of t.split("."))o=p(o)?o[c]:void 0;return o}s(x,"jsonSection");export{D as a,v as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../dist/entry-30.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../dist/entry-32.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../dist/entry-38.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../dist/entry-46.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../dist/entry-57.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../dist/entry-59.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../dist/entry-61.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../dist/entry-80.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../../dist/entry-41.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../../dist/entry-47.js";
|
package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-57.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../../../../dist/entry-57.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../../../../dist/entry-59.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../../dist/entry-61.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../../dist/entry-30.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../../../dist/entry-32.js";
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{pi-agent-filesystem-jq → pi-agent-filesystem-image}/runtime/entry-27.js
RENAMED
|
File without changes
|
/package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-jq}/runtime/entry-28.js
RENAMED
|
File without changes
|
/package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-29.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor}/runtime/entry-78.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-81.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|