pi-agent-ide 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -40
- package/README.md +15 -8
- package/dist/{chunk-ICDI27GZ.js → chunk-235QMMVA.js} +1 -1
- package/dist/{chunk-N7LMRL64.js → chunk-47SPPIXK.js} +1 -1
- package/dist/chunk-4DIUPEDF.js +2 -0
- package/dist/{chunk-JMVDFOTQ.js → chunk-57F5GTHO.js} +1 -1
- package/dist/{chunk-NULNW6GK.js → chunk-6FGLAVPJ.js} +1 -1
- package/dist/{chunk-KL776TGR.js → chunk-6H32W35W.js} +1 -1
- package/dist/{chunk-QP2QSQ4U.js → chunk-6OJ565FL.js} +1 -1
- package/dist/{chunk-TWWND6NI.js → chunk-6R3Y4AD3.js} +1 -1
- package/dist/{chunk-CPZJPGLG.js → chunk-6T7PSDQW.js} +1 -1
- package/dist/{chunk-4OYVLXWD.js → chunk-6TJPMBUQ.js} +1 -1
- package/dist/{chunk-SBLKPTL3.js → chunk-6XFUICD7.js} +1 -1
- package/dist/chunk-7VSVJRRF.js +28 -0
- package/dist/{chunk-7JV4VN73.js → chunk-AAC77UD4.js} +1 -1
- package/dist/chunk-ANM3Y5FO.js +11 -0
- package/dist/chunk-BB4A5UI3.js +5 -0
- package/dist/{chunk-7TJ6DWW3.js → chunk-CPELC6JE.js} +1 -1
- package/dist/chunk-FTPC44FP.js +33 -0
- package/dist/{chunk-SBNR4WZF.js → chunk-GSOYVIQS.js} +1 -1
- package/dist/{chunk-Z3PGADVA.js → chunk-HSRH76JN.js} +1 -1
- package/dist/{chunk-CSXHCSTH.js → chunk-HSZ4AQ6L.js} +1 -1
- package/dist/chunk-I6NPILT5.js +1 -0
- package/dist/chunk-K7SRNBIV.js +1 -0
- package/dist/{chunk-R5XJSEOE.js → chunk-LCWBVOII.js} +3 -3
- package/dist/{chunk-MZXX353D.js → chunk-LEJKDYCK.js} +1 -1
- package/dist/{chunk-3G54ZL2L.js → chunk-NJ7C4KMA.js} +1 -1
- package/dist/{chunk-CTJV77FR.js → chunk-NUM3YQGK.js} +1 -1
- package/dist/chunk-OJEIX7OZ.js +1 -0
- package/dist/{chunk-EY65TFHJ.js → chunk-PJL3UVMJ.js} +1 -1
- package/dist/{chunk-E4HPRLRB.js → chunk-QT3EAHOG.js} +1 -1
- package/dist/{chunk-HCN5W76B.js → chunk-RIJMXO43.js} +1 -1
- package/dist/chunk-RMI3NMQY.js +23 -0
- package/dist/chunk-RQ7JJ7GV.js +4 -0
- package/dist/{chunk-4XPUN4QN.js → chunk-RVU73VKN.js} +1 -1
- package/dist/{chunk-OJX3RJ5A.js → chunk-RW2GTYQI.js} +1 -1
- package/dist/{chunk-PNP2KNGP.js → chunk-SDAH3ECM.js} +1 -1
- package/dist/chunk-SGQWRIRJ.js +10 -0
- package/dist/{chunk-IUSLSROY.js → chunk-SMIFCAAX.js} +1 -1
- package/dist/chunk-SWBJS3U4.js +1 -0
- package/dist/chunk-T7MWQQIF.js +3 -0
- package/dist/{chunk-RAZP42IQ.js → chunk-VAXLSPPU.js} +1 -1
- package/dist/{chunk-XZDOVPRC.js → chunk-VMTOFEXF.js} +1 -1
- package/dist/{chunk-7HDK3NRQ.js → chunk-VXP5BMW7.js} +1 -1
- package/dist/{chunk-WE42GBGU.js → chunk-XAHU42FP.js} +3 -3
- package/dist/{chunk-UBH6X3D3.js → chunk-XBQR74IK.js} +1 -1
- package/dist/{chunk-7NS3QUIE.js → chunk-XG7QNAKW.js} +1 -1
- package/dist/{chunk-GW6NZQTQ.js → chunk-XLWCSJMR.js} +1 -1
- package/dist/{chunk-2K65BSXS.js → chunk-XXLLY66B.js} +1 -1
- package/dist/chunk-YFP4P2FV.js +1 -0
- package/dist/{chunk-75SWXD2Z.js → chunk-YIXP2ALP.js} +1 -1
- package/dist/{chunk-MOJ5RR35.js → chunk-ZJQRLVVV.js} +1 -1
- package/dist/entry-0.js +1 -1
- package/dist/entry-1.js +1 -1
- package/dist/entry-10.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-12.js +1 -1
- package/dist/entry-13.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-15.js +1 -1
- package/dist/entry-16.js +1 -1
- package/dist/entry-17.js +1 -1
- package/dist/entry-18.js +1 -0
- package/dist/entry-19.js +1 -1
- package/dist/entry-2.js +1 -1
- package/dist/entry-20.js +1 -1
- package/dist/entry-22.js +1 -1
- package/dist/entry-23.js +1 -1
- package/dist/entry-24.js +1 -1
- package/dist/entry-25.js +1 -1
- package/dist/entry-26.js +1 -2
- package/dist/entry-27.js +1 -1
- package/dist/entry-28.js +1 -4
- package/dist/entry-29.js +2 -1
- package/dist/entry-3.js +1 -1
- package/dist/entry-30.js +1 -1
- package/dist/entry-31.js +4 -1
- package/dist/entry-32.js +1 -18
- package/dist/entry-33.js +1 -1
- package/dist/entry-34.js +1 -1
- package/dist/entry-35.js +18 -1
- package/dist/entry-36.js +1 -1
- package/dist/entry-37.js +1 -1
- package/dist/entry-38.js +1 -1
- package/dist/entry-39.js +1 -1
- package/dist/entry-4.js +1 -1
- package/dist/entry-40.js +1 -1
- package/dist/entry-41.js +1 -1
- package/dist/entry-42.js +1 -1
- package/dist/entry-43.js +1 -1
- package/dist/entry-44.js +1 -1
- package/dist/entry-45.js +1 -1
- package/dist/entry-46.js +1 -25
- package/dist/entry-47.js +1 -1
- package/dist/entry-48.js +1 -1
- package/dist/entry-49.js +25 -1
- package/dist/entry-5.js +1 -1
- package/dist/entry-50.js +1 -1
- package/dist/entry-51.js +1 -3
- package/dist/entry-52.js +1 -13
- package/dist/entry-53.js +1 -1
- package/dist/entry-54.js +3 -1
- package/dist/entry-55.js +13 -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-6.js +1 -1
- package/dist/entry-60.js +1 -1
- package/dist/entry-61.js +1 -1
- package/dist/entry-62.js +1 -0
- package/dist/entry-63.js +1 -1
- package/dist/entry-64.js +1 -0
- package/dist/entry-65.js +0 -1
- package/dist/entry-66.js +1 -1
- package/dist/entry-67.js +0 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-7.js +1 -1
- package/dist/entry-70.js +1 -1
- package/dist/entry-71.js +1 -1
- package/dist/entry-72.js +1 -0
- package/dist/entry-73.js +1 -1
- package/dist/entry-74.js +1 -0
- package/dist/entry-75.js +0 -1
- package/dist/entry-76.js +1 -1
- package/dist/entry-77.js +0 -1
- package/dist/entry-78.js +1 -80
- package/dist/entry-79.js +1 -21
- package/dist/entry-8.js +1 -1
- package/dist/entry-80.js +1 -2
- package/dist/entry-81.js +80 -1
- package/dist/entry-82.js +22 -1
- package/dist/entry-83.js +2 -1
- package/dist/entry-84.js +1 -3
- package/dist/entry-85.js +1 -1
- package/dist/entry-86.js +1 -1
- package/dist/entry-87.js +1 -1
- package/dist/entry-88.js +3 -0
- package/dist/entry-89.js +1 -0
- package/dist/entry-9.js +1 -1
- package/dist/entry-90.js +1 -0
- package/dist/entry-91.js +1 -0
- package/dist/pi-agent-ide.js +53 -31
- package/docs/agent-guides/debugger.md +2 -0
- package/docs/agent-guides/editing.md +3 -3
- package/docs/agent-guides/search-code.md +5 -3
- package/docs/agent-guides/select-code.md +9 -6
- package/docs/agent-guides/ssh.md +1 -1
- package/docs/code-review.md +5 -0
- package/docs/configuration.md +52 -8
- package/docs/development.md +9 -13
- package/docs/directory-operations.md +1 -1
- package/docs/extensions.md +99 -2
- package/docs/releases.md +1 -1
- package/docs/settings-help.md +39 -0
- package/docs/structured-results.md +11 -6
- package/docs/tools.md +1 -0
- package/docs/user-hooks.md +4 -2
- package/node_modules/pi-agent-doctor/package.json +7 -10
- package/node_modules/pi-agent-doctor/runtime/entry-26.js +1 -0
- package/node_modules/pi-agent-doctor/runtime/entry-27.js +1 -0
- package/node_modules/pi-agent-documentation/package.json +2 -2
- package/node_modules/pi-agent-documentation/runtime/entry-28.js +1 -0
- package/node_modules/pi-agent-filesystem/package.json +8 -8
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-jq/package.json +6 -7
- package/node_modules/pi-agent-filesystem-jq/runtime/entry-31.js +2 -0
- package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/runtime/entry-33.js +2 -0
- package/node_modules/pi-agent-ide-ast/package.json +15 -41
- package/node_modules/pi-agent-ide-ast/runtime/entry-34.js +1 -0
- package/node_modules/pi-agent-ide-ast/src/select-schema.ts +6 -5
- package/node_modules/pi-agent-ide-changes/package.json +10 -11
- package/node_modules/pi-agent-ide-changes/runtime/entry-36.js +1 -0
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +6 -5
- package/node_modules/pi-agent-ide-formatter/package.json +4 -4
- package/node_modules/pi-agent-ide-languages/package.json +3 -3
- package/node_modules/pi-agent-ide-languages/runtime/entry-39.js +2 -0
- package/node_modules/pi-agent-ide-lint/package.json +8 -8
- package/node_modules/pi-agent-ide-lint/runtime/entry-40.js +2 -0
- package/node_modules/pi-agent-ide-lsp/package.json +10 -13
- package/node_modules/pi-agent-ide-lsp/runtime/entry-41.js +2 -0
- package/node_modules/pi-agent-image/package.json +3 -3
- package/node_modules/pi-agent-invariant/package.json +2 -2
- package/node_modules/pi-agent-pdf/package.json +3 -4
- package/node_modules/pi-agent-read/package.json +12 -12
- package/node_modules/pi-agent-read/runtime/entry-46.js +0 -1
- package/node_modules/pi-agent-read/runtime/entry-49.js +2 -0
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-resource/src/resource-error.ts +11 -0
- package/node_modules/pi-agent-resource/src/result-targets.ts +9 -0
- package/node_modules/pi-agent-search/package.json +9 -9
- package/node_modules/pi-agent-search/runtime/entry-51.js +0 -1
- package/node_modules/pi-agent-search/runtime/entry-52.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-54.js +2 -0
- package/node_modules/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-search/src/api/presentation.ts +10 -2
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +6 -5
- package/node_modules/pi-agent-search/src/api/search.ts +7 -0
- package/node_modules/pi-agent-search/src/core/search-core.ts +23 -3
- package/node_modules/pi-agent-search-text/index.ts +2 -0
- package/node_modules/pi-agent-search-text/package.json +14 -14
- package/node_modules/pi-agent-search-text/runtime/entry-55.js +1 -0
- package/node_modules/pi-agent-search-text/runtime/entry-57.js +1 -0
- package/node_modules/pi-agent-search-text/src/search-backend.ts +18 -10
- package/node_modules/pi-agent-search-text/src/search-session.ts +68 -9
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text/runtime/entry-59.js +1 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-60.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/package.json +5 -6
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-61.js +1 -0
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-62.js +2 -0
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-64.js +2 -0
- package/node_modules/pi-agent-text-editor/index.ts +2 -0
- package/node_modules/pi-agent-text-editor/package.json +26 -34
- package/node_modules/pi-agent-text-editor/runtime/entry-78.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-79.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-80.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-81.js +2 -0
- package/node_modules/pi-agent-text-editor/src/api/delete-guard.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +5 -0
- package/node_modules/pi-agent-text-editor/src/api/native-edit-batch-event.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/delete-policy.ts +6 -12
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +4 -1
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +40 -11
- 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/grouped-replacements.ts +18 -9
- package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +29 -20
- package/node_modules/pi-agent-text-editor/src/core/temporary-directories.ts +13 -9
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +16 -8
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +118 -36
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +7 -4
- package/node_modules/pi-agent-text-editor/src/core/text-edit-origin.ts +38 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +106 -48
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +35 -14
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +22 -1
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +39 -44
- package/node_modules/pi-agent-text-editor/src/core/write-agent-result.ts +3 -1
- package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +6 -5
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -8
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-82.js +2 -0
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +35 -2
- package/node_modules/pi-agent-text-editor-stale-anchor/index.ts +17 -0
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +6 -5
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-84.js +1 -0
- package/node_modules/pi-agent-tool-ui/package.json +6 -2
- package/node_modules/pi-agent-tool-ui/runtime/entry-85.js +1 -0
- package/node_modules/pi-agent-tool-ui/runtime/entry-86.js +1 -0
- package/node_modules/pi-agent-tool-ui/src/operation-approval.ts +271 -0
- package/node_modules/pi-agent-web/package.json +8 -11
- package/node_modules/pi-agent-web-html/package.json +3 -5
- package/node_modules/pi-agent-web-html/runtime/entry-88.js +2 -0
- package/node_modules/pi-agent-web-image/package.json +4 -4
- package/node_modules/pi-agent-web-image/runtime/entry-89.js +2 -0
- package/node_modules/pi-agent-web-pdf/package.json +4 -4
- package/node_modules/pi-agent-web-pdf/runtime/entry-90.js +2 -0
- package/node_modules/pi-agent-web-text/package.json +4 -4
- package/node_modules/pi-agent-web-text/runtime/entry-91.js +2 -0
- package/package.json +65 -53
- package/skills/configure-agent-ide/SKILL.md +38 -0
- package/src/api/approval.ts +5 -0
- package/src/api/content.ts +6 -0
- package/src/api/settings.ts +198 -0
- package/src/api/tips.ts +3 -0
- package/src/backend/debugger-registration.ts +5 -1
- package/src/code-review/extension.ts +10 -4
- package/src/code-review/reviewer.ts +8 -0
- package/src/composite/host-version.ts +29 -5
- package/src/composite/ide-alias-rendering.ts +97 -0
- package/src/composite/nested-tool-rendering.ts +90 -9
- package/src/composite/preferences.ts +13 -0
- package/src/composite/search-facts.ts +45 -0
- package/src/composite/settings-documentation.ts +68 -0
- package/src/composite/settings-help.ts +106 -0
- package/src/composite/settings-registry.ts +94 -0
- package/src/composite/text-results.ts +170 -30
- package/src/composite/tool-availability.ts +11 -2
- package/src/core/diagnostic-entry.ts +31 -8
- package/src/core/diagnostic-store.ts +19 -3
- package/src/core/extension.ts +7 -2
- package/src/documentation/extension.ts +12 -0
- package/src/documentation/registry.ts +10 -2
- package/src/documentation/search.ts +166 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +8 -8
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +6 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-31.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-32.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-33.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-29.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +8 -11
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -5
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-88.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-89.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-90.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-91.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-87.js +2 -0
- package/src/extensions/pi-agent-read/package.json +12 -12
- package/src/extensions/pi-agent-read/runtime/entry-46.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-47.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-49.js +2 -0
- package/src/extensions/pi-agent-search/package.json +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +2 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +14 -14
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-55.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-56.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-57.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-backend.ts +18 -10
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +68 -9
- package/src/extensions/pi-agent-search/runtime/entry-51.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-52.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-53.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-54.js +2 -0
- package/src/extensions/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/presentation.ts +10 -2
- package/src/extensions/pi-agent-search/src/api/search-parameters.ts +6 -5
- package/src/extensions/pi-agent-search/src/api/search.ts +7 -0
- package/src/extensions/pi-agent-search/src/core/search-core.ts +23 -3
- package/src/extensions/pi-agent-text-editor/index.ts +2 -0
- package/src/extensions/pi-agent-text-editor/package.json +26 -34
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +4 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-60.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-61.js +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-62.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-63.js +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-64.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -8
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-82.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +35 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.ts +17 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +6 -5
- package/src/extensions/pi-agent-text-editor/runtime/entry-78.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-79.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-80.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-81.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/delete-guard.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +5 -0
- package/src/extensions/pi-agent-text-editor/src/api/native-edit-batch-event.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/delete-policy.ts +6 -12
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +4 -1
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +40 -11
- 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/grouped-replacements.ts +18 -9
- package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +29 -20
- package/src/extensions/pi-agent-text-editor/src/core/temporary-directories.ts +13 -9
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +16 -8
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +118 -36
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +7 -4
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-origin.ts +38 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +106 -48
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +35 -14
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +22 -1
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +39 -44
- package/src/extensions/pi-agent-text-editor/src/core/write-agent-result.ts +3 -1
- package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +6 -5
- package/src/pi-agent-ide.ts +74 -15
- package/src/plugins/pi-agent-ide-ast/package.json +15 -41
- package/src/plugins/pi-agent-ide-ast/runtime/entry-34.js +1 -0
- package/src/plugins/pi-agent-ide-ast/src/select-schema.ts +6 -5
- package/src/plugins/pi-agent-ide-changes/package.json +10 -11
- package/src/plugins/pi-agent-ide-changes/runtime/entry-36.js +1 -0
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +6 -5
- package/src/plugins/pi-agent-ide-debugger/index.ts +158 -55
- package/src/plugins/pi-agent-ide-debugger/src/debugmcp-client.ts +118 -0
- package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +47 -0
- package/src/plugins/pi-agent-ide-debugger/src/renderer.ts +2 -0
- package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +146 -1
- package/src/plugins/pi-agent-ide-debugger/src/ui.ts +12 -0
- package/src/plugins/pi-agent-ide-debugger/src/vscode-backend.ts +497 -0
- package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
- package/src/plugins/pi-agent-ide-languages/package.json +3 -3
- package/src/plugins/pi-agent-ide-languages/runtime/entry-39.js +2 -0
- package/src/plugins/pi-agent-ide-lint/package.json +8 -8
- package/src/plugins/pi-agent-ide-lint/runtime/entry-40.js +2 -0
- package/src/plugins/pi-agent-ide-lsp/package.json +10 -13
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-41.js +2 -0
- package/src/plugins/pi-agent-ide-terminal/index.ts +2 -0
- package/src/plugins/pi-agent-ide-terminal/src/origin.ts +30 -0
- package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +34 -0
- package/src/plugins/pi-agent-ide-terminal/src/tools.ts +11 -2
- package/src/plugins/pi-agent-ide-terminal/src/types.ts +9 -0
- package/src/plugins/pi-agent-ide-terminal/src/ui.ts +72 -26
- package/src/tips/core.ts +5 -2
- package/src/tips/extension.ts +30 -2
- package/src/tips/persistence.ts +29 -27
- package/src/tips/setup-hint.ts +19 -0
- package/dist/chunk-3ZGDMTMD.js +0 -25
- package/dist/chunk-5KFVDYCI.js +0 -1
- package/dist/chunk-ABFCAOU5.js +0 -1
- package/dist/chunk-BIG45IPN.js +0 -2
- package/dist/chunk-BMOJTJJJ.js +0 -3
- package/dist/chunk-BQ67M4NC.js +0 -3
- package/dist/chunk-IH5NW5JX.js +0 -11
- package/dist/chunk-NRZO5KJT.js +0 -9
- package/dist/chunk-O36UC74T.js +0 -1
- package/dist/chunk-OLI3JPHJ.js +0 -28
- package/dist/chunk-SSWUUBIR.js +0 -1
- package/dist/chunk-UUJJRXHG.js +0 -29
- package/dist/entry-21.js +0 -1
- package/docs/research/apply-native-capability-matrix.md +0 -174
- package/docs/research/apply-read-latency.md +0 -221
- package/docs/research/codemode-write-context.md +0 -56
- package/docs/research/lpt-393-fuzzy-results/file.json +0 -152
- package/docs/research/lpt-393-fuzzy-results/repo.json +0 -122
- package/docs/research/lpt-393-search-fuzzy-fallback.md +0 -97
- package/docs/research/native-codemode-batch-decision.md +0 -31
- package/docs/research/native-codemode-batching.md +0 -65
- package/node_modules/pi-agent-doctor/runtime/entry-19.js +0 -1
- package/node_modules/pi-agent-doctor/runtime/entry-20.js +0 -1
- package/node_modules/pi-agent-doctor/runtime/entry-21.js +0 -1
- package/node_modules/pi-agent-filesystem/runtime/entry-26.js +0 -2
- package/node_modules/pi-agent-filesystem-image/runtime/entry-27.js +0 -2
- package/node_modules/pi-agent-filesystem-jq/runtime/entry-28.js +0 -2
- package/node_modules/pi-agent-ide-ast/runtime/entry-31.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-33.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-34.js +0 -2
- package/node_modules/pi-agent-ide-languages/runtime/entry-36.js +0 -2
- package/node_modules/pi-agent-image/runtime/entry-39.js +0 -1
- package/node_modules/pi-agent-invariant/runtime/entry-40.js +0 -1
- package/node_modules/pi-agent-pdf/runtime/entry-41.js +0 -1
- package/node_modules/pi-agent-search/runtime/entry-49.js +0 -1
- package/node_modules/pi-agent-search-text/runtime/entry-52.js +0 -2
- package/node_modules/pi-agent-search-text/runtime/entry-54.js +0 -1
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-57.js +0 -2
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-59.js +0 -2
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-60.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-61.js +0 -2
- package/node_modules/pi-agent-text-editor/runtime/entry-62.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-64.js +0 -1
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-79.js +0 -2
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-80.js +0 -2
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-81.js +0 -1
- package/node_modules/pi-agent-tool-ui/runtime/entry-82.js +0 -1
- package/node_modules/pi-agent-web-html/runtime/entry-84.js +0 -2
- package/node_modules/pi-agent-web-image/runtime/entry-85.js +0 -2
- package/node_modules/pi-agent-web-pdf/runtime/entry-86.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-27.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-28.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-29.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-26.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-84.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-85.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-86.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-87.js +0 -2
- package/src/extensions/pi-agent-read/runtime/entry-42.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-43.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-44.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-52.js +0 -2
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-53.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-54.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-49.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-50.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-57.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-59.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-60.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-61.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-79.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-80.js +0 -2
- package/src/extensions/pi-agent-text-editor/runtime/entry-62.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-63.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-64.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-31.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-32.js +0 -2
- package/src/plugins/pi-agent-ide-changes/runtime/entry-33.js +0 -1
- package/src/plugins/pi-agent-ide-changes/runtime/entry-34.js +0 -2
- package/src/plugins/pi-agent-ide-languages/runtime/entry-36.js +0 -2
- /package/node_modules/{pi-agent-documentation → pi-agent-doctor}/runtime/entry-25.js +0 -0
- /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem}/runtime/entry-29.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
- /package/node_modules/{pi-agent-ide-ast → pi-agent-filesystem-pdf}/runtime/entry-32.js +0 -0
- /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-image}/runtime/entry-42.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-invariant}/runtime/entry-43.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-44.js +0 -0
- /package/node_modules/{pi-agent-resource → pi-agent-read}/runtime/entry-47.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-read}/runtime/entry-48.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-50.js +0 -0
- /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-53.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-56.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-search-text}/runtime/entry-58.js +0 -0
- /package/node_modules/{pi-agent-text-editor → pi-agent-text-anchor-line-hash}/runtime/entry-63.js +0 -0
- /package/node_modules/{pi-agent-web → pi-agent-text-editor-stale-anchor}/runtime/entry-83.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web}/runtime/entry-87.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
- /package/src/extensions/{pi-agent-search → pi-agent-read}/runtime/entry-48.js +0 -0
- /package/src/extensions/{pi-agent-text-editor/plugins/pi-agent-text-anchor-exact → pi-agent-search/plugins/pi-agent-search-text}/runtime/entry-58.js +0 -0
- /package/src/extensions/{pi-agent-read/extensions/pi-agent-web → pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor}/runtime/entry-83.js +0 -0
- /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
/** Versioned synchronous channel; decisions return through accept(), not the bus. */
|
|
4
|
+
export const OPERATION_APPROVAL_EVENT = "pi-agent-ide/operation-approval/v1";
|
|
5
|
+
/** Non-context branch entry recording a user-selected session permission. */
|
|
6
|
+
export const OPERATION_PERMISSION_ENTRY = "pi-agent-ide/operation-permission/v1";
|
|
7
|
+
const APPROVAL_SERVICE_EVENT = "pi-agent-ide/operation-approval/service/v1";
|
|
8
|
+
|
|
9
|
+
export interface OperationApprovalContext {
|
|
10
|
+
readonly cwd: string;
|
|
11
|
+
readonly hasUI: boolean;
|
|
12
|
+
readonly mode: ExtensionContext["mode"];
|
|
13
|
+
readonly ui: Pick<ExtensionContext["ui"], "select">;
|
|
14
|
+
readonly sessionManager?: Pick<ExtensionContext["sessionManager"], "getBranch">;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** The caller owns risk classification, category identity, target text and its one-operation permit. */
|
|
18
|
+
export interface OperationApprovalRequest {
|
|
19
|
+
/** Stable extension identity; permissions never cross owners. */
|
|
20
|
+
readonly owner: string;
|
|
21
|
+
/** Stable dialog category, independent of the target path or URL. */
|
|
22
|
+
readonly category: string;
|
|
23
|
+
/** Registered boolean setting used by the host's persistent YOLO policy. */
|
|
24
|
+
readonly yoloSetting?: string;
|
|
25
|
+
readonly title: string;
|
|
26
|
+
readonly message: string;
|
|
27
|
+
readonly signal?: AbortSignal;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Host policy is separate from the provider's technical guards and from session grants. */
|
|
31
|
+
export interface OperationApprovalOptions {
|
|
32
|
+
readonly isAllowed?: (
|
|
33
|
+
request: OperationApprovalRequest,
|
|
34
|
+
context: OperationApprovalContext,
|
|
35
|
+
) => Promise<boolean>;
|
|
36
|
+
readonly remember?: (request: OperationApprovalRequest) => void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface ApprovalCall {
|
|
40
|
+
readonly context: OperationApprovalContext;
|
|
41
|
+
readonly request: OperationApprovalRequest;
|
|
42
|
+
accept(decision: Promise<boolean>): void;
|
|
43
|
+
}
|
|
44
|
+
type Events = Pick<ExtensionAPI["events"], "emit">;
|
|
45
|
+
interface ApprovalService {
|
|
46
|
+
handle(data: unknown): void;
|
|
47
|
+
setPolicy(policy: OperationApprovalOptions["isAllowed"]): void;
|
|
48
|
+
dispose(): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Install once per event bus; a later IDE host can attach policy to a standalone editor's service. */
|
|
52
|
+
export function registerOperationApproval(
|
|
53
|
+
pi: ExtensionAPI,
|
|
54
|
+
options: Pick<OperationApprovalOptions, "isAllowed"> = {},
|
|
55
|
+
): void {
|
|
56
|
+
let installed: ApprovalService | undefined;
|
|
57
|
+
pi.events.emit(APPROVAL_SERVICE_EVENT, (service: ApprovalService) => {
|
|
58
|
+
installed = service;
|
|
59
|
+
});
|
|
60
|
+
if (installed !== undefined) {
|
|
61
|
+
if (options.isAllowed !== undefined) installed.setPolicy(options.isAllowed);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const service = createOperationApproval(pi.events, {
|
|
65
|
+
...options,
|
|
66
|
+
remember: (request) =>
|
|
67
|
+
pi.appendEntry(OPERATION_PERMISSION_ENTRY, {
|
|
68
|
+
owner: request.owner,
|
|
69
|
+
category: request.category,
|
|
70
|
+
}),
|
|
71
|
+
});
|
|
72
|
+
const unsubscribeRequest = pi.events.on(OPERATION_APPROVAL_EVENT, service.handle);
|
|
73
|
+
const unsubscribeService = pi.events.on(APPROVAL_SERVICE_EVENT, (probe) => {
|
|
74
|
+
(probe as (value: ApprovalService) => void)(service);
|
|
75
|
+
});
|
|
76
|
+
pi.on("session_shutdown", () => {
|
|
77
|
+
unsubscribeRequest();
|
|
78
|
+
unsubscribeService();
|
|
79
|
+
service.dispose();
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Request permission through the shared service. Missing service and cancellation refuse. */
|
|
84
|
+
export async function confirmOperation(
|
|
85
|
+
events: Events | undefined,
|
|
86
|
+
context: OperationApprovalContext,
|
|
87
|
+
request: OperationApprovalRequest,
|
|
88
|
+
): Promise<boolean> {
|
|
89
|
+
if (request.signal?.aborted || events === undefined) return false;
|
|
90
|
+
if (!request.owner.trim() || !request.category.trim())
|
|
91
|
+
throw new Error("Approval owner and category are required");
|
|
92
|
+
let decision: Promise<boolean> | undefined;
|
|
93
|
+
events.emit(OPERATION_APPROVAL_EVENT, {
|
|
94
|
+
context,
|
|
95
|
+
request,
|
|
96
|
+
accept(value) {
|
|
97
|
+
if (decision !== undefined) throw new Error("Operation approval was accepted twice");
|
|
98
|
+
decision = value;
|
|
99
|
+
},
|
|
100
|
+
} satisfies ApprovalCall);
|
|
101
|
+
return decision === undefined ? false : decision;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
interface Pending {
|
|
105
|
+
readonly call: ApprovalCall;
|
|
106
|
+
readonly controller: AbortController;
|
|
107
|
+
readonly resolve: (answer: boolean) => void;
|
|
108
|
+
readonly cleanup: () => void;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** One session-owned queue. Each request reads only the current branch's remembered grants. */
|
|
112
|
+
export function createOperationApproval(
|
|
113
|
+
events: Events,
|
|
114
|
+
options: OperationApprovalOptions = {},
|
|
115
|
+
): ApprovalService {
|
|
116
|
+
const queue: Pending[] = [];
|
|
117
|
+
let current: Pending | undefined;
|
|
118
|
+
let draining = false;
|
|
119
|
+
let closed = false;
|
|
120
|
+
let blocked = false;
|
|
121
|
+
let isAllowed = options.isAllowed;
|
|
122
|
+
|
|
123
|
+
function setBlocked(active: boolean): void {
|
|
124
|
+
if (blocked === active) return;
|
|
125
|
+
blocked = active;
|
|
126
|
+
try {
|
|
127
|
+
events.emit(
|
|
128
|
+
"herdr:blocked",
|
|
129
|
+
active ? { active: true, label: "Waiting for operation approval" } : { active: false },
|
|
130
|
+
);
|
|
131
|
+
} catch {
|
|
132
|
+
// Advisory header listeners must never change permission.
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function remembered(call: ApprovalCall): boolean {
|
|
137
|
+
return (
|
|
138
|
+
call.context.sessionManager?.getBranch().some((entry) => {
|
|
139
|
+
if (entry.type !== "custom" || entry.customType !== OPERATION_PERMISSION_ENTRY)
|
|
140
|
+
return false;
|
|
141
|
+
const data = entry.data as { owner?: unknown; category?: unknown } | null;
|
|
142
|
+
return data?.owner === call.request.owner && data.category === call.request.category;
|
|
143
|
+
}) ?? false
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function active(pending: Pending): boolean {
|
|
148
|
+
return !closed && !pending.controller.signal.aborted;
|
|
149
|
+
}
|
|
150
|
+
async function drain(): Promise<void> {
|
|
151
|
+
draining = true;
|
|
152
|
+
while (queue.length > 0) {
|
|
153
|
+
const pending = queue.shift();
|
|
154
|
+
if (pending === undefined) break;
|
|
155
|
+
current = pending;
|
|
156
|
+
let approved = false;
|
|
157
|
+
try {
|
|
158
|
+
if (active(pending)) {
|
|
159
|
+
const call = pending.call;
|
|
160
|
+
approved = remembered(call);
|
|
161
|
+
if (!approved && isAllowed !== undefined) {
|
|
162
|
+
const policy = isAllowed;
|
|
163
|
+
approved =
|
|
164
|
+
(await untilCancelled(pending.controller.signal, () =>
|
|
165
|
+
policy(call.request, call.context),
|
|
166
|
+
)) === true;
|
|
167
|
+
}
|
|
168
|
+
if (!approved && call.context.hasUI && active(pending)) {
|
|
169
|
+
setBlocked(call.context.mode === "tui");
|
|
170
|
+
const canRemember =
|
|
171
|
+
options.remember !== undefined && call.context.sessionManager !== undefined;
|
|
172
|
+
const answer = await show(call, pending.controller.signal, canRemember);
|
|
173
|
+
approved = answer === "Allow once" || answer === "Allow for session";
|
|
174
|
+
if (answer === "Allow for session" && active(pending)) {
|
|
175
|
+
options.remember?.(call.request);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
} catch {
|
|
180
|
+
// A failed policy, session write or dialog cannot grant permission or strand the queue.
|
|
181
|
+
approved = false;
|
|
182
|
+
}
|
|
183
|
+
current = undefined;
|
|
184
|
+
pending.cleanup();
|
|
185
|
+
setBlocked(false);
|
|
186
|
+
pending.resolve(approved && active(pending));
|
|
187
|
+
}
|
|
188
|
+
setBlocked(false);
|
|
189
|
+
draining = false;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return {
|
|
193
|
+
setPolicy(policy) {
|
|
194
|
+
isAllowed = policy;
|
|
195
|
+
},
|
|
196
|
+
handle(data) {
|
|
197
|
+
const call = data as ApprovalCall;
|
|
198
|
+
call.accept(
|
|
199
|
+
new Promise<boolean>((resolve) => {
|
|
200
|
+
if (closed || call.request.signal?.aborted) {
|
|
201
|
+
resolve(false);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const controller = new AbortController();
|
|
205
|
+
const cancel = (): void => {
|
|
206
|
+
controller.abort();
|
|
207
|
+
if (current === pending) return;
|
|
208
|
+
const index = queue.indexOf(pending);
|
|
209
|
+
if (index !== -1) queue.splice(index, 1);
|
|
210
|
+
pending.cleanup();
|
|
211
|
+
resolve(false);
|
|
212
|
+
};
|
|
213
|
+
const pending: Pending = {
|
|
214
|
+
call,
|
|
215
|
+
controller,
|
|
216
|
+
resolve,
|
|
217
|
+
cleanup: () => call.request.signal?.removeEventListener("abort", cancel),
|
|
218
|
+
};
|
|
219
|
+
call.request.signal?.addEventListener("abort", cancel, { once: true });
|
|
220
|
+
queue.push(pending);
|
|
221
|
+
if (!draining) void drain();
|
|
222
|
+
}),
|
|
223
|
+
);
|
|
224
|
+
},
|
|
225
|
+
dispose() {
|
|
226
|
+
if (closed) return;
|
|
227
|
+
closed = true;
|
|
228
|
+
for (const pending of queue.splice(0)) {
|
|
229
|
+
pending.controller.abort();
|
|
230
|
+
pending.cleanup();
|
|
231
|
+
pending.resolve(false);
|
|
232
|
+
}
|
|
233
|
+
current?.controller.abort();
|
|
234
|
+
setBlocked(false);
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function show(
|
|
240
|
+
call: ApprovalCall,
|
|
241
|
+
signal: AbortSignal,
|
|
242
|
+
canRemember: boolean,
|
|
243
|
+
): Promise<string | undefined> {
|
|
244
|
+
const title = `${call.request.title}\n${call.request.message}\nScope: ${call.request.owner} / ${call.request.category}\nDisable confirmations in /agent-ide-settings (YOLO).`;
|
|
245
|
+
const choices = ["Deny", "Allow once", ...(canRemember ? ["Allow for session"] : [])];
|
|
246
|
+
return untilCancelled(signal, () => call.context.ui.select(title, choices, { signal }));
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function untilCancelled<T>(signal: AbortSignal, action: () => Promise<T>): Promise<T | undefined> {
|
|
250
|
+
return new Promise((resolve, reject) => {
|
|
251
|
+
const finish = (answer?: T): void => {
|
|
252
|
+
signal.removeEventListener("abort", abort);
|
|
253
|
+
resolve(signal.aborted ? undefined : answer);
|
|
254
|
+
};
|
|
255
|
+
const abort = (): void => finish();
|
|
256
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
257
|
+
if (signal.aborted) {
|
|
258
|
+
finish();
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const fail = (error: unknown): void => {
|
|
262
|
+
signal.removeEventListener("abort", abort);
|
|
263
|
+
reject(error);
|
|
264
|
+
};
|
|
265
|
+
try {
|
|
266
|
+
void action().then(finish, fail);
|
|
267
|
+
} catch (error) {
|
|
268
|
+
fail(error);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"pi-agent-
|
|
12
|
-
"pi-agent-
|
|
13
|
-
"pi-agent-
|
|
14
|
-
"pi-agent-
|
|
15
|
-
"pi-agent-search": "0.8.0",
|
|
16
|
-
"pi-agent-text": "0.8.0",
|
|
17
|
-
"playwright-core": "^1.62.1"
|
|
9
|
+
"pi-agent-doctor": "0.8.2",
|
|
10
|
+
"pi-agent-image": "0.8.2",
|
|
11
|
+
"pi-agent-read": "0.8.2",
|
|
12
|
+
"pi-agent-resource": "0.8.2",
|
|
13
|
+
"pi-agent-search": "0.8.2",
|
|
14
|
+
"pi-agent-text": "0.8.2"
|
|
18
15
|
},
|
|
19
16
|
"pi": {
|
|
20
17
|
"extensions": [
|
|
21
|
-
"./runtime/entry-
|
|
18
|
+
"./runtime/entry-87.js"
|
|
22
19
|
]
|
|
23
20
|
},
|
|
24
21
|
"peerDependencies": {
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web-html",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"
|
|
10
|
-
"linkedom": "^0.18.12",
|
|
11
|
-
"pi-agent-resource": "0.8.0"
|
|
9
|
+
"pi-agent-resource": "0.8.2"
|
|
12
10
|
},
|
|
13
11
|
"pi": {
|
|
14
12
|
"extensions": [
|
|
15
|
-
"./runtime/entry-
|
|
13
|
+
"./runtime/entry-88.js"
|
|
16
14
|
]
|
|
17
15
|
},
|
|
18
16
|
"peerDependencies": {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web-image",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-image": "0.8.
|
|
7
|
-
"pi-agent-resource": "0.8.
|
|
6
|
+
"pi-agent-image": "0.8.2",
|
|
7
|
+
"pi-agent-resource": "0.8.2"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-89.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web-pdf",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-pdf": "0.8.
|
|
7
|
-
"pi-agent-resource": "0.8.
|
|
6
|
+
"pi-agent-pdf": "0.8.2",
|
|
7
|
+
"pi-agent-resource": "0.8.2"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-90.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web-text",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-resource": "0.8.
|
|
7
|
-
"pi-agent-text": "0.8.
|
|
6
|
+
"pi-agent-resource": "0.8.2",
|
|
7
|
+
"pi-agent-text": "0.8.2"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-91.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Agent-native IDE extension for Pi Coding Agent with guarded editing, search, LSP, terminals, debugging, and observability",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-ide",
|
|
@@ -95,77 +95,89 @@
|
|
|
95
95
|
"#scripts/*": "./scripts/*"
|
|
96
96
|
},
|
|
97
97
|
"exports": {
|
|
98
|
+
"./api/settings": {
|
|
99
|
+
"types": "./src/api/settings.ts",
|
|
100
|
+
"default": "./dist/entry-0.js"
|
|
101
|
+
},
|
|
102
|
+
"./api/approval": {
|
|
103
|
+
"types": "./src/api/approval.ts",
|
|
104
|
+
"default": "./dist/entry-1.js"
|
|
105
|
+
},
|
|
98
106
|
"./api/code-view": {
|
|
99
107
|
"types": "./src/api/code-view.ts",
|
|
100
|
-
"default": "./dist/entry-
|
|
108
|
+
"default": "./dist/entry-2.js"
|
|
101
109
|
},
|
|
102
110
|
"./api/connect-plugin": {
|
|
103
111
|
"types": "./src/api/connect-plugin.ts",
|
|
104
|
-
"default": "./dist/entry-
|
|
112
|
+
"default": "./dist/entry-3.js"
|
|
105
113
|
},
|
|
106
114
|
"./api/plugin-protocol": {
|
|
107
115
|
"types": "./src/api/plugin-protocol.ts",
|
|
108
|
-
"default": "./dist/entry-
|
|
116
|
+
"default": "./dist/entry-4.js"
|
|
109
117
|
},
|
|
110
118
|
"./api/toolchain": {
|
|
111
119
|
"types": "./src/api/toolchain.ts",
|
|
112
|
-
"default": "./dist/entry-
|
|
120
|
+
"default": "./dist/entry-5.js"
|
|
113
121
|
},
|
|
114
122
|
"./api/tool-config": {
|
|
115
123
|
"types": "./src/api/tool-config.ts",
|
|
116
|
-
"default": "./dist/entry-
|
|
124
|
+
"default": "./dist/entry-6.js"
|
|
117
125
|
},
|
|
118
126
|
"./api/tool-catalog": {
|
|
119
127
|
"types": "./src/api/tool-catalog.ts",
|
|
120
|
-
"default": "./dist/entry-
|
|
128
|
+
"default": "./dist/entry-7.js"
|
|
121
129
|
},
|
|
122
130
|
"./api/tips": {
|
|
123
131
|
"types": "./src/api/tips.ts",
|
|
124
|
-
"default": "./dist/entry-
|
|
132
|
+
"default": "./dist/entry-8.js"
|
|
125
133
|
},
|
|
126
134
|
"./api/connect-tip-provider": {
|
|
127
135
|
"types": "./src/api/connect-tip-provider.ts",
|
|
128
|
-
"default": "./dist/entry-
|
|
136
|
+
"default": "./dist/entry-9.js"
|
|
129
137
|
},
|
|
130
138
|
"./api/doctor": {
|
|
131
139
|
"types": "./src/api/doctor.ts",
|
|
132
|
-
"default": "./dist/entry-
|
|
140
|
+
"default": "./dist/entry-10.js"
|
|
133
141
|
},
|
|
134
142
|
"./api/documentation": {
|
|
135
143
|
"types": "./src/api/documentation.ts",
|
|
136
|
-
"default": "./dist/entry-
|
|
144
|
+
"default": "./dist/entry-11.js"
|
|
137
145
|
},
|
|
138
146
|
"./api/connect-doctor-plugin": {
|
|
139
147
|
"types": "./src/api/connect-doctor-plugin.ts",
|
|
140
|
-
"default": "./dist/entry-
|
|
148
|
+
"default": "./dist/entry-12.js"
|
|
141
149
|
},
|
|
142
150
|
"./api/hooks": {
|
|
143
151
|
"types": "./src/api/hooks.ts",
|
|
144
|
-
"default": "./dist/entry-
|
|
152
|
+
"default": "./dist/entry-13.js"
|
|
145
153
|
},
|
|
146
154
|
"./api/path-identity": {
|
|
147
155
|
"types": "./src/api/path-identity.ts",
|
|
148
|
-
"default": "./dist/entry-
|
|
156
|
+
"default": "./dist/entry-14.js"
|
|
149
157
|
},
|
|
150
158
|
"./api/read": {
|
|
151
159
|
"types": "./src/api/read.ts",
|
|
152
|
-
"default": "./dist/entry-
|
|
160
|
+
"default": "./dist/entry-15.js"
|
|
161
|
+
},
|
|
162
|
+
"./api/content": {
|
|
163
|
+
"types": "./src/api/content.ts",
|
|
164
|
+
"default": "./dist/entry-16.js"
|
|
153
165
|
},
|
|
154
166
|
"./api/resource": {
|
|
155
167
|
"types": "./src/api/resource.ts",
|
|
156
|
-
"default": "./dist/entry-
|
|
168
|
+
"default": "./dist/entry-17.js"
|
|
157
169
|
},
|
|
158
170
|
"./api/search": {
|
|
159
171
|
"types": "./src/api/search.ts",
|
|
160
|
-
"default": "./dist/entry-
|
|
172
|
+
"default": "./dist/entry-18.js"
|
|
161
173
|
},
|
|
162
174
|
"./api/text": {
|
|
163
175
|
"types": "./src/api/text.ts",
|
|
164
|
-
"default": "./dist/entry-
|
|
176
|
+
"default": "./dist/entry-19.js"
|
|
165
177
|
},
|
|
166
178
|
"./api/text-editor": {
|
|
167
179
|
"types": "./src/api/text-editor.ts",
|
|
168
|
-
"default": "./dist/entry-
|
|
180
|
+
"default": "./dist/entry-20.js"
|
|
169
181
|
}
|
|
170
182
|
},
|
|
171
183
|
"dependencies": {
|
|
@@ -203,40 +215,40 @@
|
|
|
203
215
|
"oxfmt": "0.64.0",
|
|
204
216
|
"partial-json": "^0.1.7",
|
|
205
217
|
"pdfjs-dist": "^6.2.108",
|
|
206
|
-
"pi-agent-doctor": "0.8.
|
|
207
|
-
"pi-agent-documentation": "0.8.
|
|
208
|
-
"pi-agent-filesystem": "0.8.
|
|
209
|
-
"pi-agent-filesystem-image": "0.8.
|
|
210
|
-
"pi-agent-filesystem-jq": "0.8.
|
|
211
|
-
"pi-agent-filesystem-pdf": "0.8.
|
|
212
|
-
"pi-agent-filesystem-text": "0.8.
|
|
213
|
-
"pi-agent-ide-ast": "0.8.
|
|
214
|
-
"pi-agent-ide-changes": "0.8.
|
|
215
|
-
"pi-agent-ide-formatter": "0.8.
|
|
216
|
-
"pi-agent-ide-languages": "0.8.
|
|
217
|
-
"pi-agent-ide-lint": "0.8.
|
|
218
|
-
"pi-agent-ide-lsp": "0.8.
|
|
219
|
-
"pi-agent-image": "0.8.
|
|
220
|
-
"pi-agent-invariant": "0.8.
|
|
221
|
-
"pi-agent-pdf": "0.8.
|
|
222
|
-
"pi-agent-read": "0.8.
|
|
223
|
-
"pi-agent-resource": "0.8.
|
|
224
|
-
"pi-agent-search": "0.8.
|
|
225
|
-
"pi-agent-search-text": "0.8.
|
|
226
|
-
"pi-agent-text": "0.8.
|
|
227
|
-
"pi-agent-text-anchor-constant": "0.8.
|
|
228
|
-
"pi-agent-text-anchor-exact": "0.8.
|
|
229
|
-
"pi-agent-text-anchor-line-hash": "0.8.
|
|
230
|
-
"pi-agent-text-editor": "0.8.
|
|
231
|
-
"pi-agent-text-editor-renderer": "0.8.
|
|
232
|
-
"pi-agent-text-editor-stale-anchor": "0.8.
|
|
233
|
-
"pi-agent-tool-call-interception": "0.8.
|
|
234
|
-
"pi-agent-tool-ui": "0.8.
|
|
235
|
-
"pi-agent-web": "0.8.
|
|
236
|
-
"pi-agent-web-html": "0.8.
|
|
237
|
-
"pi-agent-web-image": "0.8.
|
|
238
|
-
"pi-agent-web-pdf": "0.8.
|
|
239
|
-
"pi-agent-web-text": "0.8.
|
|
218
|
+
"pi-agent-doctor": "0.8.2",
|
|
219
|
+
"pi-agent-documentation": "0.8.2",
|
|
220
|
+
"pi-agent-filesystem": "0.8.2",
|
|
221
|
+
"pi-agent-filesystem-image": "0.8.2",
|
|
222
|
+
"pi-agent-filesystem-jq": "0.8.2",
|
|
223
|
+
"pi-agent-filesystem-pdf": "0.8.2",
|
|
224
|
+
"pi-agent-filesystem-text": "0.8.2",
|
|
225
|
+
"pi-agent-ide-ast": "0.8.2",
|
|
226
|
+
"pi-agent-ide-changes": "0.8.2",
|
|
227
|
+
"pi-agent-ide-formatter": "0.8.2",
|
|
228
|
+
"pi-agent-ide-languages": "0.8.2",
|
|
229
|
+
"pi-agent-ide-lint": "0.8.2",
|
|
230
|
+
"pi-agent-ide-lsp": "0.8.2",
|
|
231
|
+
"pi-agent-image": "0.8.2",
|
|
232
|
+
"pi-agent-invariant": "0.8.2",
|
|
233
|
+
"pi-agent-pdf": "0.8.2",
|
|
234
|
+
"pi-agent-read": "0.8.2",
|
|
235
|
+
"pi-agent-resource": "0.8.2",
|
|
236
|
+
"pi-agent-search": "0.8.2",
|
|
237
|
+
"pi-agent-search-text": "0.8.2",
|
|
238
|
+
"pi-agent-text": "0.8.2",
|
|
239
|
+
"pi-agent-text-anchor-constant": "0.8.2",
|
|
240
|
+
"pi-agent-text-anchor-exact": "0.8.2",
|
|
241
|
+
"pi-agent-text-anchor-line-hash": "0.8.2",
|
|
242
|
+
"pi-agent-text-editor": "0.8.2",
|
|
243
|
+
"pi-agent-text-editor-renderer": "0.8.2",
|
|
244
|
+
"pi-agent-text-editor-stale-anchor": "0.8.2",
|
|
245
|
+
"pi-agent-tool-call-interception": "0.8.2",
|
|
246
|
+
"pi-agent-tool-ui": "0.8.2",
|
|
247
|
+
"pi-agent-web": "0.8.2",
|
|
248
|
+
"pi-agent-web-html": "0.8.2",
|
|
249
|
+
"pi-agent-web-image": "0.8.2",
|
|
250
|
+
"pi-agent-web-pdf": "0.8.2",
|
|
251
|
+
"pi-agent-web-text": "0.8.2",
|
|
240
252
|
"playwright-core": "^1.62.1",
|
|
241
253
|
"tree-sitter-cpp": "^0.23.4",
|
|
242
254
|
"tree-sitter-javascript": "^0.25.0",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: configure-agent-ide
|
|
3
|
+
description: Explain Pi Agent IDE settings and safely configure the IDE for the user's workflow. Use when the user asks how to use or configure Pi Agent IDE, enable or disable modules or behavior, show or hide Codemode tool results, change output presentation, or restore defaults. Not for Pi model selection, credentials, package installation, or unrelated extension settings.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Configure Agent IDE
|
|
7
|
+
|
|
8
|
+
## Discover supported settings
|
|
9
|
+
|
|
10
|
+
Read `docs:ide-settings` before choosing IDs or values. It is generated from the same registrations as the settings menu. It lists supported choices and defaults, not the user's current configuration. Search within that guide when locating a setting; read the relevant context before changing it.
|
|
11
|
+
|
|
12
|
+
If the docs provider is unavailable, read `../../docs/configuration.md` relative to this skill directory. For exact current IDs, values and defaults, read only the relevant installed registrations: `../../src/composite/preferences.ts`, `../../src/composite/builtin-extensions.ts`, `../../src/composite/presets.ts`, or flag registrations in `../../src/pi-agent-ide.ts`. Scope resolution and merging are in `../../src/composite/extensions-config.ts`. Treat these package files as read-only. If supported information is still unavailable, explain the blocker and offer `/agent-ide-settings`; do not guess or enable documentation modules just to get a guide.
|
|
13
|
+
|
|
14
|
+
## Explain or configure
|
|
15
|
+
|
|
16
|
+
For a help request, explain the relevant settings in plain language and offer `/agent-ide-help` or `/agent-ide-settings`. Use the catalog to distinguish built-in defaults from saved overrides. Do not change configuration when the user only asks for an explanation.
|
|
17
|
+
|
|
18
|
+
For a configuration request, ask what the user wants to change when their goal is unclear. Ask whether changes belong to Project or Global before writing, unless the user already specified the scope. Read both scopes, then change only the agreed settings. Explain how the choices work together, including the Codemode tool-result switch and each tool's own presentation setting.
|
|
19
|
+
|
|
20
|
+
## Inspect the requested scope
|
|
21
|
+
|
|
22
|
+
Resolve Global and Project paths using the guide's contract and the actual working directory, home and `PI_CODING_AGENT_DIR`. Do not assume the default global directory when the variable is set. Read both files; a missing file means no override, while malformed or unreadable configuration is a blocker.
|
|
23
|
+
|
|
24
|
+
Map the user's request to a registered setting and allowed value. Ask which scope to change if the request does not establish Project or Global. Ask about an ambiguous setting instead of choosing a nearby option. Explain when a higher-priority override, preset, dependency or CLI flag prevents the requested effective state.
|
|
25
|
+
|
|
26
|
+
Keep saved overrides, inherited defaults and the running session distinct. Removing an override restores inheritance; it is not the same as writing the built-in default. For modules, inspect disable lists in both scopes and preset restrictions before promising an enable.
|
|
27
|
+
|
|
28
|
+
## Make the smallest authorized change
|
|
29
|
+
|
|
30
|
+
Use the ordinary file editing tools to change only the requested keys in the chosen IDE configuration file. Re-read before editing, preserve unrelated and unknown fields, and use the registered storage types. Default removes the selected override. Handle legacy flag fields as described in the guide. Do not rewrite a matching configuration just to restyle it.
|
|
31
|
+
|
|
32
|
+
Do not change Pi's own settings, credentials, package sources, installed code, or another scope to make the result work. Ask before enabling desktop capture, sending code to a review provider, or another security-sensitive opt-in unless the user explicitly requested that exact behavior.
|
|
33
|
+
|
|
34
|
+
Read the saved file afterward and compare it with the intended change. If a write result is uncertain, inspect before retrying. Do not turn a read error into an empty configuration or replace a malformed file with defaults.
|
|
35
|
+
|
|
36
|
+
## Report what changed
|
|
37
|
+
|
|
38
|
+
State the scope, file, setting and saved value, or explain that nothing needed changing. Name any blocker or remaining override. Saved configuration is not proof that the running session changed: offer reload or restart, and verify the effective behavior after an authorized reload before saying it is active.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared binary converters for plugins and isolated workers.
|
|
3
|
+
* Factories use the IDE's PDF.js and image runtime; conversion preserves the input bytes.
|
|
4
|
+
*/
|
|
5
|
+
export { createPdfContentConverter } from "pi-agent-pdf";
|
|
6
|
+
export { createImageContentConverter } from "pi-agent-image";
|