pi-agent-ide 0.8.4 → 0.9.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 +59 -0
- package/README.md +24 -29
- package/dist/{chunk-CM3XGY72.js → chunk-2AY526TN.js} +1 -1
- package/dist/{chunk-LEJKDYCK.js → chunk-2TZDG2JH.js} +1 -1
- package/dist/{chunk-XBQR74IK.js → chunk-4GBFIGH3.js} +1 -1
- package/dist/{chunk-PJL3UVMJ.js → chunk-4IWEKRSP.js} +1 -1
- package/dist/chunk-52PFWQMU.js +5 -0
- package/dist/chunk-5BGWNYQS.js +1 -0
- package/dist/{chunk-QUYXINGZ.js → chunk-5S74Z6Y4.js} +3 -3
- package/dist/chunk-64JTD2DJ.js +1 -0
- package/dist/{chunk-XAHU42FP.js → chunk-6A3ORNW3.js} +2 -2
- package/dist/{chunk-ANM3Y5FO.js → chunk-6WCHBHFW.js} +5 -5
- package/dist/{chunk-IMGIDBCC.js → chunk-7D7PXIVV.js} +1 -1
- package/dist/chunk-7PVDTMEM.js +1 -0
- package/dist/chunk-7SG756UO.js +4 -0
- package/dist/{chunk-GBUJOR6V.js → chunk-7URANI6I.js} +14 -14
- package/dist/{chunk-Z2MNHSJ4.js → chunk-AJZVKDYC.js} +1 -1
- package/dist/chunk-AMIIOWFL.js +1 -0
- package/dist/{chunk-TOYN4W4F.js → chunk-B25LXXNV.js} +1 -1
- package/dist/chunk-C2JT2G5K.js +1 -0
- package/dist/chunk-CVOYSEBE.js +1 -0
- package/dist/chunk-DDH3FP4G.js +3 -0
- package/dist/chunk-FEZLTM4L.js +1 -0
- package/dist/{chunk-CPELC6JE.js → chunk-FHRHYY4M.js} +1 -1
- package/dist/chunk-FKKAHI62.js +11 -0
- package/dist/chunk-FS3KCKFX.js +9 -0
- package/dist/chunk-FYOU4RBH.js +2 -0
- package/dist/chunk-G4PRFO6G.js +1 -0
- package/dist/chunk-GS5ZRTUG.js +1 -0
- package/dist/{chunk-XXLLY66B.js → chunk-GXL4NMHR.js} +1 -1
- package/dist/{chunk-QT3EAHOG.js → chunk-H3GEEOOL.js} +1 -1
- package/dist/chunk-H5Z54BEU.js +25 -0
- package/dist/chunk-H7WAM5RH.js +23 -0
- package/dist/chunk-HT7LZN5A.js +9 -0
- package/dist/chunk-IG5DXVDJ.js +1 -0
- package/dist/chunk-K4UTEMDU.js +1 -0
- package/dist/chunk-KFBRL2V4.js +3 -0
- package/dist/chunk-KN6VPARZ.js +1 -0
- package/dist/{chunk-RW2GTYQI.js → chunk-LF325WYO.js} +1 -1
- package/dist/chunk-LTADNZKW.js +2 -0
- package/dist/{chunk-YJ6T3PEP.js → chunk-MDD5ORB6.js} +1 -1
- package/dist/{chunk-S72FVLUX.js → chunk-MLFJU2US.js} +1 -1
- package/dist/chunk-NA2NEU4V.js +1 -0
- package/dist/chunk-OBTT5INC.js +6 -0
- package/dist/{chunk-IICJXZBU.js → chunk-OMNKD7WW.js} +3 -3
- package/dist/chunk-PLMHBXWI.js +10 -0
- package/dist/{chunk-235QMMVA.js → chunk-PQWANILR.js} +1 -1
- package/dist/{chunk-QRJLIV6P.js → chunk-QJ6V5IAY.js} +6 -6
- package/dist/chunk-QM5WDEFI.js +1 -0
- package/dist/{chunk-SMIFCAAX.js → chunk-RIJRPAL2.js} +1 -1
- package/dist/chunk-RIOPUTUJ.js +6 -0
- package/dist/chunk-RVFMH77U.js +82 -0
- package/dist/{chunk-NJ7C4KMA.js → chunk-SRFWT562.js} +1 -1
- package/dist/{chunk-U22JNO6N.js → chunk-STUZZM5B.js} +1 -1
- package/dist/{chunk-PT35ZFLH.js → chunk-TNAUCNUT.js} +12 -12
- package/dist/{chunk-DUUOCBS3.js → chunk-TVH2ND35.js} +1 -1
- package/dist/chunk-TVSZYABY.js +5 -0
- package/dist/chunk-TVXZE4KW.js +4 -0
- package/dist/chunk-U7YDLVFL.js +1 -0
- package/dist/{chunk-KZC7TI5M.js → chunk-UD3DMY3Q.js} +1 -1
- package/dist/{chunk-VXP5BMW7.js → chunk-USG6WHAT.js} +1 -1
- package/dist/{chunk-RMI3NMQY.js → chunk-V4J3TLCV.js} +2 -2
- package/dist/{chunk-ZPT5D4VP.js → chunk-VDJSH3DQ.js} +2 -2
- package/dist/{chunk-VMTOFEXF.js → chunk-VMLPXSMK.js} +1 -1
- package/dist/{chunk-6T7PSDQW.js → chunk-VN3XBH2Q.js} +1 -1
- package/dist/chunk-WAJW4G4F.js +22 -0
- package/dist/chunk-WEE3NM6L.js +1 -0
- package/dist/{chunk-IM24DB3K.js → chunk-WES2E4VR.js} +1 -1
- package/dist/{chunk-RIJMXO43.js → chunk-WQIMM4SU.js} +1 -1
- package/dist/chunk-WUO3UW4J.js +17 -0
- package/dist/chunk-XE4W5YTE.js +2 -0
- package/dist/chunk-XUYIK4TX.js +1 -0
- package/dist/{chunk-ZJQRLVVV.js → chunk-Y74EKJOY.js} +1 -1
- package/dist/{chunk-AAC77UD4.js → chunk-YPYROPQF.js} +1 -1
- package/dist/chunk-ZXO4D5UB.js +1 -0
- package/dist/entry-0.js +1 -1
- package/dist/entry-1.js +1 -1
- package/dist/entry-10.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-12.js +1 -1
- package/dist/entry-13.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-15.js +1 -1
- package/dist/entry-16.js +1 -1
- package/dist/entry-17.js +1 -1
- package/dist/entry-18.js +1 -1
- package/dist/entry-19.js +1 -1
- package/dist/entry-2.js +1 -1
- package/dist/entry-20.js +1 -1
- package/dist/entry-21.js +1 -0
- package/dist/entry-23.js +1 -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 -1
- package/dist/entry-28.js +1 -1
- package/dist/entry-29.js +1 -2
- package/dist/entry-3.js +1 -1
- package/dist/entry-30.js +2 -1
- package/dist/entry-31.js +1 -4
- package/dist/entry-32.js +1 -1
- package/dist/entry-33.js +1 -1
- package/dist/entry-34.js +1 -1
- package/dist/entry-35.js +1 -18
- package/dist/entry-36.js +1 -1
- package/dist/entry-37.js +15 -1
- 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 -1
- package/dist/entry-46.js +1 -1
- package/dist/entry-47.js +1 -1
- package/dist/entry-48.js +1 -1
- package/dist/entry-49.js +1 -25
- package/dist/entry-5.js +1 -1
- package/dist/entry-50.js +1 -1
- package/dist/entry-51.js +1 -1
- package/dist/entry-52.js +1 -1
- package/dist/entry-53.js +1 -1
- package/dist/entry-54.js +1 -3
- package/dist/entry-55.js +1 -13
- package/dist/entry-56.js +1 -1
- package/dist/entry-57.js +1 -1
- package/dist/entry-58.js +1 -1
- package/dist/entry-59.js +1 -1
- package/dist/entry-6.js +1 -1
- package/dist/entry-60.js +1 -1
- package/dist/entry-61.js +1 -1
- package/dist/entry-62.js +1 -1
- package/dist/entry-63.js +1 -1
- package/dist/entry-64.js +1 -1
- package/dist/entry-65.js +1 -0
- package/dist/entry-66.js +1 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +0 -1
- package/dist/entry-7.js +1 -1
- package/dist/entry-70.js +1 -1
- package/dist/entry-71.js +1 -1
- package/dist/entry-72.js +1 -1
- package/dist/entry-73.js +1 -1
- package/dist/entry-74.js +1 -1
- package/dist/entry-75.js +1 -0
- package/dist/entry-76.js +1 -1
- package/dist/entry-78.js +1 -1
- package/dist/entry-79.js +0 -1
- package/dist/entry-8.js +1 -1
- package/dist/entry-80.js +1 -1
- package/dist/entry-81.js +1 -80
- package/dist/entry-82.js +1 -22
- package/dist/entry-83.js +1 -2
- package/dist/entry-84.js +1 -1
- package/dist/entry-85.js +2 -1
- package/dist/entry-86.js +1 -1
- package/dist/entry-87.js +1 -1
- package/dist/entry-88.js +1 -3
- package/dist/entry-89.js +1 -1
- package/dist/entry-9.js +1 -1
- package/dist/entry-90.js +3 -1
- package/dist/entry-91.js +1 -1
- package/dist/entry-92.js +1 -0
- package/dist/entry-93.js +1 -0
- package/dist/pi-agent-ide.js +10 -34
- package/docs/agent-guides/ast-search.md +58 -0
- package/docs/agent-guides/debugger.md +1 -1
- package/docs/agent-guides/editing.md +26 -58
- package/docs/agent-guides/git-changes.md +4 -14
- package/docs/agent-guides/search.md +38 -0
- package/docs/agent-guides/ssh.md +17 -49
- package/docs/agent-guides/terminal.md +9 -15
- package/docs/configuration.md +9 -13
- package/docs/extensions.md +82 -0
- package/docs/settings-help.md +2 -2
- package/docs/structured-results.md +33 -11
- package/docs/tools.md +23 -22
- package/node_modules/pi-agent-doctor/package.json +7 -7
- package/node_modules/pi-agent-doctor/src/workspace.ts +0 -5
- package/node_modules/pi-agent-documentation/package.json +2 -2
- package/node_modules/pi-agent-documentation/runtime/entry-29.js +1 -0
- package/node_modules/pi-agent-documentation/src/index.ts +26 -10
- package/node_modules/pi-agent-filesystem/index.ts +1 -1
- package/node_modules/pi-agent-filesystem/package.json +8 -8
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-jq/index.ts +9 -63
- package/node_modules/pi-agent-filesystem-jq/package.json +12 -6
- package/node_modules/pi-agent-filesystem-jq/runtime/entry-32.js +1 -0
- package/node_modules/pi-agent-filesystem-jq/src/api/jq.ts +112 -0
- package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
- package/node_modules/pi-agent-filesystem-pdf/runtime/entry-34.js +2 -0
- package/node_modules/pi-agent-filesystem-text/package.json +4 -4
- package/node_modules/pi-agent-ide-ast/package.json +15 -15
- package/node_modules/pi-agent-ide-ast/src/extension.ts +8 -8
- package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +104 -26
- package/node_modules/pi-agent-ide-ast/src/tool-ast-search.ts +210 -0
- package/node_modules/pi-agent-ide-changes/index.ts +1 -2
- package/node_modules/pi-agent-ide-changes/package.json +10 -10
- package/node_modules/pi-agent-ide-changes/runtime/entry-38.js +1 -0
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +3 -3
- 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/runtime/entry-42.js +2 -0
- package/node_modules/pi-agent-ide-lsp/index.ts +22 -28
- package/node_modules/pi-agent-ide-lsp/package.json +14 -10
- package/node_modules/pi-agent-ide-lsp/runtime/entry-43.js +2 -0
- package/node_modules/pi-agent-ide-lsp/src/declaration-targets.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/code-views.ts +8 -84
- package/node_modules/pi-agent-ide-lsp/src/lsp/index.ts +1 -6
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +11 -11
- package/node_modules/pi-agent-ide-lsp/src/manager-provider.ts +8 -0
- package/node_modules/pi-agent-ide-lsp/src/rename-plan.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +234 -36
- package/node_modules/pi-agent-ide-lsp/src/tool-lsp-search.ts +212 -0
- package/node_modules/pi-agent-image/package.json +3 -3
- package/node_modules/pi-agent-image/src/image-converter.ts +24 -1
- 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-pdf/src/pdf-converter.ts +23 -1
- package/node_modules/pi-agent-read/package.json +12 -12
- package/node_modules/pi-agent-read/runtime/entry-49.js +0 -1
- package/node_modules/pi-agent-read/runtime/entry-51.js +2 -0
- package/node_modules/pi-agent-read/src/api/read-parameters.ts +4 -7
- package/node_modules/pi-agent-read/src/api/tools/read.ts +2 -0
- package/node_modules/pi-agent-read/src/core/extension.ts +0 -8
- package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +47 -14
- package/node_modules/pi-agent-read/src/core/tools/read/result-target.ts +3 -1
- package/node_modules/pi-agent-read/src/core/tools/read/structured-result.ts +14 -2
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +21 -8
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-resource/src/index.ts +8 -0
- package/node_modules/pi-agent-resource/src/resource-error-metadata.ts +89 -0
- package/node_modules/pi-agent-resource/src/resource-error.ts +6 -1
- package/node_modules/pi-agent-resource/src/result-images.ts +87 -0
- package/node_modules/pi-agent-resource/src/result-targets.ts +9 -3
- package/node_modules/pi-agent-resource/src/tool-result.ts +17 -0
- package/node_modules/pi-agent-search/package.json +9 -9
- package/node_modules/pi-agent-search/runtime/entry-54.js +0 -1
- package/node_modules/pi-agent-search/runtime/entry-55.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-56.js +2 -0
- package/node_modules/pi-agent-search/src/api/glob-list.ts +35 -0
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +8 -8
- package/node_modules/pi-agent-search/src/api/search.ts +14 -2
- package/node_modules/pi-agent-search/src/core/extension.ts +11 -20
- package/node_modules/pi-agent-search/src/core/search-core.ts +30 -10
- package/node_modules/pi-agent-search-text/index.ts +34 -12
- package/node_modules/pi-agent-search-text/package.json +17 -15
- package/node_modules/pi-agent-search-text/runtime/entry-57.js +1 -0
- package/node_modules/pi-agent-search-text/runtime/entry-60.js +1 -0
- package/node_modules/pi-agent-search-text/src/file-search.ts +59 -25
- package/node_modules/pi-agent-search-text/src/resolvers.ts +61 -16
- package/node_modules/pi-agent-search-text/src/scoped-search.ts +9 -3
- package/node_modules/pi-agent-search-text/src/search-backend.ts +44 -48
- package/node_modules/pi-agent-search-text/src/search-presentation.ts +19 -15
- package/node_modules/pi-agent-search-text/src/search-recipe.ts +2 -1
- package/node_modules/pi-agent-search-text/src/search-result.ts +6 -2
- package/node_modules/pi-agent-search-text/src/search-session.ts +1 -0
- package/node_modules/pi-agent-search-text/src/tool-file-search.ts +146 -0
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text/src/text-converter.ts +1 -1
- package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
- package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
- package/node_modules/pi-agent-text-anchor-exact/src/anchor.ts +6 -1
- package/node_modules/pi-agent-text-anchor-line-hash/index.ts +1 -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-66.js +2 -0
- package/node_modules/pi-agent-text-editor/package.json +26 -26
- package/node_modules/pi-agent-text-editor/runtime/entry-81.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-82.js +1 -0
- package/node_modules/pi-agent-text-editor/src/api/edit-pipeline.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +23 -0
- package/node_modules/pi-agent-text-editor/src/api/text-selection-anchor.ts +31 -1
- package/node_modules/pi-agent-text-editor/src/core/diff-tool.ts +11 -21
- package/node_modules/pi-agent-text-editor/src/core/editing-guidelines.ts +5 -5
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +13 -7
- package/node_modules/pi-agent-text-editor/src/core/file-operation-guards.ts +22 -4
- package/node_modules/pi-agent-text-editor/src/core/image-write.ts +111 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +3 -0
- package/node_modules/pi-agent-text-editor/src/core/structured-result.ts +5 -1
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +8 -2
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +103 -20
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +146 -62
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +14 -19
- package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +43 -12
- package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +5 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +6 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +3 -7
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +6 -8
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +9 -6
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +3 -4
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +37 -22
- package/node_modules/pi-agent-text-editor-renderer/index.ts +6 -1
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-84.js +2 -0
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +18 -5
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +6 -6
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-85.js +2 -0
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-ui/package.json +3 -3
- package/node_modules/pi-agent-tool-ui/runtime/entry-87.js +1 -0
- package/node_modules/pi-agent-tool-ui/runtime/entry-88.js +1 -0
- package/node_modules/pi-agent-web/index.ts +28 -6
- package/node_modules/pi-agent-web/package.json +8 -8
- package/node_modules/pi-agent-web-html/package.json +3 -3
- package/node_modules/pi-agent-web-html/src/html-converter.ts +1 -1
- 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-pdf/runtime/entry-92.js +2 -0
- package/node_modules/pi-agent-web-text/package.json +4 -4
- package/node_modules/pi-agent-web-text/runtime/entry-93.js +2 -0
- package/package.json +61 -58
- package/src/api/approval.ts +2 -0
- package/src/api/read.ts +2 -0
- package/src/api/standalone.ts +7 -0
- package/src/backend/doctor-workspace.ts +0 -3
- package/src/backend/process-metadata-worker.py +9 -18
- package/src/backend/process-metadata.ts +11 -44
- package/src/backend/registration.ts +0 -10
- package/src/backend/web-browser-worker.mjs +2 -17
- package/src/backend/web-browser.ts +1 -26
- package/src/composite/builtin-extensions.ts +8 -6
- package/src/composite/ide-alias-rendering.ts +18 -2
- package/src/composite/module-labels.ts +0 -4
- package/src/composite/preferences.ts +0 -36
- package/src/composite/settings-documentation.ts +1 -2
- package/src/composite/text-results.ts +61 -23
- package/src/documentation/extension.ts +39 -15
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +1 -1
- 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 +9 -63
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +12 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-32.js +1 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/src/api/jq.ts +112 -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-pdf/runtime/entry-34.js +2 -0
- 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-35.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-30.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +28 -6
- 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-html/src/html-converter.ts +1 -1
- 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-pdf/runtime/entry-92.js +2 -0
- 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-93.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-89.js +2 -0
- package/src/extensions/pi-agent-read/package.json +12 -12
- package/src/extensions/pi-agent-read/runtime/entry-49.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-50.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-51.js +2 -0
- package/src/extensions/pi-agent-read/src/api/read-parameters.ts +4 -7
- package/src/extensions/pi-agent-read/src/api/tools/read.ts +2 -0
- package/src/extensions/pi-agent-read/src/core/extension.ts +0 -8
- package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +47 -14
- package/src/extensions/pi-agent-read/src/core/tools/read/result-target.ts +3 -1
- package/src/extensions/pi-agent-read/src/core/tools/read/structured-result.ts +14 -2
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +21 -8
- package/src/extensions/pi-agent-search/package.json +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +34 -12
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +17 -15
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-57.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-59.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-60.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/file-search.ts +59 -25
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +61 -16
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/scoped-search.ts +9 -3
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-backend.ts +44 -48
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-presentation.ts +19 -15
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +2 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +6 -2
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/tool-file-search.ts +146 -0
- package/src/extensions/pi-agent-search/runtime/entry-54.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-55.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-56.js +2 -0
- package/src/extensions/pi-agent-search/src/api/glob-list.ts +35 -0
- package/src/extensions/pi-agent-search/src/api/search-parameters.ts +8 -8
- package/src/extensions/pi-agent-search/src/api/search.ts +14 -2
- package/src/extensions/pi-agent-search/src/core/extension.ts +11 -20
- package/src/extensions/pi-agent-search/src/core/search-core.ts +30 -10
- 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-exact/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/anchor.ts +6 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts +1 -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-65.js +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-66.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +6 -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/runtime/entry-84.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +18 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +6 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-85.js +2 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-81.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-82.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-83.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/edit-pipeline.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +23 -0
- package/src/extensions/pi-agent-text-editor/src/api/text-selection-anchor.ts +31 -1
- package/src/extensions/pi-agent-text-editor/src/core/diff-tool.ts +11 -21
- package/src/extensions/pi-agent-text-editor/src/core/editing-guidelines.ts +5 -5
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +13 -7
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-guards.ts +22 -4
- package/src/extensions/pi-agent-text-editor/src/core/image-write.ts +111 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +3 -0
- package/src/extensions/pi-agent-text-editor/src/core/structured-result.ts +5 -1
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +8 -2
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +103 -20
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +146 -62
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +14 -19
- package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +43 -12
- package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +5 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +6 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +3 -7
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +6 -8
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +9 -6
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +3 -4
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +37 -22
- package/src/pi-agent-ide.ts +8 -15
- package/src/plugins/pi-agent-ide-ast/package.json +15 -15
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +8 -8
- package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +104 -26
- package/src/plugins/pi-agent-ide-ast/src/tool-ast-search.ts +210 -0
- package/src/plugins/pi-agent-ide-changes/index.ts +1 -2
- package/src/plugins/pi-agent-ide-changes/package.json +10 -10
- package/src/plugins/pi-agent-ide-changes/runtime/entry-38.js +1 -0
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +3 -3
- package/src/plugins/pi-agent-ide-debugger/index.ts +17 -4
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +2 -11
- 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/runtime/entry-42.js +2 -0
- package/src/plugins/pi-agent-ide-lsp/index.ts +22 -28
- package/src/plugins/pi-agent-ide-lsp/package.json +14 -10
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-43.js +2 -0
- package/src/plugins/pi-agent-ide-lsp/src/declaration-targets.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/code-views.ts +8 -84
- package/src/plugins/pi-agent-ide-lsp/src/lsp/index.ts +1 -6
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +11 -11
- package/src/plugins/pi-agent-ide-lsp/src/manager-provider.ts +8 -0
- package/src/plugins/pi-agent-ide-lsp/src/rename-plan.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +234 -36
- package/src/plugins/pi-agent-ide-lsp/src/tool-lsp-search.ts +212 -0
- package/src/plugins/pi-agent-ide-processes/src/ui.ts +61 -16
- package/src/plugins/pi-agent-ide-terminal/index.ts +1 -1
- package/src/plugins/pi-agent-ide-terminal/src/resources.ts +10 -7
- package/src/plugins/pi-agent-ide-terminal/src/tools.ts +1 -3
- package/src/standalone/resource-host.ts +147 -0
- package/src/standalone/scoped-api.ts +457 -0
- package/dist/chunk-2RTCSZB3.js +0 -1
- package/dist/chunk-4DIUPEDF.js +0 -2
- package/dist/chunk-6EDOLYOV.js +0 -1
- package/dist/chunk-6FGLAVPJ.js +0 -1
- package/dist/chunk-6H32W35W.js +0 -1
- package/dist/chunk-6OJ565FL.js +0 -2
- package/dist/chunk-6R3Y4AD3.js +0 -1
- package/dist/chunk-6TJPMBUQ.js +0 -1
- package/dist/chunk-6XFUICD7.js +0 -1
- package/dist/chunk-BHSO2MDK.js +0 -6
- package/dist/chunk-GSOYVIQS.js +0 -1
- package/dist/chunk-HSRH76JN.js +0 -3
- package/dist/chunk-HSZ4AQ6L.js +0 -9
- package/dist/chunk-I6NPILT5.js +0 -1
- package/dist/chunk-K7SRNBIV.js +0 -1
- package/dist/chunk-LCWBVOII.js +0 -3
- package/dist/chunk-MKEC3U2M.js +0 -4
- package/dist/chunk-NUM3YQGK.js +0 -1
- package/dist/chunk-OM4LYD3S.js +0 -1
- package/dist/chunk-PLKYHUNT.js +0 -1
- package/dist/chunk-QIJMV2P2.js +0 -2
- package/dist/chunk-RVU73VKN.js +0 -2
- package/dist/chunk-SDAH3ECM.js +0 -5
- package/dist/chunk-SGQWRIRJ.js +0 -10
- package/dist/chunk-SWBJS3U4.js +0 -1
- package/dist/chunk-T7I2VX3J.js +0 -1
- package/dist/chunk-T7MWQQIF.js +0 -3
- package/dist/chunk-VDP5CQHM.js +0 -3
- package/dist/chunk-XG7QNAKW.js +0 -9
- package/dist/chunk-XLWCSJMR.js +0 -1
- package/dist/chunk-YFP4P2FV.js +0 -1
- package/dist/chunk-YIXP2ALP.js +0 -9
- package/dist/entry-22.js +0 -1
- package/docs/agent-guides/diagnostics.md +0 -5
- package/docs/agent-guides/json-reading.md +0 -57
- package/docs/agent-guides/read-resources.md +0 -17
- package/docs/agent-guides/search-code.md +0 -76
- package/docs/agent-guides/select-code.md +0 -119
- package/docs/agent-guides/vision.md +0 -11
- package/node_modules/pi-agent-doctor/runtime/entry-22.js +0 -1
- package/node_modules/pi-agent-filesystem/runtime/entry-29.js +0 -2
- package/node_modules/pi-agent-filesystem-pdf/runtime/entry-32.js +0 -2
- package/node_modules/pi-agent-ide-ast/runtime/entry-34.js +0 -1
- package/node_modules/pi-agent-ide-ast/src/ast/constructs.ts +0 -193
- package/node_modules/pi-agent-ide-ast/src/ast/element-extent.ts +0 -59
- package/node_modules/pi-agent-ide-ast/src/ast/selection.ts +0 -204
- package/node_modules/pi-agent-ide-ast/src/geometry-selection.ts +0 -184
- package/node_modules/pi-agent-ide-ast/src/select-presentation.ts +0 -105
- package/node_modules/pi-agent-ide-ast/src/select-schema.ts +0 -387
- package/node_modules/pi-agent-ide-ast/src/selection-region.ts +0 -41
- package/node_modules/pi-agent-ide-ast/src/source-text.ts +0 -92
- package/node_modules/pi-agent-ide-ast/src/text-selection.ts +0 -214
- package/node_modules/pi-agent-ide-ast/src/tool-select.ts +0 -277
- package/node_modules/pi-agent-ide-formatter/runtime/entry-38.js +0 -2
- package/node_modules/pi-agent-ide-lsp/src/code-view-resolvers.ts +0 -136
- package/node_modules/pi-agent-image/runtime/entry-42.js +0 -1
- package/node_modules/pi-agent-invariant/runtime/entry-43.js +0 -1
- package/node_modules/pi-agent-search/runtime/entry-51.js +0 -1
- package/node_modules/pi-agent-search-text/runtime/entry-55.js +0 -2
- package/node_modules/pi-agent-search-text/runtime/entry-56.js +0 -1
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-60.js +0 -2
- package/node_modules/pi-agent-text-editor/runtime/entry-66.js +0 -1
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-82.js +0 -2
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-84.js +0 -1
- package/node_modules/pi-agent-tool-ui/runtime/entry-85.js +0 -1
- package/node_modules/pi-agent-web/runtime/entry-87.js +0 -2
- package/node_modules/pi-agent-web-html/runtime/entry-88.js +0 -2
- package/src/backend/vision-capture-worker.py +0 -319
- package/src/backend/vision-capture.ts +0 -165
- package/src/backend/vision-registration.ts +0 -104
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-30.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-32.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-29.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-88.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-89.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-87.js +0 -2
- package/src/extensions/pi-agent-read/runtime/entry-45.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-46.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-55.js +0 -2
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-56.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-51.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-52.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-60.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-61.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-82.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-83.js +0 -2
- package/src/extensions/pi-agent-text-editor/runtime/entry-65.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-66.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-34.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-35.js +0 -2
- package/src/plugins/pi-agent-ide-ast/src/ast/constructs.ts +0 -193
- package/src/plugins/pi-agent-ide-ast/src/ast/element-extent.ts +0 -59
- package/src/plugins/pi-agent-ide-ast/src/ast/selection.ts +0 -204
- package/src/plugins/pi-agent-ide-ast/src/geometry-selection.ts +0 -184
- package/src/plugins/pi-agent-ide-ast/src/select-presentation.ts +0 -105
- package/src/plugins/pi-agent-ide-ast/src/select-schema.ts +0 -387
- package/src/plugins/pi-agent-ide-ast/src/selection-region.ts +0 -41
- package/src/plugins/pi-agent-ide-ast/src/source-text.ts +0 -92
- package/src/plugins/pi-agent-ide-ast/src/text-selection.ts +0 -214
- package/src/plugins/pi-agent-ide-ast/src/tool-select.ts +0 -277
- package/src/plugins/pi-agent-ide-formatter/runtime/entry-38.js +0 -2
- package/src/plugins/pi-agent-ide-lsp/src/code-view-resolvers.ts +0 -136
- package/src/plugins/pi-agent-ide-vision/index.ts +0 -439
- package/src/plugins/pi-agent-ide-vision/src/doctor-plugin.ts +0 -47
- package/src/plugins/pi-agent-ide-vision/src/vision.ts +0 -585
- package/src/plugins/pi-agent-ide-vision/src/windows-display-capture.ps1 +0 -30
- package/src/plugins/pi-agent-ide-vision/src/windows-window-capture.ps1 +0 -33
- /package/dist/{chunk-U2JKHKLK.js → chunk-3PMHFEJY.js} +0 -0
- /package/node_modules/{pi-agent-documentation → pi-agent-doctor}/runtime/entry-28.js +0 -0
- /package/node_modules/{pi-agent-filesystem-image → pi-agent-filesystem}/runtime/entry-30.js +0 -0
- /package/node_modules/{pi-agent-filesystem-jq → pi-agent-filesystem-image}/runtime/entry-31.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-jq}/runtime/entry-33.js +0 -0
- /package/node_modules/{pi-agent-ide-ast → pi-agent-filesystem-text}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-36.js +0 -0
- /package/node_modules/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-37.js +0 -0
- /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-changes}/runtime/entry-39.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-formatter}/runtime/entry-40.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-languages}/runtime/entry-41.js +0 -0
- /package/node_modules/{pi-agent-pdf → pi-agent-image}/runtime/entry-44.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-invariant}/runtime/entry-45.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-46.js +0 -0
- /package/node_modules/{pi-agent-resource → pi-agent-read}/runtime/entry-50.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-52.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-59.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-text}/runtime/entry-61.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-text-anchor-constant}/runtime/entry-62.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-63.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-64.js +0 -0
- /package/node_modules/{pi-agent-text-editor → pi-agent-text-anchor-line-hash}/runtime/entry-65.js +0 -0
- /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor}/runtime/entry-83.js +0 -0
- /package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-86.js +0 -0
- /package/node_modules/{pi-agent-web-image → pi-agent-web}/runtime/entry-89.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web-html}/runtime/entry-90.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web-image}/runtime/entry-91.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-jq → pi-agent-filesystem-image}/runtime/entry-31.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-jq}/runtime/entry-33.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-html}/runtime/entry-90.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-image}/runtime/entry-91.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-anchor-exact → pi-agent-text-anchor-constant}/runtime/entry-62.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-63.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-64.js +0 -0
- /package/src/plugins/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-36.js +0 -0
- /package/src/plugins/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-37.js +0 -0
- /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-changes}/runtime/entry-39.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-formatter}/runtime/entry-40.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-languages}/runtime/entry-41.js +0 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import type { AgentToolResult, ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { Text } from "@earendil-works/pi-tui";
|
|
3
|
+
import { connectAgentDocumentation, loadPackagedAgentGuide } from "pi-agent-documentation";
|
|
4
|
+
import { resultError, resultInputSchema, withStructuredResult } from "pi-agent-resource";
|
|
5
|
+
import {
|
|
6
|
+
searchDataSchema,
|
|
7
|
+
searchOutputSchema,
|
|
8
|
+
type SearchPluginApi,
|
|
9
|
+
type SearchResolver,
|
|
10
|
+
type SearchToolDetails,
|
|
11
|
+
} from "pi-agent-search/api/search";
|
|
12
|
+
import { renderSearchResult } from "pi-agent-search-text/rendering";
|
|
13
|
+
import {
|
|
14
|
+
ToolCallInterceptionRenderStore,
|
|
15
|
+
withToolCallInterceptionRendering,
|
|
16
|
+
} from "pi-agent-tool-call-interception";
|
|
17
|
+
import { toolCallHeader } from "pi-agent-tool-ui";
|
|
18
|
+
import { Type, type Static } from "typebox";
|
|
19
|
+
|
|
20
|
+
import type { AstSearchOptions } from "./search-resolver.js";
|
|
21
|
+
|
|
22
|
+
export const astSearchSchema = Type.Object(
|
|
23
|
+
{
|
|
24
|
+
pattern: Type.Optional(
|
|
25
|
+
Type.String({
|
|
26
|
+
minLength: 1,
|
|
27
|
+
description:
|
|
28
|
+
"ast-grep pattern in source-code syntax; $NAME captures one node, $$$ARGS several. Use pattern or rule.",
|
|
29
|
+
}),
|
|
30
|
+
),
|
|
31
|
+
rule: Type.Optional(
|
|
32
|
+
Type.Record(Type.String(), Type.Unknown(), {
|
|
33
|
+
description:
|
|
34
|
+
"ast-grep rule object, the value of `rule:` in an ast-grep rule file: pattern, kind, regex, inside, has, not, all, any, follows, precedes, stopBy. Requires language.",
|
|
35
|
+
}),
|
|
36
|
+
),
|
|
37
|
+
language: Type.Optional(
|
|
38
|
+
Type.String({
|
|
39
|
+
minLength: 1,
|
|
40
|
+
description: "ast-grep language for a rule, such as typescript, python or go.",
|
|
41
|
+
}),
|
|
42
|
+
),
|
|
43
|
+
path: Type.Optional(
|
|
44
|
+
Type.Union(resultInputSchema.anyOf, {
|
|
45
|
+
description:
|
|
46
|
+
"File, directory, unchanged Read/Search/edit result, its UUID, or an array of such results.",
|
|
47
|
+
}),
|
|
48
|
+
),
|
|
49
|
+
relation: Type.Optional(
|
|
50
|
+
Type.Union([Type.Literal("inside"), Type.Literal("enclosing")], {
|
|
51
|
+
description:
|
|
52
|
+
"With a result as path: inside (default) keeps matches within its ranges; enclosing returns the innermost match that contains each range.",
|
|
53
|
+
}),
|
|
54
|
+
),
|
|
55
|
+
include: Type.Optional(Type.String({ description: "Include glob for files" })),
|
|
56
|
+
exclude: Type.Optional(Type.String({ description: "Exclude glob for files" })),
|
|
57
|
+
limit: Type.Optional(
|
|
58
|
+
Type.Integer({ minimum: 1, maximum: 1000, description: "Maximum matches (default 100)." }),
|
|
59
|
+
),
|
|
60
|
+
},
|
|
61
|
+
{ additionalProperties: false },
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
export type AstSearchParameters = Static<typeof astSearchSchema>;
|
|
65
|
+
|
|
66
|
+
/** The shared Search core and the AST resolver it runs for this tool only. */
|
|
67
|
+
export interface AstSearchRuntime {
|
|
68
|
+
readonly api: SearchPluginApi;
|
|
69
|
+
readonly resolver: SearchResolver;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Register the focused syntax-search tool on top of the shared Search execution core. */
|
|
73
|
+
export async function registerAstSearchTool(
|
|
74
|
+
pi: ExtensionAPI,
|
|
75
|
+
runtime: () => Promise<AstSearchRuntime>,
|
|
76
|
+
): Promise<void> {
|
|
77
|
+
let resolved: AstSearchRuntime | undefined;
|
|
78
|
+
void runtime().then((value) => (resolved = value));
|
|
79
|
+
|
|
80
|
+
pi.registerTool(
|
|
81
|
+
withToolCallInterceptionRendering(
|
|
82
|
+
{
|
|
83
|
+
name: "ast_search",
|
|
84
|
+
label: "ast_search",
|
|
85
|
+
exposure: "direct",
|
|
86
|
+
namespace: { name: "ide_ast_search", description: "Find code by syntax structure." },
|
|
87
|
+
annotations: {
|
|
88
|
+
readOnlyHint: true,
|
|
89
|
+
destructiveHint: false,
|
|
90
|
+
idempotentHint: false,
|
|
91
|
+
openWorldHint: false,
|
|
92
|
+
},
|
|
93
|
+
description:
|
|
94
|
+
"Use ast_search to find code by syntax with ast-grep patterns or rules, in files or inside a Read, Search or edit result, and to get the function, class or call that encloses a match. Matches and captures are editable selections.",
|
|
95
|
+
promptSnippet: "Find code by syntax with ast-grep patterns and relational rules",
|
|
96
|
+
parameters: astSearchSchema,
|
|
97
|
+
outputSchema: searchOutputSchema,
|
|
98
|
+
renderCall(parameters, theme, context) {
|
|
99
|
+
return toolCallHeader(
|
|
100
|
+
context.lastComponent,
|
|
101
|
+
{
|
|
102
|
+
tool: "ast_search",
|
|
103
|
+
primary: {
|
|
104
|
+
text:
|
|
105
|
+
parameters.pattern ??
|
|
106
|
+
(parameters.rule === undefined ? "" : JSON.stringify(parameters.rule)),
|
|
107
|
+
color: "accent",
|
|
108
|
+
truncate: "end",
|
|
109
|
+
},
|
|
110
|
+
qualifiers: [
|
|
111
|
+
...(parameters.path === undefined
|
|
112
|
+
? []
|
|
113
|
+
: [
|
|
114
|
+
{
|
|
115
|
+
text:
|
|
116
|
+
typeof parameters.path === "string"
|
|
117
|
+
? `in ${parameters.path}`
|
|
118
|
+
: "in result scope",
|
|
119
|
+
color: "accent" as const,
|
|
120
|
+
truncate: "start" as const,
|
|
121
|
+
},
|
|
122
|
+
]),
|
|
123
|
+
...(parameters.language === undefined ? [] : [{ text: parameters.language }]),
|
|
124
|
+
...(parameters.relation === "enclosing" ? [{ text: "enclosing" }] : []),
|
|
125
|
+
],
|
|
126
|
+
expanded: context.expanded,
|
|
127
|
+
},
|
|
128
|
+
theme,
|
|
129
|
+
);
|
|
130
|
+
},
|
|
131
|
+
renderResult(result, options, theme, context) {
|
|
132
|
+
const details = result.details as SearchToolDetails | undefined;
|
|
133
|
+
if (details?.payload !== undefined && !context.isError && !options.isPartial)
|
|
134
|
+
return renderSearchResult(
|
|
135
|
+
{ ...result, details: details.payload } as never,
|
|
136
|
+
options,
|
|
137
|
+
theme,
|
|
138
|
+
context as never,
|
|
139
|
+
);
|
|
140
|
+
return new Text(
|
|
141
|
+
result.content.flatMap((part) => (part.type === "text" ? [part.text] : [])).join("\n"),
|
|
142
|
+
0,
|
|
143
|
+
0,
|
|
144
|
+
);
|
|
145
|
+
},
|
|
146
|
+
async execute(
|
|
147
|
+
_id,
|
|
148
|
+
parameters: AstSearchParameters,
|
|
149
|
+
signal,
|
|
150
|
+
onUpdate,
|
|
151
|
+
context,
|
|
152
|
+
): Promise<AgentToolResult<SearchToolDetails>> {
|
|
153
|
+
if ((parameters.pattern === undefined) === (parameters.rule === undefined))
|
|
154
|
+
return failure("Pass exactly one of pattern or rule.");
|
|
155
|
+
if (parameters.rule !== undefined && parameters.language === undefined)
|
|
156
|
+
return failure("A rule requires language, such as typescript or python.");
|
|
157
|
+
const options: AstSearchOptions = {
|
|
158
|
+
...(parameters.pattern === undefined ? {} : { pattern: parameters.pattern }),
|
|
159
|
+
...(parameters.rule === undefined ? {} : { rule: parameters.rule }),
|
|
160
|
+
...(parameters.language === undefined ? {} : { language: parameters.language }),
|
|
161
|
+
...(parameters.relation === undefined ? {} : { relation: parameters.relation }),
|
|
162
|
+
};
|
|
163
|
+
// The Search core registers this runtime during startup; without it the tool cannot run.
|
|
164
|
+
if (resolved === undefined)
|
|
165
|
+
return failure(
|
|
166
|
+
"ast_search needs the Search module (search.core), which is not loaded.",
|
|
167
|
+
);
|
|
168
|
+
const { api, resolver } = resolved;
|
|
169
|
+
return (await api.searchWith(
|
|
170
|
+
resolver,
|
|
171
|
+
{
|
|
172
|
+
// The resolver reads options; the query is the label kept with returned references.
|
|
173
|
+
query: parameters.pattern ?? JSON.stringify(parameters.rule),
|
|
174
|
+
...(parameters.path === undefined ? {} : { path: parameters.path }),
|
|
175
|
+
...(parameters.include === undefined ? {} : { include: parameters.include }),
|
|
176
|
+
...(parameters.exclude === undefined ? {} : { exclude: parameters.exclude }),
|
|
177
|
+
...(parameters.limit === undefined ? {} : { limit: parameters.limit }),
|
|
178
|
+
options: { ast: options },
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
cwd: context.cwd,
|
|
182
|
+
...(signal !== undefined && { signal }),
|
|
183
|
+
...(onUpdate !== undefined && { onUpdate }),
|
|
184
|
+
},
|
|
185
|
+
)) as AgentToolResult<SearchToolDetails>;
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
new ToolCallInterceptionRenderStore(),
|
|
189
|
+
),
|
|
190
|
+
);
|
|
191
|
+
// Register the tool before awaiting the guide: Pi fixes an explicit tool allowlist at startup.
|
|
192
|
+
connectAgentDocumentation(pi, [
|
|
193
|
+
await loadPackagedAgentGuide({
|
|
194
|
+
id: "ast-search",
|
|
195
|
+
description: "Syntax patterns, ast-grep rules and enclosing constructs",
|
|
196
|
+
triggers: [{ tool: "ast_search" }],
|
|
197
|
+
}),
|
|
198
|
+
]);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function failure(message: string): AgentToolResult<SearchToolDetails> {
|
|
202
|
+
return withStructuredResult(
|
|
203
|
+
{
|
|
204
|
+
content: [{ type: "text", text: message }],
|
|
205
|
+
details: { failure: { code: "INVALID_REQUEST", message } },
|
|
206
|
+
},
|
|
207
|
+
searchDataSchema,
|
|
208
|
+
{ status: "error", errors: [resultError(new Error(message), "SEARCH_FAILED")] },
|
|
209
|
+
);
|
|
210
|
+
}
|
|
@@ -51,8 +51,7 @@ export async function registerGitChangesWithExecutor(
|
|
|
51
51
|
setup(api) {
|
|
52
52
|
api.addView({ view: "changes", presenter });
|
|
53
53
|
api.describe({
|
|
54
|
-
views:
|
|
55
|
-
"changes — uncommitted edits in tracked files, staged/unstaged state, and CHANGE# anchors for stage, unstage and undo.",
|
|
54
|
+
views: "changes — uncommitted Git edits with CHANGE# anchors.",
|
|
56
55
|
});
|
|
57
56
|
},
|
|
58
57
|
} satisfies ReadPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-changes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
"./changes/change-groups": {
|
|
10
10
|
"types": "./src/changes/change-groups.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-38.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"pi-agent-doctor": "0.
|
|
16
|
-
"pi-agent-documentation": "0.
|
|
17
|
-
"pi-agent-invariant": "0.
|
|
18
|
-
"pi-agent-read": "0.
|
|
19
|
-
"pi-agent-resource": "0.
|
|
20
|
-
"pi-agent-text": "0.
|
|
21
|
-
"pi-agent-text-editor": "0.
|
|
15
|
+
"pi-agent-doctor": "0.9.0",
|
|
16
|
+
"pi-agent-documentation": "0.9.0",
|
|
17
|
+
"pi-agent-invariant": "0.9.0",
|
|
18
|
+
"pi-agent-read": "0.9.0",
|
|
19
|
+
"pi-agent-resource": "0.9.0",
|
|
20
|
+
"pi-agent-text": "0.9.0",
|
|
21
|
+
"pi-agent-text-editor": "0.9.0"
|
|
22
22
|
},
|
|
23
23
|
"pi": {
|
|
24
24
|
"extensions": [
|
|
25
|
-
"./runtime/entry-
|
|
25
|
+
"./runtime/entry-39.js"
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../../dist/entry-38.js";
|
|
@@ -16,12 +16,12 @@ export const undoSchema = Type.Object(
|
|
|
16
16
|
file: Type.Optional(
|
|
17
17
|
Type.Union(resultInputSchema.anyOf, {
|
|
18
18
|
description:
|
|
19
|
-
"File path or
|
|
19
|
+
"File path or an unchanged whole-file result. Omit to use the file of the CHANGE# anchor or the last file read.",
|
|
20
20
|
}),
|
|
21
21
|
),
|
|
22
22
|
change: Type.String({
|
|
23
23
|
description:
|
|
24
|
-
'
|
|
24
|
+
'A CHANGE#HASH anchor from read with views: ["changes"] reverts that change to HEAD in the worktree and index; last reverts the file\'s last tool edit.',
|
|
25
25
|
pattern: "^(?:CHANGE#[0-9A-F]{4,64}|last)$",
|
|
26
26
|
}),
|
|
27
27
|
},
|
|
@@ -41,7 +41,7 @@ export function createUndoMutationTool(
|
|
|
41
41
|
return {
|
|
42
42
|
name: "undo",
|
|
43
43
|
description:
|
|
44
|
-
"Use undo to
|
|
44
|
+
"Use undo to revert one uncommitted Git change or the last edit a tool made to a file.",
|
|
45
45
|
|
|
46
46
|
promptSnippet: "Restore a Git change or latest text edit",
|
|
47
47
|
parameters: undoSchema,
|
|
@@ -252,8 +252,7 @@ export async function registerDebuggerWithOwner(
|
|
|
252
252
|
api.addView({ view: "breakpoints", presenter: breakpointPresenter });
|
|
253
253
|
api.describe({
|
|
254
254
|
path: "debug:<session> — debugger state.",
|
|
255
|
-
views:
|
|
256
|
-
"breakpoints — current debugger breakpoints beside source lines. Normal files include every current session; debug sources are session-scoped.",
|
|
255
|
+
views: "breakpoints — breakpoints beside the lines.",
|
|
257
256
|
});
|
|
258
257
|
},
|
|
259
258
|
} satisfies ReadPlugin;
|
|
@@ -265,9 +264,17 @@ export async function registerDebuggerWithOwner(
|
|
|
265
264
|
api.addResolver({ resolver: editorResolver });
|
|
266
265
|
api
|
|
267
266
|
.tool("insert")
|
|
268
|
-
.
|
|
269
|
-
|
|
267
|
+
.describeField(
|
|
268
|
+
"path",
|
|
269
|
+
"debug:<session> controls the debugger; debug:<session>/source with a line anchor sets a breakpoint.",
|
|
270
270
|
);
|
|
271
|
+
api
|
|
272
|
+
.tool("insert")
|
|
273
|
+
.describeField(
|
|
274
|
+
"text",
|
|
275
|
+
"For debug:<session>: start, continue, step over, step into, step out or evaluate <expression> (needs a stopped frame). For debug:<session>/source: breakpoint.",
|
|
276
|
+
);
|
|
277
|
+
api.tool("insert").describeField("anchor", "Omit for debug:<session>.");
|
|
271
278
|
api.tool("insert").addSemanticHandler({
|
|
272
279
|
matches: (input) => matchesDebugInsert(input, manager),
|
|
273
280
|
execute: async (context, input) => {
|
|
@@ -336,6 +343,12 @@ export async function registerDebuggerWithOwner(
|
|
|
336
343
|
};
|
|
337
344
|
},
|
|
338
345
|
});
|
|
346
|
+
api
|
|
347
|
+
.tool("delete")
|
|
348
|
+
.describeField(
|
|
349
|
+
"path",
|
|
350
|
+
"debug:<session> ends it; debug:<session>/breakpoint/<id> removes a breakpoint.",
|
|
351
|
+
);
|
|
339
352
|
api.tool("delete").addSemanticHandler({
|
|
340
353
|
matches: (input) => matchesDebugDelete(input, manager),
|
|
341
354
|
execute: async (context, input) => {
|
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
import { createReadResultRenderer } from "pi-agent-read/api/rendering";
|
|
27
27
|
|
|
28
28
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
29
|
-
import { connectAgentDocumentation, loadPackagedAgentGuide } from "pi-agent-documentation";
|
|
30
29
|
import type { ResourceResolutionAttempt, ResourceResolver } from "pi-agent-resource";
|
|
31
30
|
import type { TextDocument, TextLinePresenter } from "pi-agent-text";
|
|
32
31
|
import type { ReadRequest, ReadResultDetails } from "pi-agent-read/api/tools/read";
|
|
@@ -37,13 +36,6 @@ const renderReadResult = createReadResultRenderer({ kind: "code-view", label: "D
|
|
|
37
36
|
type ReadDiagnostics = IdePluginApi["readDiagnostics"];
|
|
38
37
|
|
|
39
38
|
export default async function registerDiagnostics(pi: ExtensionAPI): Promise<void> {
|
|
40
|
-
connectAgentDocumentation(pi, [
|
|
41
|
-
await loadPackagedAgentGuide({
|
|
42
|
-
id: "diagnostics",
|
|
43
|
-
description: "Diagnostic resources, readiness, and verification",
|
|
44
|
-
triggers: [{ tool: "read", resourcePrefixes: ["diagnostics:"] }],
|
|
45
|
-
}),
|
|
46
|
-
]);
|
|
47
39
|
let readDiagnostics: ReadDiagnostics | undefined;
|
|
48
40
|
const collect: CollectDiagnostics = (filePath, cwd, options) => {
|
|
49
41
|
if (readDiagnostics === undefined) {
|
|
@@ -137,9 +129,8 @@ export default async function registerDiagnostics(pi: ExtensionAPI): Promise<voi
|
|
|
137
129
|
},
|
|
138
130
|
});
|
|
139
131
|
api.describe({
|
|
140
|
-
path: "diagnostics:<path> — lint and language-server diagnostics
|
|
141
|
-
views:
|
|
142
|
-
"diagnostics — diagnostics alongside source text, with reporting tool and readiness.",
|
|
132
|
+
path: "diagnostics:<path> — lint and language-server diagnostics.",
|
|
133
|
+
views: "diagnostics — diagnostics beside the text.",
|
|
143
134
|
});
|
|
144
135
|
},
|
|
145
136
|
} satisfies ReadPlugin;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-formatter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.
|
|
6
|
+
"pi-agent-doctor": "0.9.0"
|
|
7
7
|
},
|
|
8
8
|
"pi": {
|
|
9
9
|
"extensions": [
|
|
10
|
-
"./runtime/entry-
|
|
10
|
+
"./runtime/entry-40.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.9.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.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.
|
|
6
|
+
"pi-agent-doctor": "0.9.0"
|
|
7
7
|
},
|
|
8
8
|
"pi": {
|
|
9
9
|
"extensions": [
|
|
10
|
-
"./runtime/entry-
|
|
10
|
+
"./runtime/entry-41.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.9.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.9.0",
|
|
7
|
+
"pi-agent-invariant": "0.9.0",
|
|
8
|
+
"pi-agent-read": "0.9.0",
|
|
9
|
+
"pi-agent-resource": "0.9.0",
|
|
10
|
+
"pi-agent-text": "0.9.0"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-42.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.9.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependenciesMeta": {
|
|
22
22
|
"pi-agent-ide": {
|
|
@@ -11,16 +11,15 @@ import {
|
|
|
11
11
|
READ_PROTOCOL,
|
|
12
12
|
type ReadPlugin,
|
|
13
13
|
} from "pi-agent-read/api/plugin-protocol";
|
|
14
|
-
import { createReadResultRenderer } from "pi-agent-read/api/rendering";
|
|
15
14
|
import { connectSearchPlugin } from "pi-agent-search/api/connect-plugin";
|
|
16
15
|
import { SEARCH_API_VERSION, SEARCH_PROTOCOL } from "pi-agent-search/api/plugin-protocol";
|
|
17
16
|
|
|
18
17
|
import { LSP_RECIPES } from "./src/catalog.js";
|
|
19
|
-
import { createLspGraphResolver, createLspSymbolResolver } from "./src/code-view-resolvers.js";
|
|
20
18
|
import { createLspDiagnosticSource } from "./src/diagnostic-source.js";
|
|
21
19
|
import { lspDoctorPlugin } from "./src/doctor-plugin.js";
|
|
22
20
|
import { createLspCompiler, LspManager, LspServerRegistry } from "./src/lsp/index.js";
|
|
23
21
|
import { createLspSearchResolver } from "./src/search-resolver.js";
|
|
22
|
+
import { registerLspSearchTool, type LspSearchRuntime } from "./src/tool-lsp-search.js";
|
|
24
23
|
import { createDeclarationTargets } from "./src/declaration-targets.js";
|
|
25
24
|
import { prepareSymbolRename } from "./src/rename-plan.js";
|
|
26
25
|
import { connectTextEditorPlugin } from "pi-agent-text-editor/api/connect-plugin";
|
|
@@ -44,7 +43,6 @@ export type {
|
|
|
44
43
|
export type { LspOwnerTransport, LspOwnedProcess } from "./src/lsp/owner-transport.js";
|
|
45
44
|
export { LspServerRegistry } from "./src/lsp/registry.js";
|
|
46
45
|
export { LSP_RECIPES } from "./src/catalog.js";
|
|
47
|
-
const renderReadResult = createReadResultRenderer({ kind: "code-view", label: "LSP" });
|
|
48
46
|
|
|
49
47
|
/** Resource-owner hooks for root registration without backend imports in the LSP package. */
|
|
50
48
|
export interface LspRegistrationOwner {
|
|
@@ -66,6 +64,10 @@ export async function registerLspWithOwner(
|
|
|
66
64
|
pi: ExtensionAPI,
|
|
67
65
|
owner?: LspRegistrationOwner,
|
|
68
66
|
): Promise<void> {
|
|
67
|
+
let resolveSearchRuntime!: (value: LspSearchRuntime) => void;
|
|
68
|
+
const searchRuntime = new Promise<LspSearchRuntime>(
|
|
69
|
+
(resolve) => (resolveSearchRuntime = resolve),
|
|
70
|
+
);
|
|
69
71
|
const managers = new Map<string, SharedStartup<LspManager>>();
|
|
70
72
|
let disposed = false;
|
|
71
73
|
const managerFor = async (
|
|
@@ -161,22 +163,11 @@ export async function registerLspWithOwner(
|
|
|
161
163
|
apiVersion: READ_API_VERSION,
|
|
162
164
|
id: "lsp",
|
|
163
165
|
setup(api) {
|
|
164
|
-
api.addResolver({
|
|
165
|
-
resolver: createLspSymbolResolver(managerForFile),
|
|
166
|
-
renderResult: renderReadResult,
|
|
167
|
-
});
|
|
168
|
-
api.addResolver({
|
|
169
|
-
resolver: createLspGraphResolver(managerForFile),
|
|
170
|
-
renderResult: renderReadResult,
|
|
171
|
-
});
|
|
172
166
|
api.addHandler({
|
|
173
167
|
stage: "read",
|
|
174
168
|
when: { resolvedBy: "any", contentKind: "text" },
|
|
175
169
|
handler: createSourceMappedTextReadHandler(),
|
|
176
170
|
});
|
|
177
|
-
api.describe({
|
|
178
|
-
path: "symbol:<file>#<selector> — declaration source, e.g. symbol:src/catalog.ts#Catalog/find. graph:<file> — top-level declarations, references and calls; members include selectors. graph:<file>#<selector> — references and incoming/outgoing calls for that declaration or member.",
|
|
179
|
-
});
|
|
180
171
|
},
|
|
181
172
|
} satisfies ReadPlugin;
|
|
182
173
|
|
|
@@ -217,12 +208,19 @@ export async function registerLspWithOwner(
|
|
|
217
208
|
for (const operation of ["copy", "move", "delete", "replace"]) {
|
|
218
209
|
api
|
|
219
210
|
.tool(operation)
|
|
220
|
-
.
|
|
221
|
-
"
|
|
211
|
+
.describeField(
|
|
212
|
+
"path",
|
|
213
|
+
"symbol:<file>#<selector> selects one declaration without start; imports and references are not updated." +
|
|
222
214
|
(operation === "replace"
|
|
223
|
-
? "
|
|
215
|
+
? " symbol:<file>#<selector>#name renames it, with the new name in text."
|
|
224
216
|
: ""),
|
|
225
217
|
);
|
|
218
|
+
if (operation === "replace")
|
|
219
|
+
api
|
|
220
|
+
.tool(operation)
|
|
221
|
+
.describe(
|
|
222
|
+
"Use replace with a symbol:…#name path to rename a symbol across the project.",
|
|
223
|
+
);
|
|
226
224
|
api.tool(operation).addHandler({
|
|
227
225
|
stage: "text-pre-edit",
|
|
228
226
|
async handler(state) {
|
|
@@ -264,11 +262,7 @@ export async function registerLspWithOwner(
|
|
|
264
262
|
},
|
|
265
263
|
});
|
|
266
264
|
}
|
|
267
|
-
api
|
|
268
|
-
.tool("insert")
|
|
269
|
-
.describe(
|
|
270
|
-
"Symbol targets are unsupported for insert. Read the declaration and select an ordinary text line anchor instead.",
|
|
271
|
-
);
|
|
265
|
+
api.tool("insert").describeField("anchor", "Symbol targets are not supported.");
|
|
272
266
|
api.tool("insert").addHandler({
|
|
273
267
|
stage: "text-pre-edit",
|
|
274
268
|
handler(state) {
|
|
@@ -279,7 +273,7 @@ export async function registerLspWithOwner(
|
|
|
279
273
|
)
|
|
280
274
|
)
|
|
281
275
|
throw new Error(
|
|
282
|
-
"Semantic insert is not supported.
|
|
276
|
+
"Semantic insert is not supported. Get the declaration with lsp_search and use an explicit text line anchor instead.",
|
|
283
277
|
);
|
|
284
278
|
return state;
|
|
285
279
|
},
|
|
@@ -291,16 +285,16 @@ export async function registerLspWithOwner(
|
|
|
291
285
|
connectSearchPlugin(pi, {
|
|
292
286
|
protocol: SEARCH_PROTOCOL,
|
|
293
287
|
apiVersion: SEARCH_API_VERSION,
|
|
294
|
-
id: "
|
|
288
|
+
id: "lsp-search",
|
|
295
289
|
setup(api): void {
|
|
296
|
-
|
|
290
|
+
// Not registered with search: lsp_search runs it through the shared execution core.
|
|
291
|
+
resolveSearchRuntime({
|
|
292
|
+
api,
|
|
297
293
|
resolver: createLspSearchResolver(managerForFile, api.registerSelection),
|
|
298
294
|
});
|
|
299
|
-
api.describe(
|
|
300
|
-
'Use `symbols:<query>` to locate named workspace declarations and references through configured language servers when the file is unknown. Results contain exact source targets, roles, and originating symbols. Default search stays within path. Use navigation: "references" explicitly to follow symbols represented inside path to references outside it, within the workspace.',
|
|
301
|
-
);
|
|
302
295
|
},
|
|
303
296
|
}),
|
|
297
|
+
registerLspSearchTool(pi, searchRuntime),
|
|
304
298
|
]);
|
|
305
299
|
}
|
|
306
300
|
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-lsp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.
|
|
7
|
-
"pi-agent-
|
|
8
|
-
"pi-agent-
|
|
9
|
-
"pi-agent-
|
|
10
|
-
"pi-agent-
|
|
11
|
-
"pi-agent-
|
|
12
|
-
"pi-agent-text
|
|
6
|
+
"pi-agent-doctor": "0.9.0",
|
|
7
|
+
"pi-agent-documentation": "0.9.0",
|
|
8
|
+
"pi-agent-invariant": "0.9.0",
|
|
9
|
+
"pi-agent-read": "0.9.0",
|
|
10
|
+
"pi-agent-resource": "0.9.0",
|
|
11
|
+
"pi-agent-search": "0.9.0",
|
|
12
|
+
"pi-agent-text": "0.9.0",
|
|
13
|
+
"pi-agent-text-editor": "0.9.0",
|
|
14
|
+
"pi-agent-tool-call-interception": "0.9.0",
|
|
15
|
+
"pi-agent-tool-ui": "0.9.0"
|
|
13
16
|
},
|
|
14
17
|
"pi": {
|
|
15
18
|
"extensions": [
|
|
16
|
-
"./runtime/entry-
|
|
19
|
+
"./runtime/entry-43.js"
|
|
17
20
|
]
|
|
18
21
|
},
|
|
19
22
|
"peerDependencies": {
|
|
20
23
|
"@earendil-works/pi-coding-agent": "*",
|
|
21
|
-
"pi-agent-ide": "0.
|
|
24
|
+
"pi-agent-ide": "0.9.0",
|
|
25
|
+
"typebox": "*"
|
|
22
26
|
},
|
|
23
27
|
"peerDependenciesMeta": {
|
|
24
28
|
"pi-agent-ide": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseCodeViewReference, resolveCodeViewPath } from "pi-agent-ide/api/code-view";
|
|
2
2
|
import type { TextTargetResolver } from "pi-agent-text";
|
|
3
3
|
import { resolveLspDeclaration } from "./lsp/code-views.js";
|
|
4
|
-
import type { LspManagerProvider } from "./
|
|
4
|
+
import type { LspManagerProvider } from "./manager-provider.js";
|
|
5
5
|
|
|
6
6
|
/** Resolve a live symbol reference to its exact declaration, not matching identifier words. */
|
|
7
7
|
export function createDeclarationTargets(managerFor: LspManagerProvider): TextTargetResolver {
|