pi-agent-ide 0.6.2 → 0.6.4
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 +66 -0
- package/README.md +8 -1
- package/dist/chunk-2P2OGO3G.js +2 -0
- package/dist/{chunk-5QQABP47.js → chunk-3BBJZSMS.js} +1 -1
- package/dist/chunk-5J43L2RL.js +11 -0
- package/dist/{chunk-ITSNK5YG.js → chunk-7AVXUV4A.js} +2 -2
- package/dist/chunk-BAYETTZZ.js +16 -0
- package/dist/{chunk-VCTK4JSN.js → chunk-BSICWXMH.js} +1 -1
- package/dist/chunk-BVK5A7ED.js +28 -0
- package/dist/{chunk-ZM4L5AGN.js → chunk-EDURPQAV.js} +3 -2
- package/dist/{chunk-L7JMDDSD.js → chunk-FBOW7XOV.js} +1 -1
- package/dist/{chunk-25CZ5ZIU.js → chunk-FUG2TEKI.js} +1 -1
- package/dist/chunk-FZBCKIJJ.js +1 -0
- package/dist/chunk-HPUAIWIH.js +25 -0
- package/dist/chunk-I5JLCFUX.js +1 -0
- package/dist/chunk-KUPHNMUK.js +2 -0
- package/dist/{chunk-NTYXZ3EL.js → chunk-KVHDMIZS.js} +1 -1
- package/dist/{chunk-QDST6VIU.js → chunk-KZC7TI5M.js} +1 -1
- package/dist/chunk-MIZAFRDR.js +1 -0
- package/dist/chunk-PJPA5EEE.js +2 -0
- package/dist/{chunk-GUTQ3PWL.js → chunk-PLKYHUNT.js} +1 -1
- package/dist/chunk-QEJGED4V.js +28 -0
- package/dist/chunk-SILJ3OL4.js +9 -0
- package/dist/{chunk-VXD6FZP5.js → chunk-TQZBVOTT.js} +3 -3
- package/dist/chunk-VBICI5YA.js +1 -0
- package/dist/chunk-VWW3RLUX.js +12 -0
- package/dist/{chunk-O6LE42GK.js → chunk-WJTHY6AG.js} +1 -1
- package/dist/chunk-YGGKGZO2.js +1 -0
- package/dist/chunk-ZODCBFBL.js +2 -0
- 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 -11
- package/dist/entry-33.js +1 -1
- package/dist/entry-37.js +2 -2
- package/dist/entry-42.js +1 -1
- package/dist/entry-44.js +1 -1
- package/dist/entry-45.js +13 -12
- package/dist/entry-46.js +1 -1
- package/dist/entry-49.js +1 -1
- package/dist/entry-50.js +4 -4
- package/dist/entry-51.js +9 -9
- package/dist/entry-52.js +1 -1
- package/dist/entry-53.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 +1 -1
- package/dist/entry-63.js +1 -1
- package/dist/entry-66.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-71.js +1 -0
- package/dist/entry-72.js +0 -1
- package/dist/entry-73.js +1 -0
- package/dist/entry-74.js +0 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-76.js +1 -1
- package/dist/entry-77.js +1 -315
- package/dist/entry-78.js +324 -25
- package/dist/entry-79.js +18 -2
- package/dist/entry-80.js +2 -1
- package/dist/entry-81.js +1 -1
- package/dist/entry-82.js +1 -3
- package/dist/entry-83.js +5 -3
- package/dist/entry-84.js +3 -1
- package/dist/entry-85.js +1 -1
- package/dist/entry-86.js +1 -1
- package/dist/entry-87.js +1 -0
- package/dist/pi-agent-ide.js +15 -3
- package/docs/agent-guides/apply.md +1 -1
- package/docs/agent-guides/editing.md +16 -0
- package/docs/agent-guides/json-reading.md +19 -3
- package/docs/agent-guides/read-resources.md +6 -0
- package/docs/agent-guides/search-code.md +5 -1
- package/docs/agent-guides/terminal.md +1 -1
- package/docs/code-review.md +99 -0
- package/docs/configuration.md +34 -0
- package/docs/development.md +15 -19
- package/docs/nightly.md +7 -0
- package/docs/releases.md +42 -0
- package/docs/research/native-codemode-batch-decision.md +27 -0
- package/docs/research/native-codemode-batching.md +65 -0
- package/docs/structured-results.md +59 -0
- package/docs/tools.md +18 -2
- 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 +10 -10
- 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 +17 -0
- package/node_modules/pi-agent-ide-changes/index.ts +3 -9
- 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 +125 -47
- 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/package.json +9 -9
- package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +19 -0
- 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/tools/read.ts +31 -2
- 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/structured-result.ts +216 -0
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +119 -72
- package/node_modules/pi-agent-resource/package.json +1 -1
- package/node_modules/pi-agent-resource/src/index.ts +12 -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/tool-result.ts +125 -0
- package/node_modules/pi-agent-search/package.json +5 -4
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +6 -5
- package/node_modules/pi-agent-search/src/api/search.ts +11 -0
- package/node_modules/pi-agent-search/src/api/structured-result.ts +93 -0
- package/node_modules/pi-agent-search/src/core/extension.ts +40 -14
- package/node_modules/pi-agent-search/src/core/search-core.ts +136 -77
- package/node_modules/pi-agent-search-text/index.ts +3 -0
- package/node_modules/pi-agent-search-text/package.json +6 -6
- package/node_modules/pi-agent-search-text/src/resolvers.ts +17 -0
- package/node_modules/pi-agent-search-text/src/search-backend.ts +104 -8
- 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 +37 -3
- package/node_modules/pi-agent-search-text/src/search-session.ts +21 -13
- 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 -2
- package/node_modules/pi-agent-text-editor/package.json +21 -17
- package/node_modules/pi-agent-text-editor/runtime/entry-77.js +0 -1
- 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/native-edit-batch-event.ts +12 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/apply-undo-store.ts +4 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/execution.ts +95 -34
- package/node_modules/pi-agent-text-editor/src/core/apply/prompt.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/apply/results.ts +4 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/runtime.ts +20 -11
- package/node_modules/pi-agent-text-editor/src/core/apply/structured-result.ts +251 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/tool.ts +32 -12
- package/node_modules/pi-agent-text-editor/src/core/apply/transaction.ts +154 -132
- 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 +74 -18
- package/node_modules/pi-agent-text-editor/src/core/editing-guidelines.ts +8 -0
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +6 -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/native-text-edit-batch.ts +640 -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/structured-result.ts +314 -0
- package/node_modules/pi-agent-text-editor/src/core/text-change-engine.ts +52 -11
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +143 -138
- 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 +242 -116
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +109 -47
- 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-selection.ts +7 -4
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +24 -3
- package/node_modules/pi-agent-text-editor-renderer/index.ts +8 -1
- package/node_modules/pi-agent-text-editor-renderer/package.json +7 -6
- package/node_modules/pi-agent-text-editor-renderer/src/diff-model.ts +262 -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-stale-anchor/index.ts +16 -1
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-80.js +2 -0
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-ui/package.json +2 -2
- package/node_modules/pi-agent-tool-ui/runtime/entry-82.js +1 -0
- package/node_modules/pi-agent-web/index.ts +20 -0
- package/node_modules/pi-agent-web/package.json +8 -7
- package/node_modules/pi-agent-web/src/search.ts +112 -0
- package/node_modules/pi-agent-web-html/package.json +3 -3
- 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-87.js +2 -0
- package/package.json +42 -36
- 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/nested-tool-rendering.ts +298 -0
- 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 +20 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +8 -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-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-87.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-83.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/search.ts +112 -0
- package/src/extensions/pi-agent-read/package.json +7 -7
- package/src/extensions/pi-agent-read/src/api/tools/read.ts +31 -2
- 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/structured-result.ts +216 -0
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +119 -72
- package/src/extensions/pi-agent-search/package.json +5 -4
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +3 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +6 -6
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +17 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-backend.ts +104 -8
- 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 +37 -3
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +21 -13
- package/src/extensions/pi-agent-search/src/api/search-parameters.ts +6 -5
- package/src/extensions/pi-agent-search/src/api/search.ts +11 -0
- package/src/extensions/pi-agent-search/src/api/structured-result.ts +93 -0
- package/src/extensions/pi-agent-search/src/core/extension.ts +40 -14
- package/src/extensions/pi-agent-search/src/core/search-core.ts +136 -77
- package/src/extensions/pi-agent-text-editor/index.ts +4 -2
- package/src/extensions/pi-agent-text-editor/package.json +21 -17
- 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 +8 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +7 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-model.ts +262 -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-stale-anchor/index.ts +16 -1
- 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-80.js +2 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-77.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-78.js +2 -0
- 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/native-edit-batch-event.ts +12 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/apply-undo-store.ts +4 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/execution.ts +95 -34
- package/src/extensions/pi-agent-text-editor/src/core/apply/prompt.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/apply/results.ts +4 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/runtime.ts +20 -11
- package/src/extensions/pi-agent-text-editor/src/core/apply/structured-result.ts +251 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/tool.ts +32 -12
- package/src/extensions/pi-agent-text-editor/src/core/apply/transaction.ts +154 -132
- 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 +74 -18
- package/src/extensions/pi-agent-text-editor/src/core/editing-guidelines.ts +8 -0
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +6 -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/native-text-edit-batch.ts +640 -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/structured-result.ts +314 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-change-engine.ts +52 -11
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +143 -138
- 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 +242 -116
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +109 -47
- 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-selection.ts +7 -4
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +24 -3
- package/src/pi-agent-ide.ts +61 -2
- package/src/plugins/pi-agent-ide-ast/package.json +10 -10
- 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 +17 -0
- package/src/plugins/pi-agent-ide-changes/index.ts +3 -9
- 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 +125 -47
- 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/package.json +9 -9
- package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +19 -0
- 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 +13 -8
- 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 +97 -45
- 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 +16 -1
- package/dist/chunk-3E2NTWCN.js +0 -2
- package/dist/chunk-4LUW26BX.js +0 -10
- package/dist/chunk-5VSE5X5R.js +0 -2
- 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-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-S3ZPXWX7.js +0 -2
- package/dist/chunk-T7CZIACQ.js +0 -27
- package/dist/chunk-YT42LKFV.js +0 -16
- package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +0 -52
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-80.js +0 -1
- package/node_modules/pi-agent-web/runtime/entry-82.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-83.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-82.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-78.js +0 -2
- package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +0 -52
- /package/dist/{chunk-4U2GUKNJ.js → chunk-F7NVAC4Q.js} +0 -0
- /package/dist/{chunk-ROXXK6TW.js → chunk-PXWDDBBC.js} +0 -0
- /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor}/runtime/entry-78.js +0 -0
- /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-79.js +0 -0
- /package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-81.js +0 -0
- /package/node_modules/{pi-agent-web-html → pi-agent-web}/runtime/entry-83.js +0 -0
- /package/node_modules/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-84.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-85.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-86.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-84.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-85.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-86.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-79.js +0 -0
|
@@ -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
|
@@ -24,6 +24,26 @@ Obsolete IDs in `disabled` are ignored. They do not stop IDE startup. Malformed
|
|
|
24
24
|
|
|
25
25
|
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
26
|
|
|
27
|
+
## Native tool availability
|
|
28
|
+
|
|
29
|
+
Tools use fixed native exposure; there are no IDE exposure overrides or named profiles.
|
|
30
|
+
|
|
31
|
+
| Namespace | Tools | Exposure |
|
|
32
|
+
| -------------- | -------------------------------- | ------------ |
|
|
33
|
+
| `ide_read` | `read`, `diff` | `direct` |
|
|
34
|
+
| `ide_search` | `search` | `direct` |
|
|
35
|
+
| `ide_edit` | `apply` | `model-only` |
|
|
36
|
+
| `ide_edit` | Standalone editing tools | `direct` |
|
|
37
|
+
| `ide_terminal` | `bash` (`powershell` on Windows) | `direct` |
|
|
38
|
+
| `ide_git` | `stage`, `unstage` | `deferred` |
|
|
39
|
+
| `ide_debug` | `debug` | `deferred` |
|
|
40
|
+
|
|
41
|
+
Apply stays directly declared, including in Codemode-only mode. Nested calls and Codemode scripts cannot call it. Direct tools keep their normal calls and can also run through Codemode while active.
|
|
42
|
+
|
|
43
|
+
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.
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
|
|
27
47
|
## Config files
|
|
28
48
|
|
|
29
49
|
Pi Agent IDE reads these optional files:
|
|
@@ -160,6 +180,20 @@ Regex diagnostic parsers run with multiline matching. Set `columnBase: 0` when a
|
|
|
160
180
|
|
|
161
181
|
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
182
|
|
|
183
|
+
## Java debugger
|
|
184
|
+
|
|
185
|
+
Java uses Microsoft java-debug through a private JDT LS process on Linux and native Windows. Kotlin still uses fwcd's adapter.
|
|
186
|
+
|
|
187
|
+
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:
|
|
188
|
+
|
|
189
|
+
- `PI_JAVA_PATH`: the Java executable. Otherwise Pi uses `JAVA_HOME/bin/java` (`java.exe` on Windows), then `java` on PATH.
|
|
190
|
+
- `PI_JDTLS_HOME`: the extracted JDT LS directory, containing `plugins` and `config_linux` or `config_win`.
|
|
191
|
+
- `PI_JAVA_DEBUG_PLUGIN_PATH`: the Java debug plugin jar.
|
|
192
|
+
|
|
193
|
+
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.
|
|
194
|
+
|
|
195
|
+
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.
|
|
196
|
+
|
|
163
197
|
## Doctor
|
|
164
198
|
|
|
165
199
|
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.
|
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,14 @@ 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 independent Pi pools. 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
|
+
|
|
63
|
+
`--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.
|
|
64
|
+
|
|
57
65
|
### Watch integration tests live
|
|
58
66
|
|
|
59
67
|
Use the project command to watch every test in one file:
|
|
@@ -152,29 +160,17 @@ node scripts/measure-startup.ts \
|
|
|
152
160
|
|
|
153
161
|
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
162
|
|
|
155
|
-
##
|
|
163
|
+
## Try development builds
|
|
156
164
|
|
|
157
|
-
|
|
165
|
+
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
166
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
pi install git:github.com/alexshpunt/pi-agent-ide-dev@preview
|
|
163
|
-
```
|
|
167
|
+
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
168
|
|
|
165
|
-
|
|
169
|
+
Public `main` carries released changes; install published versions from npm. See [Releases](releases.md) for the release flow.
|
|
166
170
|
|
|
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
|
-
```
|
|
171
|
+
## Project tasks
|
|
176
172
|
|
|
177
|
-
|
|
173
|
+
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
174
|
|
|
179
175
|
## Repository layout
|
|
180
176
|
|
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 remain untouched and do not block a new release.
|
|
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,27 @@
|
|
|
1
|
+
# Solution decision: accumulate sequential Codemode text edits
|
|
2
|
+
|
|
3
|
+
## Question
|
|
4
|
+
|
|
5
|
+
Should sequential editor calls in native Codemode share only original coordinates, or also one combined write, and where should that batch end?
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
The user chose an original snapshot and one combined write, not immediate writes with coordinate translation.
|
|
10
|
+
|
|
11
|
+
Sequential text-edit calls accept checked changes into a pending batch. Before commit, their results must say the changes are accepted and not yet applied. They must not present a final written file or claim the operation is committed.
|
|
12
|
+
|
|
13
|
+
The batch ends before another tool runs or when the script finishes. A read, search or terminal call after edits must see committed files. Later edits start a new batch with a new snapshot. A mode of an editor tool that cannot join the text batch also needs a boundary before its own effects.
|
|
14
|
+
|
|
15
|
+
An ordinary script exception does not discard accepted independent edits. Finish those edits and report both their commit result and the script failure. A rejected operation does not become an accepted edit.
|
|
16
|
+
|
|
17
|
+
Do not replace or re-register native Codemode, change Apply exposure, bypass Pi's tool pipeline, or silently repair stale anchors by searching for similar text. Preserve the existing direct-call batch behavior.
|
|
18
|
+
|
|
19
|
+
The user approved end-to-end implementation after this discussion. Pending edits are discarded on abort or script deadline. The parent Codemode result reports final file effects separately from child acceptance, while preserving native child call IDs and results.
|
|
20
|
+
|
|
21
|
+
## Why
|
|
22
|
+
|
|
23
|
+
The user wants the same original-snapshot approach as the direct editor batch. Translating coordinates while writing after every call would preserve only part of that behavior. Waiting for future awaited calls would deadlock the script, so earlier calls must return before the combined write.
|
|
24
|
+
|
|
25
|
+
Flushing before another tool gives that tool real committed files rather than an invisible virtual workspace. Keeping accepted independent edits after an ordinary script error follows the user's explicit choice.
|
|
26
|
+
|
|
27
|
+
[Research and source evidence](native-codemode-batching.md) records the existing mechanisms and the unproven boundaries. The [sequential real-Pi suite](https://github.com/alexshpunt/pi-agent-ide/blob/develop/tests/integration/native-codemode.integration.test.ts) checks this contract against real files. The original red reproduction is preserved in commit de82738.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Context research: native Codemode edit batching
|
|
2
|
+
|
|
3
|
+
This records the investigation at revision ce8e0bc, before implementation. Keep its red-probe findings as historical evidence. The [solution decision](native-codemode-batch-decision.md) describes the agreed behavior; the linked suite now tests the implementation.
|
|
4
|
+
|
|
5
|
+
## Question
|
|
6
|
+
|
|
7
|
+
Can sequential calls to the existing editor tools share an original file snapshot and one combined write through native Pi Codemode, without replacing Codemode or bypassing Pi's tool pipeline?
|
|
8
|
+
|
|
9
|
+
## Findings
|
|
10
|
+
|
|
11
|
+
### Sequential calls currently write immediately
|
|
12
|
+
|
|
13
|
+
The real-Pi probe reads anchors, awaits an insertion, then awaits a replacement and a deletion using the original anchors. The insertion writes immediately. The replacement rejects its now-stale line anchor, so the deletion is never called. The real file contains only the insertion. The stale-anchor guard works; the requested sequential batch does not.
|
|
14
|
+
|
|
15
|
+
**Evidence:** [`native-codemode.integration.test.ts`](https://github.com/alexshpunt/pi-agent-ide/blob/de82738/tests/integration/native-codemode.integration.test.ts), revision `de82738`. `pnpm test:integration tests/integration/native-codemode.integration.test.ts` returned one failing test. Its stale-error and partial-file checks passed before the batch-success assertion failed.
|
|
16
|
+
|
|
17
|
+
### The current coordinator needs all calls before execution
|
|
18
|
+
|
|
19
|
+
`rewriteMessage()` discovers adjacent editor calls in an assistant message and builds a complete plan at `message_end`. `executeWithBatchCoordinator()` executes that plan once and splits its results between the original calls. A native Codemode message contains one script call, not the editor calls the script will later issue. Those child calls therefore have no precomputed plan.
|
|
20
|
+
|
|
21
|
+
`executeRegisteredTextBatch()` resolves each operation against the same text map, rejects overlapping edits and passes the combined changes to `core.editTexts()`.
|
|
22
|
+
|
|
23
|
+
**Evidence:** [`text-edit-batch-coordinator.ts`](../../src/extensions/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts), `rewriteMessage`, `ensureBatchExecution`, `executeWithBatchCoordinator`; [`text-edit-batch-registrar.ts`](../../src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts), `executeRegisteredTextBatch`.
|
|
24
|
+
|
|
25
|
+
### Waiting for future awaited calls would deadlock
|
|
26
|
+
|
|
27
|
+
Native Codemode awaits `ctx.executeTool()` and returns its outcome to the sandbox. In a sequential script, the next child call does not exist until the previous promise resolves. Holding the first promise open until the complete batch is known would stop the script from issuing the rest of the batch.
|
|
28
|
+
|
|
29
|
+
This means an accumulating batch must return a truthful acceptance result before the combined write. It cannot return the current final-file result from the first call.
|
|
30
|
+
|
|
31
|
+
**Evidence:** Pi `v0.99.1` [`execute.ts`](https://github.com/earendil-works/pi/blob/v0.99.1/packages/coding-agent/src/extensions/codemode/execute.ts), `executeCodemode`; [`native Codemode contract`](https://github.com/earendil-works/pi/blob/v0.99.1/packages/coding-agent/src/extensions/codemode/tool.ts).
|
|
32
|
+
|
|
33
|
+
### Public hooks expose the parent and child boundaries
|
|
34
|
+
|
|
35
|
+
Pi's `tool_call`, `tool_result` and `tool_execution_*` events carry `parentToolCallId` for nested calls. Child IDs belong to the calling tool, but the coordinator should use the parent field rather than parse the ID string. These hooks offer a place to associate editor invocations with a script and to finish pending work before another tool or the parent result is returned.
|
|
36
|
+
|
|
37
|
+
A `tool_result` handler can replace content, details and error status. Execution-end notifications alone are not a substitute for reporting a failed commit through the parent result. A hook that merely throws is also not sufficient: Pi reports handler failures and may continue.
|
|
38
|
+
|
|
39
|
+
The public events make this approach plausible. They do not prove a working deferred batch; no implementation or live commit-boundary probe has been added yet.
|
|
40
|
+
|
|
41
|
+
**Evidence:** Pi `v0.99.1` [`extension contracts`](https://github.com/earendil-works/pi/blob/v0.99.1/packages/coding-agent/docs/extensions.md), Tools and Errors and cleanup; [`event types`](https://github.com/earendil-works/pi/blob/v0.99.1/packages/coding-agent/src/core/extensions/types.ts); [`nested runner`](https://github.com/earendil-works/pi/blob/v0.99.1/packages/coding-agent/src/core/nested-tool-calls.ts).
|
|
42
|
+
|
|
43
|
+
### The editor already separates planning data from writing
|
|
44
|
+
|
|
45
|
+
Mutation registrations return `TextChange` entries and optional `afterWrite` actions. The existing batch path gathers those changes before writing. `core.editTexts()` prepares resources, resolves anchors, applies combined changes, runs mutation guards and writes through the owning resource resolvers under its mutation queue.
|
|
46
|
+
|
|
47
|
+
A deferred batch can reuse these mechanisms, but the existing executor is not an appendable session. Planning must be separated from committing. Accepted operations should not be rerun to rebuild their plans at commit: that could repeat plugin work or change which selection was accepted. Resource content must be checked again at commit so external changes do not get overwritten.
|
|
48
|
+
|
|
49
|
+
Not every invocation of an editor-named tool is a text edit. Direct transactions, whole-file operations and semantic resource actions have separate execution paths. They cannot be silently treated as ordinary queued text changes.
|
|
50
|
+
|
|
51
|
+
**Evidence:** [`mutation-tool.ts`](../../src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts), `TextMutation`, `TextMutationToolRegistration`; [`text-mutation.ts`](../../src/extensions/pi-agent-text-editor/src/core/text-mutation.ts), `createTextTool`; [`text-editor-core.ts`](../../src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts), `editTexts`, `editTextResources`; [`batch registrar`](../../src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts), `expectedContent` checks and `textChangesConflict`.
|
|
52
|
+
|
|
53
|
+
### Final processing can reuse an existing scope, but it is not a pending-write batch
|
|
54
|
+
|
|
55
|
+
`createPostEditScope()` already collects final processing per resource. Its writes remain immediate, so using it alone would not fix the failing snapshot test. It is a possible reuse point for formatting and notifications after a combined write, not a replacement for the batch planner.
|
|
56
|
+
|
|
57
|
+
**Evidence:** [`post-edit-scope.ts`](../../src/extensions/pi-agent-text-editor/src/core/post-edit-scope.ts), `createPostEditScope`; [`Apply execution`](../../src/extensions/pi-agent-text-editor/src/core/apply/execution.ts), `finish`. This is an internal reuse observation, not a request to make Apply callable from Codemode.
|
|
58
|
+
|
|
59
|
+
### Some failure boundaries still need proof
|
|
60
|
+
|
|
61
|
+
Deferred work changes when disk failures can reach the script. A child promise can report acceptance, while a later commit may fail. The parent result must distinguish accepted, applied and rejected operations; child success alone cannot mean the file was written.
|
|
62
|
+
|
|
63
|
+
Native Codemode records successful script store writes before returning its own result. Finalizing edits in a later parent-result hook cannot assume those store writes are rolled back if the edit commit fails. Cancellation also differs from an ordinary JavaScript exception: queued work must not silently keep writing after an aborted parent. Concurrent scripts, interrupted child work and cleanup need dedicated runtime checks before this direction can be called safe.
|
|
64
|
+
|
|
65
|
+
**Evidence:** Pi `v0.99.1` [`execute.ts`](https://github.com/earendil-works/pi/blob/v0.99.1/packages/coding-agent/src/extensions/codemode/execute.ts), sandbox result handling and `appendEntry`; [`nested runner`](https://github.com/earendil-works/pi/blob/v0.99.1/packages/coding-agent/src/core/nested-tool-calls.ts), nested call lifetime. These cases are not covered by the existing sequential probe.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Native IDE results
|
|
2
|
+
|
|
3
|
+
Read, Search, text mutations, Apply, diff, Git index tools, and debugger creation declare an `outputSchema` and return `structuredContent`. Native Codemode receives that object. Normal calls keep their readable content and existing renderers. Renderer `details` are not a script API.
|
|
4
|
+
|
|
5
|
+
The shared envelope is:
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
{ status: "success", data: /* tool data */, errors: [] }
|
|
9
|
+
{ status: "error" | "partial", data?: /* observed data */, errors: [{ code, message, source? }] }
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`success` means the requested operation completed, including a search with no matches. `partial` means some work completed while other work failed. Output clipping is reported separately; it does not make a successful read an execution failure. `error` and `partial` set native `isError`.
|
|
13
|
+
|
|
14
|
+
Check `status` before using data. Domain errors with structured results resolve in native Codemode; they do not automatically throw. Invalid arguments, blocked calls, and cancellation can still reject. A mutation error does not imply rollback. Check its observed effects before retrying.
|
|
15
|
+
|
|
16
|
+
## Data by tool
|
|
17
|
+
|
|
18
|
+
- **Read:** `kind` is `text`, `bytes`, `native`, or `resources`. Text has original numbered `lines`, line endings, optional editable `anchors`, and source-level `references`. Bytes have exact `bytes: number[]`, byte offset, selected length, and total size. Native content has ordered text/image `blocks`; pass an image block to `image(...)`. Multi-source selections keep separate child resources.
|
|
19
|
+
- **Search:** `matches` have a source, exact line/column range, optional matched text, and optional `references.line` / `references.match` selectors. Columns are zero-based UTF-16 offsets. `complete` describes the backend search; `truncated` describes the public window. `all` selectors exist only for complete registered selections. File searches return paths. Other resolvers return their documented JSON domain data under `kind: "custom"`.
|
|
20
|
+
- **Mutations:** `operationId` identifies the call. `effect` and per-source `files` distinguish `pending`, `applied`, `not-applied`, and `unknown`. Recovery candidates, semantic action fields, and transaction receipts are included when available. Full before/after documents are not copied into receipts.
|
|
21
|
+
- **Flush:** `operations` link final effects and errors to accepted child call IDs. It also returns per-source effects. An empty flush succeeds with no operations. A failed flush retains writes that happened and never replays accepted edits.
|
|
22
|
+
- **Apply:** `operations` keep read and mutation outcomes in call order, including failed work. `files` and `transactions` retain committed checkpoints after a later failure. `values` contain only output explicitly requested by the script, not hidden snapshots.
|
|
23
|
+
- **Diff:** returns source identities, equality, added/removed counts, and bounded unified diff text. It does not repeat both source documents.
|
|
24
|
+
- **Git index tools:** return action, change selector, file, index state, observed effect, and whether it was already in the requested state.
|
|
25
|
+
- **Debugger:** creation returns session, source, and breakpoint resource references plus configuration and status. Debugger mutation actions return selected breakpoint or evaluation fields, not full session snapshots.
|
|
26
|
+
|
|
27
|
+
## Native editor commits
|
|
28
|
+
|
|
29
|
+
Sequential local edits share original snapshots. Child success with `effect: "pending"` means accepted, not written. Await an explicit flush when the script needs the final receipt:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
const found = await tools.search({ query: "old", path: "note.txt" });
|
|
33
|
+
if (found.status !== "success") throw new Error(found.errors[0].message);
|
|
34
|
+
const changed = await tools.replace({ path: found.data.matches[0].references.match, text: "new" });
|
|
35
|
+
if (changed.status !== "success") throw new Error(changed.errors[0].message);
|
|
36
|
+
const saved = await tools.flush({});
|
|
37
|
+
text(saved);
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Resource-owned selectors may commit immediately rather than joining the local batch. Another tool or parent completion also commits pending local edits. The parent Codemode result records automatic commits in `details.editorBatchResults`; those reports contain receipts, not source snapshots. Ordinary script errors keep accepted independent edits. Abort and deadline discard pending edits but do not undo earlier commits.
|
|
41
|
+
|
|
42
|
+
## Bounds and continuation
|
|
43
|
+
|
|
44
|
+
Public structured results must be finite plain JSON and fit within 1 MiB. Text windows keep at most 2,000 lines and 512 KiB of serialized line data. Raw byte windows keep at most 32,768 bytes, within the normal raw-read display budget. Registered search results keep the first 100 matches and at most 4 KiB of matched text per match.
|
|
45
|
+
|
|
46
|
+
Read `continuation` is a complete next request with a resolved source and absolute offset. Follow it rather than recomputing offsets from a rendered annotation. `fullResult` identifies retained complete output when available. A huge indivisible block or invalid adapter returns an explicit error rather than a clipped success. Temporary references belong to their runtime.
|
|
47
|
+
|
|
48
|
+
Native structured content is not copied into stored session messages. Existing compact renderer details stay separate. Scripts that explicitly print large data still store what they print.
|
|
49
|
+
Guides attached to native structured child calls stay on the readable parent result, even when the script prints only selected data. They do not become fields in the public data schema.
|
|
50
|
+
|
|
51
|
+
## Resolver adapters
|
|
52
|
+
|
|
53
|
+
Search resolvers must provide `toScriptData(payload, formattedDetails)`. Select documented JSON domain fields or use `selectionData` from `pi-agent-search/api/search`. Missing adapters fail with `STRUCTURED_ADAPTER_REQUIRED`; invalid schema or non-JSON values fail with `INVALID_STRUCTURED_RESULT`. Neither case falls back to display-text parsing or raw payload dumping.
|
|
54
|
+
|
|
55
|
+
Standard Read Resources use the core text/bytes/native projection. Read handlers that return their own result must supply `script: ReadScriptData`; custom content needs an explicit supported projection. Source-level references and line anchors come from presenters, not parsed annotations.
|
|
56
|
+
|
|
57
|
+
The shared validation helpers live in `pi-agent-resource`. Read and Search export their data/output schemas through their existing public tool APIs. Text mutation schemas and `structuredMutation` are exported through `pi-agent-text-editor/api/mutation-result`.
|
|
58
|
+
|
|
59
|
+
Shell command results keep their separate native process contract. This change does not add a shared result store, cross-session handles, binary editing, or a new Apply interpreter.
|
package/docs/tools.md
CHANGED
|
@@ -4,6 +4,10 @@ Pi Agent IDE explores a small tool surface for coding agents. The goal is to kee
|
|
|
4
4
|
|
|
5
5
|
The project is experimental. The behavior below describes the current implementation, not a performance guarantee.
|
|
6
6
|
|
|
7
|
+
## Native structured results
|
|
8
|
+
|
|
9
|
+
IDE tools declare native result schemas. Codemode receives typed data and explicit success/error/partial outcomes instead of display strings. Check status and mutation effects before continuing or retrying. See [Native IDE results](./structured-results.md) for fields, resolver adapters, bounds, and `tools.flush({})`.
|
|
10
|
+
|
|
7
11
|
## Resource references
|
|
8
12
|
|
|
9
13
|
Tool source fields take one complete resource reference. A filesystem path is the common case, but it is not the only kind of reference. Depending on the tool and loaded resolvers, a reference may name a file, URL, protocol source, temporary result, or a typed text selection.
|
|
@@ -72,14 +76,26 @@ Window and display capture use `node-screenshots` on Linux and macOS. Desktop or
|
|
|
72
76
|
|
|
73
77
|
## Terminal sessions
|
|
74
78
|
|
|
75
|
-
`
|
|
79
|
+
Native Codemode scripts receive a structured shell result. `output` holds up to 1 MiB of ANSI-free PTY output; empty output is `""`. Longer logs keep their first and last 512 KiB, cut at UTF-8 character boundaries. `truncated` reports missing output, not whether the process has finished. `output_ranges` gives the zero-based, end-exclusive byte ranges joined into `output`, with no added headings or omission marker. `full_output_path` points to the UTF-8 log, which keeps growing while the process runs and stays available until the session is deleted.
|
|
80
|
+
|
|
81
|
+
The native fields `exit_code` and `wall_time_seconds` describe the process, not tool transport. `exit_code` is absent until known. IDE fields `session`, `source`, `status`, `background`, `wait_reason`, `completion_reason`, `signal`, and `error` describe the persistent session. A wait timeout leaves a running session, not a failed command. Nonzero exits and shell startup failures still return structured data to scripts. Normal model output and stored renderer details keep the shorter terminal preview limits.
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
const result = await tools.bash({ command: "your-command" });
|
|
85
|
+
text({
|
|
86
|
+
status: result.status,
|
|
87
|
+
errors: result.output.split("\n").filter((line) => line.includes("error")),
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`bash` (Linux/WSL) or `powershell` (Windows) starts a command in the user's configured system shell. Its schema and prompt guidance name that shell at runtime, so the agent writes Bash, zsh, PowerShell, or Command Prompt syntax as appropriate. Commands are not translated between shell languages.
|
|
76
92
|
|
|
77
93
|
Every run returns a stable `shell:<session>` source. Synchronous runs wait for the real exit status. Background runs return immediately, remain visible below the editor, and send one completion message that wakes the agent; nearby completions are combined without losing individual results. `/terminals` opens the active and recent session overlay.
|
|
78
94
|
The UI tab in `/agent-ide-settings` controls persistent active-terminal presentation: Detailed cards (default), Compact count, or Off. Detailed cards replace the separate active count instead of showing both. This setting does not hide ordinary run results or completion messages.
|
|
79
95
|
|
|
80
96
|
Use `read` on the returned source for status and bounded output. Compact cards show the latest 12 output rows and count omitted earlier rows; expanded cards show all retained rows. Add `views: ["image"]` to receive a PNG of the ANSI-aware virtual terminal screen. Use `write` to send exact text without Enter. Use `insert` for named keys and chords such as `Enter`, `Ctrl+C`, `Ctrl+Shift+Left`, or Unix caret controls such as `^U`; separate multiple keys with spaces or commas. Batched `apply` calls can send several terminal inputs without file formatting or diagnostics. Use `search` with the `shell:<session>` path to search retained output, including rows outside the current screen. `delete` terminates the owned process tree when needed, disposes the virtual screen, and removes the session. `replace` does not apply to terminal sessions.
|
|
81
97
|
|
|
82
|
-
Deleting an active session first requests graceful termination, then forcefully terminates its process tree after the grace period. Deletion does not undo file or network effects. Sessions
|
|
98
|
+
Deleting an active session first requests graceful termination, then forcefully terminates its process tree after the grace period. Deletion does not undo file or network effects. Sessions survive extension reloads in the current Pi process. Shutdown stops live processes; sessions are not reattached after restart.
|
|
83
99
|
|
|
84
100
|
## Search
|
|
85
101
|
|
|
@@ -17,7 +17,7 @@ export interface AgentDocumentationTrigger {
|
|
|
17
17
|
readonly viewPrefixes?: readonly string[];
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
/** A packaged guide that can be
|
|
20
|
+
/** A packaged guide that can be read explicitly or added to the first relevant result, without blocking execution. */
|
|
21
21
|
export interface AgentDocumentation {
|
|
22
22
|
readonly id: string;
|
|
23
23
|
readonly description: string;
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from "pi-agent-text-editor/api/plugin-protocol";
|
|
16
16
|
|
|
17
17
|
import { createFilesystemReadResolver, createFilesystemWriteResolver } from "#src/resolver.js";
|
|
18
|
+
import { recoverFilesystemPath } from "#src/path-recovery.js";
|
|
18
19
|
|
|
19
20
|
const readTarget = { provider: "filesystem", capability: "read" } satisfies ContentTarget;
|
|
20
21
|
const writeTarget = { provider: "filesystem", capability: "write" } satisfies ContentTarget;
|
|
@@ -30,7 +31,11 @@ export default async function registerFilesystemPlugin(pi: ExtensionAPI): Promis
|
|
|
30
31
|
apiVersion: READ_API_VERSION,
|
|
31
32
|
id: "filesystem",
|
|
32
33
|
setup(api) {
|
|
33
|
-
api.addResolver({
|
|
34
|
+
api.addResolver({
|
|
35
|
+
resolver: readResolver,
|
|
36
|
+
renderResult: renderReadResult,
|
|
37
|
+
recoverFailure: recoverFilesystemPath,
|
|
38
|
+
});
|
|
34
39
|
api.describe(() =>
|
|
35
40
|
renderContentDescription(
|
|
36
41
|
"File path — file content; directory path — entry listing. Relative, absolute and file:// paths accepted.",
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.6.
|
|
10
|
-
"pi-agent-
|
|
11
|
-
"pi-agent-
|
|
12
|
-
"pi-agent-
|
|
13
|
-
"pi-agent-text
|
|
9
|
+
"pi-agent-image": "0.6.4",
|
|
10
|
+
"pi-agent-invariant": "0.6.4",
|
|
11
|
+
"pi-agent-read": "0.6.4",
|
|
12
|
+
"pi-agent-resource": "0.6.4",
|
|
13
|
+
"pi-agent-text": "0.6.4",
|
|
14
|
+
"pi-agent-text-editor": "0.6.4"
|
|
14
15
|
},
|
|
15
16
|
"pi": {
|
|
16
17
|
"extensions": [
|