pi-agent-ide 0.2.0 → 0.2.2
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 +57 -0
- package/dist/{chunk-XNXQYPVT.js → chunk-4LUW26BX.js} +1 -1
- package/dist/{chunk-2ZMYT6ZC.js → chunk-4U6KGABH.js} +1 -1
- package/dist/chunk-4ZTEPMJO.js +14 -0
- package/dist/{chunk-KNMWCDDK.js → chunk-6ACQQBUY.js} +1 -1
- package/dist/chunk-76WHES5H.js +7 -0
- package/dist/chunk-BHSO2MDK.js +6 -0
- package/dist/chunk-BMOJTJJJ.js +3 -0
- package/dist/chunk-GFWDXTOB.js +4 -0
- package/dist/{chunk-VSP2QQPQ.js → chunk-GIRAEVUJ.js} +1 -1
- package/dist/chunk-JJVXUL5U.js +2 -0
- package/dist/chunk-KCEOTU5Z.js +3 -0
- package/dist/chunk-KVGQG43U.js +1 -0
- package/dist/{chunk-MTTKFJV6.js → chunk-LQYZG62K.js} +1 -1
- package/dist/chunk-N34ATN52.js +1 -0
- package/dist/{chunk-PETQCA7G.js → chunk-P6T3Q7LB.js} +1 -1
- package/dist/chunk-QIJMV2P2.js +2 -0
- package/dist/chunk-QJFRAMK7.js +2 -0
- package/dist/{chunk-2SKAED2I.js → chunk-RAZOACDD.js} +2 -2
- package/dist/chunk-RIGRP3FD.js +1 -0
- package/dist/chunk-S3ZPXWX7.js +2 -0
- package/dist/{chunk-266RH77Z.js → chunk-THSCUT2L.js} +1 -1
- package/dist/{chunk-EEH4WYI7.js → chunk-WNMGUALD.js} +1 -1
- package/dist/chunk-WZI4YC2O.js +1 -0
- package/dist/{chunk-5A25RATC.js → chunk-X6MPU7UO.js} +3 -3
- package/dist/{chunk-QNZVPFSP.js → chunk-XF5PVZOS.js} +1 -1
- package/dist/{chunk-SJYDLHEF.js → chunk-ZXN3TWWW.js} +1 -1
- package/dist/entry-0.js +1 -1
- package/dist/entry-10.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-13.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-18.js +1 -1
- package/dist/entry-19.js +1 -1
- package/dist/entry-20.js +1 -1
- package/dist/entry-21.js +2 -1
- package/dist/entry-22.js +1 -1
- package/dist/entry-23.js +1 -1
- package/dist/entry-24.js +1 -1
- package/dist/entry-25.js +1 -1
- package/dist/entry-26.js +7 -1
- package/dist/entry-27.js +1 -1
- package/dist/entry-28.js +1 -1
- package/dist/entry-29.js +1 -1
- package/dist/entry-30.js +1 -1
- package/dist/entry-31.js +4 -1
- package/dist/entry-32.js +8 -1
- package/dist/entry-33.js +1 -1
- package/dist/entry-34.js +1 -1
- package/dist/entry-35.js +1 -1
- package/dist/entry-36.js +1 -1
- package/dist/entry-37.js +1 -1
- package/dist/entry-38.js +1 -1
- package/dist/entry-39.js +1 -1
- package/dist/entry-4.js +1 -1
- package/dist/entry-40.js +14 -1
- package/dist/entry-41.js +1 -1
- package/dist/entry-42.js +1 -1
- package/dist/entry-43.js +1 -1
- package/dist/entry-44.js +1 -1
- package/dist/entry-45.js +7 -1
- package/dist/entry-46.js +11 -1
- package/dist/entry-47.js +1 -1
- package/dist/entry-48.js +1 -1
- package/dist/entry-49.js +1 -1
- package/dist/entry-50.js +1 -1
- package/dist/entry-51.js +1 -1
- package/dist/entry-52.js +1 -1
- package/dist/entry-53.js +1 -0
- package/dist/entry-54.js +0 -1
- package/dist/entry-55.js +1 -0
- package/dist/entry-56.js +0 -1
- package/dist/entry-57.js +1 -1
- package/dist/entry-58.js +1 -1
- package/dist/entry-59.js +1 -1
- package/dist/entry-60.js +1 -1
- package/dist/entry-61.js +1 -1
- package/dist/entry-62.js +1 -0
- package/dist/entry-63.js +0 -1
- package/dist/entry-64.js +1 -0
- package/dist/entry-65.js +0 -1
- package/dist/entry-66.js +1 -1
- package/dist/entry-67.js +1 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +59 -1
- package/dist/entry-70.js +4 -1
- package/dist/entry-71.js +1 -1
- package/dist/entry-72.js +29 -1
- package/dist/entry-73.js +2 -1
- package/dist/entry-74.js +1 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-76.js +1 -1
- package/dist/entry-77.js +3 -1
- package/dist/entry-78.js +1 -1
- package/dist/entry-79.js +1 -1
- package/dist/entry-80.js +1 -0
- package/dist/pi-agent-ide.js +2 -13
- package/docs/configuration.md +57 -1
- package/docs/extensions.md +4 -2
- package/docs/generated/tool-catalog/cmake.md +5 -5
- package/docs/generated/tool-catalog/csharp.md +5 -5
- package/docs/generated/tool-catalog/css.md +7 -7
- package/docs/generated/tool-catalog/dart.md +9 -0
- package/docs/generated/tool-catalog/dockerfile.md +5 -5
- package/docs/generated/tool-catalog/elixir.md +9 -0
- package/docs/generated/tool-catalog/html.md +7 -6
- package/docs/generated/tool-catalog/index.md +9 -0
- package/docs/generated/tool-catalog/javascript.md +8 -8
- package/docs/generated/tool-catalog/json.md +7 -7
- package/docs/generated/tool-catalog/julia.md +8 -0
- package/docs/generated/tool-catalog/kotlin.md +6 -5
- package/docs/generated/tool-catalog/markdown.md +6 -6
- package/docs/generated/tool-catalog/powershell.md +9 -0
- package/docs/generated/tool-catalog/python.md +6 -6
- package/docs/generated/tool-catalog/r.md +9 -0
- package/docs/generated/tool-catalog/scala.md +9 -0
- package/docs/generated/tool-catalog/svelte.md +9 -0
- package/docs/generated/tool-catalog/typescript.md +9 -8
- package/docs/generated/tool-catalog/vue.md +9 -0
- package/docs/generated/tool-catalog/yaml.md +6 -6
- package/docs/generated/tool-catalog/zig.md +9 -0
- package/docs/tools.md +1 -1
- package/node_modules/pi-agent-doctor/package.json +10 -3
- package/node_modules/pi-agent-doctor/runtime/entry-20.js +1 -0
- package/node_modules/pi-agent-doctor/src/catalog.ts +27 -1
- package/node_modules/pi-agent-doctor/src/evidence.ts +118 -0
- package/node_modules/pi-agent-doctor/src/executable.ts +63 -17
- package/node_modules/pi-agent-filesystem/index.ts +2 -2
- package/node_modules/pi-agent-filesystem/package.json +7 -7
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/runtime/entry-24.js +2 -0
- package/node_modules/pi-agent-ide-ast/package.json +11 -11
- package/node_modules/pi-agent-ide-ast/runtime/entry-25.js +0 -1
- package/node_modules/pi-agent-ide-ast/runtime/entry-26.js +2 -0
- package/node_modules/pi-agent-ide-ast/src/ast/manager.ts +3 -0
- package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +92 -19
- package/node_modules/pi-agent-ide-ast/src/extension.ts +9 -14
- package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +60 -0
- package/node_modules/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/node_modules/pi-agent-ide-changes/index.ts +1 -5
- package/node_modules/pi-agent-ide-changes/package.json +8 -8
- package/node_modules/pi-agent-ide-changes/runtime/entry-27.js +0 -1
- package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +1 -7
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +1 -5
- package/node_modules/pi-agent-ide-formatter/package.json +4 -4
- package/node_modules/pi-agent-ide-formatter/src/catalog.ts +131 -13
- package/node_modules/pi-agent-ide-formatter/src/formatter.ts +12 -7
- package/node_modules/pi-agent-ide-formatter/src/registry.ts +20 -8
- package/node_modules/pi-agent-ide-languages/package.json +3 -3
- package/node_modules/pi-agent-ide-languages/src/languages.ts +15 -0
- package/node_modules/pi-agent-ide-lint/index.ts +4 -1
- package/node_modules/pi-agent-ide-lint/package.json +8 -8
- package/node_modules/pi-agent-ide-lint/src/catalog.ts +196 -39
- package/node_modules/pi-agent-ide-lint/src/command-linter.ts +23 -3
- package/node_modules/pi-agent-ide-lint/src/diagnostics.ts +73 -33
- package/node_modules/pi-agent-ide-lint/src/registry.ts +20 -8
- package/node_modules/pi-agent-ide-lsp/index.ts +1 -12
- package/node_modules/pi-agent-ide-lsp/package.json +9 -9
- package/node_modules/pi-agent-ide-lsp/runtime/entry-32.js +2 -0
- package/node_modules/pi-agent-ide-lsp/src/catalog.ts +161 -7
- package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +10 -10
- package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +2 -4
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +162 -12
- package/node_modules/pi-agent-ide-lsp/src/lsp/file-watchers.ts +88 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/initialization-options.ts +14 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +8 -4
- package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +69 -34
- package/node_modules/pi-agent-ide-lsp/src/lsp/transport-writer.ts +24 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/types.ts +5 -0
- package/node_modules/pi-agent-image/package.json +3 -3
- package/node_modules/pi-agent-image/src/image-converter.ts +1 -1
- package/node_modules/pi-agent-invariant/package.json +2 -2
- package/node_modules/pi-agent-pdf/package.json +3 -3
- package/node_modules/pi-agent-pdf/src/pdf-converter.ts +1 -1
- package/node_modules/pi-agent-read/package.json +11 -11
- package/node_modules/pi-agent-read/runtime/entry-39.js +0 -1
- package/node_modules/pi-agent-read/runtime/entry-40.js +2 -0
- package/node_modules/pi-agent-read/src/api/rendering.ts +3 -0
- package/node_modules/pi-agent-read/src/core/read-core.ts +6 -26
- package/node_modules/pi-agent-read/src/core/tools/read/native-resource-renderer.ts +74 -0
- package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +28 -7
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +35 -30
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-resource/src/content-conversion/content-description.ts +1 -8
- package/node_modules/pi-agent-search/package.json +7 -7
- package/node_modules/pi-agent-search/runtime/entry-44.js +0 -1
- package/node_modules/pi-agent-search/src/core/extension.ts +7 -5
- package/node_modules/pi-agent-search/src/core/search-core.ts +10 -0
- package/node_modules/pi-agent-search-text/index.ts +42 -33
- package/node_modules/pi-agent-search-text/package.json +9 -9
- package/node_modules/pi-agent-search-text/runtime/entry-46.js +1 -0
- package/node_modules/pi-agent-search-text/src/file-search.ts +9 -1
- package/node_modules/pi-agent-search-text/src/resolvers.ts +1 -1
- package/node_modules/pi-agent-search-text/src/search-recipe.ts +2 -0
- package/node_modules/pi-agent-search-text/src/search-session.ts +48 -0
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text/runtime/entry-48.js +1 -0
- package/node_modules/pi-agent-text/src/text-converter.ts +1 -1
- package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-49.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-50.js +0 -1
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-51.js +2 -0
- package/node_modules/pi-agent-text-anchor-line-hash/index.ts +2 -6
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-52.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-53.js +2 -0
- package/node_modules/pi-agent-text-editor/package.json +22 -22
- package/node_modules/pi-agent-text-editor/runtime/entry-68.js +0 -1
- package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +3 -0
- package/node_modules/pi-agent-text-editor/src/api/post-edit.ts +71 -1
- package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +4 -12
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +7 -9
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +27 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +38 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +81 -0
- package/node_modules/pi-agent-text-editor/src/core/text-anchor-registry.ts +5 -2
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +23 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +5 -9
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +54 -14
- package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +45 -43
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +18 -8
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +7 -4
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +13 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +18 -8
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -1
- package/node_modules/pi-agent-text-editor-argument-order/package.json +3 -3
- package/node_modules/pi-agent-text-editor-overwrite/package.json +4 -4
- package/node_modules/pi-agent-text-editor-renderer/index.ts +5 -1
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
- package/node_modules/pi-agent-text-editor-renderer/src/diff-model.ts +7 -0
- package/node_modules/pi-agent-text-editor-renderer/src/diff-renderer.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/src/diff-viewport.ts +11 -2
- package/node_modules/pi-agent-text-editor-renderer/src/frozen-viewport.ts +140 -52
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +52 -4
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-result.ts +53 -1
- package/node_modules/pi-agent-text-editor-renderer/src/persisted-result.ts +8 -2
- package/node_modules/pi-agent-text-editor-renderer/src/render-resource.ts +10 -0
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +5 -3
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +2 -0
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-call-interception/src/index.ts +3 -0
- package/node_modules/pi-agent-tool-ui/package.json +2 -2
- package/node_modules/pi-agent-tool-ui/runtime/entry-75.js +1 -0
- package/node_modules/pi-agent-web/index.ts +1 -6
- package/node_modules/pi-agent-web/package.json +7 -7
- package/node_modules/pi-agent-web-html/package.json +3 -3
- package/node_modules/pi-agent-web-html/src/html-converter.ts +1 -1
- package/node_modules/pi-agent-web-image/package.json +4 -4
- package/node_modules/pi-agent-web-pdf/package.json +4 -4
- package/node_modules/pi-agent-web-text/package.json +4 -4
- package/node_modules/pi-agent-web-text/runtime/entry-80.js +2 -0
- package/package.json +35 -35
- package/src/api/plugin-protocol.ts +2 -0
- package/src/api/text-editor.ts +7 -0
- package/src/api/tool-config/formatters.json +70 -12
- package/src/api/tool-config/linters.json +148 -66
- package/src/api/tool-config/lsp-servers.json +142 -7
- package/src/api/tool-config.ts +60 -24
- package/src/code-view/diagnostic-view.ts +14 -10
- package/src/composite/builtin-extensions.ts +148 -66
- package/src/composite/extensions-config.ts +18 -0
- package/src/core/diagnostic-entry.ts +94 -0
- package/src/core/diagnostic-store.ts +43 -21
- package/src/core/extension.ts +39 -17
- package/src/doctor/config-writer.ts +14 -1
- package/src/doctor/discovery.ts +13 -68
- package/src/doctor/run.ts +33 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +2 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-24.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-21.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +1 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/src/html-converter.ts +1 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-80.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-76.js +2 -0
- package/src/extensions/pi-agent-read/package.json +11 -11
- package/src/extensions/pi-agent-read/runtime/entry-39.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-40.js +2 -0
- package/src/extensions/pi-agent-read/src/api/rendering.ts +3 -0
- package/src/extensions/pi-agent-read/src/core/read-core.ts +6 -26
- package/src/extensions/pi-agent-read/src/core/tools/read/native-resource-renderer.ts +74 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +28 -7
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +35 -30
- package/src/extensions/pi-agent-search/package.json +7 -7
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +42 -33
- 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-46.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-47.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/file-search.ts +9 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +1 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +2 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +48 -0
- package/src/extensions/pi-agent-search/runtime/entry-44.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-45.js +2 -0
- package/src/extensions/pi-agent-search/src/core/extension.ts +7 -5
- package/src/extensions/pi-agent-search/src/core/search-core.ts +10 -0
- package/src/extensions/pi-agent-text-editor/package.json +22 -22
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +4 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-49.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-50.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-51.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts +2 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-52.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-53.js +2 -0
- 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-overwrite/package.json +4 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +5 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-model.ts +7 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-renderer.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-viewport.ts +11 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/frozen-viewport.ts +140 -52
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +52 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-result.ts +53 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/persisted-result.ts +8 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/render-resource.ts +10 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +5 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +2 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-68.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-69.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +3 -0
- package/src/extensions/pi-agent-text-editor/src/api/post-edit.ts +71 -1
- package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +4 -12
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +7 -9
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +27 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +38 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +81 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-anchor-registry.ts +5 -2
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +23 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +5 -9
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +54 -14
- package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +45 -43
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +18 -8
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +7 -4
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +13 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +18 -8
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -1
- package/src/pi-agent-ide.ts +11 -0
- package/src/plugins/pi-agent-ide-ast/package.json +11 -11
- package/src/plugins/pi-agent-ide-ast/runtime/entry-25.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-26.js +2 -0
- package/src/plugins/pi-agent-ide-ast/src/ast/manager.ts +3 -0
- package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +92 -19
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +9 -14
- package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +60 -0
- package/src/plugins/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/index.ts +1 -5
- package/src/plugins/pi-agent-ide-changes/package.json +8 -8
- package/src/plugins/pi-agent-ide-changes/runtime/entry-27.js +0 -1
- package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +1 -7
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +1 -5
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +1 -8
- package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
- package/src/plugins/pi-agent-ide-formatter/src/catalog.ts +131 -13
- package/src/plugins/pi-agent-ide-formatter/src/formatter.ts +12 -7
- package/src/plugins/pi-agent-ide-formatter/src/registry.ts +20 -8
- package/src/plugins/pi-agent-ide-languages/package.json +3 -3
- package/src/plugins/pi-agent-ide-languages/src/languages.ts +15 -0
- package/src/plugins/pi-agent-ide-lint/index.ts +4 -1
- package/src/plugins/pi-agent-ide-lint/package.json +8 -8
- package/src/plugins/pi-agent-ide-lint/src/catalog.ts +196 -39
- package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +23 -3
- package/src/plugins/pi-agent-ide-lint/src/diagnostics.ts +73 -33
- package/src/plugins/pi-agent-ide-lint/src/registry.ts +20 -8
- package/src/plugins/pi-agent-ide-lsp/index.ts +1 -12
- package/src/plugins/pi-agent-ide-lsp/package.json +9 -9
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-32.js +2 -0
- package/src/plugins/pi-agent-ide-lsp/src/catalog.ts +161 -7
- package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +10 -10
- package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +2 -4
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +162 -12
- package/src/plugins/pi-agent-ide-lsp/src/lsp/file-watchers.ts +88 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/initialization-options.ts +14 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +8 -4
- package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +69 -34
- package/src/plugins/pi-agent-ide-lsp/src/lsp/transport-writer.ts +24 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/types.ts +5 -0
- package/src/post-edit/gate.ts +44 -15
- package/src/toolchain/types.ts +4 -0
- package/dist/chunk-34ZQTTU2.js +0 -2
- package/dist/chunk-476MR2QB.js +0 -1
- package/dist/chunk-4KQOODGE.js +0 -13
- package/dist/chunk-4SQQKEVD.js +0 -16
- package/dist/chunk-52BM6J6I.js +0 -6
- package/dist/chunk-5BWUVAR4.js +0 -1
- package/dist/chunk-6DN7NO7L.js +0 -1
- package/dist/chunk-6SMFVLTY.js +0 -1
- package/dist/chunk-7NDBZ4WX.js +0 -1
- package/dist/chunk-AP7Z3VWC.js +0 -1
- package/dist/chunk-BYWAG6X3.js +0 -6
- package/dist/chunk-E4SECPF4.js +0 -1
- package/dist/chunk-EW2KVKCN.js +0 -2
- package/dist/chunk-F6SESI3P.js +0 -4
- package/dist/chunk-GTK5AREE.js +0 -2
- package/dist/chunk-HOBTFFQR.js +0 -1
- package/dist/chunk-IMVCVPMP.js +0 -3
- package/dist/chunk-IOCABSRL.js +0 -1
- package/dist/chunk-KP37XTDI.js +0 -1
- package/dist/chunk-KYVOMBO5.js +0 -1
- package/dist/chunk-LFV6G5Z3.js +0 -1
- package/dist/chunk-MB6VVVAF.js +0 -2
- package/dist/chunk-NI2NK4JU.js +0 -1
- package/dist/chunk-OIL6BB2S.js +0 -33
- package/dist/chunk-PODWLGNO.js +0 -6
- package/dist/chunk-QW5O42QJ.js +0 -2
- package/dist/chunk-SSZB66C3.js +0 -3
- package/dist/chunk-TG6H6EOI.js +0 -1
- package/dist/chunk-TNWYEXFG.js +0 -1
- package/dist/chunk-U4D6FT66.js +0 -1
- package/dist/chunk-VUNCBASK.js +0 -10
- package/dist/chunk-VWVLBOMU.js +0 -8
- package/dist/chunk-W3XYKJ5H.js +0 -1
- package/dist/chunk-XGUAL3CA.js +0 -1
- package/dist/chunk-YQTLJ5ZV.js +0 -58
- package/node_modules/pi-agent-filesystem/runtime/entry-20.js +0 -2
- package/node_modules/pi-agent-ide-ast/runtime/entry-24.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-26.js +0 -1
- package/node_modules/pi-agent-image/runtime/entry-32.js +0 -1
- package/node_modules/pi-agent-read/src/core/tools/read/views.ts +0 -29
- package/node_modules/pi-agent-resource/runtime/entry-40.js +0 -1
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-48.js +0 -2
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-49.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-51.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-53.js +0 -1
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-73.js +0 -1
- package/node_modules/pi-agent-web/runtime/entry-75.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-21.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-20.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-76.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-75.js +0 -2
- package/src/extensions/pi-agent-read/runtime/entry-35.js +0 -1
- package/src/extensions/pi-agent-read/src/core/tools/read/views.ts +0 -29
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-45.js +0 -2
- package/src/extensions/pi-agent-search/runtime/entry-41.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-48.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-49.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-51.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/runtime/entry-69.js +0 -2
- package/src/extensions/pi-agent-text-editor/runtime/entry-53.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-24.js +0 -1
- package/src/plugins/pi-agent-ide-changes/runtime/entry-26.js +0 -1
- /package/node_modules/{pi-agent-filesystem-image → pi-agent-filesystem}/runtime/entry-21.js +0 -0
- /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-22.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-23.js +0 -0
- /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-28.js +0 -0
- /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-29.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-30.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-31.js +0 -0
- /package/node_modules/{pi-agent-invariant → pi-agent-image}/runtime/entry-33.js +0 -0
- /package/node_modules/{pi-agent-pdf → pi-agent-invariant}/runtime/entry-34.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-41.js +0 -0
- /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-45.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-47.js +0 -0
- /package/node_modules/{pi-agent-text-editor-argument-order → pi-agent-text-editor}/runtime/entry-69.js +0 -0
- /package/node_modules/{pi-agent-text-editor-overwrite → pi-agent-text-editor-argument-order}/runtime/entry-70.js +0 -0
- /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor-overwrite}/runtime/entry-71.js +0 -0
- /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-72.js +0 -0
- /package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-74.js +0 -0
- /package/node_modules/{pi-agent-web-html → pi-agent-web}/runtime/entry-76.js +0 -0
- /package/node_modules/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-77.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-78.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-79.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-22.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-23.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-77.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-78.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-79.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-overwrite → pi-agent-text-editor-argument-order}/runtime/entry-70.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-renderer → pi-agent-text-editor-overwrite}/runtime/entry-71.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-72.js +0 -0
- /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-28.js +0 -0
- /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-29.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-30.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-31.js +0 -0
|
@@ -20,6 +20,44 @@ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
|
20
20
|
export default async function registerTextSearch(pi: ExtensionAPI): Promise<void> {
|
|
21
21
|
const sessions = new SearchSessionStore();
|
|
22
22
|
|
|
23
|
+
pi.on("tool_result", async (event, ctx) => {
|
|
24
|
+
if (
|
|
25
|
+
event.toolName !== "replace" ||
|
|
26
|
+
event.isError ||
|
|
27
|
+
typeof event.details !== "object" ||
|
|
28
|
+
event.details === null
|
|
29
|
+
)
|
|
30
|
+
return;
|
|
31
|
+
const observations = await sessions.observeAfterEdit(
|
|
32
|
+
[event.input.path, event.input.start, event.input.end],
|
|
33
|
+
ctx.signal,
|
|
34
|
+
);
|
|
35
|
+
if (observations.length === 0) return;
|
|
36
|
+
return {
|
|
37
|
+
content: [
|
|
38
|
+
...event.content,
|
|
39
|
+
{
|
|
40
|
+
type: "text" as const,
|
|
41
|
+
text: [
|
|
42
|
+
"Original search observed after editing (not task validation):",
|
|
43
|
+
...observations.map((observation) => {
|
|
44
|
+
const { query: _compiledQuery, fallbacks: _fallbacks, ...scope } = observation.scope;
|
|
45
|
+
return [
|
|
46
|
+
`SEARCH#${observation.sessionId}: ${JSON.stringify(observation.query)}`,
|
|
47
|
+
`Scope and options: ${JSON.stringify(scope)}`,
|
|
48
|
+
observation.error === undefined
|
|
49
|
+
? `Matches: ${observation.matches}${observation.complete === true ? "; complete search." : "+; incomplete search, lower bound only."}`
|
|
50
|
+
: `Search failed: ${observation.error}. Applied edits remain applied.`,
|
|
51
|
+
...(observation.notices ?? []),
|
|
52
|
+
].join("\n");
|
|
53
|
+
}),
|
|
54
|
+
].join("\n"),
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
details: { ...event.details, searchObservations: observations },
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
|
|
23
61
|
pi.on("tool_result", (event) => {
|
|
24
62
|
if (event.toolName !== "search" || typeof event.details !== "object" || event.details === null)
|
|
25
63
|
return;
|
|
@@ -47,41 +85,12 @@ export default async function registerTextSearch(pi: ExtensionAPI): Promise<void
|
|
|
47
85
|
api.addResolver({ resolver: createTextResolver(sessions), fallback: true });
|
|
48
86
|
api.describe(
|
|
49
87
|
[
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
api.addPromptGuideline(
|
|
57
|
-
"Local search tries literal terms first, then unquoted terms as regex if no matches exist, then separate words for ordinary multi-word queries. Search reports each fallback; invalid optional regex is skipped. Quoted and Boolean queries never fall back to separate words.",
|
|
58
|
-
);
|
|
59
|
-
api.addPromptGuideline(
|
|
60
|
-
'You can combine search terms with uppercase `AND`/`OR`, infix `NOT`, `||`, or space-separated `|`. Parentheses containing Boolean operators group conditions. Regex groups, classes, and escapes stay inside terms: `(?:foo|bar)\\d+ AND "keep.me" NOT ignored`. Quoted terms stay literal, including during regex fallback; `foo|bar` first searches that exact text, then regex alternatives.',
|
|
61
|
-
);
|
|
62
|
-
api.addPromptGuideline(
|
|
63
|
-
"You can use `regex:<pattern>` to force regex-only search and `files:<pattern>` for file paths. Empty or unhandled protocol queries fall back to searching the original text, including the prefix. Resolver errors, timeouts, and successful empty protocol results do not trigger text fallback.",
|
|
64
|
-
);
|
|
65
|
-
api.addPromptGuideline(
|
|
66
|
-
"You can narrow local search with `path`, `include`, `exclude`, `caseSensitive`, `wholeWord`, and `limit`.",
|
|
67
|
-
);
|
|
68
|
-
api.addPromptGuideline(
|
|
69
|
-
[
|
|
70
|
-
"You can reuse complete text and regex search results through these `SEARCH#...` values:",
|
|
71
|
-
" - `SEARCH#HASH:N:line` selects one result's full line.",
|
|
72
|
-
" - `SEARCH#HASH:N:match` selects one exact match.",
|
|
73
|
-
" - `SEARCH#HASH:all:line` selects every unique containing line.",
|
|
74
|
-
" - `SEARCH#HASH:all:match` selects every exact match.",
|
|
75
|
-
" Read shows the containing lines for both modes; `:line` and `:match` control the edit range, not partial-line read rendering.",
|
|
76
|
-
" Limited or incomplete searches omit the `all` values.",
|
|
88
|
+
"Local queries try literal terms first, then unquoted terms as regex when no literal results exist, then separate words for ordinary multi-word queries. Quoted terms stay literal. Boolean conditions stay intact across fallback. Uppercase AND/OR, infix NOT, ||, and space-separated | are Boolean operators; unspaced | and regex groups/classes belong to regex terms. Parentheses containing Boolean operators group Boolean conditions. regex:<pattern> forces regex-only matching; files:<pattern> searches file paths: glob patterns use *, **, ?, character classes and braces; other queries use case-insensitive subsequence matching. Slash-containing globs match cwd-relative paths; basename globs match at any depth.",
|
|
89
|
+
"The result says when a query was broadened. Empty or unknown prefixes are searched as plain text. A recognized prefixed query returns its own results or error; it does not silently become a text search.",
|
|
90
|
+
"SEARCH#HASH:N:line selects one containing line; :match selects its exact match. :all:line selects all unique containing lines and :all:match selects all matches. Read returns containing lines for both forms. A SEARCH resource can be used as a read path or mutation path/anchor; omit the file path for an all-selection spanning files.",
|
|
91
|
+
"Use SEARCH references exactly as returned to select the matching content. A single-result reference becomes stale when its file changes; obtain a fresh result before using it again. An :all reference refreshes the original query when a selected file changes. Limited or incomplete searches do not provide :all selections.",
|
|
77
92
|
].join("\n"),
|
|
78
93
|
);
|
|
79
|
-
api.addPromptGuideline(
|
|
80
|
-
"You can pass a returned `SEARCH#...` value directly to read or a compatible mutation tool as its path or anchor. Omit the file path when an `all` value spans files.",
|
|
81
|
-
);
|
|
82
|
-
api.addPromptGuideline(
|
|
83
|
-
"You can replace every exact search match by passing `SEARCH#HASH:all:match` as the replace path, or replace whole matched lines with `SEARCH#HASH:all:line`.",
|
|
84
|
-
);
|
|
85
94
|
},
|
|
86
95
|
}),
|
|
87
96
|
connectTextEditorPlugin(pi, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-search-text",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,23 +8,23 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./index.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-46.js"
|
|
12
12
|
},
|
|
13
13
|
"./search-session": {
|
|
14
14
|
"types": "./src/search-session.ts",
|
|
15
|
-
"default": "./runtime/entry-
|
|
15
|
+
"default": "./runtime/entry-47.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"pi-agent-doctor": "0.2.
|
|
20
|
-
"pi-agent-invariant": "0.2.
|
|
21
|
-
"pi-agent-search": "0.2.
|
|
22
|
-
"pi-agent-text": "0.2.
|
|
23
|
-
"pi-agent-text-editor": "0.2.
|
|
19
|
+
"pi-agent-doctor": "0.2.2",
|
|
20
|
+
"pi-agent-invariant": "0.2.2",
|
|
21
|
+
"pi-agent-search": "0.2.2",
|
|
22
|
+
"pi-agent-text": "0.2.2",
|
|
23
|
+
"pi-agent-text-editor": "0.2.2"
|
|
24
24
|
},
|
|
25
25
|
"pi": {
|
|
26
26
|
"extensions": [
|
|
27
|
-
"./runtime/entry-
|
|
27
|
+
"./runtime/entry-46.js"
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -71,7 +71,7 @@ export function searchFiles(
|
|
|
71
71
|
.split("\n")
|
|
72
72
|
.filter(Boolean)
|
|
73
73
|
.map((file) => path.relative(cwd, path.resolve(cwd, file)))
|
|
74
|
-
.filter((file) =>
|
|
74
|
+
.filter((file) => matchFile(file, query))
|
|
75
75
|
.sort((left, right) => left.localeCompare(right));
|
|
76
76
|
resolve({ files: matches.slice(0, limit), complete: matches.length <= limit });
|
|
77
77
|
});
|
|
@@ -87,6 +87,14 @@ function splitGlobs(value: string | undefined): string[] {
|
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
function matchFile(file: string, query: string): boolean {
|
|
91
|
+
if (/[*?[\]{}]/u.test(query)) {
|
|
92
|
+
const pattern = query.replace(/^\.\//u, "");
|
|
93
|
+
return path.matchesGlob(pattern.includes("/") ? file : path.basename(file), pattern);
|
|
94
|
+
}
|
|
95
|
+
return fuzzyMatch(file, query);
|
|
96
|
+
}
|
|
97
|
+
|
|
90
98
|
function fuzzyMatch(file: string, query: string): boolean {
|
|
91
99
|
if (query.length === 0) {
|
|
92
100
|
return true;
|
|
@@ -13,6 +13,8 @@ export interface SearchFallback {
|
|
|
13
13
|
|
|
14
14
|
/** Replayable search inputs, including the same ordered fallbacks used by the original call. */
|
|
15
15
|
export interface SearchRecipe extends TextSearchRequest {
|
|
16
|
+
/** User-facing query retained separately from the compiled matching expression. */
|
|
17
|
+
readonly originalQuery?: string;
|
|
16
18
|
readonly fallbacks?: readonly SearchFallback[];
|
|
17
19
|
}
|
|
18
20
|
|
|
@@ -175,6 +175,54 @@ export class SearchSessionStore {
|
|
|
175
175
|
return session;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
/** Repeats each referenced search once, keeping its original scope, limits and fallback rules. */
|
|
179
|
+
public async observeAfterEdit(
|
|
180
|
+
values: readonly unknown[],
|
|
181
|
+
signal?: AbortSignal,
|
|
182
|
+
): Promise<
|
|
183
|
+
readonly {
|
|
184
|
+
sessionId: string;
|
|
185
|
+
query: string;
|
|
186
|
+
scope: Record<string, unknown>;
|
|
187
|
+
matches?: number;
|
|
188
|
+
complete?: boolean;
|
|
189
|
+
notices?: readonly string[];
|
|
190
|
+
error?: string;
|
|
191
|
+
}[]
|
|
192
|
+
> {
|
|
193
|
+
const ids = new Set(
|
|
194
|
+
values.flatMap((value) => {
|
|
195
|
+
const anchor = typeof value === "string" ? parseSearchAnchor(value) : undefined;
|
|
196
|
+
return anchor === undefined ? [] : [anchor.id];
|
|
197
|
+
}),
|
|
198
|
+
);
|
|
199
|
+
const observations = [];
|
|
200
|
+
for (const id of ids) {
|
|
201
|
+
const session = this.#sessions.get(id);
|
|
202
|
+
if (session === undefined) continue;
|
|
203
|
+
const base = {
|
|
204
|
+
sessionId: id,
|
|
205
|
+
query: session.recipe.originalQuery ?? session.query,
|
|
206
|
+
scope: normalizeRecipe(session.recipe, session.cwd),
|
|
207
|
+
};
|
|
208
|
+
try {
|
|
209
|
+
const result = await runSearchRecipe(session.recipe, session.cwd, signal);
|
|
210
|
+
observations.push({
|
|
211
|
+
...base,
|
|
212
|
+
matches: result.matches.length,
|
|
213
|
+
complete: result.complete,
|
|
214
|
+
notices: result.notices,
|
|
215
|
+
});
|
|
216
|
+
} catch (error) {
|
|
217
|
+
observations.push({
|
|
218
|
+
...base,
|
|
219
|
+
error: error instanceof Error ? error.message : String(error),
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return observations;
|
|
224
|
+
}
|
|
225
|
+
|
|
178
226
|
public anchorResolver(): TextAnchorResolver {
|
|
179
227
|
return {
|
|
180
228
|
id: "search",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-text",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./src/index.ts",
|
|
6
6
|
"imports": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./src/index.ts",
|
|
12
|
-
"default": "./runtime/entry-
|
|
12
|
+
"default": "./runtime/entry-48.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"pi-agent-resource": "0.2.
|
|
16
|
+
"pi-agent-resource": "0.2.2"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"typebox": "*"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../dist/entry-48.js";
|
|
@@ -25,7 +25,7 @@ const textualAppMediaTypes = new Set([
|
|
|
25
25
|
export function createTextContentConverter(): ContentConverter {
|
|
26
26
|
return {
|
|
27
27
|
id: "text",
|
|
28
|
-
description: "
|
|
28
|
+
description: "Text file paths and URLs return their text.",
|
|
29
29
|
tryConvert(input, context) {
|
|
30
30
|
return Promise.resolve(convertText(input, context));
|
|
31
31
|
},
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-text-anchor-constant",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-text": "0.2.
|
|
10
|
-
"pi-agent-text-editor": "0.2.
|
|
9
|
+
"pi-agent-text": "0.2.2",
|
|
10
|
+
"pi-agent-text-editor": "0.2.2"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-49.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-text-anchor-exact",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
"./api/anchor": {
|
|
10
10
|
"types": "./src/anchor.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-50.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"fast-fuzzy": "1.12.0",
|
|
16
|
-
"pi-agent-text": "0.2.
|
|
17
|
-
"pi-agent-text-editor": "0.2.
|
|
16
|
+
"pi-agent-text": "0.2.2",
|
|
17
|
+
"pi-agent-text-editor": "0.2.2"
|
|
18
18
|
},
|
|
19
19
|
"pi": {
|
|
20
20
|
"extensions": [
|
|
21
|
-
"./runtime/entry-
|
|
21
|
+
"./runtime/entry-51.js"
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
@@ -24,13 +24,9 @@ export default async function registerLineHashTextAnchor(pi: ExtensionAPI): Prom
|
|
|
24
24
|
apiVersion: READ_API_VERSION,
|
|
25
25
|
id: "text-anchor-line-hash",
|
|
26
26
|
setup(api) {
|
|
27
|
-
api.addView({ view: "anchors",
|
|
27
|
+
api.addView({ view: "anchors", presenter });
|
|
28
28
|
api.describe(
|
|
29
|
-
"
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
api.addPromptGuideline(
|
|
33
|
-
'You can use read with `views: ["anchors"]` to add `LINE#HASH` anchors for later edits.',
|
|
29
|
+
'views: ["anchors"] — LINE#HASH references for editing individual source lines.',
|
|
34
30
|
);
|
|
35
31
|
},
|
|
36
32
|
} satisfies ReadPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-text-anchor-line-hash",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
"./api/anchor": {
|
|
10
10
|
"types": "./src/anchor.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-52.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"pi-agent-invariant": "0.2.
|
|
16
|
-
"pi-agent-read": "0.2.
|
|
17
|
-
"pi-agent-text": "0.2.
|
|
18
|
-
"pi-agent-text-editor": "0.2.
|
|
15
|
+
"pi-agent-invariant": "0.2.2",
|
|
16
|
+
"pi-agent-read": "0.2.2",
|
|
17
|
+
"pi-agent-text": "0.2.2",
|
|
18
|
+
"pi-agent-text-editor": "0.2.2"
|
|
19
19
|
},
|
|
20
20
|
"pi": {
|
|
21
21
|
"extensions": [
|
|
22
|
-
"./runtime/entry-
|
|
22
|
+
"./runtime/entry-53.js"
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-text-editor",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*",
|
|
@@ -9,79 +9,79 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
"./api/anchor-inspection": {
|
|
11
11
|
"types": "./src/api/anchor-inspection.ts",
|
|
12
|
-
"default": "./runtime/entry-
|
|
12
|
+
"default": "./runtime/entry-54.js"
|
|
13
13
|
},
|
|
14
14
|
"./api/connect-plugin": {
|
|
15
15
|
"types": "./src/api/connect-plugin.ts",
|
|
16
|
-
"default": "./runtime/entry-
|
|
16
|
+
"default": "./runtime/entry-55.js"
|
|
17
17
|
},
|
|
18
18
|
"./api/edit-completion": {
|
|
19
19
|
"types": "./src/api/edit-completion.ts",
|
|
20
|
-
"default": "./runtime/entry-
|
|
20
|
+
"default": "./runtime/entry-56.js"
|
|
21
21
|
},
|
|
22
22
|
"./api/edit-pipeline": {
|
|
23
23
|
"types": "./src/api/edit-pipeline.ts",
|
|
24
|
-
"default": "./runtime/entry-
|
|
24
|
+
"default": "./runtime/entry-57.js"
|
|
25
25
|
},
|
|
26
26
|
"./api/plugin-protocol": {
|
|
27
27
|
"types": "./src/api/plugin-protocol.ts",
|
|
28
|
-
"default": "./runtime/entry-
|
|
28
|
+
"default": "./runtime/entry-58.js"
|
|
29
29
|
},
|
|
30
30
|
"./api/stale-anchor-message": {
|
|
31
31
|
"types": "./src/api/stale-anchor-message.ts",
|
|
32
|
-
"default": "./runtime/entry-
|
|
32
|
+
"default": "./runtime/entry-59.js"
|
|
33
33
|
},
|
|
34
34
|
"./api/text-selection-anchor": {
|
|
35
35
|
"types": "./src/api/text-selection-anchor.ts",
|
|
36
|
-
"default": "./runtime/entry-
|
|
36
|
+
"default": "./runtime/entry-60.js"
|
|
37
37
|
},
|
|
38
38
|
"./api/post-edit": {
|
|
39
39
|
"types": "./src/api/post-edit.ts",
|
|
40
|
-
"default": "./runtime/entry-
|
|
40
|
+
"default": "./runtime/entry-61.js"
|
|
41
41
|
},
|
|
42
42
|
"./api/mutation-result": {
|
|
43
43
|
"types": "./src/api/mutation-result.ts",
|
|
44
|
-
"default": "./runtime/entry-
|
|
44
|
+
"default": "./runtime/entry-62.js"
|
|
45
45
|
},
|
|
46
46
|
"./api/mutation-guard": {
|
|
47
47
|
"types": "./src/api/mutation-guard.ts",
|
|
48
|
-
"default": "./runtime/entry-
|
|
48
|
+
"default": "./runtime/entry-63.js"
|
|
49
49
|
},
|
|
50
50
|
"./api/mutation-tool": {
|
|
51
51
|
"types": "./src/api/mutation-tool.ts",
|
|
52
|
-
"default": "./runtime/entry-
|
|
52
|
+
"default": "./runtime/entry-64.js"
|
|
53
53
|
},
|
|
54
54
|
"./api/mutation-preview": {
|
|
55
55
|
"types": "./src/api/mutation-preview.ts",
|
|
56
|
-
"default": "./runtime/entry-
|
|
56
|
+
"default": "./runtime/entry-65.js"
|
|
57
57
|
},
|
|
58
58
|
"./api/last-resolved-resource": {
|
|
59
59
|
"types": "./src/api/last-resolved-resource.ts",
|
|
60
|
-
"default": "./runtime/entry-
|
|
60
|
+
"default": "./runtime/entry-66.js"
|
|
61
61
|
},
|
|
62
62
|
"./api/tool-call-interceptor": {
|
|
63
63
|
"types": "./src/api/tool-call-interceptor.ts",
|
|
64
|
-
"default": "./runtime/entry-
|
|
64
|
+
"default": "./runtime/entry-67.js"
|
|
65
65
|
},
|
|
66
66
|
"./api/tool-renderer": {
|
|
67
67
|
"types": "./src/api/tool-renderer.ts",
|
|
68
|
-
"default": "./runtime/entry-
|
|
68
|
+
"default": "./runtime/entry-68.js"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@codemirror/state": "^6.5.0",
|
|
73
73
|
"diff": "^9.0.0",
|
|
74
74
|
"partial-json": "^0.1.7",
|
|
75
|
-
"pi-agent-invariant": "0.2.
|
|
76
|
-
"pi-agent-read": "0.2.
|
|
77
|
-
"pi-agent-resource": "0.2.
|
|
78
|
-
"pi-agent-text": "0.2.
|
|
79
|
-
"pi-agent-tool-call-interception": "0.2.
|
|
75
|
+
"pi-agent-invariant": "0.2.2",
|
|
76
|
+
"pi-agent-read": "0.2.2",
|
|
77
|
+
"pi-agent-resource": "0.2.2",
|
|
78
|
+
"pi-agent-text": "0.2.2",
|
|
79
|
+
"pi-agent-tool-call-interception": "0.2.2",
|
|
80
80
|
"typebox-guard": "npm:typebox@^1.1.38"
|
|
81
81
|
},
|
|
82
82
|
"pi": {
|
|
83
83
|
"extensions": [
|
|
84
|
-
"./runtime/entry-
|
|
84
|
+
"./runtime/entry-69.js"
|
|
85
85
|
]
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
@@ -7,12 +7,19 @@ import {
|
|
|
7
7
|
TEXT_EDITOR_PROTOCOL,
|
|
8
8
|
} from "#src/api/plugin-protocol.js";
|
|
9
9
|
|
|
10
|
-
import type {
|
|
10
|
+
import type {
|
|
11
|
+
DiagnosticHint,
|
|
12
|
+
MutationFormatting,
|
|
13
|
+
MutationDiffStatus,
|
|
14
|
+
SyntaxErrorSummary,
|
|
15
|
+
Warning,
|
|
16
|
+
} from "#src/api/mutation-result.js";
|
|
11
17
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
12
18
|
import type { TextDocument } from "pi-agent-text";
|
|
13
19
|
|
|
14
20
|
export const TEXT_EDITOR_POST_EDIT_REGISTER_EVENT = `${TEXT_EDITOR_PROTOCOL}/post-edit/register`;
|
|
15
21
|
|
|
22
|
+
/** The saved edit before post-processing; handlers run inside the file's mutation queue. */
|
|
16
23
|
export interface TextPostEditTransaction {
|
|
17
24
|
readonly source: string;
|
|
18
25
|
readonly resourceSource: string;
|
|
@@ -35,6 +42,63 @@ export interface TextMutationResultContributionData {
|
|
|
35
42
|
readonly syntaxErrorSummary?: SyntaxErrorSummary;
|
|
36
43
|
}
|
|
37
44
|
|
|
45
|
+
/** Validates formatter metadata supplied by a post-edit integration. */
|
|
46
|
+
export function isFormattingContribution(
|
|
47
|
+
value: unknown,
|
|
48
|
+
): value is { formatting: MutationFormatting } {
|
|
49
|
+
return Value.Check(
|
|
50
|
+
Type.Object({
|
|
51
|
+
formatting: Type.Object({
|
|
52
|
+
status: Type.Union(
|
|
53
|
+
[
|
|
54
|
+
"disabled",
|
|
55
|
+
"unavailable",
|
|
56
|
+
"skipped-syntax",
|
|
57
|
+
"unchanged",
|
|
58
|
+
"changed",
|
|
59
|
+
"failed",
|
|
60
|
+
"not-reported",
|
|
61
|
+
].map((status) => Type.Literal(status)),
|
|
62
|
+
),
|
|
63
|
+
formatter: Type.Optional(Type.String()),
|
|
64
|
+
}),
|
|
65
|
+
}),
|
|
66
|
+
value,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Return this data from a post-edit handler to add statuses to that file's diff.
|
|
72
|
+
* All handlers contribute in registration order. Use plain text, not ANSI or Markdown.
|
|
73
|
+
* Statuses are display-only and persist with the completed result, including on resume.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* connectTextEditorPostEditHandler(pi, {
|
|
77
|
+
* id: "my-check",
|
|
78
|
+
* handler: () => ({ diffStatuses: [{ text: "Checked", tone: "success" }] }),
|
|
79
|
+
* });
|
|
80
|
+
*/
|
|
81
|
+
export interface TextPostEditStatusContribution {
|
|
82
|
+
readonly diffStatuses: readonly MutationDiffStatus[];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Validate display data before it enters the diff result. */
|
|
86
|
+
export function isDiffStatusContribution(value: unknown): value is TextPostEditStatusContribution {
|
|
87
|
+
return Value.Check(
|
|
88
|
+
Type.Object({
|
|
89
|
+
diffStatuses: Type.Array(
|
|
90
|
+
Type.Object({
|
|
91
|
+
text: Type.String({ minLength: 1 }),
|
|
92
|
+
tone: Type.Optional(
|
|
93
|
+
Type.Union(["muted", "success", "warning", "error"].map((tone) => Type.Literal(tone))),
|
|
94
|
+
),
|
|
95
|
+
}),
|
|
96
|
+
),
|
|
97
|
+
}),
|
|
98
|
+
value,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
38
102
|
export type TextPostEditHandler = (transaction: TextPostEditTransaction) => unknown;
|
|
39
103
|
|
|
40
104
|
export interface TextPostEditHandlerRegistration {
|
|
@@ -86,6 +150,12 @@ export function isTextMutationResultContributionData(
|
|
|
86
150
|
);
|
|
87
151
|
}
|
|
88
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Register a session-owned post-edit handler, regardless of extension load order.
|
|
155
|
+
* Pi awaits handlers in registration order before finalizing the file result.
|
|
156
|
+
* Return a TextPostEditStatusContribution to add diff statuses; keep slow analysis
|
|
157
|
+
* in background diagnostic sources instead. Registration is removed on shutdown.
|
|
158
|
+
*/
|
|
89
159
|
export function connectTextEditorPostEditHandler(
|
|
90
160
|
pi: ExtensionAPI,
|
|
91
161
|
registration: TextPostEditHandlerRegistration,
|
|
@@ -29,18 +29,10 @@ export function registerBuiltinEditFilter(pi: ExtensionAPI): void {
|
|
|
29
29
|
label: "edit",
|
|
30
30
|
description: "",
|
|
31
31
|
promptGuidelines: [
|
|
32
|
-
"Use
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
" - Use text that matches the file exactly and occurs only once.",
|
|
37
|
-
" - Keep it as small as possible while still unique. Do not pad it with large unchanged regions.",
|
|
38
|
-
" - Plain text is matched against the original file contents, not after earlier mutations are applied.",
|
|
39
|
-
].join("\n"),
|
|
40
|
-
"Do not emit overlapping or nested mutations in one tool-call block. Merge nearby changes into one mutation.",
|
|
41
|
-
|
|
42
|
-
"A mutation that overlaps an earlier accepted mutation is rejected. Check each call's result before retrying; do not repeat edits that already applied.",
|
|
43
|
-
"You can omit a mutation source to reuse the last resolved resource or the previous source in the same tool-call block. Write requires a path; copy and move default their target to the source.",
|
|
32
|
+
"Use the smallest useful source view: reuse sufficient content and anchors, search for known text, or inspect structure when locating a declaration. Read nearby context when boundaries are unclear; resolve ambiguity rather than guessing.",
|
|
33
|
+
"Use an available anchor when it selects exactly the intended text; otherwise use minimal unique exact text. Keep the edit limited to the intended content.",
|
|
34
|
+
"When search broadens to separate words, treat its results as location hints. Refine the query before using those matches for replacement.",
|
|
35
|
+
"Submit independent mutations together in one tool-call block. They are evaluated against the original file contents. Combine overlapping changes into one mutation. A rejected mutation does not cancel other valid mutations; check each result and retry only changes that were not applied.",
|
|
44
36
|
],
|
|
45
37
|
parameters: Type.Object({}, { additionalProperties: false }),
|
|
46
38
|
execute() {
|