pi-agent-ide 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +11 -5
- package/dist/chunk-266RH77Z.js +1 -0
- package/dist/chunk-2SKAED2I.js +2 -0
- package/dist/chunk-2ZMYT6ZC.js +1 -0
- package/dist/chunk-34ZQTTU2.js +2 -0
- package/dist/chunk-3H2EU7VQ.js +0 -0
- package/dist/chunk-3YK4XMWB.js +0 -0
- package/dist/chunk-476MR2QB.js +1 -0
- package/dist/chunk-4KQOODGE.js +13 -0
- package/dist/chunk-4SQQKEVD.js +16 -0
- package/dist/chunk-52BM6J6I.js +6 -0
- package/dist/chunk-5A25RATC.js +3 -0
- package/dist/chunk-5BWUVAR4.js +1 -0
- package/dist/chunk-6DN7NO7L.js +1 -0
- package/dist/chunk-6SMFVLTY.js +1 -0
- package/dist/chunk-7NDBZ4WX.js +1 -0
- package/dist/chunk-AP7Z3VWC.js +1 -0
- package/dist/chunk-BYWAG6X3.js +6 -0
- package/dist/chunk-DEP55R35.js +1 -0
- package/dist/chunk-E2RESHYR.js +1 -0
- package/dist/chunk-E4SECPF4.js +1 -0
- package/dist/chunk-EEH4WYI7.js +1 -0
- package/dist/chunk-EI7MMDWY.js +1 -0
- package/dist/chunk-ERVMDQGX.js +1 -0
- package/dist/chunk-EW2KVKCN.js +2 -0
- package/dist/chunk-F6SESI3P.js +4 -0
- package/dist/chunk-GTK5AREE.js +2 -0
- package/dist/chunk-HOBTFFQR.js +1 -0
- package/dist/chunk-IMVCVPMP.js +3 -0
- package/dist/chunk-IOCABSRL.js +1 -0
- package/dist/chunk-JASLOB2X.js +1 -0
- package/dist/chunk-JMVDFOTQ.js +1 -0
- package/dist/chunk-K4ZMRDEI.js +0 -0
- package/dist/chunk-KINKBPPX.js +1 -0
- package/dist/chunk-KNMWCDDK.js +7 -0
- package/dist/chunk-KP37XTDI.js +1 -0
- package/dist/chunk-KYVOMBO5.js +1 -0
- package/dist/chunk-KZBAJFCV.js +1 -0
- package/dist/chunk-LFV6G5Z3.js +1 -0
- package/dist/chunk-MB6VVVAF.js +2 -0
- package/dist/chunk-MBUXFKIW.js +3 -0
- package/dist/chunk-MTTKFJV6.js +1 -0
- package/dist/chunk-NI2NK4JU.js +1 -0
- package/dist/chunk-NNCZYO4Q.js +0 -0
- package/dist/chunk-OBWZ5RYN.js +1 -0
- package/dist/chunk-OIL6BB2S.js +33 -0
- package/dist/chunk-ORAPGW7W.js +1 -0
- package/dist/chunk-OVUYPHDE.js +1 -0
- package/dist/chunk-PETQCA7G.js +1 -0
- package/dist/chunk-PODWLGNO.js +6 -0
- package/dist/chunk-QNZVPFSP.js +3 -0
- package/dist/chunk-QW5O42QJ.js +2 -0
- package/dist/chunk-SJYDLHEF.js +108 -0
- package/dist/chunk-SSZB66C3.js +3 -0
- package/dist/chunk-STUZZM5B.js +1 -0
- package/dist/chunk-T2RPMEM2.js +1 -0
- package/dist/chunk-TG6H6EOI.js +1 -0
- package/dist/chunk-TNWYEXFG.js +1 -0
- package/dist/chunk-U4D6FT66.js +1 -0
- package/dist/chunk-VCCMVQXU.js +1 -0
- package/dist/chunk-VFBLX4TG.js +1 -0
- package/dist/chunk-VSP2QQPQ.js +2 -0
- package/dist/chunk-VUNCBASK.js +10 -0
- package/dist/chunk-VWVLBOMU.js +8 -0
- package/dist/chunk-W3XYKJ5H.js +1 -0
- package/dist/chunk-XGUAL3CA.js +1 -0
- package/dist/chunk-XNXQYPVT.js +10 -0
- package/dist/chunk-YHUTTZC6.js +2 -0
- package/dist/chunk-YPHXLAQF.js +1 -0
- package/dist/chunk-YQTLJ5ZV.js +58 -0
- package/dist/chunk-ZC65Z3CK.js +1 -0
- package/dist/entry-0.js +1 -0
- package/dist/entry-1.js +1 -0
- package/dist/entry-10.js +1 -0
- package/dist/entry-11.js +1 -0
- package/dist/entry-12.js +1 -0
- package/dist/entry-13.js +1 -0
- package/dist/entry-14.js +1 -0
- package/dist/entry-16.js +1 -0
- package/dist/entry-17.js +1 -0
- package/dist/entry-18.js +1 -0
- package/dist/entry-19.js +1 -0
- package/dist/entry-2.js +1 -0
- package/dist/entry-20.js +1 -0
- package/dist/entry-21.js +1 -0
- package/dist/entry-22.js +1 -0
- package/dist/entry-23.js +1 -0
- package/dist/entry-24.js +1 -0
- package/dist/entry-25.js +1 -0
- package/dist/entry-26.js +1 -0
- package/dist/entry-27.js +1 -0
- package/dist/entry-28.js +1 -0
- package/dist/entry-29.js +1 -0
- package/dist/entry-3.js +1 -0
- package/dist/entry-30.js +1 -0
- package/dist/entry-31.js +1 -0
- package/dist/entry-32.js +1 -0
- package/dist/entry-33.js +1 -0
- package/dist/entry-34.js +1 -0
- package/dist/entry-35.js +1 -0
- package/dist/entry-36.js +1 -0
- package/dist/entry-37.js +1 -0
- package/dist/entry-38.js +1 -0
- package/dist/entry-39.js +1 -0
- package/dist/entry-4.js +1 -0
- package/dist/entry-40.js +1 -0
- package/dist/entry-41.js +1 -0
- package/dist/entry-42.js +1 -0
- package/dist/entry-43.js +1 -0
- package/dist/entry-44.js +1 -0
- package/dist/entry-45.js +1 -0
- package/dist/entry-46.js +1 -0
- package/dist/entry-47.js +1 -0
- package/dist/entry-48.js +1 -0
- package/dist/entry-49.js +1 -0
- package/dist/entry-5.js +1 -0
- package/dist/entry-50.js +1 -0
- package/dist/entry-51.js +1 -0
- package/dist/entry-52.js +1 -0
- package/dist/entry-53.js +0 -0
- package/dist/entry-54.js +1 -0
- package/dist/entry-55.js +0 -0
- package/dist/entry-56.js +1 -0
- package/dist/entry-57.js +1 -0
- package/dist/entry-58.js +1 -0
- package/dist/entry-59.js +1 -0
- package/dist/entry-6.js +1 -0
- package/dist/entry-60.js +1 -0
- package/dist/entry-61.js +1 -0
- package/dist/entry-62.js +0 -0
- package/dist/entry-63.js +1 -0
- package/dist/entry-64.js +0 -0
- package/dist/entry-65.js +1 -0
- package/dist/entry-66.js +1 -0
- package/dist/entry-67.js +1 -0
- package/dist/entry-68.js +1 -0
- package/dist/entry-69.js +1 -0
- package/dist/entry-7.js +1 -0
- package/dist/entry-70.js +1 -0
- package/dist/entry-71.js +1 -0
- package/dist/entry-72.js +1 -0
- package/dist/entry-73.js +1 -0
- package/dist/entry-74.js +1 -0
- package/dist/entry-75.js +1 -0
- package/dist/entry-76.js +1 -0
- package/dist/entry-77.js +1 -0
- package/dist/entry-78.js +1 -0
- package/dist/entry-79.js +1 -0
- package/dist/entry-8.js +1 -0
- package/dist/entry-9.js +1 -0
- package/dist/pi-agent-ide.js +13 -0
- package/docs/architecture.md +21 -17
- package/docs/configuration.md +149 -52
- package/docs/development.md +105 -5
- package/docs/extensions.md +64 -4
- package/docs/generated/tool-catalog/css.md +7 -6
- package/docs/generated/tool-catalog/html.md +6 -5
- package/docs/generated/tool-catalog/javascript.md +8 -6
- package/docs/generated/tool-catalog/json.md +7 -6
- package/docs/generated/tool-catalog/markdown.md +6 -5
- package/docs/generated/tool-catalog/toml.md +6 -5
- package/docs/generated/tool-catalog/typescript.md +8 -6
- package/docs/generated/tool-catalog/yaml.md +6 -5
- package/docs/tools.md +88 -6
- package/node_modules/pi-agent-doctor/package.json +8 -5
- package/node_modules/pi-agent-doctor/runtime/entry-16.js +1 -0
- package/node_modules/pi-agent-doctor/runtime/entry-17.js +1 -0
- package/node_modules/pi-agent-doctor/runtime/entry-18.js +1 -0
- package/node_modules/pi-agent-doctor/runtime/entry-19.js +1 -0
- package/node_modules/pi-agent-doctor/src/executable.ts +33 -0
- package/node_modules/pi-agent-doctor/src/plugin-protocol.ts +30 -4
- package/node_modules/pi-agent-filesystem/index.ts +4 -3
- package/node_modules/pi-agent-filesystem/package.json +7 -7
- package/node_modules/pi-agent-filesystem/runtime/entry-20.js +2 -0
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-image/runtime/entry-21.js +2 -0
- package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
- package/node_modules/pi-agent-filesystem-pdf/runtime/entry-22.js +2 -0
- package/node_modules/pi-agent-filesystem-text/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/runtime/entry-23.js +2 -0
- package/node_modules/pi-agent-ide-ast/package.json +11 -10
- package/node_modules/pi-agent-ide-ast/runtime/entry-24.js +1 -0
- package/node_modules/pi-agent-ide-ast/runtime/entry-25.js +2 -0
- package/node_modules/pi-agent-ide-ast/src/api/scope.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/doctor-plugin.ts +25 -0
- package/node_modules/pi-agent-ide-ast/src/extension.ts +13 -5
- package/node_modules/pi-agent-ide-ast/src/scope-resolver.ts +6 -0
- package/node_modules/pi-agent-ide-changes/index.ts +6 -2
- package/node_modules/pi-agent-ide-changes/package.json +8 -7
- package/node_modules/pi-agent-ide-changes/runtime/entry-26.js +1 -0
- package/node_modules/pi-agent-ide-changes/runtime/entry-27.js +2 -0
- package/node_modules/pi-agent-ide-changes/src/change-anchor.ts +6 -0
- package/node_modules/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
- package/node_modules/pi-agent-ide-changes/src/changes/change-service.ts +1 -1
- package/node_modules/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -0
- package/node_modules/pi-agent-ide-changes/src/current-change-presenter.ts +1 -1
- package/node_modules/pi-agent-ide-changes/src/doctor-plugin.ts +31 -1
- package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +5 -0
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +7 -0
- package/node_modules/pi-agent-ide-formatter/package.json +4 -4
- package/node_modules/pi-agent-ide-formatter/runtime/entry-28.js +2 -0
- package/node_modules/pi-agent-ide-formatter/src/catalog.ts +34 -0
- package/node_modules/pi-agent-ide-formatter/src/doctor-plugin.ts +115 -63
- package/node_modules/pi-agent-ide-formatter/src/registry.ts +71 -28
- package/node_modules/pi-agent-ide-languages/package.json +3 -3
- package/node_modules/pi-agent-ide-languages/runtime/entry-29.js +2 -0
- package/node_modules/pi-agent-ide-lint/index.ts +30 -155
- package/node_modules/pi-agent-ide-lint/package.json +8 -7
- package/node_modules/pi-agent-ide-lint/runtime/entry-30.js +2 -0
- package/node_modules/pi-agent-ide-lint/src/catalog.ts +14 -2
- package/node_modules/pi-agent-ide-lint/src/command-linter.ts +60 -4
- package/node_modules/pi-agent-ide-lint/src/diagnostics.ts +3 -1
- package/node_modules/pi-agent-ide-lint/src/doctor-plugin.ts +115 -64
- package/node_modules/pi-agent-ide-lint/src/registry.ts +72 -27
- package/node_modules/pi-agent-ide-lsp/index.ts +35 -134
- package/node_modules/pi-agent-ide-lsp/package.json +9 -8
- package/node_modules/pi-agent-ide-lsp/runtime/entry-31.js +2 -0
- package/node_modules/pi-agent-ide-lsp/src/code-view-resolvers.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +113 -0
- package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +108 -53
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +94 -27
- package/node_modules/pi-agent-ide-lsp/src/lsp/code-views.ts +2 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +76 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostics.ts +137 -144
- package/node_modules/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +2 -2
- package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +9 -32
- package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +86 -50
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +1 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/types.ts +8 -6
- package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +5 -5
- package/node_modules/pi-agent-image/package.json +3 -3
- package/node_modules/pi-agent-image/runtime/entry-32.js +1 -0
- package/node_modules/pi-agent-invariant/package.json +12 -0
- package/node_modules/pi-agent-invariant/runtime/entry-33.js +1 -0
- package/node_modules/pi-agent-pdf/package.json +3 -3
- package/node_modules/pi-agent-pdf/runtime/entry-34.js +1 -0
- package/node_modules/pi-agent-pdf/src/pdf-converter.ts +3 -2
- package/node_modules/pi-agent-read/package.json +11 -9
- package/node_modules/pi-agent-read/runtime/entry-35.js +1 -0
- package/node_modules/pi-agent-read/runtime/entry-36.js +1 -0
- package/node_modules/pi-agent-read/runtime/entry-37.js +1 -0
- package/node_modules/pi-agent-read/runtime/entry-38.js +1 -0
- package/node_modules/pi-agent-read/runtime/entry-39.js +2 -0
- package/node_modules/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-read/src/api/tools/read.ts +113 -2
- package/node_modules/pi-agent-read/src/core/extension.ts +19 -0
- package/node_modules/pi-agent-read/src/core/read-core.ts +85 -13
- package/node_modules/pi-agent-read/src/core/tools/read/output-truncation.ts +26 -10
- package/node_modules/pi-agent-read/src/core/tools/read/persisted-result.ts +72 -0
- package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +102 -12
- package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +27 -3
- package/node_modules/pi-agent-read/src/core/tools/read/views.ts +29 -0
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +532 -46
- package/node_modules/pi-agent-resource/package.json +5 -2
- package/node_modules/pi-agent-resource/runtime/entry-40.js +1 -0
- package/node_modules/pi-agent-resource/src/content-conversion/content-converter.ts +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/content-host.ts +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/content-runner.ts +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/validation.ts +1 -1
- package/node_modules/pi-agent-search/package.json +7 -6
- package/node_modules/pi-agent-search/runtime/entry-41.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-42.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-43.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-44.js +2 -0
- package/node_modules/pi-agent-search/src/api/search.ts +4 -0
- package/node_modules/pi-agent-search/src/core/extension.ts +99 -27
- package/node_modules/pi-agent-search/src/core/search-config.ts +98 -0
- package/node_modules/pi-agent-search/src/core/search-core.ts +32 -28
- package/node_modules/pi-agent-search/src/core/search-timeout.ts +54 -0
- package/node_modules/pi-agent-search-text/index.ts +53 -3
- package/node_modules/pi-agent-search-text/package.json +9 -9
- package/node_modules/pi-agent-search-text/runtime/entry-45.js +2 -0
- package/node_modules/pi-agent-search-text/runtime/entry-46.js +1 -0
- package/node_modules/pi-agent-search-text/src/doctor-plugin.ts +20 -1
- package/node_modules/pi-agent-search-text/src/persisted-result.ts +56 -0
- package/node_modules/pi-agent-search-text/src/resolvers.ts +36 -34
- package/node_modules/pi-agent-search-text/src/search-query.ts +254 -71
- package/node_modules/pi-agent-search-text/src/search-recipe.ts +68 -0
- package/node_modules/pi-agent-search-text/src/search-renderer.ts +71 -117
- package/node_modules/pi-agent-search-text/src/search-result.ts +1 -0
- package/node_modules/pi-agent-search-text/src/search-session.ts +276 -110
- package/node_modules/pi-agent-text/package.json +6 -3
- package/node_modules/pi-agent-text/runtime/entry-47.js +1 -0
- package/node_modules/pi-agent-text/src/index.ts +23 -0
- package/node_modules/pi-agent-text/src/stored-text.ts +14 -0
- package/node_modules/pi-agent-text/src/text-anchor.ts +160 -16
- package/node_modules/pi-agent-text/src/text-document.ts +26 -5
- package/node_modules/pi-agent-text/src/text-target.ts +105 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +7 -4
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-48.js +2 -0
- package/node_modules/pi-agent-text-anchor-constant/src/resolver.ts +6 -0
- package/node_modules/pi-agent-text-anchor-exact/index.ts +34 -0
- package/node_modules/pi-agent-text-anchor-exact/package.json +27 -0
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-49.js +1 -0
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-50.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/src/anchor.ts +230 -0
- package/node_modules/pi-agent-text-anchor-exact/src/config.ts +159 -0
- package/node_modules/pi-agent-text-anchor-exact/src/fuzzy-worker.ts +100 -0
- package/node_modules/pi-agent-text-anchor-exact/src/recovery.ts +151 -0
- package/node_modules/pi-agent-text-anchor-line-hash/index.ts +8 -2
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +10 -6
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-51.js +1 -0
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-52.js +2 -0
- package/node_modules/pi-agent-text-anchor-line-hash/src/anchor.ts +32 -1
- package/node_modules/pi-agent-text-anchor-line-hash/src/read-handler.ts +20 -12
- package/node_modules/pi-agent-text-editor/package.json +22 -21
- package/node_modules/pi-agent-text-editor/runtime/entry-53.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-54.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-55.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-56.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-57.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-58.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-59.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-60.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-61.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-62.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-63.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-64.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-65.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-66.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-67.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-68.js +2 -0
- package/node_modules/pi-agent-text-editor/src/api/anchor-inspection.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +1 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +38 -0
- package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +30 -15
- package/node_modules/pi-agent-text-editor/src/api/text-selection-anchor.ts +10 -13
- package/node_modules/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +12 -5
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +15 -1
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +14 -10
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/diff.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +3 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +19 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +64 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/read-fragment-resolver.ts +83 -0
- package/node_modules/pi-agent-text-editor/src/core/text-anchor-registry.ts +96 -8
- package/node_modules/pi-agent-text-editor/src/core/text-change-engine.ts +4 -1
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +194 -35
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +43 -13
- package/node_modules/pi-agent-text-editor/src/core/text-editor-config.ts +95 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +75 -5
- package/node_modules/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +7 -0
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +541 -130
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +5 -9
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/rendering.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +228 -6
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +50 -70
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +25 -26
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +30 -21
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +57 -71
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +30 -27
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -0
- package/node_modules/pi-agent-text-editor-argument-order/package.json +3 -3
- package/node_modules/pi-agent-text-editor-argument-order/runtime/entry-69.js +2 -0
- package/node_modules/pi-agent-text-editor-overwrite/index.ts +1 -1
- package/node_modules/pi-agent-text-editor-overwrite/package.json +4 -3
- package/node_modules/pi-agent-text-editor-overwrite/runtime/entry-70.js +2 -0
- package/node_modules/pi-agent-text-editor-renderer/index.ts +21 -1
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -3
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-71.js +2 -0
- package/node_modules/pi-agent-text-editor-renderer/src/animation-pressure.ts +50 -0
- package/node_modules/pi-agent-text-editor-renderer/src/config.ts +73 -0
- package/node_modules/pi-agent-text-editor-renderer/src/diff-model.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/src/diff-renderer.ts +77 -22
- package/node_modules/pi-agent-text-editor-renderer/src/diff-theme.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +140 -24
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-projection.ts +274 -43
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-result.ts +33 -6
- package/node_modules/pi-agent-text-editor-renderer/src/persisted-result.ts +47 -0
- package/node_modules/pi-agent-text-editor-renderer/src/render-resource.ts +7 -0
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +265 -105
- package/node_modules/pi-agent-text-editor-renderer/src/typing-interpolation.ts +96 -15
- package/node_modules/pi-agent-text-editor-stale-anchor/index.ts +22 -6
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -4
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-72.js +2 -0
- package/node_modules/pi-agent-tool-call-interception/package.json +5 -2
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-73.js +1 -0
- package/node_modules/pi-agent-tool-call-interception/src/index.ts +175 -32
- package/node_modules/pi-agent-tool-ui/package.json +15 -0
- package/node_modules/pi-agent-tool-ui/runtime/entry-74.js +1 -0
- package/node_modules/pi-agent-tool-ui/src/index.ts +318 -0
- package/node_modules/pi-agent-web/index.ts +16 -6
- package/node_modules/pi-agent-web/package.json +8 -6
- package/node_modules/pi-agent-web/runtime/entry-75.js +2 -0
- package/node_modules/pi-agent-web/src/browser-loader.ts +180 -0
- package/node_modules/pi-agent-web/src/doctor-plugin.ts +41 -0
- package/node_modules/pi-agent-web/src/resolver.ts +128 -24
- package/node_modules/pi-agent-web-html/package.json +6 -3
- package/node_modules/pi-agent-web-html/runtime/entry-76.js +2 -0
- package/node_modules/pi-agent-web-html/src/extract-readable-html.ts +19 -6
- package/node_modules/pi-agent-web-image/package.json +4 -4
- package/node_modules/pi-agent-web-image/runtime/entry-77.js +2 -0
- package/node_modules/pi-agent-web-pdf/package.json +4 -4
- package/node_modules/pi-agent-web-pdf/runtime/entry-78.js +2 -0
- package/node_modules/pi-agent-web-text/package.json +4 -4
- package/node_modules/pi-agent-web-text/runtime/entry-79.js +2 -0
- package/package.json +68 -54
- package/src/api/code-view.ts +4 -0
- package/src/api/connect-tip-provider.ts +49 -0
- package/src/api/plugin-protocol.ts +41 -2
- package/src/api/tips.ts +77 -0
- package/src/api/tool-config/formatters.json +215 -0
- package/src/api/tool-config/linters.json +257 -0
- package/src/api/tool-config/lsp-servers.json +275 -0
- package/src/api/tool-config.ts +217 -13
- package/src/api/toolchain.ts +0 -5
- package/src/code-view/diagnostic-view.ts +117 -26
- package/src/code-view/source-view.ts +1 -1
- package/src/composite/builtin-extensions.ts +12 -6
- package/src/composite/extensions-config.ts +137 -0
- package/src/composite/selection.ts +58 -3
- package/src/core/diagnostic-store.ts +244 -0
- package/src/core/extension.ts +40 -0
- package/src/core/ide-core.ts +48 -3
- package/src/doctor/config-writer.ts +1 -1
- package/src/doctor/core.ts +47 -0
- package/src/doctor/discovery.ts +10 -2
- package/src/doctor/extension.ts +12 -1
- package/src/doctor/inventory.ts +24 -6
- package/src/doctor/run.ts +68 -87
- package/src/doctor/tip-provider.ts +92 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +4 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-21.js +2 -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-22.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-23.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-20.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +16 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +8 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +6 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-76.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/src/extract-readable-html.ts +19 -6
- 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-image/runtime/entry-77.js +2 -0
- 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-78.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-79.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-75.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/browser-loader.ts +180 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/doctor-plugin.ts +41 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/resolver.ts +128 -24
- package/src/extensions/pi-agent-read/package.json +11 -9
- package/src/extensions/pi-agent-read/runtime/entry-35.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-36.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-37.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-38.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-39.js +2 -0
- package/src/extensions/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-read/src/api/tools/read.ts +113 -2
- package/src/extensions/pi-agent-read/src/core/extension.ts +19 -0
- package/src/extensions/pi-agent-read/src/core/read-core.ts +85 -13
- package/src/extensions/pi-agent-read/src/core/tools/read/output-truncation.ts +26 -10
- package/src/extensions/pi-agent-read/src/core/tools/read/persisted-result.ts +72 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +102 -12
- package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +27 -3
- package/src/extensions/pi-agent-read/src/core/tools/read/views.ts +29 -0
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +532 -46
- package/src/extensions/pi-agent-search/package.json +7 -6
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +53 -3
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-45.js +2 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-46.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/doctor-plugin.ts +20 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/persisted-result.ts +56 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +36 -34
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-query.ts +254 -71
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +68 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-renderer.ts +71 -117
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +276 -110
- package/src/extensions/pi-agent-search/runtime/entry-41.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-42.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-43.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-44.js +2 -0
- package/src/extensions/pi-agent-search/src/api/search.ts +4 -0
- package/src/extensions/pi-agent-search/src/core/extension.ts +99 -27
- package/src/extensions/pi-agent-search/src/core/search-config.ts +98 -0
- package/src/extensions/pi-agent-search/src/core/search-core.ts +32 -28
- package/src/extensions/pi-agent-search/src/core/search-timeout.ts +54 -0
- package/src/extensions/pi-agent-text-editor/package.json +22 -21
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +7 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-48.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/src/resolver.ts +6 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.ts +34 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +27 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-49.js +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-50.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/anchor.ts +230 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/config.ts +159 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/fuzzy-worker.ts +100 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/recovery.ts +151 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts +8 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +10 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-51.js +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-52.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/anchor.ts +32 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/read-handler.ts +20 -12
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/runtime/entry-69.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/index.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/package.json +4 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/runtime/entry-70.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +21 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-71.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/animation-pressure.ts +50 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/config.ts +73 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-model.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-renderer.ts +77 -22
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-theme.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +140 -24
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-projection.ts +274 -43
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-result.ts +33 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/persisted-result.ts +47 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/render-resource.ts +7 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +265 -105
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/typing-interpolation.ts +96 -15
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.ts +22 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-72.js +2 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-53.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-54.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-55.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-56.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-57.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-58.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-59.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-60.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-61.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-62.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-63.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-64.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-65.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-66.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-67.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-68.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/anchor-inspection.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +1 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +38 -0
- package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +30 -15
- package/src/extensions/pi-agent-text-editor/src/api/text-selection-anchor.ts +10 -13
- package/src/extensions/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +12 -5
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +15 -1
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +14 -10
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/diff.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +3 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +19 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +64 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/read-fragment-resolver.ts +83 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-anchor-registry.ts +96 -8
- package/src/extensions/pi-agent-text-editor/src/core/text-change-engine.ts +4 -1
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +194 -35
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +43 -13
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-config.ts +95 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +75 -5
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +7 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +541 -130
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +5 -9
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/rendering.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +228 -6
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +50 -70
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +25 -26
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +30 -21
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +57 -71
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +30 -27
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -0
- package/src/pi-agent-ide.ts +15 -3
- package/src/plugins/pi-agent-ide-ast/package.json +11 -10
- package/src/plugins/pi-agent-ide-ast/runtime/entry-24.js +1 -0
- package/src/plugins/pi-agent-ide-ast/runtime/entry-25.js +2 -0
- package/src/plugins/pi-agent-ide-ast/src/api/scope.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/doctor-plugin.ts +25 -0
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +13 -5
- package/src/plugins/pi-agent-ide-ast/src/scope-resolver.ts +6 -0
- package/src/plugins/pi-agent-ide-changes/index.ts +6 -2
- package/src/plugins/pi-agent-ide-changes/package.json +8 -7
- package/src/plugins/pi-agent-ide-changes/runtime/entry-26.js +1 -0
- package/src/plugins/pi-agent-ide-changes/runtime/entry-27.js +2 -0
- package/src/plugins/pi-agent-ide-changes/src/change-anchor.ts +6 -0
- package/src/plugins/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/src/changes/change-service.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -0
- package/src/plugins/pi-agent-ide-changes/src/current-change-presenter.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/src/doctor-plugin.ts +31 -1
- package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +5 -0
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +7 -0
- package/src/plugins/pi-agent-ide-diagnostics/index.ts +1 -0
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +191 -0
- package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
- package/src/plugins/pi-agent-ide-formatter/runtime/entry-28.js +2 -0
- package/src/plugins/pi-agent-ide-formatter/src/catalog.ts +34 -0
- package/src/plugins/pi-agent-ide-formatter/src/doctor-plugin.ts +115 -63
- package/src/plugins/pi-agent-ide-formatter/src/registry.ts +71 -28
- package/src/plugins/pi-agent-ide-languages/package.json +3 -3
- package/src/plugins/pi-agent-ide-languages/runtime/entry-29.js +2 -0
- package/src/plugins/pi-agent-ide-lint/index.ts +30 -155
- package/src/plugins/pi-agent-ide-lint/package.json +8 -7
- package/src/plugins/pi-agent-ide-lint/runtime/entry-30.js +2 -0
- package/src/plugins/pi-agent-ide-lint/src/catalog.ts +14 -2
- package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +60 -4
- package/src/plugins/pi-agent-ide-lint/src/diagnostics.ts +3 -1
- package/src/plugins/pi-agent-ide-lint/src/doctor-plugin.ts +115 -64
- package/src/plugins/pi-agent-ide-lint/src/registry.ts +72 -27
- package/src/plugins/pi-agent-ide-lsp/index.ts +35 -134
- package/src/plugins/pi-agent-ide-lsp/package.json +9 -8
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-31.js +2 -0
- package/src/plugins/pi-agent-ide-lsp/src/code-view-resolvers.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +113 -0
- package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +108 -53
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +94 -27
- package/src/plugins/pi-agent-ide-lsp/src/lsp/code-views.ts +2 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +76 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostics.ts +137 -144
- package/src/plugins/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +2 -2
- package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +9 -32
- package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +86 -50
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +1 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/types.ts +8 -6
- package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +5 -5
- package/src/post-edit/gate.ts +17 -141
- package/src/tips/core.ts +86 -0
- package/src/tips/extension.ts +115 -0
- package/src/tips/persistence.ts +225 -0
- package/src/tips/tip-callout.ts +77 -0
- package/src/toolchain/registry.ts +8 -23
- package/src/toolchain/types.ts +6 -74
- package/node_modules/pi-agent-search-semantic/index.ts +0 -97
- package/node_modules/pi-agent-search-semantic/package.json +0 -17
- package/node_modules/pi-agent-search-text/src/lucene-query-parser.d.ts +0 -20
- package/node_modules/pi-agent-search-web/index.ts +0 -82
- package/node_modules/pi-agent-search-web/package.json +0 -20
- package/node_modules/pi-agent-search-web/src/config.ts +0 -560
- package/node_modules/pi-agent-search-web/src/doctor-plugin.ts +0 -40
- package/node_modules/pi-agent-search-web/src/providers/duckduckgo-html.ts +0 -74
- package/node_modules/pi-agent-search-web/src/providers/endpoints.ts +0 -81
- package/node_modules/pi-agent-search-web/src/providers/request.ts +0 -427
- package/node_modules/pi-agent-search-web/src/providers/response.ts +0 -353
- package/node_modules/pi-agent-search-web/src/search-format.ts +0 -24
- package/node_modules/pi-agent-search-web/src/search.ts +0 -376
- package/node_modules/pi-agent-search-web/src/types.ts +0 -141
- package/src/composite/config.ts +0 -100
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-semantic/index.ts +0 -97
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-semantic/package.json +0 -17
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/lucene-query-parser.d.ts +0 -20
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/index.ts +0 -82
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/package.json +0 -20
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/config.ts +0 -560
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/doctor-plugin.ts +0 -40
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/duckduckgo-html.ts +0 -74
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/endpoints.ts +0 -81
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/request.ts +0 -427
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/response.ts +0 -353
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/search-format.ts +0 -24
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/search.ts +0 -376
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/types.ts +0 -141
- package/src/toolchain/gate.ts +0 -305
- /package/{src/utils/required-value.ts → node_modules/pi-agent-invariant/src/index.ts} +0 -0
package/dist/entry-19.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-VFBLX4TG.js";import"./chunk-EI7MMDWY.js";export{b as DOCTOR_API_VERSION,c as DOCTOR_CORE_READY_EVENT,d as DOCTOR_PLUGIN_REGISTER_EVENT,a as DOCTOR_PROTOCOL,e as isDoctorCoreReady,f as isDoctorPluginRegistrationRequest};
|
package/dist/entry-2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-KZBAJFCV.js";import"./chunk-EI7MMDWY.js";export{b as IDE_API_VERSION,c as IDE_CORE_READY_EVENT,d as IDE_PLUGIN_REGISTER_EVENT,a as IDE_PROTOCOL,e as isIdeCoreReady,f as isIdePlugin,g as isIdePluginRegistrationRequest};
|
package/dist/entry-20.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MB6VVVAF.js";import"./chunk-NNCZYO4Q.js";import"./chunk-SSZB66C3.js";import"./chunk-YHUTTZC6.js";import"./chunk-ORAPGW7W.js";import"./chunk-JASLOB2X.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-21.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-NI2NK4JU.js";import"./chunk-GTK5AREE.js";import"./chunk-EW2KVKCN.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-22.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-W3XYKJ5H.js";import"./chunk-PODWLGNO.js";import"./chunk-EW2KVKCN.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-23.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-XGUAL3CA.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-24.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as o}from"./chunk-QNZVPFSP.js";import"./chunk-2SKAED2I.js";import"./chunk-EI7MMDWY.js";export{o as AstScopeManager,e as parseDocument};
|
package/dist/entry-25.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-52BM6J6I.js";import"./chunk-QNZVPFSP.js";import"./chunk-U4D6FT66.js";import"./chunk-ERVMDQGX.js";import"./chunk-VFBLX4TG.js";import"./chunk-NNCZYO4Q.js";import"./chunk-SSZB66C3.js";import"./chunk-YHUTTZC6.js";import"./chunk-ORAPGW7W.js";import"./chunk-JASLOB2X.js";import"./chunk-E2RESHYR.js";import"./chunk-T2RPMEM2.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-5A25RATC.js";import"./chunk-2SKAED2I.js";import"./chunk-KINKBPPX.js";import"./chunk-7NDBZ4WX.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-26.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-DEP55R35.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as createChangeGroups,c as replaceHeadRangeInIndex,b as reverseChangeGroup};
|
package/dist/entry-27.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-E4SECPF4.js";import"./chunk-DEP55R35.js";import"./chunk-U4D6FT66.js";import"./chunk-ERVMDQGX.js";import"./chunk-VFBLX4TG.js";import"./chunk-ORAPGW7W.js";import"./chunk-JASLOB2X.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-28.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-TNWYEXFG.js";import"./chunk-ERVMDQGX.js";import"./chunk-VFBLX4TG.js";import"./chunk-OBWZ5RYN.js";import"./chunk-KZBAJFCV.js";import"./chunk-7NDBZ4WX.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-29.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-AP7Z3VWC.js";import"./chunk-ERVMDQGX.js";import"./chunk-VFBLX4TG.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-3.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-KINKBPPX.js";import"./chunk-EI7MMDWY.js";export{t as formatDiagnostic};
|
package/dist/entry-30.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-476MR2QB.js";import"./chunk-ERVMDQGX.js";import"./chunk-VFBLX4TG.js";import"./chunk-OBWZ5RYN.js";import"./chunk-KZBAJFCV.js";import"./chunk-7NDBZ4WX.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-31.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-VWVLBOMU.js";import"./chunk-ERVMDQGX.js";import"./chunk-VFBLX4TG.js";import"./chunk-NNCZYO4Q.js";import"./chunk-SSZB66C3.js";import"./chunk-YHUTTZC6.js";import"./chunk-ORAPGW7W.js";import"./chunk-JASLOB2X.js";import"./chunk-E2RESHYR.js";import"./chunk-T2RPMEM2.js";import"./chunk-5A25RATC.js";import"./chunk-2SKAED2I.js";import"./chunk-OBWZ5RYN.js";import"./chunk-KZBAJFCV.js";import"./chunk-KINKBPPX.js";import"./chunk-7NDBZ4WX.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-32.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-GTK5AREE.js";import"./chunk-EI7MMDWY.js";export{c as createImageContent,a as createImageContentConverter,b as detectSupportedImageMimeType};
|
package/dist/entry-33.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as requiredValue};
|
package/dist/entry-34.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-PODWLGNO.js";import"./chunk-EI7MMDWY.js";export{c as createPdfContent,a as createPdfContentConverter,b as isPdf};
|
package/dist/entry-35.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-ORAPGW7W.js";import"./chunk-JASLOB2X.js";import"./chunk-EI7MMDWY.js";export{a as connectReadPlugin};
|
package/dist/entry-36.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-NNCZYO4Q.js";import{c as a}from"./chunk-SSZB66C3.js";import"./chunk-YHUTTZC6.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as createReadResultRenderer};
|
package/dist/entry-37.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-JASLOB2X.js";import"./chunk-EI7MMDWY.js";export{b as READ_API_VERSION,c as READ_CORE_READY_EVENT,d as READ_PLUGIN_REGISTER_EVENT,a as READ_PROTOCOL,e as isReadCoreReady,f as isReadPlugin,g as isReadPluginRegistrationRequest};
|
package/dist/entry-38.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-2ZMYT6ZC.js";import"./chunk-EW2KVKCN.js";import"./chunk-EI7MMDWY.js";export{e as isFragmentResolverRegistration,f as isReadFragmentResolution,c as isReadHandlerRegistration,d as isReadViewRegistration,b as isResourceResolverRegistration,a as isTextTargetResolverRegistration};
|
package/dist/entry-39.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-4SQQKEVD.js";import"./chunk-VSP2QQPQ.js";import"./chunk-2ZMYT6ZC.js";import"./chunk-SSZB66C3.js";import"./chunk-YHUTTZC6.js";import"./chunk-JASLOB2X.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-4.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-7NDBZ4WX.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as TOOL_CONFIG_VERSION,l as createConfiguredProcessEnvironment,g as hasConfiguredExecutable,e as loadLayeredToolConfig,f as matchesConfiguredFile,j as parseFormattersConfig,k as parseLintersConfig,b as projectIdeConfigDirectory,c as projectIdeConfigPath,d as resolveToolConfigPaths,i as runConfiguredFormatter,h as runConfiguredProcess};
|
package/dist/entry-40.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v}from"./chunk-EW2KVKCN.js";import"./chunk-EI7MMDWY.js";export{p as CONTENT_API_VERSION,r as CONTENT_CONVERTER_REGISTER_EVENT,q as CONTENT_HOST_READY_EVENT,o as CONTENT_PROTOCOL,l as UnsupportedContentError,v as connectContentConverter,u as createContentHost,m as createContentRunner,b as isAgentContent,j as isContentConversionAttempt,h as isContentConversionContext,i as isContentConverter,k as isContentConverterRegistration,t as isContentConverterRegistrationRequest,s as isContentHostReady,g as isContentInput,f as isContentTarget,c as isResource,e as isResourceResolutionAttempt,d as isResourceResolver,a as renderContentDescription,n as targetsEqual};
|
package/dist/entry-41.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-E2RESHYR.js";import"./chunk-T2RPMEM2.js";import"./chunk-EI7MMDWY.js";export{a as connectSearchPlugin};
|
package/dist/entry-42.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-T2RPMEM2.js";import"./chunk-EI7MMDWY.js";export{b as SEARCH_API_VERSION,c as SEARCH_CORE_READY_EVENT,d as SEARCH_PLUGIN_REGISTER_EVENT,a as SEARCH_PROTOCOL,e as isSearchCoreReady,f as isSearchPlugin,g as isSearchPluginRegistrationRequest};
|
package/dist/entry-43.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-3H2EU7VQ.js";
|
package/dist/entry-44.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-BYWAG6X3.js";import"./chunk-VSP2QQPQ.js";import"./chunk-YHUTTZC6.js";import"./chunk-T2RPMEM2.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-45.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b}from"./chunk-VUNCBASK.js";import{d as a}from"./chunk-34ZQTTU2.js";import"./chunk-MTTKFJV6.js";import"./chunk-U4D6FT66.js";import"./chunk-ERVMDQGX.js";import"./chunk-VFBLX4TG.js";import"./chunk-E2RESHYR.js";import"./chunk-T2RPMEM2.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as createSearchSessionId,b as default};
|
package/dist/entry-46.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a,e as b,f as c,g as d}from"./chunk-34ZQTTU2.js";import"./chunk-MTTKFJV6.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{d as SearchSessionStore,c as allocateSearchSessionId,a as createSearchSessionId,b as createSearchSessionIdentity};
|
package/dist/entry-47.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-2SKAED2I.js";import"./chunk-EI7MMDWY.js";export{a as TextAnchor,b as attachTextAnchorRenderer,p as createTextContentConverter,m as createTextDocument,c as getTextAnchorRenderer,i as getTextSourceLine,g as isTextAnchorRecoveryOutcome,f as isTextAnchorResolutionAttempt,e as isTextAnchorResolver,k as isTextLinePresenter,l as isTextPresenterRegistration,s as isTextTargetResolutionAttempt,q as isTextualMediaType,o as renderPresentedTextDocument,h as renderPresentedTextRows,d as renderTextAnchor,n as renderTextDocument,u as restoreText,t as storeText,r as textFromAgentContent,j as withTextSourceLine};
|
package/dist/entry-48.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-5BWUVAR4.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-49.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-SJYDLHEF.js";import"./chunk-MTTKFJV6.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as createExactTextAnchorResolver,c as findExactTextMatches,b as resolveExactTextAnchor};
|
package/dist/entry-5.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-K4ZMRDEI.js";
|
package/dist/entry-50.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-HOBTFFQR.js";import"./chunk-SJYDLHEF.js";import"./chunk-MTTKFJV6.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-51.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-PETQCA7G.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{b as createLineHashAnchor,e as createLineHashAnchorResolver,c as formatLineHashAnchor,a as hashLine,d as renderLineHashLines};
|
package/dist/entry-52.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-6SMFVLTY.js";import"./chunk-PETQCA7G.js";import"./chunk-ORAPGW7W.js";import"./chunk-JASLOB2X.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-53.js
ADDED
|
File without changes
|
package/dist/entry-54.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-EI7MMDWY.js";export{a as connectTextEditorPlugin};
|
package/dist/entry-55.js
ADDED
|
File without changes
|
package/dist/entry-56.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-STUZZM5B.js";import"./chunk-EI7MMDWY.js";export{a as isTextEditHandlerRegistration};
|
package/dist/entry-57.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-EI7MMDWY.js";export{b as TEXT_EDITOR_API_VERSION,e as TEXT_EDITOR_CORE_READY_EVENT,f as TEXT_EDITOR_PLUGIN_REGISTER_EVENT,a as TEXT_EDITOR_PROTOCOL,c as TEXT_POSITION_ANCHOR_KIND,d as TEXT_SEARCH_ANCHOR_KIND,h as isResourceResolverRegistration,i as isTextAnchorResolverRegistration,j as isTextAnchorResourceResolutionAttempt,k as isTextEditorCoreReady,l as isTextEditorPlugin,m as isTextEditorPluginRegistrationRequest,g as isTextEditorToolId};
|
package/dist/entry-58.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MBUXFKIW.js";import"./chunk-EI7MMDWY.js";export{a as formatStaleAnchorMessage};
|
package/dist/entry-59.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MTTKFJV6.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as TextSelectionAnchor};
|
package/dist/entry-6.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-JMVDFOTQ.js";import"./chunk-EI7MMDWY.js";export{c as TIP_API_VERSION,d as TIP_CORE_READY_EVENT,b as TIP_PROTOCOL,e as TIP_PROVIDER_REGISTER_EVENT,a as connectTipProvider,f as isTipCoreReady,g as isTipProviderRegistrationRequest};
|
package/dist/entry-60.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-TG6H6EOI.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-EI7MMDWY.js";export{a as TEXT_EDITOR_POST_EDIT_REGISTER_EVENT,e as connectTextEditorPostEditHandler,d as isTextMutationResultContributionData,b as isTextPostEditHandlerRegistration,c as isTextPostEditHandlerRegistrationRequest};
|
package/dist/entry-61.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,d as c}from"./chunk-KNMWCDDK.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{b as FileMutationResult,a as FileRange,c as computeChangedRanges};
|
package/dist/entry-62.js
ADDED
|
File without changes
|
package/dist/entry-63.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-OVUYPHDE.js";import"./chunk-EI7MMDWY.js";export{b as assertTextMutationToolRegistration,a as isMutationAnchorValue,c as mutationSource};
|
package/dist/entry-64.js
ADDED
|
File without changes
|
package/dist/entry-65.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-YPHXLAQF.js";import"./chunk-EI7MMDWY.js";export{c as clearLastResolvedResource,b as getLastResolvedResource,a as rememberLastResolvedResource};
|
package/dist/entry-66.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b,b as c}from"./chunk-XNXQYPVT.js";import{c as a}from"./chunk-VSP2QQPQ.js";import"./chunk-YHUTTZC6.js";import"./chunk-EI7MMDWY.js";export{a as getToolCallInterception,c as registerToolCallAnnotationSink,b as registerToolCallInterceptor};
|
package/dist/entry-67.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-VCCMVQXU.js";import"./chunk-EI7MMDWY.js";export{a as isTextEditorToolRendererRegistration};
|
package/dist/entry-68.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-YQTLJ5ZV.js";import"./chunk-YPHXLAQF.js";import"./chunk-VCCMVQXU.js";import"./chunk-XNXQYPVT.js";import"./chunk-STUZZM5B.js";import"./chunk-MBUXFKIW.js";import"./chunk-TG6H6EOI.js";import"./chunk-KNMWCDDK.js";import"./chunk-OVUYPHDE.js";import"./chunk-MTTKFJV6.js";import"./chunk-VSP2QQPQ.js";import"./chunk-YHUTTZC6.js";import"./chunk-ORAPGW7W.js";import"./chunk-JASLOB2X.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-69.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-F6SESI3P.js";import"./chunk-XNXQYPVT.js";import"./chunk-VSP2QQPQ.js";import"./chunk-YHUTTZC6.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-7.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-JMVDFOTQ.js";import"./chunk-EI7MMDWY.js";export{a as connectTipProvider};
|
package/dist/entry-70.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-KYVOMBO5.js";import"./chunk-XNXQYPVT.js";import"./chunk-VSP2QQPQ.js";import"./chunk-YHUTTZC6.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{b as createOverwriteGuard,a as default};
|
package/dist/entry-71.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-OIL6BB2S.js";import"./chunk-KNMWCDDK.js";import"./chunk-VSP2QQPQ.js";import"./chunk-YHUTTZC6.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-72.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-QW5O42QJ.js";import"./chunk-YPHXLAQF.js";import"./chunk-XNXQYPVT.js";import"./chunk-MBUXFKIW.js";import"./chunk-OVUYPHDE.js";import"./chunk-VSP2QQPQ.js";import"./chunk-YHUTTZC6.js";import"./chunk-ORAPGW7W.js";import"./chunk-JASLOB2X.js";import"./chunk-EEH4WYI7.js";import"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-73.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-VSP2QQPQ.js";import"./chunk-YHUTTZC6.js";import"./chunk-EI7MMDWY.js";export{b as TOOL_CALL_INTERCEPTION_ANCHOR_RENDER_PATCH,a as TOOL_CALL_INTERCEPTION_DETAILS_KEY,f as ToolCallInterceptionRenderStore,c as getToolCallInterception,h as isToolCallAnnotation,e as withBlockedToolResult,d as withToolCallInterceptionDetails,g as withToolCallInterceptionRendering};
|
package/dist/entry-74.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-YHUTTZC6.js";import"./chunk-EI7MMDWY.js";export{b as ToolCallHeader,f as preserveEnclosingBackground,e as renderToolCallDetails,d as renderToolCallHeader,g as singleLine,a as toolBackgroundAnsi,c as toolCallHeader};
|
package/dist/entry-75.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-KP37XTDI.js";import"./chunk-U4D6FT66.js";import"./chunk-ERVMDQGX.js";import"./chunk-VFBLX4TG.js";import"./chunk-NNCZYO4Q.js";import"./chunk-SSZB66C3.js";import"./chunk-YHUTTZC6.js";import"./chunk-ORAPGW7W.js";import"./chunk-JASLOB2X.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-76.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-IMVCVPMP.js";import"./chunk-EW2KVKCN.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-77.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-LFV6G5Z3.js";import"./chunk-GTK5AREE.js";import"./chunk-EW2KVKCN.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-78.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-IOCABSRL.js";import"./chunk-PODWLGNO.js";import"./chunk-EW2KVKCN.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-79.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-6DN7NO7L.js";import"./chunk-EW2KVKCN.js";import"./chunk-2SKAED2I.js";import"./chunk-EI7MMDWY.js";export{a as default};
|
package/dist/entry-8.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-3YK4XMWB.js";import{a,b,c,d,e,f}from"./chunk-VFBLX4TG.js";import"./chunk-EI7MMDWY.js";export{b as DOCTOR_API_VERSION,c as DOCTOR_CORE_READY_EVENT,d as DOCTOR_PLUGIN_REGISTER_EVENT,a as DOCTOR_PROTOCOL,e as isDoctorCoreReady,f as isDoctorPluginRegistrationRequest};
|
package/dist/entry-9.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-ERVMDQGX.js";import"./chunk-VFBLX4TG.js";import"./chunk-EI7MMDWY.js";export{o as connectDoctorPlugin};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{a as tt}from"./chunk-QW5O42QJ.js";import{a as Ve}from"./chunk-KP37XTDI.js";import{a as Ue}from"./chunk-IMVCVPMP.js";import{a as Be}from"./chunk-LFV6G5Z3.js";import{a as Je}from"./chunk-IOCABSRL.js";import{a as qe}from"./chunk-6DN7NO7L.js";import{a as He}from"./chunk-YQTLJ5ZV.js";import"./chunk-YPHXLAQF.js";import"./chunk-VCCMVQXU.js";import{a as Qe}from"./chunk-F6SESI3P.js";import{a as Ze}from"./chunk-KYVOMBO5.js";import"./chunk-XNXQYPVT.js";import{a as et}from"./chunk-OIL6BB2S.js";import"./chunk-STUZZM5B.js";import"./chunk-MBUXFKIW.js";import{e as _e}from"./chunk-TG6H6EOI.js";import"./chunk-KNMWCDDK.js";import"./chunk-OVUYPHDE.js";import{a as Ye}from"./chunk-5BWUVAR4.js";import{a as Ke}from"./chunk-HOBTFFQR.js";import"./chunk-SJYDLHEF.js";import{a as Xe}from"./chunk-6SMFVLTY.js";import"./chunk-PETQCA7G.js";import{a as We}from"./chunk-BYWAG6X3.js";import{a as ze}from"./chunk-VUNCBASK.js";import"./chunk-34ZQTTU2.js";import"./chunk-MTTKFJV6.js";import{a as Ge}from"./chunk-4SQQKEVD.js";import"./chunk-VSP2QQPQ.js";import{a as nt}from"./chunk-52BM6J6I.js";import"./chunk-QNZVPFSP.js";import{a as it}from"./chunk-E4SECPF4.js";import"./chunk-DEP55R35.js";import{a as ot}from"./chunk-TNWYEXFG.js";import{a as rt}from"./chunk-AP7Z3VWC.js";import{a as st}from"./chunk-476MR2QB.js";import{a as at}from"./chunk-VWVLBOMU.js";import"./chunk-U4D6FT66.js";import{a as Ne}from"./chunk-MB6VVVAF.js";import{a as Le}from"./chunk-NI2NK4JU.js";import"./chunk-GTK5AREE.js";import{a as Fe}from"./chunk-W3XYKJ5H.js";import"./chunk-PODWLGNO.js";import{a as Me}from"./chunk-XGUAL3CA.js";import"./chunk-3YK4XMWB.js";import"./chunk-ERVMDQGX.js";import{a as Te,b as De,c as Ee,d as Se,f as xe}from"./chunk-VFBLX4TG.js";import"./chunk-2ZMYT6ZC.js";import"./chunk-NNCZYO4Q.js";import{c as Ae}from"./chunk-SSZB66C3.js";import"./chunk-YHUTTZC6.js";import{a as ke}from"./chunk-ORAPGW7W.js";import{a as Re,b as Ce}from"./chunk-JASLOB2X.js";import"./chunk-E2RESHYR.js";import"./chunk-T2RPMEM2.js";import{a as Oe}from"./chunk-EEH4WYI7.js";import{a as je,b as $e}from"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import{e as ae,f as ce,g as de,h as le,i as ue,l as ge}from"./chunk-5A25RATC.js";import"./chunk-2SKAED2I.js";import{a as ye}from"./chunk-OBWZ5RYN.js";import{a as D,b as E,c as fe,d as me,g as he}from"./chunk-KZBAJFCV.js";import"./chunk-KINKBPPX.js";import{b as we,c as P}from"./chunk-7NDBZ4WX.js";import{a as pe}from"./chunk-ZC65Z3CK.js";import{a as Pe,b as S,c as x,d as be,e as ve,g as Ie}from"./chunk-JMVDFOTQ.js";import{a}from"./chunk-EI7MMDWY.js";var R=[],C=[],J=[];function B(n,e,t){if(e.some(i=>i.name===t))throw new Error(`[pi-agent-ide] ${n} "${t}" is already registered. Use a unique name.`)}a(B,"assertUniqueName");function dt(n){let e=new Set;for(let t of n){let i=`${t.kind}:${t.name}`;if(e.has(i))throw new Error(`[pi-agent-ide] ${t.kind} "${t.name}" is registered twice by one plugin.`);switch(e.add(i),t.kind){case"compiler":{B(t.kind,C,t.name);break}case"formatter":{B(t.kind,R,t.name);break}case"linter":{B(t.kind,J,t.name);break}}}for(let t of n)switch(t.kind){case"compiler":{C.push(t);break}case"formatter":{R.push(t);break}case"linter":{J.push(t);break}}}a(dt,"registerTools");async function ct(n,e){let t=[];for(let i of n)try{await i.detect(e)&&t.push(i)}catch(o){console.error(`[pi-agent-ide] detect failed for "${i.name}":`,o)}return t.sort((i,o)=>o.priority-i.priority),Vt(t),t}a(ct,"filterActive");function Vt(n){let e=new Map;for(let t of n)for(let i of t.extensions){let o=`${i}@${t.priority}`,r=e.get(o);if(r!==void 0)throw new Error(`[pi-agent-ide] priority conflict: tools "${r}" and "${t.name}" both claim "${i}" at priority ${t.priority}.`);e.set(o,t.name)}}a(Vt,"assertNoPriorityConflicts");async function lt(n){let[e,t]=await Promise.all([ct(R,n),ct(C.filter(i=>i.syntaxOnly===!0),n)]);return{ctx:n,formatters:e,compilers:t,linters:[]}}a(lt,"warmupFormatting");function q(){R.length=0,C.length=0,J.length=0}a(q,"resetRegistry");import{readFile as G}from"node:fs/promises";import y from"node:path";var k=class{constructor(e,t={}){this.sources=e;this.options=t}static{a(this,"DiagnosticStore")}files=new Map;dirty=new Set;sent=new Map;queue=[];running=0;disposed=!1;schedule(e,t,{cwd:i}){this.disposed||this.ensure(e,t,i)}async read(e,{cwd:t}){this.assertActive();let i=y.resolve(t,e),o=await G(i,"utf8");this.assertActive();let r=this.ensure(i,o,t);await Ut(Promise.all(r.jobs),this.options.readWaitMs??5e3),this.assertActive();let s=await G(i,"utf8");this.assertActive();let c=this.ensure(i,s,t);return{filePath:i,content:c.content,results:[...c.results.values()]}}async takeNotifications(e){let t=[];for(let i of[...this.dirty]){if(i.cwd!==y.resolve(e)||(this.dirty.delete(i),!await this.isCurrent(i)))continue;let o=[...i.results.values()],r=o.map(d=>{if(d.status==="pending"||d.status==="unavailable")return`${d.source} ${d.status}`;let l=["error","warning","info","hint"].map(u=>`${d.diagnostics.filter(g=>g.severity===u).length} ${u}`);return`${d.source} ${l.join(", ")}${d.status==="snapshot"?" (snapshot; completion unknown)":d.status==="unversioned"?" (unversioned)":""}`}).join("; "),s=this.key(i.filePath,i.cwd),c=JSON.stringify(o);this.sent.get(s)!==c&&(this.sent.set(s,c),t.push(`${JSON.stringify(y.relative(e,i.filePath))}: ${r||"no diagnostic sources"}.`))}return t}dispose(){this.disposed=!0;for(let e of this.files.values())e.controller.abort();this.files.clear(),this.dirty.clear(),this.sent.clear(),this.pump()}key(e,t){return JSON.stringify([y.resolve(t),y.resolve(t,e)])}ensure(e,t,i){let o=this.key(e,i),r=this.files.get(o);if(r?.content===t)return r;r?.controller.abort(),r&&this.dirty.delete(r);let s={cwd:y.resolve(i),filePath:y.resolve(i,e),content:t,controller:new AbortController,results:new Map,jobs:[],publications:new Map};this.files.set(o,s),this.sources.length===0&&s.results.set("diagnostics",{source:"diagnostics",status:"unavailable",diagnostics:[],reason:"No diagnostic sources registered"}),this.dirty.add(s);for(let c of this.sources){s.results.set(c.id,{source:c.id,status:"pending",diagnostics:[]});let d=new Promise(l=>{this.queue.push(async()=>{try{await this.check(s,c)}finally{l()}})});s.jobs.push(d)}return queueMicrotask(()=>this.pump()),s}pump(){for(;this.running<(this.options.concurrency??4)&&this.queue.length>0;){let e=this.queue.shift();if(!e)break;this.running++,e().finally(()=>{this.running--,this.pump()})}}active(e){return!this.disposed&&!e.controller.signal.aborted}assertActive(){if(this.disposed)throw new Error("Diagnostics session has ended")}async isCurrent(e){if(!this.active(e))return!1;let t=await G(e.filePath,"utf8").catch(()=>{});return this.active(e)&&t===e.content}async publish(e,t,i){let o=(e.publications.get(t)??0)+1;if(e.publications.set(t,o),!await this.isCurrent(e)||e.publications.get(t)!==o)return;let r={source:t,...i};JSON.stringify(e.results.get(t))!==JSON.stringify(r)&&(e.results.set(t,r),this.dirty.add(e))}async check(e,t){if(!await this.isCurrent(e))return;let i=new AbortController,o=AbortSignal.any([i.signal,e.controller.signal]);if(o.aborted)return;let r,s;try{let c=new Promise((l,u)=>{s=a(()=>u(o.reason),"onAbort"),o.addEventListener("abort",s,{once:!0}),r=setTimeout(()=>i.abort(new Error("Diagnostic check timed out")),this.options.checkTimeoutMs??3e4)}),d=await Promise.race([t.diagnose(e.filePath,{cwd:e.cwd,content:e.content,signal:o,publish:a(l=>{o.aborted||this.publish(e,t.id,l)},"publish")}),c]);await this.publish(e,t.id,d)}catch(c){await this.publish(e,t.id,{status:"unavailable",diagnostics:[],reason:c instanceof Error?c.message:String(c)})}finally{clearTimeout(r),s&&o.removeEventListener("abort",s)}}};async function Ut(n,e){let t;try{await Promise.race([n,new Promise(i=>{t=setTimeout(i,e)})])}finally{clearTimeout(t)}}a(Ut,"waitAtMost");function ut(){let n=new Map,e=[],t=new k(e),i=Promise.resolve();return{diagnostics:t,registerPlugin(o){if(o.id.trim().length===0)return Promise.reject(new Error("Plugin ID must not be empty"));let r=n.get(o.id);if(r!==void 0)return r;let s=i.then(async()=>{let c=[],d=[],l=!0,u={addTool(g){if(!l)throw new Error(`Plugin ${o.id} setup is already complete`);Jt(g),c.push(g)},addDiagnosticSource(g){if(!l)throw new Error(`Plugin ${o.id} setup is already complete`);qt(g),d.push(g)},readDiagnostics(g,f){return t.read(g,f)}};try{await o.setup(u)}catch(g){throw l=!1,g}l=!1,Bt(e,d),dt(c),e.push(...d)});return n.set(o.id,s),i=s.catch(()=>{}),s.catch(()=>{n.delete(o.id)}),s},async waitForPendingPlugins(){await Promise.all(n.values())}}}a(ut,"createIdeCore");function Bt(n,e){let t=new Set(n.map(i=>i.id));for(let i of e){if(t.has(i.id))throw new Error(`Diagnostic source ${i.id} is already registered`);t.add(i.id)}}a(Bt,"assertUniqueDiagnosticSources");function Jt(n){if(!pt(n))throw new TypeError("IDE tool must be an object");let e=n.kind,t=e==="compiler"?n.compile:e==="formatter"?n.format:e==="linter"?n.lint:void 0;if(t===void 0||typeof t!="function"||typeof n.detect!="function"||typeof n.name!="string"||n.name.trim().length===0||typeof n.priority!="number"||!Number.isFinite(n.priority)||!Array.isArray(n.extensions)||n.extensions.length===0||n.extensions.some(i=>typeof i!="string"||i.length===0))throw new TypeError("Invalid pi-agent-ide tool contribution")}a(Jt,"assertIdeTool");function qt(n){if(!pt(n)||typeof n.id!="string"||n.id.trim().length===0||typeof n.diagnose!="function")throw new TypeError("Invalid pi-agent-ide diagnostic source contribution")}a(qt,"assertDiagnosticSource");function pt(n){return typeof n=="object"&&n!==null}a(pt,"isRecord");import gt from"node:path";async function ft(n){if(!gt.isAbsolute(n.resourceSource))return;let e=await lt({cwd:n.cwd}),t=gt.extname(n.resourceSource).toLowerCase(),i=a(s=>s.extensions.includes(t)||s.extensions.includes("*"),"matches"),o=e.compilers.find(i);if(o&&(await o.compile({filePath:n.resourceSource},e.ctx)).syntaxErrors.length>0)return;await e.formatters.find(i)?.format({filePath:n.resourceSource},e.ctx)}a(ft,"runIdePostEditGate");import Gt from"node:path";async function W(n){n.registerFlag("old-tools",{description:"Use the old IDE and text editor tools",type:"boolean",default:!1}),q();let e=ut(),t=n.events.on(me,i=>{if(!he(i))throw new Error("Invalid pi-agent-ide plugin registration request");i.accept(e.registerPlugin(i.plugin))});n.on("session_shutdown",()=>{t(),e.diagnostics.dispose(),q()}),_e(n,{id:"pi-agent-ide",handler:ft}),n.events.emit(fe,{protocol:D,apiVersion:3}),await Oe(n,{protocol:je,apiVersion:$e,id:"ide-diagnostics",setup(i){i.onDidEdit(o=>{Gt.isAbsolute(o.resourceSource)&&e.diagnostics.schedule(o.resourceSource,o.after.content,{cwd:o.cwd})})}}),n.on("context",async(i,o)=>{let r=await e.diagnostics.takeNotifications(o.cwd);if(r.length!==0)return{messages:[...i.messages,{role:"custom",customType:"ide-diagnostics",display:!1,content:`File diagnostics:
|
|
2
|
+
${r.join(`
|
|
3
|
+
`)}`,timestamp:Date.now()}]}}),await e.waitForPendingPlugins()}a(W,"registerPiAgentIde");import{truncateToWidth as Wt,wrapTextWithAnsi as zt}from"@earendil-works/pi-tui";var Ht="PI AGENT IDE",Yt=/\/[a-z][\w-]*/giu,A=class{constructor(e,t){this.tip=e;this.theme=t}static{a(this,"TipCallout")}cached;render(e){if(this.cached?.width===e)return this.cached.lines;let t=Xt(this.tip,this.theme,e);return this.cached={width:e,lines:t},t}invalidate(){this.cached=void 0}};function Xt(n,e,t){if(t<=0)return[];if(t<=2)return[e.fg("accent",t===1?"\u2502":"\u2502 ")];let i=t-2,o=e.fg("accent",e.bold(Ht))+e.fg("dim"," \xB7 ")+e.bold(n.title),r=n.body.split(`
|
|
4
|
+
`).map(l=>l.length===0?"":Qt(l,e)),s=[o,...r].flatMap(l=>Kt(l,i)),c=e.fg("accent","\u2502");return s.map(l=>Wt(`${c} ${l}`,t))}a(Xt,"renderTip");function Kt(n,e){return n.length===0?[""]:zt(n,e)}a(Kt,"wrapLine");function Qt(n,e){let t="",i=0;for(let o of n.matchAll(Yt)){let r=o.index;t+=e.fg("muted",n.slice(i,r)),t+=e.fg("accent",e.bold(o[0])),i=r+o[0].length}return t+e.fg("muted",n.slice(i))}a(Qt,"styleBodyLine");var j=class{static{a(this,"TipCore")}providers=new Map;registerProvider(e){if(!/^[a-z0-9][a-z0-9.-]*$/u.test(e.id))return Promise.reject(new Error(`Invalid tip provider ID: ${e.id}`));let t=this.providers.get(e.id);return t!==void 0?t===e?Promise.resolve():Promise.reject(new Error(`Tip provider ${e.id} is already registered`)):(this.providers.set(e.id,e),Promise.resolve())}get isEmpty(){return this.providers.size===0}async collectTips(e){let t=[];for(let i of this.providers.values()){if(e.signal?.aborted)break;try{let o=await Zt(i,e);o!==void 0&&en(o)&&t.push({providerId:i.id,tip:o})}catch{}}return t}};async function Zt(n,e){let t=e.signal;if(t===void 0)return n.getTip(e);if(t.aborted)return;let i=a(()=>{},"abort"),o=new Promise(r=>{i=a(()=>r(void 0),"abort"),t.addEventListener("abort",i,{once:!0})});try{return await Promise.race([n.getTip(e),o])}finally{t.removeEventListener("abort",i)}}a(Zt,"collectTip");function en(n){return typeof n.id=="string"&&/^[a-z0-9][a-z0-9.-]*$/u.test(n.id)&&typeof n.title=="string"&&n.title.trim().length>0&&typeof n.body=="string"&&n.body.trim().length>0}a(en,"isTip");import{randomUUID as tn}from"node:crypto";import{mkdir as Y,readFile as nn,rename as on,rm as X,stat as rn,writeFile as sn}from"node:fs/promises";import{setTimeout as an}from"node:timers/promises";import{homedir as cn}from"node:os";import I from"node:path";var v=1,dn=10,ln=5e3,un=6e4,h=Promise.resolve();function pn(n=process.env){let e=n.PI_CODING_AGENT_DIR??I.join(cn(),".pi","agent");return I.join(e,"pi-agent-ide","tips.json")}a(pn,"resolveTipStatePath");var O=class{constructor(e=pn()){this.statePath=e}static{a(this,"TipStateStore")}async shownFor(e){let t=await $(this.statePath);return new Set(t.projects[e]??[])}async claimIfUnseen(e,t,i){let o=h.then(async()=>{try{return await z(this.statePath,async()=>{let r=await $(this.statePath),s=new Set(r.projects[e]??[]);if(s.has(t)||i!==void 0&&s.has(i))return!1;s.add(t);let c={version:v,projects:{...r.projects,[e]:[...s]}};return await H(this.statePath,c),!0})}catch{return!0}});return h=o.then(()=>{},()=>{}),o}async markShown(e,t){if(t.length===0)return;h=h.then(async()=>{await z(this.statePath,async()=>{let o=await $(this.statePath),r=new Set(o.projects[e]??[]);for(let c of t)r.add(c);let s={version:v,projects:{...o.projects,[e]:[...r]}};await H(this.statePath,s)})}).catch(()=>{}),await h}async unmarkShown(e,t){h=h.then(async()=>{try{await z(this.statePath,async()=>{let o=await $(this.statePath),r=new Set(o.projects[e]??[]);if(!r.delete(t))return;let s={version:v,projects:{...o.projects,[e]:[...r]}};await H(this.statePath,s)})}catch{}}).catch(()=>{}),await h}};function ht(n){return I.resolve(n)}a(ht,"normalizeProjectPath");async function $(n){try{let e=JSON.parse(await nn(n,"utf8"));return fn(e)?e:mt()}catch{return mt()}}a($,"readState");async function z(n,e){let t=`${n}.lock`;await Y(I.dirname(n),{recursive:!0});let i=Date.now();for(;;)try{await Y(t);break}catch(o){if(gn(o)!=="EEXIST")throw o;try{if(Date.now()-(await rn(t)).mtimeMs>un){await X(t,{recursive:!0,force:!0});continue}}catch{}if(Date.now()-i>=ln)throw new Error(`Timed out waiting for startup-tip state lock: ${t}`,{cause:o});await an(dn)}try{return await e()}finally{await X(t,{recursive:!0,force:!0})}}a(z,"withStateLock");function gn(n){return typeof n=="object"&&n!==null&&"code"in n?String(n.code):void 0}a(gn,"errorCode");async function H(n,e){try{await Y(I.dirname(n),{recursive:!0});let t=`${n}.${process.pid}.${tn()}.tmp`;try{await sn(t,`${JSON.stringify(e,null,2)}
|
|
5
|
+
`,"utf8"),await on(t,n)}finally{await X(t,{force:!0})}}catch{}}a(H,"writeState");function mt(){return{version:v,projects:{}}}a(mt,"emptyState");function fn(n){if(typeof n!="object"||n===null||Array.isArray(n))return!1;let e=n;return e.version!==v||typeof e.projects!="object"||e.projects===null?!1:Object.values(e.projects).every(t=>Array.isArray(t)&&t.every(i=>typeof i=="string"))}a(fn,"isState");var yt="pi-agent-ide-startup-tip";function K(n){let e=new j,t=new O;n.registerEntryRenderer(yt,(s,c,d)=>{let l=s.data;if(!(typeof l.title!="string"||typeof l.body!="string"))return new A({title:l.title,body:l.body},d)});let i=n.events.on(ve,s=>{if(!Ie(s))throw new Error("Invalid tip provider registration request");s.accept(e.registerProvider(s.provider))});n.on("session_shutdown",i);let o,r=Promise.resolve();n.on("session_start",(s,c)=>{o?.abort(),o=new AbortController;let d=o.signal;r=r.then(()=>mn(n,e,t,s.reason,c,d)).catch(()=>{})}),n.on("session_shutdown",async()=>{o?.abort(),await r}),n.events.emit(be,{protocol:S,apiVersion:x})}a(K,"registerTips");async function mn(n,e,t,i,o,r){if(o.mode!=="tui"||(r.throwIfAborted(),e.isEmpty))return;let s=await e.collectTips({cwd:o.cwd,mode:o.mode,hasUI:o.hasUI,signal:r,reason:i});if(r.throwIfAborted(),s.length===0)return;let c=ht(o.cwd);for(let d of s){let l=hn(d.providerId,d.tip.id);if(await t.claimIfUnseen(c,l,d.tip.id)){if(r.aborted){await t.unmarkShown(c,l);return}try{n.appendEntry(yt,d.tip);return}catch(u){throw await t.unmarkShown(c,l),u}}}}a(mn,"displayTip");function hn(n,e){return JSON.stringify([n,e])}a(hn,"tipIdentity");import{mkdir as yn,readFile as wt,writeFile as wn}from"node:fs/promises";async function Pt(n,e){await yn(we(n),{recursive:!0});let t=[],i=e.filter(s=>s.recipe.formatter!==void 0),o=e.filter(s=>s.recipe.linter!==void 0),r=e.filter(s=>s.recipe.lsp!==void 0);if(i.length>0){let s=P(n,"formatters"),c=await Q(s,{version:1,formatters:{}}),d=Z(c,"formatters");for(let l of i)d[l.recipe.id]??=l.recipe.formatter;await ee(s,c)&&t.push(s)}if(o.length>0){let s=P(n,"linters"),c=await Q(s,{version:1,linters:{}}),d=Z(c,"linters");for(let l of o)d[l.recipe.id]??=l.recipe.linter;await ee(s,c)&&t.push(s)}if(r.length>0){let s=P(n,"lsp-servers"),c=await Q(s,{version:1,servers:{}}),d=Z(c,"servers");for(let l of r){let u=pe(l.recipe.lsp);d[l.recipe.id]??={command:u.command,transport:"stdio",rootMarkers:u.rootMarkers,languages:Object.fromEntries(Object.entries(u.languageIds).map(([g,f])=>[g,{extensions:f}])),capabilities:["diagnostics"]}}await ee(s,c)&&t.push(s)}return t}a(Pt,"writeSuggestedConfigs");async function Q(n,e){try{let t=JSON.parse(await wt(n,"utf8"));if(typeof t!="object"||t===null||Array.isArray(t))throw new Error(`${n} must contain an object`);return t}catch(t){if(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT")return e;throw t}}a(Q,"readObject");function Z(n,e){let t=n[e];if(typeof t!="object"||t===null||Array.isArray(t))throw new Error(`${e} must be an object`);return t}a(Z,"objectMember");async function ee(n,e){let t=`${JSON.stringify(e,null,2)}
|
|
6
|
+
`;return await wt(n,"utf8").catch(()=>{})===t?!1:(await wn(n,t,"utf8"),!0)}a(ee,"writeJson");var N=class{static{a(this,"DoctorCore")}plugins=new Map;languages=[];recipes=[];setupChecks=[];checks=[];queue=Promise.resolve();registerPlugin(e){let t=this.plugins.get(e.id);if(t!==void 0)return t;let i=this.queue.then(async()=>{let o=!0,r=[],s=[],c=[],d=[],l={addLanguage:a(u=>{_(u,r,e.id,"language",()=>o)},"addLanguage"),addToolRecipe:a(u=>{_(u,s,e.id,"tool recipe",()=>o)},"addToolRecipe"),addSetupCheck:a(u=>{_(u,c,e.id,"setup check",()=>o)},"addSetupCheck"),addCheck:a(u=>{_(u,d,e.id,"check",()=>o)},"addCheck")};try{await e.setup(l)}finally{o=!1}bt(this.languages,r,"language"),bt(this.recipes,s,"tool recipe"),this.languages.push(...r),this.recipes.push(...s),this.setupChecks.push(...c),this.checks.push(...d)});return this.plugins.set(e.id,i),this.queue=i.catch(()=>{}),i.catch(()=>{this.plugins.delete(e.id)}),i}async waitForPlugins(){await Promise.all(this.plugins.values())}snapshot(){return{languages:[...this.languages],recipes:[...this.recipes],setupChecks:[...this.setupChecks],checks:[...this.checks]}}};async function vt(n,e){let t=[],i=[];for(let o of n.setupChecks)try{let r=await o.value.inspect(e);t.push(...(r.selections??[]).map(s=>({...s,pluginId:o.pluginId}))),i.push(...(r.actions??[]).map(s=>({...s,pluginId:o.pluginId})))}catch{}return{selections:t,actions:i}}a(vt,"runContributedSetupChecks");async function It(n,e){let t=[];for(let i of n.checks)try{t.push({pluginId:i.pluginId,title:i.value.title,findings:await i.value.run(e)})}catch(o){t.push({pluginId:i.pluginId,title:i.value.title,findings:[{status:"fail",message:o instanceof Error?o.message:String(o)}]})}return t}a(It,"runContributedChecks");function bt(n,e,t){for(let i of e){let o=n.find(r=>r.value.id===i.value.id)?.pluginId;if(o!==void 0)throw new Error(`${t} ${i.value.id} is already owned by doctor plugin ${o}`)}}a(bt,"assertAvailable");function _(n,e,t,i,o){if(!o())throw new Error(`Doctor plugin ${t} setup is complete`);if(!/^[a-z0-9][a-z0-9.-]*$/u.test(n.id))throw new Error(`Invalid ${i} ID: ${n.id}`);if(e.some(r=>r.value.id===n.id))throw new Error(`Doctor plugin ${t} registered ${i} ${n.id} twice`);e.push({pluginId:t,value:n})}a(_,"add");import Rn from"node:path";import{access as te,readFile as Tt}from"node:fs/promises";import w from"node:path";async function Dt(n,e,t,i=process.env){let o=await In(n),r=await vn(n),s=[];for(let c of t){let d=c.value;if(d.languages.every(U=>!e.has(U)))continue;let l=[],u=1,g=await Pn(n,d.configFiles??[]);g!==void 0&&(u+=6,l.push(`project config: ${g}`)),r.has(`${d.kind}:${d.id}`)&&(u+=6,l.push("Pi Agent IDE config"));let f=d.dependencies?.find(U=>o.has(U));f!==void 0&&(u+=4,l.push(`project dependency: ${f}`));let m=await bn(n,d.executables,i);m!==void 0&&(u+=3,l.push(`executable: ${m}`)),s.push({pluginId:c.pluginId,recipe:d,score:u,evidence:l,...m&&{executable:m}})}return s.sort((c,d)=>d.score-c.score||c.recipe.id.localeCompare(d.recipe.id))}a(Dt,"discoverRecipeCandidates");function Et(n,e,t=[]){let i=new Map,o=new Map(t.map(r=>[`${r.kind}:${r.languageId}`,r.toolId]));for(let r of e)for(let s of["formatter","linter","lsp"]){let c=o.get(`${s}:${r}`),d=c===void 0?4:7,l=n.filter(g=>g.recipe.kind===s&&g.recipe.languages.includes(r)&&g.executable!==void 0&&g.recipe.id!==c&&g.score>=d),u=l[0];u!==void 0&&(l.filter(g=>g.score===u.score).length>1||i.set(`${u.recipe.kind}:${u.recipe.id}`,u))}return[...i.values()]}a(Et,"selectSuggestedRecipes");async function Pn(n,e){for(let t of e)try{return await te(w.join(n,t)),t}catch{}}a(Pn,"firstExisting");async function bn(n,e,t){let i=(t.PATH??"").split(w.delimiter).filter(Boolean),o=[w.join(n,"node_modules",".bin"),...i];for(let r of e){if(r.includes(w.sep))try{return await te(w.resolve(n,r)),r}catch{continue}for(let s of o)try{return await te(w.join(s,r)),r}catch{}}}a(bn,"firstExecutable");async function vn(n){let e=new Set;for(let[t,i,o]of[["formatters","formatters","formatter"],["linters","linters","linter"],["lsp-servers","servers","lsp"]])try{let r=JSON.parse(await Tt(P(n,t),"utf8"));if(typeof r!="object"||r===null||Array.isArray(r))continue;let c=r[i];if(typeof c=="object"&&c!==null&&!Array.isArray(c))for(let d of Object.keys(c))e.add(`${o}:${d}`)}catch{}return e}a(vn,"managedRecipeIds");async function In(n){try{let e=JSON.parse(await Tt(w.join(n,"package.json"),"utf8")),t=new Set;for(let i of["dependencies","devDependencies","peerDependencies","optionalDependencies"]){let o=e[i];if(typeof o=="object"&&o!==null&&!Array.isArray(o))for(let r of Object.keys(o))t.add(r)}return t}catch{return new Set}}a(In,"packageDependencies");import{execFile as Tn}from"node:child_process";import{readdir as Dn}from"node:fs/promises";import b from"node:path";import{promisify as En}from"node:util";var Sn=En(Tn),xn=new Set([".git",".hg",".svn","node_modules","vendor","build","dist","coverage",".cache",".next","target"]);async function St(n,e){e?.throwIfAborted();try{let i=(await Sn("git",["ls-files","--cached","--others","--exclude-standard","-z"],{cwd:n,encoding:"utf8",maxBuffer:16777216,signal:e})).stdout.split("\0").filter(Boolean).map(o=>b.resolve(n,o)).filter(o=>!Rt(o));return e?.throwIfAborted(),i.length>0?i:await ne(n,e)}catch{return e?.throwIfAborted(),ne(n,e)}}a(St,"collectProjectFiles");function xt(n,e){let t=new Map;for(let i of e){let o=new Set(i.extensions.map(c=>c.toLowerCase())),r=new Set(i.fileNames),s=n.filter(c=>!c.split(b.sep).join("/").includes("/.pi/pi-agent-ide/")&&(o.has(b.extname(c).toLowerCase())||r.has(b.basename(c))));s.length>0&&t.set(i.id,s)}return t}a(xt,"detectProjectLanguages");async function ne(n,e){e?.throwIfAborted();let t=[];for(let i of await Dn(n,{withFileTypes:!0})){if(i.isDirectory()&&xn.has(i.name))continue;let o=b.join(n,i.name);Rt(o)||(i.isDirectory()?t.push(...await ne(o,e)):i.isFile()&&t.push(o))}return t}a(ne,"walk");function Rt(n){return n.split(b.sep).join("/").includes("/.pi/pi-agent-ide/")}a(Rt,"isManagedIdeConfig");async function ie(n,e,t=process.env,i){i?.throwIfAborted();let o=await St(e,i);i?.throwIfAborted();let r=xt(o,n.languages.map(u=>u.value)),s=new Set(r.keys()),c={cwd:e,files:o,detectedLanguageIds:s,detectedLanguages:r,env:t},[d,l]=await Promise.all([Dt(e,s,n.recipes,t),vt(n,c)]);return{cwd:e,files:o,detectedLanguages:r,candidates:d,selections:l.selections,actions:l.actions,suggestions:Et(d,s,l.selections)}}a(ie,"inspectDoctorSetup");async function L(n,e,t=process.env){let i=await ie(n,e,t),o=new Set(i.detectedLanguages.keys()),r={cwd:e,files:i.files,detectedLanguageIds:o,detectedLanguages:i.detectedLanguages,env:t},s=await It(n,r),c=[{status:"pass",message:`Project: ${e}`},i.files.length>0?{status:"pass",message:`${i.files.length} project files inspected`}:{status:"warn",message:"No project files found"},o.size>0?{status:"pass",message:`Detected: ${[...o].join(", ")}`}:{status:"warn",message:"No registered project languages detected"}];return{...i,sections:[{title:"Project",pluginId:"doctor",findings:c},...s]}}a(L,"runDoctor");function T(n){let e=["Pi Agent IDE doctor",""];for(let t of n.sections){e.push(`${t.title} (${t.pluginId})`);for(let i of t.findings)e.push(` ${i.status.toUpperCase().padEnd(4)} ${i.message}`),i.detail!==void 0&&e.push(` \`${i.detail}\``);e.push("")}if(n.actions.length>0){e.push("Setup needs attention");for(let t of n.actions)e.push(` ${t.message} [${t.pluginId}]`);e.push("")}if(n.suggestions.length>0){e.push("Suggested configuration");for(let t of n.suggestions){let i=t.evidence.length>0?` \u2014 ${t.evidence.join(", ")}`:"";e.push(` ${t.recipe.kind.padEnd(9)} ${t.recipe.id} [${t.pluginId}]${i}`)}e.push("")}return e.join(`
|
|
7
|
+
`).trimEnd()}a(T,"formatDoctorReport");function oe(n){return n.actions.length>0||n.suggestions.length>0||n.sections.some(e=>e.findings.some(t=>t.status==="fail"))}a(oe,"doctorNeedsWork");function Ct(n){let e=n.candidates.map(t=>({owner:t.pluginId,id:t.recipe.id,kind:t.recipe.kind,languages:t.recipe.languages,evidence:t.evidence,documentation:t.recipe.documentation}));return["Finish configuring Pi Agent IDE for this project.","Preserve existing formatter, linter, compiler, and style rules. Do not invent or replace native project settings.","Do not install packages, write credentials, or change source files without the user's normal confirmation.","Pi Agent IDE project configs live in .pi/pi-agent-ide/.","Use only the relevant plugin contributions listed below; each owner remains responsible for its own scope.","",T(n),"","Relevant registered recipes:",JSON.stringify(e,null,2),"",`Project root: ${Rn.resolve(n.cwd)}`].join(`
|
|
8
|
+
`)}a(Ct,"buildDoctorAgentPrompt");import{createHash as Cn}from"node:crypto";var kn="doctor",re=3;function kt(n,e){let t=Pe(n,An(e));t!==void 0&&t.catch(()=>{})}a(kt,"registerDoctorTipProvider");function An(n){return{protocol:S,apiVersion:x,id:kn,async getTip(e){let t=await n(e),i=jn(t);if(i.length===0)return;let o=i.slice(0,re).map(r=>`\u2022 ${r.message}`);return i.length>re&&o.push(`\u2022 ${i.length-re} more`),{id:`doctor-setup-${$n(i)}`,title:i.length===1?"Project setup needs attention":`${i.length} project setup items`,body:[...o,"Run /pi-agent-ide-doctor"].join(`
|
|
9
|
+
`)}}}}a(An,"createDoctorTipProvider");function jn(n){let e=n.actions.map(i=>({id:`action:${i.pluginId}:${i.id}`,message:i.message})),t=n.suggestions.map(i=>{let o=i.recipe.languages.filter(s=>n.detectedLanguages.has(s)).join(", "),r={formatter:"formatting",linter:"linting",lsp:"language support"}[i.recipe.kind];return{id:`suggestion:${i.pluginId}:${i.recipe.kind}:${i.recipe.id}`,message:`Use ${i.recipe.name} for ${o} ${r}`}});return[...e,...t].sort((i,o)=>i.id.localeCompare(o.id))}a(jn,"setupItems");function $n(n){return Cn("sha256").update(n.map(e=>`${e.id}\0${e.message}`).join("\0")).digest("hex").slice(0,12)}a($n,"fingerprint");async function F(n){let e=new N;kt(n,async o=>(await e.waitForPlugins(),ie(e.snapshot(),o.cwd,process.env,o.signal)));let t,i=n.events.on(Se,o=>{if(!xe(o))throw new Error("Invalid doctor plugin registration request");o.accept(e.registerPlugin(o.plugin))});n.on("session_shutdown",i),n.registerCommand("pi-agent-ide-doctor",{description:"Check and configure Pi Agent IDE for this project",handler:a(async(o,r)=>{await e.waitForPlugins();let s=await L(e.snapshot(),r.cwd);se(n,T(s));let c=new Set(o.trim().split(/\s+/u).filter(Boolean));if(s.suggestions.length>0&&!c.has("--no-apply")&&(c.has("--apply")||r.hasUI&&await r.ui.confirm("Apply suggested configuration?","Add detected tools to .pi/pi-agent-ide/. Existing entries and native tool settings are kept."))){let u=await Pt(r.cwd,s.suggestions),g=u.length===0?"Pi Agent IDE configs are already up to date":`Updated ${u.length} Pi Agent IDE config ${u.length===1?"file":"files"}`;r.ui.notify(g,"info"),s=await L(e.snapshot(),r.cwd),se(n,T(s))}if(!oe(s)&&!c.has("--agent"))return;(c.has("--agent")||r.hasUI&&await r.ui.confirm("Ask the agent to finish setup?","The agent will receive this redacted report and relevant plugin recipes."))&&(t=r.cwd,n.sendUserMessage(Ct(s)))},"handler")}),n.on("agent_end",async(o,r)=>{let s=t;if(s===void 0)return;t=void 0;let c=await L(e.snapshot(),s,process.env);se(n,`Doctor recheck after agent setup
|
|
10
|
+
|
|
11
|
+
${T(c)}`),oe(c)?r.ui.notify("Pi Agent IDE setup still needs attention","warning"):r.ui.notify("Pi Agent IDE setup is ready","info")}),n.events.emit(Ee,{protocol:Te,apiVersion:1}),await e.waitForPlugins()}a(F,"registerDoctor");function se(n,e){n.sendMessage({customType:"pi-agent-ide-doctor",content:e,display:!0},{triggerTurn:!1})}a(se,"sendReport");import On from"node:path";var At="diagnostics",_n=Ae({kind:"code-view",label:"Diagnostics"});async function M(n){let e,t=a((c,d)=>{if(e===void 0)throw new Error("IDE diagnostics are not connected");return e(c,{cwd:d})},"collect"),i={protocol:D,apiVersion:3,id:"diagnostics",setup(c){e=c.readDiagnostics}},o=new WeakMap,r=new WeakMap,s={protocol:Re,apiVersion:Ce,id:"diagnostics",setup(c){c.addResolver({resolver:Nn(t),renderResult:_n});let d=ge();c.addView({view:"diagnostics",priority:100,presenter:Fn(t,r)}),c.addHandler({stage:"read",when:{resolvedBy:"any",contentKind:"text"},handler(l){return l.state?.resolvedBy==="diagnostics"?d(l):(l.state?.contentKind==="text"&&l.request.views?.includes("diagnostics")&&o.set(l.request,l.state.text),{kind:"continue",context:l})}}),c.addHandler({stage:"post-read",handler(l){let u=o.get(l.request),g=u&&r.get(u),f=l.result,m=f?.content[0];return!g||!f||m?.type!=="text"?{kind:"continue",context:l}:{kind:"continue",context:{...l,result:{...f,content:[{...m,text:`${g}
|
|
12
|
+
${m.text}`},...f.content.slice(1)]}}}}}),c.describe("`diagnostics:<path>` returns lint and LSP diagnostics with five lines of source context on each side. The `diagnostics` view adds the same diagnostics alongside a normal file read. Both reuse background results, wait briefly for current checks, and report pending, unavailable, snapshot, or unversioned sources explicitly. A snapshot is the latest push update, not a completed check; an empty snapshot does not mean the file is clean."),c.addPromptGuideline("Use read with `diagnostics:<path>` or the `diagnostics` view for per-file diagnostics instead of running equivalent checks through Bash. Project builds and tests remain separate verification."),c.addPromptGuideline('You can use read with `views: ["diagnostics"]` to add lint and LSP diagnostics alongside file content.'),c.addPromptGuideline("Treat diagnostic snapshots as incomplete observations, not completed checks; an empty snapshot is not evidence that the file is clean.")}};await Promise.all([ye(n,i),ke(n,s)])}a(M,"registerDiagnostics");function Nn(n){return{id:"diagnostics",tryResolve(e,t){return Promise.resolve(Ln(e,t.cwd,n))}}}a(Nn,"createDiagnosticResolver");function Ln(n,e,t){let i;try{i=ae(n,At,e)}catch(o){return{kind:"failed",error:o}}return i===void 0?{kind:"not-handled"}:{kind:"resolved",resource:{source:ce(At,i),async read(){let o=await t(i,e);return[de(i,o.content,o.results)]}}}}a(Ln,"resolveDiagnosticSource");function Fn(n,e){return{id:"diagnostics",async present(t,i){if(i.purpose!=="read"||!On.isAbsolute(t.source))return t;let o=await n(t.source,i.cwd);if(o.content!==t.content)throw new Error("File changed during diagnostic read; read it again for current source lines.");return e.set(t,ue(o.results)),le(t,o.results)}}}a(Fn,"createDiagnosticPresenter");var jt=[p("ide.core",W),p("ide.tips",K),p("ide.doctor",F),p("ide.languages",rt,["ide.doctor"]),p("read.core",Ge),p("read.filesystem",Ne,["read.core","editor.core"]),p("read.filesystem.image",Le,["read.filesystem"]),p("read.filesystem.pdf",Fe,["read.filesystem"]),p("read.filesystem.text",Me,["read.filesystem"]),p("read.web",Ve,["read.core"]),p("read.web.html",Ue,["read.web"]),p("read.web.image",Be,["read.web"]),p("read.web.pdf",Je,["read.web"]),p("read.web.text",qe,["read.web"]),p("search.core",We),p("search.text",ze,["search.core"]),p("editor.renderer",et,["editor.core"]),p("editor.core",He),p("editor.anchor.constant",Ye,["read.core","editor.core"]),p("editor.anchor.line-hash",Xe,["read.core","editor.core"]),p("editor.anchor.exact",Ke,["editor.core"]),p("editor.argument-order",Qe,["editor.core"],!1),p("editor.overwrite",Ze,["editor.core"],!1),p("editor.stale-anchor",tt,["editor.core"]),p("ide.ast",nt,["ide.core","read.core","search.core","editor.core"]),p("ide.formatter",ot,["ide.core"]),p("ide.lint",st,["ide.core"]),p("ide.changes",it,["ide.core","read.core","editor.core"]),p("ide.lsp",at,["ide.core","read.core","search.core"]),p("ide.diagnostics",M,["ide.core","read.core"])];function p(n,e,t=[],i=!0){return{id:n,dependencies:t,register:e,...i?{}:{defaultEnabled:!1}}}a(p,"builtin");import{readFile as Mn}from"node:fs/promises";import Vn from"node:os";import V from"node:path";function Nt(n=process.env,e=Vn.homedir(),t=process.cwd()){let i=n.PI_CODING_AGENT_DIR?.trim(),o=i===void 0||i.length===0?V.join(e,".pi","agent"):V.resolve(i);return{globalPath:V.join(o,"pi-agent-ide","extensions.json"),projectPath:V.resolve(t,".pi","pi-agent-ide","extensions.json")}}a(Nt,"resolvePiAgentIdeExtensionsConfigPaths");async function Lt(n){let e=await $t(n.globalPath),t=await $t(n.projectPath);return{disabled:[...new Set([...e.disabled,...t.disabled])],enabled:[...new Set([...e.enabled,...t.enabled])]}}a(Lt,"readPiAgentIdeExtensionsConfig");async function $t(n){let e;try{e=await Mn(n,"utf8")}catch(i){if(Un(i))return{disabled:[],enabled:[]};throw new Error(`Cannot read Pi Agent IDE extension config at ${n}: ${_t(i)}`,{cause:i})}let t;try{t=JSON.parse(e)}catch(i){throw new Error(`Invalid JSON in Pi Agent IDE extension config at ${n}: ${_t(i)}`,{cause:i})}if(!Ft(t))throw new Error(`Pi Agent IDE extension config at ${n} must be a JSON object`);return{disabled:Ot(t,"disabled",n),enabled:Ot(t,"enabled",n)}}a($t,"readConfigExtensionIds");function Ot(n,e,t){let i=n[e];if(i===void 0)return[];if(!Array.isArray(i))throw new Error(`${e} in ${t} must be an array of non-empty strings`);let o=i.filter(s=>typeof s=="string");if(o.length!==i.length||o.some(s=>s.length===0))throw new Error(`${e} in ${t} must be an array of non-empty strings`);if(new Set(o).size!==o.length)throw new Error(`${e} in ${t} must not contain duplicate IDs`);return o}a(Ot,"readIdField");function Un(n){return Ft(n)&&n.code==="ENOENT"}a(Un,"isMissingFile");function Ft(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}a(Ft,"isRecord");function _t(n){return n instanceof Error?n.message:String(n)}a(_t,"errorMessage");function Mt(n,e,t=[]){let i=new Map;for(let d of n){if(i.has(d.id))throw new Error(`Duplicate Pi Agent IDE extension ID: ${d.id}`);i.set(d.id,d)}for(let d of n)for(let l of d.dependencies)if(!i.has(l))throw new Error(`Pi Agent IDE extension ${d.id} has unknown dependency ${l}`);let o=new Set;for(let d of e){if(!i.has(d))throw new Error(`Unknown Pi Agent IDE extension ID in disabled: ${d}`);o.add(d)}for(let d of t)if(!i.has(d))throw new Error(`Unknown Pi Agent IDE extension ID in enabled: ${d}`);let r=Bn(i,t,o),s=new Set;for(let d of n)(d.defaultEnabled===!1&&!r.has(d.id)||o.has(d.id))&&s.add(d.id);let c=!0;for(;c;){c=!1;for(let d of n)s.has(d.id)||d.dependencies.every(l=>!s.has(l))||(s.add(d.id),c=!0)}return{enabled:n.filter(d=>!s.has(d.id)),disabled:s}}a(Mt,"selectBuiltinExtensions");function Bn(n,e,t){let i=new Set,o=[...e];for(;o.length>0;){let r=o.pop();if(!(i.has(r)||t.has(r))){i.add(r);for(let s of n.get(r)?.dependencies??[])i.has(s)||o.push(s)}}return i}a(Bn,"collectForcedOn");async function Jn(n){n.on("before_agent_start",i=>{let o=i.systemPrompt.replace("- bash: Execute bash commands (ls, grep, find, etc.)","- bash: Execute Bash commands").replace(`- Use bash for file operations like ls, rg, find
|
|
13
|
+
`,"");return o===i.systemPrompt?void 0:{systemPrompt:o}});let e=await Lt(Nt()),{enabled:t}=Mt(jt,e.disabled,e.enabled);for(let i of t)await i.register(n)}a(Jn,"registerUnifiedPiAgentIde");export{Jn as default};
|
package/docs/architecture.md
CHANGED
|
@@ -24,11 +24,13 @@ Pi Agent IDE
|
|
|
24
24
|
├── read core
|
|
25
25
|
│ └── Resource resolvers, presenters, and pipeline handlers
|
|
26
26
|
├── search core
|
|
27
|
-
│ └── text
|
|
27
|
+
│ └── text and structural resolvers
|
|
28
28
|
├── text-editor core
|
|
29
29
|
│ └── writable Resources, anchors, mutations, guards, and renderers
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
├── IDE core
|
|
31
|
+
│ └── AST, LSP, formatter, lint, and Git-aware plugins
|
|
32
|
+
└── startup-tip core
|
|
33
|
+
└── passive, provider-owned TUI tips
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
The cores do not import concrete plugins to discover behavior. Plugins connect through public protocols.
|
|
@@ -43,16 +45,17 @@ Shared Resource contracts live under `packages/pi-agent-resource`.
|
|
|
43
45
|
|
|
44
46
|
## Plugin protocols
|
|
45
47
|
|
|
46
|
-
The umbrella currently exposes
|
|
48
|
+
The umbrella currently exposes five main extension protocols:
|
|
47
49
|
|
|
48
|
-
| Protocol package
|
|
49
|
-
|
|
|
50
|
-
| `pi-agent-read`
|
|
51
|
-
| `pi-agent-search`
|
|
52
|
-
| `pi-agent-text-editor`
|
|
53
|
-
| `pi-agent-ide`
|
|
50
|
+
| Protocol package | Contributions |
|
|
51
|
+
| ----------------------- | ------------------------------------------------------------------------- |
|
|
52
|
+
| `pi-agent-read` | Resource resolvers, read handlers, presenters, result renderers |
|
|
53
|
+
| `pi-agent-search` | Search resolvers and search actions |
|
|
54
|
+
| `pi-agent-text-editor` | Writable resolvers, anchors, mutations, guards, renderers, edit listeners |
|
|
55
|
+
| `pi-agent-ide` | Formatter, compiler, linter, and other toolchain implementations |
|
|
56
|
+
| `pi-agent-ide/api/tips` | Provider-owned passive startup tips |
|
|
54
57
|
|
|
55
|
-
Each
|
|
58
|
+
Each protocol contribution declares a protocol name, API version, and stable ID. Contributions are validated before they become active; protocols that need setup expose it through their own contract.
|
|
56
59
|
|
|
57
60
|
The core and plugin may load in either order. They exchange readiness and registration messages through Pi's shared event bus, then use direct in-memory APIs after registration. This lets an external Pi extension connect even though the built-in package is loaded through one composite entrypoint.
|
|
58
61
|
|
|
@@ -61,12 +64,13 @@ The core and plugin may load in either order. They exchange readiness and regist
|
|
|
61
64
|
Doctor is an independent protocol, not a central list of tool knowledge. Each extension owns and registers its own checks and recipes:
|
|
62
65
|
|
|
63
66
|
- the language plugin contributes language detection;
|
|
64
|
-
- AST contributes parser probes;
|
|
65
|
-
- formatter, lint, and LSP contribute their own catalogs and config checks;
|
|
66
|
-
-
|
|
67
|
+
- AST contributes structural-search setup and parser probes;
|
|
68
|
+
- formatter, lint, and LSP contribute their own catalogs, lightweight effective-selection inspections, and full config checks;
|
|
69
|
+
- local search and Git contribute lightweight dependency setup inspections and full runtime checks;
|
|
70
|
+
- browser reads contribute an optional full runtime check, not a startup setup action;
|
|
67
71
|
- external extensions can contribute through `pi-agent-doctor`.
|
|
68
72
|
|
|
69
|
-
The doctor core only aggregates contributions, runs them, and presents the result. It never imports concrete plugins or assumes their IDs.
|
|
73
|
+
The doctor core only aggregates contributions, runs them, and presents the result. It never imports concrete plugins or assumes their IDs. Lightweight setup inspections decide whether actionable startup guidance exists without launching project tools. Full checks remain behind `/pi-agent-ide-doctor`. Disabling a plugin removes its checks, setup inspections, and recipes. Human-facing catalog pages are generated from the same plugin-owned data.
|
|
70
74
|
|
|
71
75
|
## Anchors
|
|
72
76
|
|
|
@@ -78,9 +82,9 @@ An anchor resolver can:
|
|
|
78
82
|
- validate it against the current Resource snapshot;
|
|
79
83
|
- return a line or text selection;
|
|
80
84
|
- reject stale or ambiguous input with recovery context;
|
|
81
|
-
- resolve one
|
|
85
|
+
- resolve one value to typed ranges in several Resource sources.
|
|
82
86
|
|
|
83
|
-
Read presenters can display matching markers without changing canonical source text.
|
|
87
|
+
Typed target resolvers own their opaque syntax. Read and editor cores validate and use the returned sources and ranges; they do not parse formats such as `SEARCH#...` themselves. Read presenters can display matching markers without changing canonical source text.
|
|
84
88
|
|
|
85
89
|
## Toolchain feedback
|
|
86
90
|
|