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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Agent-native IDE extension for Pi Coding Agent with guarded editing, search, LSP, terminals, debugging, and observability",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-ide",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"text-editor",
|
|
59
59
|
"transactional-editing",
|
|
60
60
|
"typescript",
|
|
61
|
-
"vision",
|
|
62
61
|
"web-reader",
|
|
63
62
|
"web-scraping",
|
|
64
63
|
"windows",
|
|
@@ -95,89 +94,93 @@
|
|
|
95
94
|
"#scripts/*": "./scripts/*"
|
|
96
95
|
},
|
|
97
96
|
"exports": {
|
|
97
|
+
"./api/standalone": {
|
|
98
|
+
"types": "./src/api/standalone.ts",
|
|
99
|
+
"default": "./dist/entry-0.js"
|
|
100
|
+
},
|
|
98
101
|
"./api/settings": {
|
|
99
102
|
"types": "./src/api/settings.ts",
|
|
100
|
-
"default": "./dist/entry-
|
|
103
|
+
"default": "./dist/entry-1.js"
|
|
101
104
|
},
|
|
102
105
|
"./api/approval": {
|
|
103
106
|
"types": "./src/api/approval.ts",
|
|
104
|
-
"default": "./dist/entry-
|
|
107
|
+
"default": "./dist/entry-2.js"
|
|
105
108
|
},
|
|
106
109
|
"./api/code-view": {
|
|
107
110
|
"types": "./src/api/code-view.ts",
|
|
108
|
-
"default": "./dist/entry-
|
|
111
|
+
"default": "./dist/entry-3.js"
|
|
109
112
|
},
|
|
110
113
|
"./api/connect-plugin": {
|
|
111
114
|
"types": "./src/api/connect-plugin.ts",
|
|
112
|
-
"default": "./dist/entry-
|
|
115
|
+
"default": "./dist/entry-4.js"
|
|
113
116
|
},
|
|
114
117
|
"./api/plugin-protocol": {
|
|
115
118
|
"types": "./src/api/plugin-protocol.ts",
|
|
116
|
-
"default": "./dist/entry-
|
|
119
|
+
"default": "./dist/entry-5.js"
|
|
117
120
|
},
|
|
118
121
|
"./api/toolchain": {
|
|
119
122
|
"types": "./src/api/toolchain.ts",
|
|
120
|
-
"default": "./dist/entry-
|
|
123
|
+
"default": "./dist/entry-6.js"
|
|
121
124
|
},
|
|
122
125
|
"./api/tool-config": {
|
|
123
126
|
"types": "./src/api/tool-config.ts",
|
|
124
|
-
"default": "./dist/entry-
|
|
127
|
+
"default": "./dist/entry-7.js"
|
|
125
128
|
},
|
|
126
129
|
"./api/tool-catalog": {
|
|
127
130
|
"types": "./src/api/tool-catalog.ts",
|
|
128
|
-
"default": "./dist/entry-
|
|
131
|
+
"default": "./dist/entry-8.js"
|
|
129
132
|
},
|
|
130
133
|
"./api/tips": {
|
|
131
134
|
"types": "./src/api/tips.ts",
|
|
132
|
-
"default": "./dist/entry-
|
|
135
|
+
"default": "./dist/entry-9.js"
|
|
133
136
|
},
|
|
134
137
|
"./api/connect-tip-provider": {
|
|
135
138
|
"types": "./src/api/connect-tip-provider.ts",
|
|
136
|
-
"default": "./dist/entry-
|
|
139
|
+
"default": "./dist/entry-10.js"
|
|
137
140
|
},
|
|
138
141
|
"./api/doctor": {
|
|
139
142
|
"types": "./src/api/doctor.ts",
|
|
140
|
-
"default": "./dist/entry-
|
|
143
|
+
"default": "./dist/entry-11.js"
|
|
141
144
|
},
|
|
142
145
|
"./api/documentation": {
|
|
143
146
|
"types": "./src/api/documentation.ts",
|
|
144
|
-
"default": "./dist/entry-
|
|
147
|
+
"default": "./dist/entry-12.js"
|
|
145
148
|
},
|
|
146
149
|
"./api/connect-doctor-plugin": {
|
|
147
150
|
"types": "./src/api/connect-doctor-plugin.ts",
|
|
148
|
-
"default": "./dist/entry-
|
|
151
|
+
"default": "./dist/entry-13.js"
|
|
149
152
|
},
|
|
150
153
|
"./api/hooks": {
|
|
151
154
|
"types": "./src/api/hooks.ts",
|
|
152
|
-
"default": "./dist/entry-
|
|
155
|
+
"default": "./dist/entry-14.js"
|
|
153
156
|
},
|
|
154
157
|
"./api/path-identity": {
|
|
155
158
|
"types": "./src/api/path-identity.ts",
|
|
156
|
-
"default": "./dist/entry-
|
|
159
|
+
"default": "./dist/entry-15.js"
|
|
157
160
|
},
|
|
158
161
|
"./api/read": {
|
|
159
162
|
"types": "./src/api/read.ts",
|
|
160
|
-
"default": "./dist/entry-
|
|
163
|
+
"default": "./dist/entry-16.js"
|
|
161
164
|
},
|
|
162
165
|
"./api/content": {
|
|
163
166
|
"types": "./src/api/content.ts",
|
|
164
|
-
"default": "./dist/entry-
|
|
167
|
+
"default": "./dist/entry-17.js"
|
|
165
168
|
},
|
|
166
169
|
"./api/resource": {
|
|
167
170
|
"types": "./src/api/resource.ts",
|
|
168
|
-
"default": "./dist/entry-
|
|
171
|
+
"default": "./dist/entry-18.js"
|
|
169
172
|
},
|
|
170
173
|
"./api/search": {
|
|
171
174
|
"types": "./src/api/search.ts",
|
|
172
|
-
"default": "./dist/entry-
|
|
175
|
+
"default": "./dist/entry-19.js"
|
|
173
176
|
},
|
|
174
177
|
"./api/text": {
|
|
175
178
|
"types": "./src/api/text.ts",
|
|
176
|
-
"default": "./dist/entry-
|
|
179
|
+
"default": "./dist/entry-20.js"
|
|
177
180
|
},
|
|
178
181
|
"./api/text-editor": {
|
|
179
182
|
"types": "./src/api/text-editor.ts",
|
|
180
|
-
"default": "./dist/entry-
|
|
183
|
+
"default": "./dist/entry-21.js"
|
|
181
184
|
}
|
|
182
185
|
},
|
|
183
186
|
"dependencies": {
|
|
@@ -203,6 +206,7 @@
|
|
|
203
206
|
"@napi-rs/canvas": "^1.0.9",
|
|
204
207
|
"@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
|
|
205
208
|
"@tree-sitter-grammars/tree-sitter-yaml": "^0.7.1",
|
|
209
|
+
"@types/fs-extra": "^11.0.4",
|
|
206
210
|
"@xterm/headless": "^6.0.0",
|
|
207
211
|
"cross-spawn": "^7.0.6",
|
|
208
212
|
"defuddle": "^0.19.1",
|
|
@@ -211,44 +215,43 @@
|
|
|
211
215
|
"fs-extra": "^11.4.0",
|
|
212
216
|
"linkedom": "^0.18.12",
|
|
213
217
|
"node-pty": "^1.1.0",
|
|
214
|
-
"node-screenshots": "0.2.8",
|
|
215
218
|
"oxfmt": "0.64.0",
|
|
216
219
|
"partial-json": "^0.1.7",
|
|
217
220
|
"pdfjs-dist": "^6.2.108",
|
|
218
|
-
"pi-agent-doctor": "0.
|
|
219
|
-
"pi-agent-documentation": "0.
|
|
220
|
-
"pi-agent-filesystem": "0.
|
|
221
|
-
"pi-agent-filesystem-image": "0.
|
|
222
|
-
"pi-agent-filesystem-jq": "0.
|
|
223
|
-
"pi-agent-filesystem-pdf": "0.
|
|
224
|
-
"pi-agent-filesystem-text": "0.
|
|
225
|
-
"pi-agent-ide-ast": "0.
|
|
226
|
-
"pi-agent-ide-changes": "0.
|
|
227
|
-
"pi-agent-ide-formatter": "0.
|
|
228
|
-
"pi-agent-ide-languages": "0.
|
|
229
|
-
"pi-agent-ide-lint": "0.
|
|
230
|
-
"pi-agent-ide-lsp": "0.
|
|
231
|
-
"pi-agent-image": "0.
|
|
232
|
-
"pi-agent-invariant": "0.
|
|
233
|
-
"pi-agent-pdf": "0.
|
|
234
|
-
"pi-agent-read": "0.
|
|
235
|
-
"pi-agent-resource": "0.
|
|
236
|
-
"pi-agent-search": "0.
|
|
237
|
-
"pi-agent-search-text": "0.
|
|
238
|
-
"pi-agent-text": "0.
|
|
239
|
-
"pi-agent-text-anchor-constant": "0.
|
|
240
|
-
"pi-agent-text-anchor-exact": "0.
|
|
241
|
-
"pi-agent-text-anchor-line-hash": "0.
|
|
242
|
-
"pi-agent-text-editor": "0.
|
|
243
|
-
"pi-agent-text-editor-renderer": "0.
|
|
244
|
-
"pi-agent-text-editor-stale-anchor": "0.
|
|
245
|
-
"pi-agent-tool-call-interception": "0.
|
|
246
|
-
"pi-agent-tool-ui": "0.
|
|
247
|
-
"pi-agent-web": "0.
|
|
248
|
-
"pi-agent-web-html": "0.
|
|
249
|
-
"pi-agent-web-image": "0.
|
|
250
|
-
"pi-agent-web-pdf": "0.
|
|
251
|
-
"pi-agent-web-text": "0.
|
|
221
|
+
"pi-agent-doctor": "0.9.0",
|
|
222
|
+
"pi-agent-documentation": "0.9.0",
|
|
223
|
+
"pi-agent-filesystem": "0.9.0",
|
|
224
|
+
"pi-agent-filesystem-image": "0.9.0",
|
|
225
|
+
"pi-agent-filesystem-jq": "0.9.0",
|
|
226
|
+
"pi-agent-filesystem-pdf": "0.9.0",
|
|
227
|
+
"pi-agent-filesystem-text": "0.9.0",
|
|
228
|
+
"pi-agent-ide-ast": "0.9.0",
|
|
229
|
+
"pi-agent-ide-changes": "0.9.0",
|
|
230
|
+
"pi-agent-ide-formatter": "0.9.0",
|
|
231
|
+
"pi-agent-ide-languages": "0.9.0",
|
|
232
|
+
"pi-agent-ide-lint": "0.9.0",
|
|
233
|
+
"pi-agent-ide-lsp": "0.9.0",
|
|
234
|
+
"pi-agent-image": "0.9.0",
|
|
235
|
+
"pi-agent-invariant": "0.9.0",
|
|
236
|
+
"pi-agent-pdf": "0.9.0",
|
|
237
|
+
"pi-agent-read": "0.9.0",
|
|
238
|
+
"pi-agent-resource": "0.9.0",
|
|
239
|
+
"pi-agent-search": "0.9.0",
|
|
240
|
+
"pi-agent-search-text": "0.9.0",
|
|
241
|
+
"pi-agent-text": "0.9.0",
|
|
242
|
+
"pi-agent-text-anchor-constant": "0.9.0",
|
|
243
|
+
"pi-agent-text-anchor-exact": "0.9.0",
|
|
244
|
+
"pi-agent-text-anchor-line-hash": "0.9.0",
|
|
245
|
+
"pi-agent-text-editor": "0.9.0",
|
|
246
|
+
"pi-agent-text-editor-renderer": "0.9.0",
|
|
247
|
+
"pi-agent-text-editor-stale-anchor": "0.9.0",
|
|
248
|
+
"pi-agent-tool-call-interception": "0.9.0",
|
|
249
|
+
"pi-agent-tool-ui": "0.9.0",
|
|
250
|
+
"pi-agent-web": "0.9.0",
|
|
251
|
+
"pi-agent-web-html": "0.9.0",
|
|
252
|
+
"pi-agent-web-image": "0.9.0",
|
|
253
|
+
"pi-agent-web-pdf": "0.9.0",
|
|
254
|
+
"pi-agent-web-text": "0.9.0",
|
|
252
255
|
"playwright-core": "^1.62.1",
|
|
253
256
|
"tree-sitter-cpp": "^0.23.4",
|
|
254
257
|
"tree-sitter-javascript": "^0.25.0",
|
package/src/api/approval.ts
CHANGED
package/src/api/read.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Isolated, provider-owned resource tools without enabling the full IDE extension. */
|
|
2
|
+
export {
|
|
3
|
+
createStandaloneResourceHost,
|
|
4
|
+
type StandaloneResourceHost,
|
|
5
|
+
type StandaloneResourceHostOptions,
|
|
6
|
+
type StandaloneResourceTool,
|
|
7
|
+
} from "#src/standalone/resource-host.js";
|
|
@@ -15,7 +15,6 @@ import { readOwnedSshCommand } from "./owned-read-command.js";
|
|
|
15
15
|
import { startSshProcess, type SshProcessChannel } from "./ssh-channel.js";
|
|
16
16
|
import { SshBackendError } from "./ssh.js";
|
|
17
17
|
import { probeSshBrowser } from "./web-browser.js";
|
|
18
|
-
import { probeSshCapture } from "./vision-capture.js";
|
|
19
18
|
import type { SshBackendRegistry } from "./registry.js";
|
|
20
19
|
|
|
21
20
|
const probeSchema = Type.Object({
|
|
@@ -232,8 +231,6 @@ export async function createSshDoctorWorkspace(
|
|
|
232
231
|
source: root.source,
|
|
233
232
|
platform: "linux",
|
|
234
233
|
toolPaths,
|
|
235
|
-
probeCapture: (requestSignal) =>
|
|
236
|
-
probeSshCapture({ ...backend.target, workspace: root.path }, root.source, requestSignal),
|
|
237
234
|
async probeBrowser(requestSignal) {
|
|
238
235
|
await probeSshBrowser(
|
|
239
236
|
{ ...backend.target, workspace: root.path },
|
|
@@ -67,24 +67,15 @@ def main():
|
|
|
67
67
|
with open("/proc/sys/kernel/random/boot_id", encoding="utf-8") as stream:
|
|
68
68
|
boot_id = stream.read().strip()
|
|
69
69
|
clock = os.sysconf("SC_CLK_TCK")
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
raise OverflowError()
|
|
80
|
-
result.append(item)
|
|
81
|
-
except (FileNotFoundError, ProcessLookupError):
|
|
82
|
-
if selected is not None:
|
|
83
|
-
return {"error": "ENOENT"}
|
|
84
|
-
except PermissionError:
|
|
85
|
-
if selected is not None:
|
|
86
|
-
return {"error": "EACCES"}
|
|
87
|
-
return {"processes": result}
|
|
70
|
+
pid = int(sys.argv[1])
|
|
71
|
+
if pid < 1:
|
|
72
|
+
return {"error": "CAPABILITY_UNAVAILABLE"}
|
|
73
|
+
try:
|
|
74
|
+
return {"processes": [inspect(pid, boot, clock, boot_id)]}
|
|
75
|
+
except (FileNotFoundError, ProcessLookupError):
|
|
76
|
+
return {"error": "ENOENT"}
|
|
77
|
+
except PermissionError:
|
|
78
|
+
return {"error": "EACCES"}
|
|
88
79
|
|
|
89
80
|
|
|
90
81
|
try:
|
|
@@ -15,27 +15,11 @@ const rowSchema = Type.Object({
|
|
|
15
15
|
const resultSchema = Type.Object({ processes: Type.Array(rowSchema) });
|
|
16
16
|
let worker: Promise<string> | undefined;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
export interface SshProcessMetadata extends Static<typeof rowSchema> {
|
|
20
|
-
readonly host: "ssh";
|
|
21
|
-
readonly target: string;
|
|
22
|
-
readonly resource: string;
|
|
23
|
-
/** Discovery alone never grants control or window access. */
|
|
24
|
-
readonly owned: false;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** Inspect only a configured Linux target, without treating any remote PID as controller-local. */
|
|
28
|
-
export async function readSshProcessMetadata(
|
|
29
|
-
registry: SshBackendRegistry,
|
|
30
|
-
scope: string,
|
|
31
|
-
pid?: number,
|
|
32
|
-
signal?: AbortSignal,
|
|
33
|
-
): Promise<readonly SshProcessMetadata[]> {
|
|
34
|
-
return readSshProcessRows(registry, scope, pid, signal, false);
|
|
35
|
-
}
|
|
18
|
+
type SshProcessMetadata = Static<typeof rowSchema>;
|
|
36
19
|
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
20
|
+
/** Check one owned PID before cleanup; never enumerate the target's processes.
|
|
21
|
+
* Return undefined only when /proc confirms absence. Transport and permission
|
|
22
|
+
* failures do not prove process death, and must not authorize cleanup.
|
|
39
23
|
*/
|
|
40
24
|
export async function findSshProcessMetadata(
|
|
41
25
|
registry: SshBackendRegistry,
|
|
@@ -43,25 +27,14 @@ export async function findSshProcessMetadata(
|
|
|
43
27
|
pid: number,
|
|
44
28
|
signal?: AbortSignal,
|
|
45
29
|
): Promise<SshProcessMetadata | undefined> {
|
|
46
|
-
return (await readSshProcessRows(registry, scope, pid, signal, true))[0];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async function readSshProcessRows(
|
|
50
|
-
registry: SshBackendRegistry,
|
|
51
|
-
scope: string,
|
|
52
|
-
pid: number | undefined,
|
|
53
|
-
signal: AbortSignal | undefined,
|
|
54
|
-
missingIsEmpty: boolean,
|
|
55
|
-
): Promise<readonly SshProcessMetadata[]> {
|
|
56
30
|
signal?.throwIfAborted();
|
|
57
|
-
if (
|
|
58
|
-
throw new Error("Invalid process PID");
|
|
31
|
+
if (!Number.isSafeInteger(pid) || pid < 1) throw new Error("Invalid process PID");
|
|
59
32
|
const owner = registry.resolve(scope);
|
|
60
33
|
if (!owner) throw new SshBackendError("UNSUPPORTED_SOURCE", scope, "not-applied");
|
|
61
34
|
worker ??= readFile(new URL("./process-metadata-worker.py", import.meta.url), "utf8");
|
|
62
35
|
const result = await owner.backend.execute(
|
|
63
36
|
"python3",
|
|
64
|
-
["-c", await worker,
|
|
37
|
+
["-c", await worker, String(pid)],
|
|
65
38
|
owner.location.path,
|
|
66
39
|
{ signal },
|
|
67
40
|
);
|
|
@@ -75,8 +48,8 @@ async function readSshProcessRows(
|
|
|
75
48
|
throw new SshBackendError("INVALID_RESPONSE", scope, "not-applied");
|
|
76
49
|
}
|
|
77
50
|
if (typeof data === "object" && data !== null && "error" in data) {
|
|
78
|
-
if (
|
|
79
|
-
const codes = new Set(["CAPABILITY_UNAVAILABLE", "
|
|
51
|
+
if (data.error === "ENOENT") return undefined;
|
|
52
|
+
const codes = new Set(["CAPABILITY_UNAVAILABLE", "EACCES", "BYTE_LIMIT"]);
|
|
80
53
|
throw new SshBackendError(
|
|
81
54
|
typeof data.error === "string" && codes.has(data.error) ? data.error : "INVALID_RESPONSE",
|
|
82
55
|
scope,
|
|
@@ -85,15 +58,9 @@ async function readSshProcessRows(
|
|
|
85
58
|
}
|
|
86
59
|
if (
|
|
87
60
|
!Value.Check(resultSchema, data) ||
|
|
88
|
-
|
|
89
|
-
|
|
61
|
+
data.processes.length !== 1 ||
|
|
62
|
+
data.processes[0]?.pid !== pid
|
|
90
63
|
)
|
|
91
64
|
throw new SshBackendError("INVALID_RESPONSE", scope, "not-applied");
|
|
92
|
-
return data.processes
|
|
93
|
-
...item,
|
|
94
|
-
target: owner.location.target,
|
|
95
|
-
host: "ssh",
|
|
96
|
-
owned: false,
|
|
97
|
-
resource: `process:ssh://${owner.location.target}/${item.pid}`,
|
|
98
|
-
}));
|
|
65
|
+
return data.processes[0];
|
|
99
66
|
}
|
|
@@ -52,16 +52,6 @@ export async function registerSshResources(
|
|
|
52
52
|
markdown: `${guide.markdown}\n## Configured workspaces\n\n${targets.length === 0 ? "No SSH targets are configured. Follow the setup steps above." : targets.map((target) => `- \`${remoteLocation(target.id, target.workspace).source}\``).join("\n")}\n`,
|
|
53
53
|
},
|
|
54
54
|
]);
|
|
55
|
-
await connectReadPlugin(pi, {
|
|
56
|
-
protocol: READ_PROTOCOL,
|
|
57
|
-
apiVersion: READ_API_VERSION,
|
|
58
|
-
id: "ssh-guidance",
|
|
59
|
-
setup(api) {
|
|
60
|
-
api.addPromptGuideline(
|
|
61
|
-
"When the user asks to connect to or work on a remote device or environment over SSH, read docs:ssh first and follow its setup and usage steps.",
|
|
62
|
-
);
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
55
|
if (targets.length === 0) return;
|
|
66
56
|
const registry = new SshBackendRegistry(targets);
|
|
67
57
|
// Reuse installed byte converters; readable images/PDFs never become writable text.
|
|
@@ -69,7 +69,7 @@ function targetProxy(url) {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/** @param {{kind: "html" | "
|
|
72
|
+
/** @param {{kind: "html" | "probe", url: string, timeoutMs: number}} request */
|
|
73
73
|
async function render(request) {
|
|
74
74
|
const url = new URL(request.url);
|
|
75
75
|
if (
|
|
@@ -111,21 +111,6 @@ async function render(request) {
|
|
|
111
111
|
.waitForLoadState("networkidle", { timeout: Math.min(request.timeoutMs, 1500) })
|
|
112
112
|
.catch(() => {});
|
|
113
113
|
cancellation.signal.throwIfAborted();
|
|
114
|
-
if (request.kind === "image") {
|
|
115
|
-
const dimensions = await page.evaluate(() => ({
|
|
116
|
-
width: Math.max(innerWidth, document.documentElement.scrollWidth, document.body.scrollWidth),
|
|
117
|
-
height: Math.max(
|
|
118
|
-
innerHeight,
|
|
119
|
-
document.documentElement.scrollHeight,
|
|
120
|
-
document.body.scrollHeight,
|
|
121
|
-
),
|
|
122
|
-
}));
|
|
123
|
-
if (dimensions.width * dimensions.height > 16_000_000) throw new Refused("BYTE_LIMIT");
|
|
124
|
-
const png = await page.screenshot({ type: "png", fullPage: true, timeout: request.timeoutMs });
|
|
125
|
-
if (png.length > 20 * 1024 * 1024) throw new Refused("BYTE_LIMIT");
|
|
126
|
-
cancellation.signal.throwIfAborted();
|
|
127
|
-
return { png: png.toString("base64") };
|
|
128
|
-
}
|
|
129
114
|
await page.locator("body *").evaluateAll((elements) => {
|
|
130
115
|
for (const element of elements.toReversed()) {
|
|
131
116
|
const style = globalThis.getComputedStyle(element);
|
|
@@ -153,7 +138,7 @@ try {
|
|
|
153
138
|
typeof request !== "object" ||
|
|
154
139
|
request === null ||
|
|
155
140
|
!("kind" in request) ||
|
|
156
|
-
(request.kind !== "html" && request.kind !== "
|
|
141
|
+
(request.kind !== "html" && request.kind !== "probe") ||
|
|
157
142
|
!("url" in request) ||
|
|
158
143
|
typeof request.url !== "string" ||
|
|
159
144
|
!("timeoutMs" in request) ||
|
|
@@ -36,31 +36,6 @@ export async function readSshBrowserPage(
|
|
|
36
36
|
return page;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
/** Capture target web pixels for the existing image transforms; unavailable targets never capture locally. */
|
|
40
|
-
export async function captureSshBrowserImage(
|
|
41
|
-
target: SshTarget,
|
|
42
|
-
url: URL,
|
|
43
|
-
source: string,
|
|
44
|
-
signal?: AbortSignal,
|
|
45
|
-
): Promise<Uint8Array> {
|
|
46
|
-
const frame = await runBrowser(target, url, source, { signal, timeoutMs: 30_000 }, "image");
|
|
47
|
-
if (
|
|
48
|
-
typeof frame !== "object" ||
|
|
49
|
-
frame === null ||
|
|
50
|
-
!("png" in frame) ||
|
|
51
|
-
typeof frame.png !== "string"
|
|
52
|
-
)
|
|
53
|
-
throw new SshBackendError("INVALID_RESPONSE", source, "not-applied");
|
|
54
|
-
const bytes = Buffer.from(frame.png, "base64");
|
|
55
|
-
if (
|
|
56
|
-
bytes.toString("base64") !== frame.png ||
|
|
57
|
-
bytes.length > 20 * 1024 * 1024 ||
|
|
58
|
-
!bytes.subarray(0, 8).equals(Buffer.from("89504e470d0a1a0a", "hex"))
|
|
59
|
-
)
|
|
60
|
-
throw new SshBackendError("INVALID_RESPONSE", source, "not-applied");
|
|
61
|
-
return bytes;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
39
|
/** Probe the target browser using the same installed runtime and private launch path, without navigation. */
|
|
65
40
|
export async function probeSshBrowser(
|
|
66
41
|
target: SshTarget,
|
|
@@ -83,7 +58,7 @@ async function runBrowser(
|
|
|
83
58
|
url: URL,
|
|
84
59
|
source: string,
|
|
85
60
|
options: BrowserLoadOptions,
|
|
86
|
-
kind: "html" | "
|
|
61
|
+
kind: "html" | "probe",
|
|
87
62
|
): Promise<unknown> {
|
|
88
63
|
options.signal?.throwIfAborted();
|
|
89
64
|
worker ??= readFile(new URL("./web-browser-worker.mjs", import.meta.url), "utf8");
|
|
@@ -13,7 +13,14 @@ export const BUILTIN_EXTENSIONS: readonly BuiltinExtension[] = [
|
|
|
13
13
|
"ide.doctor",
|
|
14
14
|
]),
|
|
15
15
|
builtin("read.core", () => import("#src/extensions/pi-agent-read/index.js")),
|
|
16
|
-
builtin(
|
|
16
|
+
builtin(
|
|
17
|
+
"ide.documentation",
|
|
18
|
+
async () => {
|
|
19
|
+
const { default: register } = await import("#src/documentation/extension.js");
|
|
20
|
+
return { default: (pi) => register(pi) };
|
|
21
|
+
},
|
|
22
|
+
["read.core"],
|
|
23
|
+
),
|
|
17
24
|
builtin(
|
|
18
25
|
"read.filesystem",
|
|
19
26
|
() => import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.js"),
|
|
@@ -125,11 +132,6 @@ export const BUILTIN_EXTENSIONS: readonly BuiltinExtension[] = [
|
|
|
125
132
|
"search.core",
|
|
126
133
|
]),
|
|
127
134
|
builtin("ide.processes", () => import("#src/plugins/pi-agent-ide-processes/index.js")),
|
|
128
|
-
builtin("ide.vision", () => import("#src/backend/vision-registration.js"), [
|
|
129
|
-
"ide.processes",
|
|
130
|
-
"read.core",
|
|
131
|
-
"search.core",
|
|
132
|
-
]),
|
|
133
135
|
builtin("ide.debugger", () => import("#src/backend/debugger-registration.js"), [
|
|
134
136
|
"ide.processes",
|
|
135
137
|
"read.core",
|
|
@@ -59,7 +59,7 @@ export function registerIdeAliasCompatibility(
|
|
|
59
59
|
const definition = native === undefined ? undefined : definitions.get(native);
|
|
60
60
|
if (!definition) continue;
|
|
61
61
|
const descriptors = Object.getOwnPropertyDescriptors(definition);
|
|
62
|
-
// Preserve live metadata getters and outputSchema
|
|
62
|
+
// Preserve live metadata getters and outputSchema without presenting a second IDE contract.
|
|
63
63
|
delete descriptors.namespace;
|
|
64
64
|
descriptors.name = {
|
|
65
65
|
value: alias.name,
|
|
@@ -68,7 +68,23 @@ export function registerIdeAliasCompatibility(
|
|
|
68
68
|
writable: true,
|
|
69
69
|
};
|
|
70
70
|
descriptors.exposure = {
|
|
71
|
-
|
|
71
|
+
// Deferred aliases remain callable by scripts without duplicating the Codemode catalogue.
|
|
72
|
+
value: alias.exposure === "model-only" ? alias.exposure : "deferred",
|
|
73
|
+
enumerable: true,
|
|
74
|
+
configurable: true,
|
|
75
|
+
writable: true,
|
|
76
|
+
};
|
|
77
|
+
const prepareLoadout: ToolDefinition["prepareLoadout"] = (loadout) => {
|
|
78
|
+
const changes = definition.prepareLoadout?.(loadout);
|
|
79
|
+
if (!loadout.declared.some((tool) => tool.name === definition.name)) return changes;
|
|
80
|
+
// Keep the connector's active route and wire remapping, but declare the source only once.
|
|
81
|
+
return {
|
|
82
|
+
...changes,
|
|
83
|
+
hiddenDeclarations: [...(changes?.hiddenDeclarations ?? []), alias.name],
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
descriptors.prepareLoadout = {
|
|
87
|
+
value: prepareLoadout,
|
|
72
88
|
enumerable: true,
|
|
73
89
|
configurable: true,
|
|
74
90
|
writable: true,
|
|
@@ -15,10 +15,6 @@ export const moduleLabels = {
|
|
|
15
15
|
"Agent IDE processes",
|
|
16
16
|
"Show active terminal and debugger sessions in one shared process surface.",
|
|
17
17
|
],
|
|
18
|
-
"ide.vision": [
|
|
19
|
-
"Agent vision",
|
|
20
|
-
"Inspect process metadata and capture supported windows and web pages as images.",
|
|
21
|
-
],
|
|
22
18
|
"ide.debugger": [
|
|
23
19
|
"Debugger sessions",
|
|
24
20
|
"Debug local programs through addressable DAP sessions and anchored breakpoints.",
|
|
@@ -75,40 +75,4 @@ export const AGENT_IDE_PREFERENCES: readonly AgentIdePreference[] = [
|
|
|
75
75
|
{ value: "off", label: "Off" },
|
|
76
76
|
],
|
|
77
77
|
},
|
|
78
|
-
{
|
|
79
|
-
kind: "text",
|
|
80
|
-
id: "vision.sequenceDurationSeconds",
|
|
81
|
-
name: "Vision sequence duration",
|
|
82
|
-
description:
|
|
83
|
-
"Default sequence duration in seconds. Requests may override it, up to 10 seconds.",
|
|
84
|
-
default: "2",
|
|
85
|
-
group: "features",
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
kind: "text",
|
|
89
|
-
id: "vision.sequenceIntervalSeconds",
|
|
90
|
-
name: "Vision sequence interval",
|
|
91
|
-
description:
|
|
92
|
-
"Default seconds between sequence frames. A sequence may contain at most 20 frames.",
|
|
93
|
-
default: "0.5",
|
|
94
|
-
group: "features",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
kind: "text",
|
|
98
|
-
id: "vision.imageScale",
|
|
99
|
-
name: "Vision image scale",
|
|
100
|
-
description: "Default image downscale from greater than 0 through 1.",
|
|
101
|
-
default: "0.5",
|
|
102
|
-
group: "features",
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
kind: "text",
|
|
106
|
-
id: "vision.allowedExecutables",
|
|
107
|
-
name: "Vision allowed executables",
|
|
108
|
-
description:
|
|
109
|
-
"Comma-separated executable file names that may be captured without arbitrary-window access.",
|
|
110
|
-
default: "",
|
|
111
|
-
group: "features",
|
|
112
|
-
placeholder: "Unity.exe,UnrealEditor.exe",
|
|
113
|
-
},
|
|
114
78
|
];
|
|
@@ -11,8 +11,7 @@ export function createIdeSettingsDocumentation(
|
|
|
11
11
|
): AgentDocumentation {
|
|
12
12
|
return {
|
|
13
13
|
id: "ide-settings",
|
|
14
|
-
description:
|
|
15
|
-
"Registered IDE settings, choices, defaults, configuration scopes and inheritance.",
|
|
14
|
+
description: "IDE settings and their scopes",
|
|
16
15
|
triggers: [{ tool: "read", resourcePrefixes: ["docs:ide-settings"] }],
|
|
17
16
|
get markdown() {
|
|
18
17
|
const catalog = {
|