pi-agent-ide 0.6.3 → 0.7.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 +97 -0
- package/README.md +10 -3
- package/dist/{chunk-AWXVJ5AC.js → chunk-2RTCSZB3.js} +1 -1
- package/dist/chunk-3HYXQ4YA.js +28 -0
- package/dist/chunk-3JO7QFIL.js +1 -0
- package/dist/chunk-4NIFBFFR.js +11 -0
- package/dist/{chunk-VCTK4JSN.js → chunk-64M3SQPG.js} +1 -1
- package/dist/{chunk-5QQABP47.js → chunk-7LD2OQH3.js} +1 -1
- package/dist/chunk-7LZKOHH2.js +1 -0
- package/dist/chunk-AJRIASPQ.js +2 -0
- package/dist/chunk-EAZGN5ND.js +7 -0
- package/dist/{chunk-ZM4L5AGN.js → chunk-EDURPQAV.js} +3 -2
- package/dist/{chunk-GIRAEVUJ.js → chunk-F5YZG77W.js} +1 -1
- package/dist/chunk-FK42RSF4.js +1 -0
- package/dist/{chunk-O6LE42GK.js → chunk-FXNKMNSJ.js} +1 -1
- package/dist/chunk-GBLKIB6O.js +2 -0
- package/dist/chunk-KBP3QUDT.js +2 -0
- package/dist/chunk-KR36BT5E.js +1 -0
- package/dist/{chunk-NTYXZ3EL.js → chunk-KVHDMIZS.js} +1 -1
- package/dist/{chunk-QDST6VIU.js → chunk-KZC7TI5M.js} +1 -1
- package/dist/chunk-OE7QVAI2.js +5 -0
- package/dist/{chunk-GUTQ3PWL.js → chunk-PLKYHUNT.js} +1 -1
- package/dist/chunk-PNU3E7IO.js +3 -0
- package/dist/chunk-PS2B6THP.js +3 -0
- package/dist/chunk-PYPPV2F5.js +25 -0
- package/dist/{chunk-25CZ5ZIU.js → chunk-QFTBY67N.js} +3 -3
- package/dist/chunk-S5LXX32D.js +28 -0
- package/dist/chunk-SILJ3OL4.js +9 -0
- package/dist/chunk-SQKAXYIR.js +2 -0
- package/dist/chunk-VCGNVTXQ.js +1 -0
- package/dist/chunk-XYS4FSCC.js +12 -0
- package/dist/chunk-YGGKGZO2.js +1 -0
- package/dist/{chunk-L7JMDDSD.js → chunk-YRF7OATP.js} +1 -1
- package/dist/chunk-ZPT5D4VP.js +2 -0
- package/dist/entry-0.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-13.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-15.js +1 -1
- package/dist/entry-16.js +1 -1
- package/dist/entry-17.js +1 -1
- package/dist/entry-25.js +2 -2
- package/dist/entry-26.js +1 -1
- package/dist/entry-27.js +1 -1
- package/dist/entry-28.js +1 -1
- package/dist/entry-29.js +1 -1
- package/dist/entry-30.js +1 -1
- package/dist/entry-31.js +11 -9
- package/dist/entry-33.js +1 -1
- package/dist/entry-37.js +6 -6
- package/dist/entry-42.js +1 -1
- package/dist/entry-44.js +1 -1
- package/dist/entry-45.js +12 -11
- package/dist/entry-46.js +1 -1
- package/dist/entry-49.js +1 -1
- package/dist/entry-50.js +3 -6
- package/dist/entry-51.js +11 -9
- package/dist/entry-52.js +1 -1
- package/dist/entry-53.js +1 -1
- package/dist/entry-54.js +1 -1
- package/dist/entry-55.js +1 -1
- package/dist/entry-56.js +1 -1
- package/dist/entry-57.js +1 -1
- package/dist/entry-58.js +1 -1
- package/dist/entry-59.js +1 -1
- package/dist/entry-60.js +1 -1
- package/dist/entry-61.js +0 -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 +1 -1
- package/dist/entry-66.js +1 -1
- package/dist/entry-67.js +1 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-70.js +1 -1
- package/dist/entry-72.js +1 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-77.js +50 -307
- package/dist/entry-78.js +14 -26
- package/dist/entry-79.js +2 -2
- package/dist/entry-80.js +1 -1
- package/dist/entry-81.js +1 -1
- package/dist/entry-82.js +5 -3
- package/dist/entry-83.js +1 -1
- package/dist/entry-84.js +1 -1
- package/dist/entry-85.js +1 -1
- package/dist/entry-86.js +1 -1
- package/dist/pi-agent-ide.js +15 -3
- package/docs/agent-guides/editing.md +31 -3
- package/docs/agent-guides/git-changes.md +1 -1
- package/docs/agent-guides/json-reading.md +19 -3
- package/docs/agent-guides/read-resources.md +15 -1
- package/docs/agent-guides/search-code.md +43 -2
- package/docs/agent-guides/select-code.md +194 -0
- package/docs/agent-guides/terminal.md +1 -1
- package/docs/code-review.md +99 -0
- package/docs/configuration.md +36 -7
- package/docs/development.md +16 -19
- package/docs/nightly.md +7 -0
- package/docs/releases.md +42 -0
- package/docs/research/apply-native-capability-matrix.md +174 -0
- package/docs/research/apply-read-latency.md +2 -0
- package/docs/research/lpt-393-fuzzy-results/file.json +152 -0
- package/docs/research/lpt-393-fuzzy-results/repo.json +122 -0
- package/docs/research/lpt-393-search-fuzzy-fallback.md +97 -0
- package/docs/research/native-codemode-batch-decision.md +29 -0
- package/docs/research/native-codemode-batching.md +65 -0
- package/docs/structured-results.md +86 -0
- package/docs/tools.md +24 -4
- package/docs/user-hooks.md +1 -1
- package/node_modules/pi-agent-doctor/package.json +1 -1
- package/node_modules/pi-agent-documentation/package.json +1 -1
- package/node_modules/pi-agent-documentation/src/index.ts +1 -1
- package/node_modules/pi-agent-filesystem/index.ts +6 -1
- package/node_modules/pi-agent-filesystem/package.json +7 -6
- package/node_modules/pi-agent-filesystem/src/path-recovery.ts +109 -0
- package/node_modules/pi-agent-filesystem-image/package.json +3 -3
- package/node_modules/pi-agent-filesystem-jq/package.json +5 -5
- package/node_modules/pi-agent-filesystem-pdf/package.json +3 -3
- package/node_modules/pi-agent-filesystem-text/package.json +3 -3
- package/node_modules/pi-agent-ide-ast/package.json +15 -10
- package/node_modules/pi-agent-ide-ast/src/ast/constructs.ts +193 -0
- package/node_modules/pi-agent-ide-ast/src/ast/element-extent.ts +59 -0
- package/node_modules/pi-agent-ide-ast/src/ast/manager.ts +5 -1
- package/node_modules/pi-agent-ide-ast/src/ast/selection.ts +204 -0
- package/node_modules/pi-agent-ide-ast/src/ast/syntax-tree.ts +2 -0
- package/node_modules/pi-agent-ide-ast/src/extension.ts +4 -2
- package/node_modules/pi-agent-ide-ast/src/geometry-selection.ts +184 -0
- package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +6 -1
- package/node_modules/pi-agent-ide-ast/src/scope-handler.ts +6 -2
- package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +110 -7
- package/node_modules/pi-agent-ide-ast/src/select-presentation.ts +104 -0
- package/node_modules/pi-agent-ide-ast/src/select-schema.ts +384 -0
- package/node_modules/pi-agent-ide-ast/src/selection-region.ts +41 -0
- package/node_modules/pi-agent-ide-ast/src/source-text.ts +92 -0
- package/node_modules/pi-agent-ide-ast/src/text-selection.ts +214 -0
- package/node_modules/pi-agent-ide-ast/src/tool-select.ts +251 -0
- package/node_modules/pi-agent-ide-changes/index.ts +2 -24
- package/node_modules/pi-agent-ide-changes/package.json +8 -7
- package/node_modules/pi-agent-ide-changes/src/current-change-presenter.ts +5 -0
- package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +126 -48
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +11 -40
- package/node_modules/pi-agent-ide-formatter/package.json +3 -3
- package/node_modules/pi-agent-ide-languages/package.json +2 -2
- package/node_modules/pi-agent-ide-lint/package.json +7 -7
- package/node_modules/pi-agent-ide-lsp/index.ts +2 -2
- package/node_modules/pi-agent-ide-lsp/package.json +9 -9
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +5 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +8 -2
- package/node_modules/pi-agent-ide-lsp/src/lsp/project.ts +19 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +204 -118
- package/node_modules/pi-agent-ide-lsp/src/rename-plan.ts +2 -17
- package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +92 -30
- package/node_modules/pi-agent-image/package.json +2 -2
- package/node_modules/pi-agent-invariant/package.json +1 -1
- package/node_modules/pi-agent-pdf/package.json +2 -2
- package/node_modules/pi-agent-read/package.json +7 -7
- package/node_modules/pi-agent-read/src/api/read-parameters.ts +2 -2
- package/node_modules/pi-agent-read/src/api/tools/read.ts +35 -2
- package/node_modules/pi-agent-read/src/core/extension.ts +11 -0
- package/node_modules/pi-agent-read/src/core/tools/read/raw-read.ts +9 -10
- package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +28 -15
- package/node_modules/pi-agent-read/src/core/tools/read/result-target.ts +93 -0
- package/node_modules/pi-agent-read/src/core/tools/read/structured-result.ts +218 -0
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +127 -73
- package/node_modules/pi-agent-resource/package.json +1 -1
- package/node_modules/pi-agent-resource/src/index.ts +22 -0
- package/node_modules/pi-agent-resource/src/resource-access.ts +55 -0
- package/node_modules/pi-agent-resource/src/resource-scheduler.ts +204 -0
- package/node_modules/pi-agent-resource/src/result-targets.ts +233 -0
- package/node_modules/pi-agent-resource/src/tool-result.ts +125 -0
- package/node_modules/pi-agent-search/package.json +5 -4
- package/node_modules/pi-agent-search/src/api/fuzzy.ts +208 -0
- package/node_modules/pi-agent-search/src/api/presentation.ts +68 -0
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +13 -6
- package/node_modules/pi-agent-search/src/api/search-scope.ts +22 -0
- package/node_modules/pi-agent-search/src/api/search.ts +39 -0
- package/node_modules/pi-agent-search/src/api/structured-result.ts +148 -0
- package/node_modules/pi-agent-search/src/core/extension.ts +90 -24
- package/node_modules/pi-agent-search/src/core/search-core.ts +145 -78
- package/node_modules/pi-agent-search-text/index.ts +6 -1
- package/node_modules/pi-agent-search-text/package.json +7 -6
- package/node_modules/pi-agent-search-text/src/fuzzy-search.ts +164 -0
- package/node_modules/pi-agent-search-text/src/resolvers.ts +174 -26
- package/node_modules/pi-agent-search-text/src/scoped-search.ts +103 -0
- package/node_modules/pi-agent-search-text/src/search-backend.ts +201 -18
- package/node_modules/pi-agent-search-text/src/search-query.ts +42 -34
- package/node_modules/pi-agent-search-text/src/search-recipe.ts +18 -4
- package/node_modules/pi-agent-search-text/src/search-renderer.ts +90 -259
- package/node_modules/pi-agent-search-text/src/search-result.ts +77 -0
- package/node_modules/pi-agent-search-text/src/search-session.ts +110 -17
- package/node_modules/pi-agent-text/package.json +2 -2
- package/node_modules/pi-agent-text/src/text-document.ts +15 -10
- package/node_modules/pi-agent-text-anchor-constant/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-exact/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-exact/src/anchor.ts +4 -3
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +5 -5
- package/node_modules/pi-agent-text-editor/index.ts +4 -7
- package/node_modules/pi-agent-text-editor/package.json +20 -21
- package/node_modules/pi-agent-text-editor/src/api/mutation-preview.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +6 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +3 -1
- package/node_modules/pi-agent-text-editor/src/api/native-edit-batch-event.ts +12 -0
- package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +1 -20
- package/node_modules/pi-agent-text-editor/src/core/builtin-edit.ts +16 -0
- package/node_modules/pi-agent-text-editor/src/core/diff-tool.ts +78 -41
- package/node_modules/pi-agent-text-editor/src/core/editing-guidelines.ts +8 -0
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +12 -2
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +35 -4
- package/node_modules/pi-agent-text-editor/src/core/file-operations.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/file-result-targets.ts +76 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result-targets.ts +168 -0
- package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +820 -0
- package/node_modules/pi-agent-text-editor/src/core/post-edit-scope.ts +20 -6
- package/node_modules/pi-agent-text-editor/src/core/result-input.ts +22 -0
- package/node_modules/pi-agent-text-editor/src/core/result-target-anchors.ts +78 -0
- package/node_modules/pi-agent-text-editor/src/core/result-transfer.ts +175 -0
- package/node_modules/pi-agent-text-editor/src/core/structured-result.ts +412 -0
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +149 -139
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +236 -185
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +253 -203
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +25 -5
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +8 -4
- package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +9 -6
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +5 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +5 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +9 -7
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +8 -8
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +8 -3
- package/node_modules/pi-agent-text-editor-renderer/index.ts +9 -73
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -5
- package/node_modules/pi-agent-text-editor-renderer/src/diff-model.ts +276 -129
- package/node_modules/pi-agent-text-editor-renderer/src/diff-renderer.ts +36 -2
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +28 -2
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-projection.ts +40 -10
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +19 -45
- package/node_modules/pi-agent-text-editor-stale-anchor/index.ts +16 -1
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +4 -4
- package/node_modules/pi-agent-tool-call-interception/package.json +2 -2
- package/node_modules/pi-agent-tool-ui/package.json +1 -1
- package/node_modules/pi-agent-tool-ui/src/index.ts +7 -0
- package/node_modules/pi-agent-tool-ui/src/result-panel.ts +298 -0
- package/node_modules/pi-agent-web/index.ts +23 -0
- package/node_modules/pi-agent-web/package.json +7 -6
- package/node_modules/pi-agent-web/src/search.ts +221 -0
- package/node_modules/pi-agent-web-html/package.json +2 -2
- package/node_modules/pi-agent-web-image/package.json +3 -3
- package/node_modules/pi-agent-web-pdf/package.json +3 -3
- package/node_modules/pi-agent-web-text/package.json +3 -3
- package/package.json +42 -37
- package/skills/capture-code-review-rule/SKILL.md +60 -0
- package/src/code-review/config.ts +68 -0
- package/src/code-review/extension.ts +105 -0
- package/src/code-review/fragments.ts +26 -0
- package/src/code-review/reviewer.ts +198 -0
- package/src/composite/host-version.ts +13 -0
- package/src/composite/module-labels.ts +1 -1
- package/src/composite/nested-tool-rendering.ts +298 -0
- package/src/composite/preferences.ts +0 -5
- package/src/composite/tool-availability.ts +90 -0
- package/src/core/extension.ts +2 -0
- package/src/documentation/extension.ts +81 -145
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +6 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +5 -5
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/src/path-recovery.ts +109 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +23 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +2 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/search.ts +221 -0
- package/src/extensions/pi-agent-read/package.json +7 -7
- package/src/extensions/pi-agent-read/src/api/read-parameters.ts +2 -2
- package/src/extensions/pi-agent-read/src/api/tools/read.ts +35 -2
- package/src/extensions/pi-agent-read/src/core/extension.ts +11 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/raw-read.ts +9 -10
- package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +28 -15
- package/src/extensions/pi-agent-read/src/core/tools/read/result-target.ts +93 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/structured-result.ts +218 -0
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +127 -73
- package/src/extensions/pi-agent-search/package.json +5 -4
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +6 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +7 -6
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/fuzzy-search.ts +164 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +174 -26
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/scoped-search.ts +103 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-backend.ts +201 -18
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-query.ts +42 -34
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +18 -4
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-renderer.ts +90 -259
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +77 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +110 -17
- package/src/extensions/pi-agent-search/src/api/fuzzy.ts +208 -0
- package/src/extensions/pi-agent-search/src/api/presentation.ts +68 -0
- package/src/extensions/pi-agent-search/src/api/search-parameters.ts +13 -6
- package/src/extensions/pi-agent-search/src/api/search-scope.ts +22 -0
- package/src/extensions/pi-agent-search/src/api/search.ts +39 -0
- package/src/extensions/pi-agent-search/src/api/structured-result.ts +148 -0
- package/src/extensions/pi-agent-search/src/core/extension.ts +90 -24
- package/src/extensions/pi-agent-search/src/core/search-core.ts +145 -78
- package/src/extensions/pi-agent-text-editor/index.ts +4 -7
- package/src/extensions/pi-agent-text-editor/package.json +20 -21
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/anchor.ts +4 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +9 -73
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-model.ts +276 -129
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-renderer.ts +36 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +28 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-projection.ts +40 -10
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +19 -45
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.ts +16 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +4 -4
- package/src/extensions/pi-agent-text-editor/src/api/mutation-preview.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +6 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +3 -1
- package/src/extensions/pi-agent-text-editor/src/api/native-edit-batch-event.ts +12 -0
- package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +1 -20
- package/src/extensions/pi-agent-text-editor/src/core/builtin-edit.ts +16 -0
- package/src/extensions/pi-agent-text-editor/src/core/diff-tool.ts +78 -41
- package/src/extensions/pi-agent-text-editor/src/core/editing-guidelines.ts +8 -0
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +12 -2
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +35 -4
- package/src/extensions/pi-agent-text-editor/src/core/file-operations.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/file-result-targets.ts +76 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result-targets.ts +168 -0
- package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +820 -0
- package/src/extensions/pi-agent-text-editor/src/core/post-edit-scope.ts +20 -6
- package/src/extensions/pi-agent-text-editor/src/core/result-input.ts +22 -0
- package/src/extensions/pi-agent-text-editor/src/core/result-target-anchors.ts +78 -0
- package/src/extensions/pi-agent-text-editor/src/core/result-transfer.ts +175 -0
- package/src/extensions/pi-agent-text-editor/src/core/structured-result.ts +412 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +149 -139
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +236 -185
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +253 -203
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +25 -5
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +8 -4
- package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +9 -6
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +5 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +5 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +9 -7
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +8 -8
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +8 -3
- package/src/pi-agent-ide.ts +61 -8
- package/src/plugins/pi-agent-ide-ast/package.json +15 -10
- package/src/plugins/pi-agent-ide-ast/src/ast/constructs.ts +193 -0
- package/src/plugins/pi-agent-ide-ast/src/ast/element-extent.ts +59 -0
- package/src/plugins/pi-agent-ide-ast/src/ast/manager.ts +5 -1
- package/src/plugins/pi-agent-ide-ast/src/ast/selection.ts +204 -0
- package/src/plugins/pi-agent-ide-ast/src/ast/syntax-tree.ts +2 -0
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +4 -2
- package/src/plugins/pi-agent-ide-ast/src/geometry-selection.ts +184 -0
- package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +6 -1
- package/src/plugins/pi-agent-ide-ast/src/scope-handler.ts +6 -2
- package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +110 -7
- package/src/plugins/pi-agent-ide-ast/src/select-presentation.ts +104 -0
- package/src/plugins/pi-agent-ide-ast/src/select-schema.ts +384 -0
- package/src/plugins/pi-agent-ide-ast/src/selection-region.ts +41 -0
- package/src/plugins/pi-agent-ide-ast/src/source-text.ts +92 -0
- package/src/plugins/pi-agent-ide-ast/src/text-selection.ts +214 -0
- package/src/plugins/pi-agent-ide-ast/src/tool-select.ts +251 -0
- package/src/plugins/pi-agent-ide-changes/index.ts +2 -24
- package/src/plugins/pi-agent-ide-changes/package.json +8 -7
- package/src/plugins/pi-agent-ide-changes/src/current-change-presenter.ts +5 -0
- package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +126 -48
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +11 -40
- package/src/plugins/pi-agent-ide-debugger/index.ts +63 -17
- package/src/plugins/pi-agent-ide-debugger/src/catalog.ts +18 -2
- package/src/plugins/pi-agent-ide-debugger/src/dap-client.ts +24 -4
- package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +68 -2
- package/src/plugins/pi-agent-ide-debugger/src/java-runtime.ts +357 -0
- package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +55 -3
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +13 -13
- package/src/plugins/pi-agent-ide-formatter/package.json +3 -3
- package/src/plugins/pi-agent-ide-languages/package.json +2 -2
- package/src/plugins/pi-agent-ide-lint/package.json +7 -7
- package/src/plugins/pi-agent-ide-lsp/index.ts +2 -2
- package/src/plugins/pi-agent-ide-lsp/package.json +9 -9
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +5 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +8 -2
- package/src/plugins/pi-agent-ide-lsp/src/lsp/project.ts +19 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +204 -118
- package/src/plugins/pi-agent-ide-lsp/src/rename-plan.ts +2 -17
- package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +92 -30
- package/src/plugins/pi-agent-ide-terminal/index.ts +12 -2
- package/src/plugins/pi-agent-ide-terminal/src/output-limits.ts +1 -1
- package/src/plugins/pi-agent-ide-terminal/src/resources.ts +65 -30
- package/src/plugins/pi-agent-ide-terminal/src/search.ts +16 -37
- package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +1 -0
- package/src/plugins/pi-agent-ide-terminal/src/shell-result.ts +100 -0
- package/src/plugins/pi-agent-ide-terminal/src/steering.ts +62 -0
- package/src/plugins/pi-agent-ide-terminal/src/tools.ts +98 -46
- package/src/plugins/pi-agent-ide-terminal/src/types.ts +3 -1
- package/src/plugins/pi-agent-ide-terminal/src/ui.ts +15 -6
- package/src/plugins/pi-agent-ide-vision/index.ts +35 -1
- package/dist/chunk-3E2NTWCN.js +0 -2
- package/dist/chunk-4LUW26BX.js +0 -10
- package/dist/chunk-4U2GUKNJ.js +0 -0
- package/dist/chunk-5VSE5X5R.js +0 -2
- package/dist/chunk-6EYWFBNG.js +0 -0
- package/dist/chunk-7WCZOO5I.js +0 -1
- package/dist/chunk-CEX3VOJ7.js +0 -2
- package/dist/chunk-FA6BKC5Y.js +0 -1
- package/dist/chunk-FEDVTZJG.js +0 -1
- package/dist/chunk-HMLH43ZS.js +0 -4
- package/dist/chunk-ITSNK5YG.js +0 -7
- package/dist/chunk-KII2JQC5.js +0 -1
- package/dist/chunk-LVWMWWWF.js +0 -28
- package/dist/chunk-P7XO5CIP.js +0 -2
- package/dist/chunk-PZFOOHY2.js +0 -15
- package/dist/chunk-ROXXK6TW.js +0 -0
- package/dist/chunk-S3ZPXWX7.js +0 -2
- package/dist/chunk-T7CZIACQ.js +0 -27
- package/dist/chunk-VXD6FZP5.js +0 -5
- package/dist/chunk-YHUTTZC6.js +0 -2
- package/dist/chunk-YT42LKFV.js +0 -16
- package/docs/agent-guides/apply.md +0 -333
- package/node_modules/pi-agent-text-editor/src/api/apply-renderer.ts +0 -3
- package/node_modules/pi-agent-text-editor/src/core/apply/apply-undo-store.ts +0 -155
- package/node_modules/pi-agent-text-editor/src/core/apply/execution.ts +0 -344
- package/node_modules/pi-agent-text-editor/src/core/apply/final-mutations.ts +0 -50
- package/node_modules/pi-agent-text-editor/src/core/apply/format-source.ts +0 -11
- package/node_modules/pi-agent-text-editor/src/core/apply/mixed-source.ts +0 -203
- package/node_modules/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +0 -55
- package/node_modules/pi-agent-text-editor/src/core/apply/output.ts +0 -276
- package/node_modules/pi-agent-text-editor/src/core/apply/prompt.ts +0 -13
- package/node_modules/pi-agent-text-editor/src/core/apply/queue.ts +0 -25
- package/node_modules/pi-agent-text-editor/src/core/apply/renderer.ts +0 -405
- package/node_modules/pi-agent-text-editor/src/core/apply/results.ts +0 -133
- package/node_modules/pi-agent-text-editor/src/core/apply/runtime.ts +0 -369
- package/node_modules/pi-agent-text-editor/src/core/apply/tool.ts +0 -148
- package/node_modules/pi-agent-text-editor/src/core/apply/transaction.ts +0 -920
- package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +0 -52
- package/src/extensions/pi-agent-text-editor/src/api/apply-renderer.ts +0 -3
- package/src/extensions/pi-agent-text-editor/src/core/apply/apply-undo-store.ts +0 -155
- package/src/extensions/pi-agent-text-editor/src/core/apply/execution.ts +0 -344
- package/src/extensions/pi-agent-text-editor/src/core/apply/final-mutations.ts +0 -50
- package/src/extensions/pi-agent-text-editor/src/core/apply/format-source.ts +0 -11
- package/src/extensions/pi-agent-text-editor/src/core/apply/mixed-source.ts +0 -203
- package/src/extensions/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +0 -55
- package/src/extensions/pi-agent-text-editor/src/core/apply/output.ts +0 -276
- package/src/extensions/pi-agent-text-editor/src/core/apply/prompt.ts +0 -13
- package/src/extensions/pi-agent-text-editor/src/core/apply/queue.ts +0 -25
- package/src/extensions/pi-agent-text-editor/src/core/apply/renderer.ts +0 -405
- package/src/extensions/pi-agent-text-editor/src/core/apply/results.ts +0 -133
- package/src/extensions/pi-agent-text-editor/src/core/apply/runtime.ts +0 -369
- package/src/extensions/pi-agent-text-editor/src/core/apply/tool.ts +0 -148
- package/src/extensions/pi-agent-text-editor/src/core/apply/transaction.ts +0 -920
- package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +0 -52
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Optional Jev code review
|
|
2
|
+
|
|
3
|
+
Jev checks saved edit fragments against your project's own rules. It adds review hints,
|
|
4
|
+
not compiler errors. It does not fix code, block edits, or certify that code is correct.
|
|
5
|
+
|
|
6
|
+
Review and rule capture are separate features. Both are off by default.
|
|
7
|
+
|
|
8
|
+
## Enable review
|
|
9
|
+
|
|
10
|
+
Open `/ide` and enable **Jev code review** in Features, or add the flag to
|
|
11
|
+
`.pi/pi-agent-ide/extensions.json`:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"flags": {
|
|
16
|
+
"pi-agent-ide-code-review": true,
|
|
17
|
+
"pi-agent-ide-code-review-capture": false
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Reload Pi after changing the file. The corresponding CLI flags use the same names.
|
|
23
|
+
The existing global extension settings can also set these flags.
|
|
24
|
+
|
|
25
|
+
Connect a Jev provider through Pi. The integration uses Pi's native authenticated classifier
|
|
26
|
+
runtime. It prefers TypeSafe Jev when available, then another available Jev model.
|
|
27
|
+
It does not select a chat model or install a provider.
|
|
28
|
+
|
|
29
|
+
Enabling review allows the configured provider to receive inspected code and rule descriptions.
|
|
30
|
+
With review disabled, no connected Jev, or no enabled rules, no classification runs.
|
|
31
|
+
|
|
32
|
+
## Define your rules
|
|
33
|
+
|
|
34
|
+
Create `.pi/pi-agent-ide/code-review.yaml` in the Pi working directory:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
rules:
|
|
38
|
+
- id: hidden-errors
|
|
39
|
+
description: >
|
|
40
|
+
Do not turn a failed operation into a successful result.
|
|
41
|
+
Explicit recovery that preserves the documented contract is allowed.
|
|
42
|
+
- id: example-disabled
|
|
43
|
+
description: Explain one concrete expectation here.
|
|
44
|
+
enabled: false
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
These examples are not built-in policy. Write your own expectations in natural language.
|
|
48
|
+
Describe a visible violation and allowed exceptions. Avoid rules that need the whole
|
|
49
|
+
repository or undocumented requirements to judge.
|
|
50
|
+
|
|
51
|
+
IDs start with a lowercase letter and contain lowercase letters, numbers and hyphens.
|
|
52
|
+
IDs are unique and limited to 64 characters. Descriptions are limited to 2048 characters.
|
|
53
|
+
The file accepts at most 32 rules and 64 KiB of text. Unknown fields, duplicate IDs,
|
|
54
|
+
YAML aliases and invalid YAML are rejected. An empty `rules: []` means no checks.
|
|
55
|
+
Rules reload for each review; editing the rule file itself does not trigger review.
|
|
56
|
+
|
|
57
|
+
## What gets checked
|
|
58
|
+
|
|
59
|
+
Review observes saved text-editor changes, including final batched writes and undo.
|
|
60
|
+
Each request contains one complete diff hunk with three surrounding lines on each side,
|
|
61
|
+
and all enabled rules. Nearby changes may share a hunk. Removed lines are included.
|
|
62
|
+
|
|
63
|
+
Writes and formatting do not wait for review. Edits to the same file are combined over
|
|
64
|
+
300 milliseconds. Classifier requests run sequentially and each review has a 15-second
|
|
65
|
+
request timeout. New edits cancel previous work; replies for a different saved snapshot
|
|
66
|
+
are discarded, including after external writes.
|
|
67
|
+
|
|
68
|
+
Automatic review skips changes above these bounds with an unavailable notice:
|
|
69
|
+
300,000 combined before/after characters, 16 hunks, or 12,000 characters in a hunk.
|
|
70
|
+
It never presents a clipped fragment as a complete review.
|
|
71
|
+
|
|
72
|
+
## Read the feedback
|
|
73
|
+
|
|
74
|
+
Jev chooses violation, clear, or insufficient context for each rule.
|
|
75
|
+
Violations are reported only when their classification probability is at least 80%.
|
|
76
|
+
That number is a model score, not a measured probability that the code is wrong.
|
|
77
|
+
|
|
78
|
+
The background message names the file, snapshot, provider/model, rule and inspected diff.
|
|
79
|
+
Expand it to read the evidence. Findings can wake an idle agent, like ordinary diagnostics.
|
|
80
|
+
Unavailable and insufficient-context notices do not start a new turn by themselves.
|
|
81
|
+
|
|
82
|
+
No generated explanation is attributed to Jev. No findings does not mean the code passed
|
|
83
|
+
a complete review. Provider failures never undo edits or suppress regular diagnostics.
|
|
84
|
+
|
|
85
|
+
Reported classifier tokens and catalog cost are shown in feedback when available.
|
|
86
|
+
Background calls are not tool results, so Pi does not automatically add them to tool-result
|
|
87
|
+
cost totals. Do not use the session footer as a budget limit for this feature.
|
|
88
|
+
|
|
89
|
+
## Capture rules from your reviews
|
|
90
|
+
|
|
91
|
+
Enable **Capture code-review rules** separately. Pi then tells the agent to use the shipped
|
|
92
|
+
`capture-code-review-rule` skill after reusable code-review feedback.
|
|
93
|
+
|
|
94
|
+
The skill proposes a general rule, checks for duplicates and waits for confirmation before
|
|
95
|
+
saving it. Strong wording or anger alone is not a rule. It never enables review, and it can
|
|
96
|
+
capture rules without a Jev connection. With capture disabled it does not act.
|
|
97
|
+
|
|
98
|
+
The skill is agent guidance, not a guaranteed automatic listener or a write-permission gate.
|
|
99
|
+
Inspect proposed rules before accepting them.
|
package/docs/configuration.md
CHANGED
|
@@ -8,13 +8,9 @@ Default removes the selected scope’s override. Module descriptions show effect
|
|
|
8
8
|
|
|
9
9
|
Feature overrides are stored under `flags` in `extensions.json`, keyed by their CLI name. Existing `noAnimations` and `noPostProcessing` fields still work; changing the corresponding feature in the menu replaces that field with its flag override.
|
|
10
10
|
|
|
11
|
-
The Features tab includes **Disable Apply** (`pi-agent-ide-no-apply`). Enable it and reload to remove only the `apply` tool; standalone tools remain available. It defaults to off. The obsolete `old-tools` switch has been removed.
|
|
12
|
-
|
|
13
11
|
Agent Vision adds separate opt-ins for **Capture arbitrary windows** and **Capture full displays**. Both default to off. Its text settings control the default sequence duration, frame interval, image scale, and a comma-separated list of exact executable file names that may be captured without arbitrary-window access. Press Enter to edit a text value, Enter again to commit it, then Ctrl+S to save.
|
|
14
12
|
|
|
15
|
-
The UI tab contains separate presentation settings for
|
|
16
|
-
|
|
17
|
-
Apply previews never execute arguments and do not indicate successful edits; operation results are shown separately. In compact mode, completed source is formatted before recognized helper calls are projected into concise operation headers. Incomplete code uses the recoverable source preview. Headers keep supplied anchors and compact long argument expressions with their source size; those sizes are not counts of applied edits. Full mode shows the complete display copy. Execution always receives the original source.
|
|
13
|
+
The UI tab contains separate presentation settings for diffs, Read, Search, and terminal output. Each setting supports **Full**, **Compact**, and **Disabled**. Compact is the product default. Full shows all available content, while Disabled keeps only a concise, honest status and still shows failures and warnings. Expanding a tool call always shows the full presentation, regardless of its collapsed preference. These settings affect only the TUI; agent-facing results and tool behavior do not change.
|
|
18
14
|
|
|
19
15
|
All user-configurable presentation and behavior preferences belong in Agent IDE settings. New options must carry a human name, explanation and default in their registration. Presentation options belong in the UI tab.
|
|
20
16
|
|
|
@@ -24,6 +20,25 @@ Obsolete IDs in `disabled` are ignored. They do not stop IDE startup. Malformed
|
|
|
24
20
|
|
|
25
21
|
Pi Agent IDE enables every built-in extension by default. Project and global config files can disable built-ins by their stable IDs and turn on built-ins that are off by default.
|
|
26
22
|
|
|
23
|
+
## Native tool availability
|
|
24
|
+
|
|
25
|
+
Tools use fixed native exposure; there are no IDE exposure overrides or named profiles.
|
|
26
|
+
|
|
27
|
+
| Namespace | Tools | Exposure |
|
|
28
|
+
| -------------- | -------------------------------- | ---------- |
|
|
29
|
+
| `ide_read` | `read`, `diff` | `direct` |
|
|
30
|
+
| `ide_search` | `search` | `direct` |
|
|
31
|
+
| `ide_edit` | Standalone editing tools | `direct` |
|
|
32
|
+
| `ide_terminal` | `bash` (`powershell` on Windows) | `direct` |
|
|
33
|
+
| `ide_git` | `stage`, `unstage` | `deferred` |
|
|
34
|
+
| `ide_debug` | `debug` | `deferred` |
|
|
35
|
+
|
|
36
|
+
Direct tools keep their normal calls and can also run through Codemode while active. Select derives exact boundaries; edits consume its snapshot-bound targets.
|
|
37
|
+
|
|
38
|
+
Git staging and debugger tools are not declared ahead of time. Short agent guidance names the enabled capabilities and tells the agent to find them through native `tool_search`. IDE activates `tool_search` when an enabled deferred capability needs it and the host allows it. Native namespace filtering, BM25 ranking and Codemode declaration budgets apply; workspace `search` still searches workspace content.
|
|
39
|
+
|
|
40
|
+
Explicit `-name` entries in Pi's `defaultTools` hide matching IDE tools from direct calls, discovery and nested calls. A later `+name` restores the capability and selects it at startup. Pi's CLI allowlist and exclusions still apply: IDE does not restore a tool removed from the host registry. Disabling an IDE module removes its tools rather than leaving a deferred path behind. Discovery guidance omits disabled capabilities.
|
|
41
|
+
|
|
27
42
|
## Config files
|
|
28
43
|
|
|
29
44
|
Pi Agent IDE reads these optional files:
|
|
@@ -60,7 +75,7 @@ Built-in entry modules are imported only after selection. Disabled built-ins, in
|
|
|
60
75
|
|
|
61
76
|
## Animations and post-edit processing
|
|
62
77
|
|
|
63
|
-
|
|
78
|
+
Standalone editing tools validate source snapshots before writing. Native Codemode composes those same tools and can commit pending local edits with `tools.flush({})`. Accepted child calls are not proof of persistence. Ordinary script errors keep accepted edits; aborts discard only pending work. Formatting runs once per surviving changed file at script end, followed by diagnostics. Text copy/move destinations receive post-processing; binary contents stay unchanged.
|
|
64
79
|
|
|
65
80
|
Automatic diagnostic findings are grouped for five seconds from the first finding. The UI tab’s **Immediate diagnostic notices** option (`pi-agent-ide-no-diagnostic-buffer`) disables this delay. Combined notices keep each file and reporting tool identifiable. Empty completed diagnostic reads tell the agent that checks finished without findings, but do not draw an empty diagnostic panel. Pending, unavailable and incomplete checks are not reported as clean.
|
|
66
81
|
|
|
@@ -160,6 +175,20 @@ Regex diagnostic parsers run with multiline matching. Set `columnBase: 0` when a
|
|
|
160
175
|
|
|
161
176
|
A runtime being installed does not prove its modules or language-server features are installed. For example, Taplo's npm build can format TOML but does not include its LSP. Use an LSP-enabled Taplo build for language-server diagnostics. Doctor reports the actual startup failure rather than treating that file as clean.
|
|
162
177
|
|
|
178
|
+
## Java debugger
|
|
179
|
+
|
|
180
|
+
Java uses Microsoft java-debug through a private JDT LS process on Linux and native Windows. Kotlin still uses fwcd's adapter.
|
|
181
|
+
|
|
182
|
+
Install JDK 21 or newer, JDT LS 1.61.0, and `com.microsoft.java.debug.plugin-0.53.2.jar` from vscode-java-debug 0.59.0. Set these variables before starting Pi:
|
|
183
|
+
|
|
184
|
+
- `PI_JAVA_PATH`: the Java executable. Otherwise Pi uses `JAVA_HOME/bin/java` (`java.exe` on Windows), then `java` on PATH.
|
|
185
|
+
- `PI_JDTLS_HOME`: the extracted JDT LS directory, containing `plugins` and `config_linux` or `config_win`.
|
|
186
|
+
- `PI_JAVA_DEBUG_PLUGIN_PATH`: the Java debug plugin jar.
|
|
187
|
+
|
|
188
|
+
Compile with debug information (`javac -g`) before starting the session. Pi finds the main class in `build/classes/java/main`, `target/classes`, `out/production`, `bin`, or the project directory. This launch path does not resolve Maven/Gradle dependency classpaths.
|
|
189
|
+
|
|
190
|
+
Create the session with `adapter: "java"` and the fully qualified `mainClass`. Use the returned resources to read source, set an anchored breakpoint, start, inspect locals, and continue. Pi keeps the target suspended until attach and breakpoint configuration finish. Deleting the session closes only its own target JVM and JDT LS process. Doctor checks the actual bridge rather than treating a Kotlin adapter as a Java dependency.
|
|
191
|
+
|
|
163
192
|
## Doctor
|
|
164
193
|
|
|
165
194
|
Run `/pi-agent-ide-doctor` to check the effective tools for the current project. Doctor uses the same layered entries as runtime. For each applicable entry it shows the stable ID, source layer, command, and real probe result. A missing or failing command is reported instead of falling back to a lower layer.
|
|
@@ -227,7 +256,7 @@ Missing fields use these defaults. Invalid values stop the editor from loading.
|
|
|
227
256
|
|
|
228
257
|
### Diff presentation
|
|
229
258
|
|
|
230
|
-
Use **Diff presentation** in the Agent IDE settings UI to choose Full, Compact, or Disabled diff panels. Compact is the default and shows a focused sliding window. Full shows every available diff row. Disabled hides diff rows but keeps mutation totals, status, failures, and warnings visible. Expanding a tool call temporarily shows the full diff. The setting applies to standalone mutations, the `diff` tool
|
|
259
|
+
Use **Diff presentation** in the Agent IDE settings UI to choose Full, Compact, or Disabled diff panels. Compact is the default and shows a focused sliding window. Full shows every available diff row. Disabled hides diff rows but keeps mutation totals, status, failures, and warnings visible. Expanding a tool call temporarily shows the full diff. The setting applies to standalone mutations, native Codemode edit panels, and the `diff` tool.
|
|
231
260
|
|
|
232
261
|
## Extension config behavior
|
|
233
262
|
|
package/docs/development.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Requirements
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Pi 0.99.1 with `pi` on `PATH` for the pinned integration tests;
|
|
6
6
|
- Node.js and pnpm;
|
|
7
7
|
- Git.
|
|
8
8
|
|
|
@@ -54,6 +54,15 @@ pnpm test:integration
|
|
|
54
54
|
|
|
55
55
|
Integration tests use `pi-coding-agent-test`. They start real Pi processes with scripted model responses and preserve traces and terminal artifacts under `.tmp/test-runs/`.
|
|
56
56
|
|
|
57
|
+
The root runner uses native rendering by default. The published harness's raw renderer imports private files relative to the CLI and cannot start with Pi 0.99.1's bundled CLI. Explicit `rawMode: true` still exposes that failure; it is not silently replaced. Result and filesystem assertions remain enabled.
|
|
58
|
+
|
|
59
|
+
Tests that need an unchanged conversation use `#integration/support/pi-runtime/native-pi-coding-agent-test.js`. The root `pi-coding-agent-test` alias uses the same native adapter and keeps its existing surrounding read calls. Both adapters forward explicit launch options; the native adapter also reads the system prompt from Pi 0.99's transcript system messages using the SDK.
|
|
60
|
+
|
|
61
|
+
`pnpm test:integration:shards` runs four standalone shards. Each scenario closes its Pi process instead of retaining a shared process for every fixture configuration. Each run prints its own log directory under `.tmp/integration-shards.*`, so parallel audits do not overwrite each other's logs. Set `LOG_DIR` to choose another parent directory.
|
|
62
|
+
CI uses the same four shards without changing test or job timeouts. Set `REPORT_DIR` to write a separate `integration-N.xml` JUnit report for each shard. CI retains all shard reports and logs, and builds the release candidate only after every shard passes.
|
|
63
|
+
|
|
64
|
+
`--no-extensions` also disables Pi's native built-ins. Native fixtures explicitly load `builtin:codemode`, `builtin:tool-search`, and `builtin:mcp`; ordinary fixtures do not. `native-host.integration.test.ts` checks the version inside the launched process, deferred discovery, nested execution, and isolation from personal MCP servers.
|
|
65
|
+
|
|
57
66
|
### Watch integration tests live
|
|
58
67
|
|
|
59
68
|
Use the project command to watch every test in one file:
|
|
@@ -152,29 +161,17 @@ node scripts/measure-startup.ts \
|
|
|
152
161
|
|
|
153
162
|
Use the entry declared in each installed package's `pi.extensions`. The script records an initial run separately, then five interleaved fresh-process runs for each variant and Pi alone. It measures process-to-RPC-ready time, not TUI rendering or import time alone. `PI_COMMAND` can select the Pi executable. Startup Doctor hints run after session readiness and are cancelled when their session ends.
|
|
154
163
|
|
|
155
|
-
##
|
|
164
|
+
## Try development builds
|
|
156
165
|
|
|
157
|
-
|
|
166
|
+
For local changes, use the `develop` checkout. Run `pnpm install --frozen-lockfile` before loading it as a local Pi package. This checkout uses pnpm workspaces, so do not install it through `pi install git`.
|
|
158
167
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
pi install git:github.com/alexshpunt/pi-agent-ide-dev@preview
|
|
163
|
-
```
|
|
168
|
+
To try a verified build without a checkout, download the `nightly-package` artifact from a successful [Develop nightly](nightly.md) run. The archive contains the tested `develop` commit and is retained for 30 days. The nightly guide explains how to install it in a disposable Pi environment. Nightlies do not publish to npm.
|
|
164
169
|
|
|
165
|
-
|
|
170
|
+
Public `main` carries released changes; install published versions from npm. See [Releases](releases.md) for the release flow.
|
|
166
171
|
|
|
167
|
-
|
|
168
|
-
pi install git:git@github.com:alexshpunt/pi-agent-ide-dev@preview
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
After the preview workflow publishes a newer snapshot, refresh the installed package:
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
pi install git:github.com/alexshpunt/pi-agent-ide-dev@preview
|
|
175
|
-
```
|
|
172
|
+
## Project tasks
|
|
176
173
|
|
|
177
|
-
|
|
174
|
+
The Product Owner decides scope, priority, labels, status, and cycle plans. An agent assigned a tracked task may update its status while working and mark it complete after the accepted work is verified. Other project-management changes need the Product Owner's approval. The Project Manager gathers requirements, maintains task records, and plans only the next cycle; it does not inspect or change product code. Linear authentication and the optional local `.linear-project` binding are not needed to build or test the public repository.
|
|
178
175
|
|
|
179
176
|
## Repository layout
|
|
180
177
|
|
package/docs/nightly.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Develop nightly
|
|
2
|
+
|
|
3
|
+
The public repository runs the normal CI suite on a pinned `develop` commit around midnight in Berlin. GitHub Actions cron uses UTC, so `.github/workflows/nightly.yml` runs at both 22:00 and 23:00 UTC. Only the run that falls in Berlin's midnight hour continues. GitHub may delay scheduled runs; if it starts after that hour, it is skipped. Use **Run workflow** to retry a missed night.
|
|
4
|
+
|
|
5
|
+
Successful runs retain an installable `nightly-package` archive for 30 days. Unit and integration test reports are retained as `test-results` for 30 days, including failed runs when reports are available. Download the archive from the workflow run and install that exact `.tgz` in a disposable Pi environment to try the build. Nightlies are not published to npm and do not change `latest`.
|
|
6
|
+
|
|
7
|
+
The nightly runner pins the `develop` commit before calling the same CI workflow used for regular changes. Its package is scanned and smoke-installed. A failed run is the regression report; inspect its job logs and test artifacts. This workflow is active only after a public `develop` branch and this workflow have been merged into the public repository.
|
package/docs/releases.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Develop and release Pi Agent IDE
|
|
2
|
+
|
|
3
|
+
The public `pi-agent-ide` repository owns development and releases. Feature branches merge into `develop`. Ready changes merge into `main`. A versioned release starts from `main` and freezes it until the package is published and `main` has been merged back into `develop`, or the unpublished release is explicitly canceled. `develop` stays open throughout.
|
|
4
|
+
|
|
5
|
+
## Activate the single repository
|
|
6
|
+
|
|
7
|
+
Create public `develop` from public `main` before opening a feature PR. Merge the migration feature into `develop` after CI passes, then merge `develop` into `main` through a second reviewed PR. Do not merge or push `pi-agent-ide-dev` history: the migration branch must be based on public `main`, and only reviewed files belong in the PR. Confirm that `develop` passes CI, the nightly workflow runs against it, and main branch protection and release App permissions work on the public repository. Keep npm publishing manual. Archive the private product repository only after these checks; do not delete it as part of the migration.
|
|
8
|
+
|
|
9
|
+
## Keep develop current
|
|
10
|
+
|
|
11
|
+
Squash-merging `develop` into `main` makes their histories diverge. The **Synchronize main into develop** workflow merges `main` back into `develop` after every ordinary `main` push; it does not force-push. If a versioned release is active, it waits: the publish or cancel workflow synchronizes `develop` before lifting the freeze. Check the sync job after every main merge. If an ordinary sync fails because develop advances during its push or a merge conflicts, resolve the conflict and rerun the sync workflow manually on `main`. During a release, repair the conflict and retry Publish or Cancel instead; the versioned branch keeps the freeze until synchronization succeeds. Never start another develop-to-main PR before the synchronization succeeds.
|
|
12
|
+
|
|
13
|
+
## Nightly
|
|
14
|
+
|
|
15
|
+
See [Develop nightly](nightly.md). Nightlies test a pinned `develop` commit and keep an installable package and test reports in GitHub Actions for 30 days. They do not publish to npm.
|
|
16
|
+
|
|
17
|
+
## Start a release
|
|
18
|
+
|
|
19
|
+
Choose a release cut by its full commit SHA. If that commit is not yet on main, promote it through a separate pinned branch such as `chore/promote-X.Y.Z`, not a PR whose head is the moving `develop` branch. Keep that promotion head unchanged while CI runs. New develop merges do not join the release unless its scope is explicitly changed. After promotion and main-to-develop synchronization succeed, start the versioned release below. See `.pi/skills/publish-pi-agent-ide/SKILL.md` for the agent runbook.
|
|
20
|
+
|
|
21
|
+
Run **Start release** on `main` with an unused `X.Y.Z` and finished release notes. The workflow checks that no other release branch or registry version exists, creates `release/X.Y.Z` with the version and changelog update, and opens a PR to `main`. The App needs Contents and Pull requests write access to this public repository. Configure `RELEASE_APP_ID` and `RELEASE_APP_PRIVATE_KEY` as Actions secrets; never commit the key. A release branch is the freeze marker. The `Validate` check is required on PRs to `main`; it rejects `develop` while a release branch exists. It admits only the matching release PR or a `fix/release-*` PR labeled `release-fix`. Review the fix itself: a label is not proof that a change is a fix.
|
|
22
|
+
Only a branch named exactly `release/X.Y.Z` is an active release marker; older `release/v*` and `release/official-*` branches do not block a new release. Remove merged or abandoned release branches when no open PR, running workflow, or worktree still needs them. Delete with an expected-head lease and keep all release tags. Active release branches stay until publication and synchronization, or confirmed cancellation, finish.
|
|
23
|
+
|
|
24
|
+
During the freeze, fix defects in `main` through a labeled fix PR. Rebase `release/X.Y.Z` onto the updated `main` using `--force-with-lease` and wait for the release PR's new CI run. A changed base, head or archive requires fresh candidate evidence. Do not merge features into `main` while a release is active.
|
|
25
|
+
|
|
26
|
+
The release PR runs the full CI matrix. Its candidate step builds twice, compares archive bytes, scans and installs the package and tests the installed runtime. Do not merge a failed candidate. Squash-merge the verified PR into `main`; the protected `Validate` check must pass for the current head and base. Keep the release branch until publication and develop synchronization are complete.
|
|
27
|
+
|
|
28
|
+
## Refresh after failed CI/CD
|
|
29
|
+
|
|
30
|
+
Before publication, diagnose and verify the fix for a failed release check, then inspect the latest develop changes. Cancel the active unpublished candidate through the workflow, confirm synchronization, and prepare any remaining fixes in develop. Capture a fresh develop SHA, update the notes for the new scope, and promote it through a new pinned branch. Start a new candidate with the same unused version number. Do not reuse the old candidate's run or archive evidence. A watcher network error alone does not trigger a refresh, and a published or tagged version cannot be replaced.
|
|
31
|
+
|
|
32
|
+
## Verify, publish, finish
|
|
33
|
+
|
|
34
|
+
Run **Publish to npm** on `main` with the merged release PR number and its successful CI run ID. Leave `publish: false` to verify the PR, tree and artifact without publishing. For publication set it to `true` and approve the protected `npm` environment after examining that same verified archive. The workflow downloads the CI archive; it does not rebuild it. npm Trusted Publishing publishes only its exact bytes. A retry cannot replace a tag or overwrite an existing version with different bytes. Do not approve a stale or expired candidate: rerun validation instead.
|
|
35
|
+
|
|
36
|
+
After npm publication, **Synchronize develop and lift release freeze** checks the registry integrity, merges `main` into `develop`, pushes that merge, and deletes the unchanged release branch with a lease. If the merge conflicts or develop advances during the push, the branch stays in place and `main` remains frozen; resolve the conflict and retry the same verified release. The benchmark runs separately after npm publication; its failure is reported but does not undo publication. `PI_AUTH_JSON` and `HF_TOKEN` stay in Actions secrets for that benchmark.
|
|
37
|
+
|
|
38
|
+
To abandon an **unpublished** release, run **Cancel release** on `main` with its version and confirmation `cancel`. This closes its PR and deletes only the matching release branch if no registry version or tag exists. If the release PR was already merged, revert it on `main` through normal review, verify that its product and version changes are gone, then cancel. A package already published or tagged cannot be canceled.
|
|
39
|
+
|
|
40
|
+
## Protection and limits
|
|
41
|
+
|
|
42
|
+
Protect `main` against direct pushes and require the `Validate` check on PRs. The release-freeze check runs inside that required check; GitHub administrators who can bypass branch protection can also bypass the freeze. Review branch-protection permissions before relying on the freeze as a hard guarantee. GitHub's scheduler can delay nightly runs beyond the Berlin midnight hour; use manual dispatch to retry a skipped night. Verify the workflow on public branches before calling the migration complete. The existing public Git history and published tags are never rewritten or replaced. No old private repository code or history is needed for normal publication.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Can native tools replace Apply?
|
|
2
|
+
|
|
3
|
+
The tables record the pre-removal audit at `c4ccbf9`. LPT-403 then fixed empty-file creation and removed Apply under the approved native contract. Historical differences below are evidence, not current API promises.
|
|
4
|
+
|
|
5
|
+
## Answer
|
|
6
|
+
|
|
7
|
+
**Native tools replace the agreed practical workflows, not every historical Apply guarantee.** The user chose to retire grouped undo and aggregate transfers, keep native batching semantics, fix empty creation, and remove the duplicate tool.
|
|
8
|
+
|
|
9
|
+
The audit found three major differences. The first two were dropped from the required replacement contract; the third was fixed before removal:
|
|
10
|
+
|
|
11
|
+
1. Native batches do not produce grouped undo receipts. `undo last` cannot restore an Apply checkpoint containing several files, file creation/deletion, moves, or binary files.
|
|
12
|
+
2. Native text copy/move pairs ranges. Apply concatenates sources and broadcasts the result. JavaScript can build the same destination text, but that alone does not preserve source guards or a coherent multi-file move.
|
|
13
|
+
3. Creating a new empty file with native `write` creates the file but reports a failed batch. A tested temporary-file composition avoids that failure and refuses overwriting an existing destination, but adds intermediate effects and is not a transaction.
|
|
14
|
+
|
|
15
|
+
Other differences are intentional or can be handled by composition. In particular, committing accepted edits after an ordinary script error is already the approved [native batching policy](native-codemode-batch-decision.md). It should not be changed silently to imitate Apply.
|
|
16
|
+
|
|
17
|
+
This audit does **not** require preserving every historical Apply behavior. The user chose the native contract and important practical scenarios, not full historical compatibility. The tables below keep the observed differences visible; the approved removal contract at the end says which ones still matter.
|
|
18
|
+
|
|
19
|
+
## How to read the historical matrix
|
|
20
|
+
|
|
21
|
+
- **Covered**: an existing native mechanism covers the operation. This is not a claim of identical execution guarantees.
|
|
22
|
+
- **Compose**: ordinary tools plus JavaScript can express the operation; the stated caveats still apply.
|
|
23
|
+
- **Different**: both routes exist, but their observable behavior differs.
|
|
24
|
+
- **Gap**: there is no replacement for the stated guarantee in the current native API.
|
|
25
|
+
- **Unproven**: a proposed replacement has not been checked end to end.
|
|
26
|
+
|
|
27
|
+
The public inventory comes from [Apply's runtime bindings][apply-runtime], not just its prompt. `editorOpen`, `editorResolve`, and `editorApply` are private bridges. `__finishApplyScript` is an internal completion hook. There is no public `result()` helper bound by this runtime; Read/Search/Diff results are recorded automatically.
|
|
28
|
+
|
|
29
|
+
## Public operations
|
|
30
|
+
|
|
31
|
+
| Apply capability | Native route | Status and limits | Evidence |
|
|
32
|
+
| ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| JavaScript conditions, loops, computed edits | Native Codemode JavaScript calling `tools.*` | Covered. Async tool calls replace synchronous Apply helpers. Do not call Apply from the replacement chain. | [Runtime][apply-runtime]; [native composition suite][composition-tests] |
|
|
34
|
+
| `read(request)` | `await tools.read(request)` | Covered for resource reading. Different result envelopes and clipping rules; see snapshots below. Read still takes a string path, so use a stored target string for a selection. | [Apply execution][apply-execution]; [Read targets][read-targets] |
|
|
35
|
+
| `search(request)` | `await tools.search(request)` | Covered: text, regex, AST, symbols, files, web, terminal and process providers. Use native structured matches/captures, not Apply's adapter fields. | [Structural Search suite][structural-tests]; [composition suite][composition-tests] |
|
|
36
|
+
| `diff({before, after})` | `await tools.diff({before, after})` | Covered by the same comparison implementation. It compares complete resolved text unless explicitly windowed. A diff is not an editable target. | [Diff core][diff-core]; [Diff tests][diff-tests] |
|
|
37
|
+
| `open(path)` / `open({path, views})` | Read a resource; keep its returned target and data | Compose, not a mutable editor handle. Full-file reading and checkpoint refresh differ; see snapshots below. | [Runtime][apply-runtime]; [Read targets][read-targets] |
|
|
38
|
+
| `file.source` | Result item's `source` | Covered. Keep source identity, not a display path or preview. | [Result store][result-store] |
|
|
39
|
+
| `file.content` | Read `lines`, preserving each `lineEnding`, and page as needed | Compose. A bounded Read is not complete file content. Bulk snapshot-equivalent reconstruction is unproven in this audit. | [Read targets][read-targets]; [Apply execution][apply-execution] |
|
|
40
|
+
| `file.lines` | Read structured `lines` | Covered for returned lines. Apply also has snapshot line offsets; native selection coordinates are absolute lines and UTF-16 columns. | [Runtime][apply-runtime]; [text Select][text-select] |
|
|
41
|
+
| `file.find(text)` | Strict literal Search on the original target | Compose. Quote and escape the literal, use `caseSensitive: true`, and check completeness. Ordinary unquoted Search can fall back to separate terms; that is not `find`. Arbitrary multiline literal parity is not newly proven here. | [Search parser][search-query]; [Runtime][apply-runtime] |
|
|
42
|
+
| `file.select(searchMatch)` | Pass a match/capture or its target to Search/Select/edit tools | Covered. No conversion to an Apply SelectionSet is needed. Stored native targets also reject stale, forged and expired inputs. | [Structural Search suite][structural-tests]; [composition suite][composition-tests] |
|
|
43
|
+
| `file.between(start, end, {inside, lines})` with literal markers | Select `between` with `extent: inside/around/lines` | Different. Native refuses an unmatched opening marker; Apply stops without an error. The native refusal is an approved guard. | [Runtime][apply-runtime]; [text Select suite][text-tests] |
|
|
44
|
+
| `file.between(selectionSet, selectionSet)` | Derive endpoints and Select `range` within a common original snapshot | Unproven as a general replacement. Native `between` itself accepts literal markers only. Do not manufacture authority from preview coordinates. | [Runtime][apply-runtime]; [text Select][text-select] |
|
|
45
|
+
| `file.slice(set, start, end)` | JavaScript `items.slice(start, end)`, passed as native inputs | Covered for choosing items, including negative array indexes. This is not Select `sliceText`, which slices text within every item. Preview clipping means the returned `items` array may omit target ranges; do not treat it as complete without checking. | [Runtime][apply-runtime]; [Select tool][select-tool] |
|
|
46
|
+
| `file.union(...sets)` | Combine native inputs; optionally Select `merge` | Different. Apply sorts, deduplicates and refuses overlapping ranges. Native merge explicitly joins overlaps. Add a checked overlap refusal if that old guard is required. | [Runtime][apply-runtime]; [geometry Select][geometry-select] |
|
|
47
|
+
| `file.within(candidates, scopes)` | Select `within` | Covered for non-empty ranges; different point membership. Native uses half-open scopes and excludes a point at a non-empty scope's end. Apply's numeric containment includes that point. | [geometry Select][geometry-select]; [geometry suite][geometry-tests] |
|
|
48
|
+
| `file.linesOf(selection)` | Select `linesOf` | Covered for deriving whole lines. It does not imply Apply's automatic linewise insertion/transfer behavior. | [text Select][text-select]; [text suite][text-tests] |
|
|
49
|
+
| `file.line(first, last)` | Select `lines` from a sufficiently broad original target | Covered, with strict containment. Partial Read authority is never silently widened. | [text suite][text-tests] |
|
|
50
|
+
| `file.start()` / `file.end()` | Select `position: before/after` from a whole-file target | Covered for character positions, including empty files. Unlike Apply's points, these do not carry a linewise insertion flag. | [text suite][text-tests]; paired check P8 |
|
|
51
|
+
| `file.before(selection)` / `file.after(selection)` | Select `position: before/after` | Covered for exact positions. Supply line separators deliberately when using character-point edits or transfers. | [text Select][text-select]; [element suite][element-tests] |
|
|
52
|
+
| SelectionSet `.text` / each selection's `.text` | Read stored target(s), then join returned content | Compose. Read whole-line context is not the exact selection text; clip it to the verified range. A preview is not a full value. Source-guarded bulk concatenation remains unproven. | [Read targets][read-targets]; [transfer core][transfer-core] |
|
|
53
|
+
| SelectionSet identity, generation, provenance | Session-owned result targets, strict snapshots, Select origins and syntax metadata | Covered with a different representation. Targets expire across session/reload and do not silently refresh. | [Result store][result-store]; [Select suites][select-tests] |
|
|
54
|
+
| `file.replace(selection, text)` / global `replace(selection, text)` | `tools.replace({path: selection, text})` | Covered for exact guarded ranges, sparse and multi-file selections. A bare exact string uses the native anchor contract, not a SelectionSet. | [composition suite][composition-tests] |
|
|
55
|
+
| `file.remove(selection)` / global `remove(selection)` | Structured `tools.delete({path: selection})` or empty replacement | Covered. Structured deletion keeps the file and exposes no editable removal target; empty replacement can expose the resulting position. | [composition suite][composition-tests]; [editing guide][editing-guide] |
|
|
56
|
+
| `file.insertBefore/insertAfter` / global variants | Line-based `insert` for anchors; Select position + replace/copy/move for exact character points | Compose. `insert` does not accept arbitrary structured inputs. The EOF CRLF blank-line case is paired and proven; general linewise transfer is not established by that one example. | Paired check P8; [transfer tests][apply-transaction-tests] |
|
|
57
|
+
| `copy(sourceSet, destinationSet)` | Structured native `copy` | Different: native pairs equal counts; Apply concatenates all source text and broadcasts it. | Paired check P4; [transfer core][transfer-core] |
|
|
58
|
+
| `move(sourceSet, destinationSet)` | Structured native `move` | Different for the same aggregation reason. JavaScript copy/replace then delete is not automatically one coherent guarded move. | [Apply transaction][apply-transaction]; [transfer core][transfer-core]; [transfer tests][apply-transaction-tests] |
|
|
59
|
+
| `createFile(path, content)` | `write`, or owned temporary file + non-overwriting whole-file copy | Different. Write overwrites; the tested composition protects an existing destination, including empty creation, but has intermediate effects. | Paired checks P2, P3, P5 |
|
|
60
|
+
| `deleteFile(path)` / `file.delete()` | `tools.delete({path})` with an ordinary path | Covered for regular-file deletion. Native action is a commit boundary, not a queued Apply operation. | [file operations][file-operations]; [composition suite][composition-tests] |
|
|
61
|
+
| `copyFile(path, target, {overwrite})` | Whole-file `tools.copy` with ordinary paths | Covered: same byte-preserving primitive, default refusal to overwrite, regular-file/symlink checks. Outer rollback/undo differs. | [file operations][file-operations]; [Apply transaction][apply-transaction] |
|
|
62
|
+
| `moveFile(path, target, {overwrite})` | Whole-file `tools.move` with ordinary paths | Covered with the same rollback/undo caveat. | [file operations][file-operations]; [composition suite][composition-tests] |
|
|
63
|
+
| Global `flush()` / normal script completion | `tools.flush({})` / native script completion | Covered as a checkpoint mechanism, not receipt or error parity. Inspect final per-call effects, not just pending child results. | Paired checks P1, P6; [native batch][native-batch] |
|
|
64
|
+
| `file.flush()` | Reorder staging, then global native flush | Different. No file-selective native flush exists. Apply skips selective flush when that file participates in a pending cross-file transfer. | Paired check P7; [Runtime][apply-runtime] |
|
|
65
|
+
|
|
66
|
+
## Execution guarantees
|
|
67
|
+
|
|
68
|
+
| Guarantee | Apply | Native Codemode | Assessment |
|
|
69
|
+
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
70
|
+
| Pending edits use original coordinates | Immutable document snapshot and SelectionSet generation | Original snapshots within a batch; pending mutation targets can start dependent work | Covered by existing native tests, with explicit boundary rules. |
|
|
71
|
+
| Ordinary uncaught script error | Does not auto-commit still-pending operations | Commits accepted surviving edits, then reports the error | Different, paired P1 and live. Native behavior was already approved. |
|
|
72
|
+
| Abort/deadline | No final pending checkpoint; already committed effects remain | Discards pending batch; already committed effects remain | Comparable intent. Existing native cancellation tests are evidence, not rerun in this audit. |
|
|
73
|
+
| Read/Search after pending edits | Reads snapshot/disk without implicitly committing queued edits | Another tool or pending-result dependency can commit the batch first | Different timing. Native reads see committed, not yet finally formatted text. |
|
|
74
|
+
| Explicit checkpoint | Global or eligible file-selective flush | Global flush plus automatic boundaries | Different, paired P7. Scheduling can express many workflows, not identical pending-state semantics. |
|
|
75
|
+
| Handle after checkpoint | Open document handles refresh; old SelectionSets become stale | Earlier target strings remain strict; obtain or use a confirmed fresh target | Different by design. No silent native refresh. |
|
|
76
|
+
| Independent operation failure | Can keep successful siblings; failures/unknown effects are recorded | Can keep successful siblings; structured domain errors must be inspected | Both are partial-success systems. Neither is all-script atomic. |
|
|
77
|
+
| Failed text write / transfer | Per-operation saved-path rollback plus dependency blocking when outcome is unknown | Shared multi-resource text-write rollback and guarded per-call effects | Source-level overlap, not full failure parity. Newly created paths and whole-file failures need separate adversarial proof. |
|
|
78
|
+
| Whole-file copy/move/delete rollback | Apply adds its saved-before operation journal | Shared file primitive reports an unknown effect if failure occurs after the operation starts | Gap in equivalent restoration guarantees; not newly fault-injected here. |
|
|
79
|
+
| Grouped undo | Checkpoint creates `APPLY#`; preflight guards then restore all touched paths, including binary/absent paths | Can consume an existing Apply receipt, but native flush cannot produce one. `undo last` is per-file text undo | Gap, paired receipt producer P6 plus source inspection. Calling Apply to make a receipt is not a replacement. |
|
|
80
|
+
| Repeated overlapping edits | Checkpoint checks original ranges and records failures | Batch checks original ranges and refuses conflicting changes | Covered in broad mechanism only. Ordering of multiple insertions at the exact same point was not paired here. |
|
|
81
|
+
| Stale source authority | Snapshot checks and selection generation | Expected content/existence, source identity, strict stored targets and completeness | Covered, not permission to replace a guarded source with an unguarded string reconstruction. |
|
|
82
|
+
| Sparse/multi-file selections | Apply SelectionSets belong to one document; global operations compose them | Native results retain separate source/ranges and origins | Covered; native does not match across gaps. |
|
|
83
|
+
| No-op / empty selections | Can record a warning without edits | Successful `not-applied` no-op for eligible text operations | Covered goal, different receipts. Whole-file write/undo do not widen an empty/partial selection. |
|
|
84
|
+
| Formatting and post-edit handlers | Final processing after surviving Apply work, with final snapshots/results | Once per surviving resource at native script end; flush does not format | Covered goal by existing native integration tests. Final processing can stale earlier targets. No formatter success claim for ignored live `.tmp` fixtures. |
|
|
85
|
+
| Script sandbox | Fresh Run guest, fixed private IDE bridge; no shell/import/Node access | Native QuickJS orchestration, registered tool pipeline; no Node filesystem API in guest | Different implementation. Test ordinary tool composition, not a shell script that sidesteps guards. |
|
|
86
|
+
| Concurrency | Guest calls use an ordered host queue; file reservations protect effects | Independent disjoint calls can run concurrently; await dependent same-source calls | Covered with a richer native model, not identical scheduling. |
|
|
87
|
+
| Output and TUI | Recorded read results, operation outcomes, refreshed snapshots and checkpoint receipts | Native child calls, pending receipts, final batch effects and formatting contributions | Covered presentation goal, different envelopes. Live viewport verified ordinary-error effects, not every historical Apply output shape. |
|
|
88
|
+
| Large inputs/outputs | Full opened snapshots, bridge/output budgets and overflow artifacts | Bounded Read/item previews; stored targets can retain more ranges than the preview | Unproven for arbitrary bulk `.content`/`.text` replacement. Do not call clipped data complete. |
|
|
89
|
+
|
|
90
|
+
### Snapshot-safe composition rules
|
|
91
|
+
|
|
92
|
+
A matching final string is not enough to establish parity:
|
|
93
|
+
|
|
94
|
+
- Check `status`, `effect`, completeness and the parent final batch outcome. Native domain errors can resolve instead of rejecting the JavaScript promise.
|
|
95
|
+
- Use a returned stored target or a filtered array of complete returned items. Read context and preview text do not create new editing authority.
|
|
96
|
+
- Retain original source/snapshot guards when reconstructing text. Replacing only the destination does not check that the source still matches the text you copied.
|
|
97
|
+
- Read's default target is its returned window. A whole-file target can be obtained through Select on the file, but any paged reconstruction must stay tied to that target and preserve line endings. This bulk composition was not executed here.
|
|
98
|
+
- For exact `find`, escape quotes/backslashes inside a quoted Search term rather than relying on JSON's `\n` escape decoding. Check arbitrary multiline cases before replacing Apply's literal scanning.
|
|
99
|
+
- A sequence of successful calls is not an atomic transaction. Compensation code can itself fail and does not replace a preflight-guarded grouped undo receipt.
|
|
100
|
+
|
|
101
|
+
## Targeted evidence from this audit
|
|
102
|
+
|
|
103
|
+
All checks are in [apply-native-parity.integration.test.ts][paired-tests]. Apply is the reference call; native replacement chains do not invoke Apply. No production code was changed.
|
|
104
|
+
|
|
105
|
+
| ID | Check | Observed result |
|
|
106
|
+
| --- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
107
|
+
| P1 | Pending replacement, then ordinary throw | Apply file stays `old`; native file becomes `new`. Both report the script error. |
|
|
108
|
+
| P2 | Create an already existing file | Apply refuses and preserves it. Native write replaces it. |
|
|
109
|
+
| P3 | Create a missing empty file | Apply succeeds. Native creates the empty file, but its batch reports `Text changes must change the document.` This is a real observed bug, not the desired contract. |
|
|
110
|
+
| P4 | Two source fragments copied to two destination ranges | Apply produces `ab ab`; native produces `a b`. Protected CRLF neighbors remain unchanged. |
|
|
111
|
+
| P5 | Create-only composition using an owned temporary file and whole-file copy | Existing destination is refused and preserved. A nonempty pending write followed by replacement through its returned target can prepare an empty source; copy creates the empty destination, then cleanup removes the owned temporary file. |
|
|
112
|
+
| P6 | Commit two edited files | Apply publishes a grouped receipt. Native flush confirms two operations but has no `transaction` or `transactions`. |
|
|
113
|
+
| P7 | Stage two files, flush selectively/globally, then throw | Apply commits only the selected file; native global flush commits both. |
|
|
114
|
+
| P8 | Blank-line insertion after an unterminated CRLF file | Both produce exact `😀 first\r\nlast\r\n\r\nNEW`. This proves this composition, not every linewise transfer. |
|
|
115
|
+
|
|
116
|
+
**All eight checks passed across focused runs, not in one uninterrupted eight-test run.** Passing P3 means the audit reproduced the bug; it does not mean empty native creation works correctly.
|
|
117
|
+
|
|
118
|
+
The run history is intentionally kept honest:
|
|
119
|
+
|
|
120
|
+
- First six-check run: no scenario could start because `node-pty` had not been built after the local install with scripts disabled. Building that dependency fixed the environment, without repository source changes.
|
|
121
|
+
- Retry: five passed; one assertion used the wrong Apply result envelope. Correcting it proved P6 in isolation.
|
|
122
|
+
- New creation workaround exposed P3. The first workaround used a literal selector before a pending file creation had committed; the replacement failed and the file contained `seed`. The final version checks child statuses and replaces through the returned pending write target; P5 then passed.
|
|
123
|
+
- Only targeted serial runs were used: `env -u PI_INTEGRATION_TEST_RUNNER pnpm exec vitest run --config vitest.integration.config.mjs --maxWorkers=1 --no-file-parallelism`. No shared runner pool, shards, or full-suite rerun.
|
|
124
|
+
|
|
125
|
+
Run logs remain in `.tmp/lpt-403-paired-integration.log`, `.tmp/lpt-403-paired-integration-retry.log`, `.tmp/lpt-403-paired-followup.log`, `.tmp/lpt-403-create-followup.log` and `.tmp/lpt-403-create-composition-retry.log`. Real-Pi artifacts remain under `.tmp/test-runs/`. These local logs support this audit; the reusable checks and this matrix belong in Git.
|
|
126
|
+
|
|
127
|
+
Live checks separately reproduced P1 and native empty creation. Read-only byte checks confirmed P1's exact CRLF files. Actual Herdr pane `w3HS:p1`, revision 40, showed both script failures and the native `new` diff. No model-facing text was used as a substitute for that viewport check.
|
|
128
|
+
|
|
129
|
+
The existing suites linked above are source evidence and earlier contract coverage. They were **not** all rerun for LPT-403.
|
|
130
|
+
|
|
131
|
+
## Approved removal contract
|
|
132
|
+
|
|
133
|
+
The user reviewed the matrix and chose:
|
|
134
|
+
|
|
135
|
+
1. **Drop grouped checkpoint undo.** Do not add a native grouped receipt producer just to preserve Apply. Existing per-file text undo is a separate capability.
|
|
136
|
+
2. **Keep equal-pair copy/move.** Concatenating sources and broadcasting to all destinations is not a required native operation.
|
|
137
|
+
3. **Fix empty-file creation separately before removing Apply.** The temporary-file composition is evidence of a workaround, not the chosen permanent API.
|
|
138
|
+
4. **Keep the native error/checkpoint/target model.** Ordinary errors keep accepted surviving edits; checkpoints are global/automatic; targets never silently refresh. Remove old Apply promises from removal-facing docs and examples.
|
|
139
|
+
5. **Check the native contract and important practical scenarios.** Do not chase full compatibility with every historical helper or convenience rule. The unproven areas above remain honest limitations, not automatically mandatory new features.
|
|
140
|
+
|
|
141
|
+
### Removal implementation
|
|
142
|
+
|
|
143
|
+
- Fixed empty native creation. The standalone and Codemode regressions check actual zero-byte content, truthful applied effects and a usable point target. See [empty creation tests](https://github.com/alexshpunt/pi-agent-ide/blob/5c318fd2081a3bc4e187efb06c7e9eeae4a22317/tests/integration/native-empty-write.integration.test.ts).
|
|
144
|
+
- Removed Apply registration, runtime, grouped undo receipts, private plugin APIs, preview settings and dependencies. Ordinary editing, Diff, Git change undo and per-file last undo remain.
|
|
145
|
+
- Migrated practical shared integration scenarios to native tools. The removal checks cover post-edit processing, scoped semantic/AST operations, module settings, user hooks, CRLF insertion, native result schemas, discovery and hidden-tool boundaries, resource scheduling and progressive guides.
|
|
146
|
+
- Kept the native contract: strict snapshots, equal-pair transfers, global checkpoints and final processing once per surviving resource. Ordinary errors keep accepted edits; cancellation discards only pending work. There is no grouped rollback or silent syntax repair.
|
|
147
|
+
|
|
148
|
+
Historical audit checks below were not rerun after removal: they deliberately depend on the old Apply runtime, and P3 reproduces the old empty-write defect. Their source stays in Git history. The original serial removal check passed 58 contracts and failed one outdated hook expectation; targeted retries verify the corrected native Read/error and blocked-commit behavior. Final live and check evidence is recorded in the task Workpad. No full suite was run for this removal.
|
|
149
|
+
|
|
150
|
+
Full historical equivalence remains false by design. That is not the accepted product requirement.
|
|
151
|
+
|
|
152
|
+
[apply-runtime]: https://github.com/alexshpunt/pi-agent-ide/blob/c4ccbf9e8620976b5130e6f351f2678ce1d1a067/src/extensions/pi-agent-text-editor/src/core/apply/runtime.ts
|
|
153
|
+
[apply-execution]: https://github.com/alexshpunt/pi-agent-ide/blob/c4ccbf9e8620976b5130e6f351f2678ce1d1a067/src/extensions/pi-agent-text-editor/src/core/apply/execution.ts
|
|
154
|
+
[apply-transaction]: https://github.com/alexshpunt/pi-agent-ide/blob/c4ccbf9e8620976b5130e6f351f2678ce1d1a067/src/extensions/pi-agent-text-editor/src/core/apply/transaction.ts
|
|
155
|
+
[apply-transaction-tests]: https://github.com/alexshpunt/pi-agent-ide/blob/c4ccbf9e8620976b5130e6f351f2678ce1d1a067/src/extensions/pi-agent-text-editor/tests/core/apply-transaction.test.ts
|
|
156
|
+
[native-batch]: ../../src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts
|
|
157
|
+
[file-operations]: ../../src/extensions/pi-agent-text-editor/src/core/file-operations.ts
|
|
158
|
+
[transfer-core]: ../../src/extensions/pi-agent-text-editor/src/core/result-transfer.ts
|
|
159
|
+
[read-targets]: ../../src/extensions/pi-agent-read/src/core/tools/read/result-target.ts
|
|
160
|
+
[result-store]: ../../packages/pi-agent-resource/src/result-targets.ts
|
|
161
|
+
[select-tool]: ../../src/plugins/pi-agent-ide-ast/src/tool-select.ts
|
|
162
|
+
[text-select]: ../../src/plugins/pi-agent-ide-ast/src/text-selection.ts
|
|
163
|
+
[geometry-select]: ../../src/plugins/pi-agent-ide-ast/src/geometry-selection.ts
|
|
164
|
+
[search-query]: ../../src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-query.ts
|
|
165
|
+
[diff-core]: ../../src/extensions/pi-agent-text-editor/src/core/diff-tool.ts
|
|
166
|
+
[diff-tests]: ../../src/extensions/pi-agent-text-editor/tests/core/diff-tool.test.ts
|
|
167
|
+
[paired-tests]: https://github.com/alexshpunt/pi-agent-ide/blob/8336931d17056149fe1d4fd3f0340061533438c9/tests/integration/apply-native-parity.integration.test.ts
|
|
168
|
+
[composition-tests]: ../../tests/integration/native-tool-composition.integration.test.ts
|
|
169
|
+
[structural-tests]: ../../tests/integration/native-structural-search.integration.test.ts
|
|
170
|
+
[select-tests]: ../../tests/integration/native-select.integration.test.ts
|
|
171
|
+
[text-tests]: ../../tests/integration/native-text-select.integration.test.ts
|
|
172
|
+
[geometry-tests]: ../../tests/integration/native-geometry-select.integration.test.ts
|
|
173
|
+
[element-tests]: ../../tests/integration/native-element-select.integration.test.ts
|
|
174
|
+
[editing-guide]: ../agent-guides/editing.md
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Apply and Read latency research
|
|
2
2
|
|
|
3
|
+
This is historical research. Apply was removed in LPT-403; source paths below refer to [the last pre-removal revision](https://github.com/alexshpunt/pi-agent-ide/tree/c4ccbf9e8620976b5130e6f351f2678ce1d1a067).
|
|
4
|
+
|
|
3
5
|
This report records the LPT-238 investigation. It describes the current code on `develop` at `bf7f36db` and the retained benchmark evidence available on 17 September 2026. No product behavior was changed.
|
|
4
6
|
|
|
5
7
|
## Summary
|