pi-agent-ide 0.8.1 → 0.8.3
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 +50 -0
- package/README.md +5 -3
- package/dist/{chunk-TGC2ZACO.js → chunk-235QMMVA.js} +1 -1
- package/dist/{chunk-OI3HBIPK.js → chunk-4DIUPEDF.js} +1 -1
- package/dist/{chunk-2ITKAXHO.js → chunk-6FGLAVPJ.js} +1 -1
- package/dist/{chunk-7LOVUWNI.js → chunk-6H32W35W.js} +1 -1
- package/dist/{chunk-YHREORHH.js → chunk-6OJ565FL.js} +1 -1
- package/dist/{chunk-E2PHA4SQ.js → chunk-6R3Y4AD3.js} +1 -1
- package/dist/{chunk-VNTY7BKC.js → chunk-6T7PSDQW.js} +1 -1
- package/dist/{chunk-D4IA2MTA.js → chunk-6TJPMBUQ.js} +1 -1
- package/dist/{chunk-JKMXND6V.js → chunk-6XFUICD7.js} +1 -1
- package/dist/{chunk-A64JRDZK.js → chunk-AAC77UD4.js} +1 -1
- package/dist/{chunk-HFJGCYFO.js → chunk-ANM3Y5FO.js} +5 -5
- package/dist/{chunk-Q5X6OXNS.js → chunk-CPELC6JE.js} +1 -1
- package/dist/chunk-GBUJOR6V.js +28 -0
- package/dist/{chunk-3WO2NOEQ.js → chunk-GSOYVIQS.js} +1 -1
- package/dist/{chunk-AIT3YWR5.js → chunk-HSRH76JN.js} +1 -1
- package/dist/{chunk-ID4RJIVZ.js → chunk-HSZ4AQ6L.js} +1 -1
- package/dist/chunk-I6NPILT5.js +1 -0
- package/dist/chunk-K7SRNBIV.js +1 -0
- package/dist/{chunk-DXONCYWF.js → chunk-LCWBVOII.js} +3 -3
- package/dist/{chunk-EMRJP6EM.js → chunk-LEJKDYCK.js} +1 -1
- package/dist/{chunk-HCK7OIQ3.js → chunk-NJ7C4KMA.js} +1 -1
- package/dist/{chunk-BQAKA3FU.js → chunk-NUM3YQGK.js} +1 -1
- package/dist/chunk-OJEIX7OZ.js +1 -0
- package/dist/chunk-PBQDHYNX.js +1 -0
- package/dist/{chunk-4HWKBCBH.js → chunk-PJL3UVMJ.js} +1 -1
- package/dist/chunk-PT35ZFLH.js +33 -0
- package/dist/{chunk-AKNHSDGV.js → chunk-QT3EAHOG.js} +1 -1
- package/dist/{chunk-LLRUJD62.js → chunk-RIJMXO43.js} +1 -1
- package/dist/chunk-RMI3NMQY.js +23 -0
- package/dist/chunk-RQ7JJ7GV.js +4 -0
- package/dist/{chunk-AUL5FGGK.js → chunk-RVU73VKN.js} +1 -1
- package/dist/{chunk-WPBQ45ZL.js → chunk-RW2GTYQI.js} +1 -1
- package/dist/{chunk-BR7GRH4A.js → chunk-SDAH3ECM.js} +1 -1
- package/dist/chunk-SGQWRIRJ.js +10 -0
- package/dist/{chunk-N56WAVYA.js → chunk-SMIFCAAX.js} +1 -1
- package/dist/chunk-SWBJS3U4.js +1 -0
- package/dist/{chunk-WXGTU2M6.js → chunk-VMTOFEXF.js} +1 -1
- package/dist/{chunk-GEMDU6XW.js → chunk-VXP5BMW7.js} +1 -1
- package/dist/{chunk-LAJQSHEI.js → chunk-XAHU42FP.js} +3 -3
- package/dist/{chunk-ZV5ETNLQ.js → chunk-XBQR74IK.js} +1 -1
- package/dist/{chunk-TXG2H7YQ.js → chunk-XG7QNAKW.js} +1 -1
- package/dist/{chunk-PRLIHLCS.js → chunk-XLWCSJMR.js} +1 -1
- package/dist/{chunk-M4TVRCMZ.js → chunk-XXLLY66B.js} +1 -1
- package/dist/chunk-YFP4P2FV.js +1 -0
- package/dist/{chunk-SWA5B5B2.js → chunk-YIXP2ALP.js} +1 -1
- package/dist/{chunk-246NTPOS.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 -1
- package/dist/entry-19.js +1 -0
- 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 -1
- package/dist/entry-27.js +1 -2
- package/dist/entry-28.js +1 -1
- package/dist/entry-29.js +2 -4
- 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 -1
- package/dist/entry-33.js +1 -18
- 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 -1
- package/dist/entry-47.js +1 -25
- 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 -1
- package/dist/entry-52.js +1 -3
- package/dist/entry-53.js +1 -13
- 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 -1
- package/dist/entry-63.js +1 -0
- package/dist/entry-64.js +1 -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 -1
- package/dist/entry-73.js +1 -0
- package/dist/entry-74.js +1 -1
- package/dist/entry-76.js +1 -1
- package/dist/entry-77.js +0 -1
- package/dist/entry-78.js +1 -1
- package/dist/entry-79.js +1 -80
- package/dist/entry-8.js +1 -1
- package/dist/entry-80.js +1 -22
- package/dist/entry-81.js +80 -2
- package/dist/entry-82.js +22 -1
- package/dist/entry-83.js +2 -1
- package/dist/entry-84.js +1 -1
- package/dist/entry-85.js +1 -3
- package/dist/entry-86.js +1 -1
- package/dist/entry-87.js +1 -1
- package/dist/entry-88.js +3 -1
- 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 +29 -36
- package/docs/agent-guides/debugger.md +2 -0
- package/docs/agent-guides/editing.md +3 -3
- package/docs/agent-guides/search-code.md +2 -2
- package/docs/agent-guides/select-code.md +9 -6
- package/docs/code-review.md +5 -0
- package/docs/configuration.md +36 -4
- package/docs/development.md +8 -0
- package/docs/directory-operations.md +1 -1
- package/docs/extensions.md +98 -1
- package/docs/structured-results.md +11 -6
- package/docs/user-hooks.md +2 -2
- package/node_modules/pi-agent-doctor/package.json +7 -7
- 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 -6
- package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
- package/node_modules/pi-agent-filesystem-pdf/runtime/entry-32.js +2 -0
- package/node_modules/pi-agent-filesystem-text/package.json +4 -4
- package/node_modules/pi-agent-ide-ast/package.json +15 -15
- package/node_modules/pi-agent-ide-ast/src/select-schema.ts +6 -5
- package/node_modules/pi-agent-ide-changes/package.json +10 -10
- 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-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 -10
- 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 -3
- package/node_modules/pi-agent-read/package.json +12 -12
- package/node_modules/pi-agent-read/runtime/entry-47.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-search/package.json +9 -9
- package/node_modules/pi-agent-search/runtime/entry-52.js +0 -1
- package/node_modules/pi-agent-search/runtime/entry-53.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-54.js +2 -0
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +6 -5
- 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-58.js +1 -0
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
- package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
- 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 -26
- package/node_modules/pi-agent-text-editor/runtime/entry-79.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-80.js +1 -0
- 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/core/extension.ts +3 -1
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +45 -44
- 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 +27 -18
- 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 +29 -6
- 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 -6
- 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 +14 -3
- 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-text-editor-stale-anchor/runtime/entry-83.js +2 -0
- 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 -8
- 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-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 +62 -54
- package/src/api/approval.ts +5 -0
- package/src/api/settings.ts +198 -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 +74 -4
- package/src/composite/search-facts.ts +45 -0
- package/src/composite/settings-documentation.ts +32 -23
- package/src/composite/settings-registry.ts +94 -0
- package/src/composite/text-results.ts +120 -8
- 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/core/reload-resource-store.ts +23 -3
- package/src/documentation/registry.ts +10 -2
- 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 -6
- 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 -8
- 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-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-47.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-48.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/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-57.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-58.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-52.js +0 -1
- 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/search-parameters.ts +6 -5
- package/src/extensions/pi-agent-text-editor/index.ts +2 -0
- package/src/extensions/pi-agent-text-editor/package.json +26 -26
- 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-exact/package.json +5 -5
- 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 -6
- 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 +14 -3
- 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/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-83.js +2 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-79.js +0 -1
- 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/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/core/extension.ts +3 -1
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +45 -44
- 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 +27 -18
- 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 +29 -6
- 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 +61 -14
- package/src/plugins/pi-agent-ide-ast/package.json +15 -15
- package/src/plugins/pi-agent-ide-ast/src/select-schema.ts +6 -5
- package/src/plugins/pi-agent-ide-changes/package.json +10 -10
- 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 +159 -60
- 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-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 -10
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-41.js +2 -0
- package/src/plugins/pi-agent-ide-terminal/index.ts +3 -2
- 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/dist/chunk-ESPNEJHK.js +0 -1
- package/dist/chunk-GNACBJM3.js +0 -1
- package/dist/chunk-VMGZMXEM.js +0 -10
- package/dist/chunk-W3YFF6OO.js +0 -1
- package/dist/chunk-W7M3V7FR.js +0 -28
- package/dist/chunk-WMHSVEIT.js +0 -29
- package/dist/chunk-XSIKDVAR.js +0 -25
- package/dist/chunk-YTYLS2UM.js +0 -1
- package/dist/chunk-Z2QGNTGQ.js +0 -1
- package/dist/entry-21.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-27.js +0 -2
- package/node_modules/pi-agent-filesystem-image/runtime/entry-28.js +0 -2
- package/node_modules/pi-agent-ide-ast/runtime/entry-32.js +0 -1
- package/node_modules/pi-agent-ide-formatter/runtime/entry-36.js +0 -2
- package/node_modules/pi-agent-image/runtime/entry-40.js +0 -1
- package/node_modules/pi-agent-invariant/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-53.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-58.js +0 -2
- package/node_modules/pi-agent-text-editor/runtime/entry-64.js +0 -1
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-80.js +0 -2
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-82.js +0 -1
- package/node_modules/pi-agent-tool-ui/runtime/entry-83.js +0 -1
- package/node_modules/pi-agent-web/runtime/entry-84.js +0 -2
- package/node_modules/pi-agent-web-html/runtime/entry-85.js +0 -2
- package/node_modules/pi-agent-web-image/runtime/entry-86.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-28.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-29.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-27.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-85.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-86.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-87.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-84.js +0 -2
- 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-53.js +0 -2
- 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-58.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-59.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-80.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-81.js +0 -2
- 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-32.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-33.js +0 -2
- package/src/plugins/pi-agent-ide-formatter/runtime/entry-36.js +0 -2
- /package/node_modules/{pi-agent-documentation → pi-agent-doctor}/runtime/entry-26.js +0 -0
- /package/node_modules/{pi-agent-filesystem-jq → pi-agent-filesystem}/runtime/entry-29.js +0 -0
- /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-jq}/runtime/entry-31.js +0 -0
- /package/node_modules/{pi-agent-ide-ast → pi-agent-filesystem-text}/runtime/entry-33.js +0 -0
- /package/node_modules/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-34.js +0 -0
- /package/node_modules/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-languages}/runtime/entry-39.js +0 -0
- /package/node_modules/{pi-agent-pdf → 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-48.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-50.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-57.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-text}/runtime/entry-59.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-text-anchor-constant}/runtime/entry-60.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-61.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-62.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-text-editor-stale-anchor → pi-agent-text-editor}/runtime/entry-81.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web}/runtime/entry-87.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web-html}/runtime/entry-88.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-jq}/runtime/entry-31.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-html}/runtime/entry-88.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-anchor-exact → pi-agent-text-anchor-constant}/runtime/entry-60.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-61.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-62.js +0 -0
- /package/src/plugins/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-34.js +0 -0
- /package/src/plugins/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
- /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-languages}/runtime/entry-39.js +0 -0
package/dist/pi-agent-ide.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import{a as O,b as B,c as U,d as re,e as ie,f as F}from"./chunk-W7CASEO3.js";import{f as H}from"./chunk-IM24DB3K.js";import"./chunk-QUYXINGZ.js";import"./chunk-PRLIHLCS.js";import{a as ae}from"./chunk-YGGKGZO2.js";import"./chunk-MPT3R4BL.js";import{f as Z}from"./chunk-T7I2VX3J.js";import{a as ne}from"./chunk-BU7IZLKB.js";import{a as ee,b as te}from"./chunk-S5PL5DFQ.js";import{K as se,d as oe}from"./chunk-DXONCYWF.js";import"./chunk-ZC65Z3CK.js";import{a as u}from"./chunk-EI7MMDWY.js";var z={"ide.core":["IDE services","Shared services used by language, formatting and diagnostic modules."],"ide.tips":["Getting started tips","Show contextual guidance while setting up a project."],"ide.documentation":["Progressive agent documentation","Expose packaged guides and attach them on first relevant tool use."],"ide.doctor":["Setup doctor","Check external tools and help configure project support."],"ide.languages":["Language setup","Discover languages and their recommended toolchains."],"ide.processes":["Agent IDE processes","Show active terminal and debugger sessions in one shared process surface."],"ide.vision":["Agent vision","Inspect process metadata and capture supported windows and web pages as images."],"ide.debugger":["Debugger sessions","Debug local programs through addressable DAP sessions and anchored breakpoints."],"ide.terminal":["Terminal sessions","Run and manage local interactive and background terminal processes."],"read.core":["Read tools","Read sources through the configured readers and views."],"read.filesystem":["Local files","Resolve files and folders from the local filesystem."],"read.ssh":["SSH files","Read and edit configured SSH file sources through existing tools."],"read.filesystem.jq":["JSON queries","Query local JSON files through jq read views."],"read.filesystem.image":["Local images","Read local images as visual content."],"read.filesystem.pdf":["Local PDFs","Extract readable content from local PDF documents."],"read.filesystem.text":["Local text","Read local text files with their source coordinates."],"read.web":["Web sources","Read remote sources over HTTP and HTTPS."],"read.web.html":["Web pages","Extract readable content from HTML pages."],"read.web.image":["Web images","Read remote images as visual content."],"read.web.pdf":["Web PDFs","Extract text from remote PDF documents."],"read.web.text":["Web text","Read remote plain-text sources."],"search.core":["Search tools","Run searches through the configured search providers."],"search.text":["Text search","Find text and files and register reusable search selections."],"editor.core":["Editing tools","Make guarded text and whole-file changes, directly or through native Codemode."],"editor.renderer":["Edit previews","Display changes in the shared colored diff panels."],"editor.anchor.constant":["File boundary selectors","Use begin and end to select file boundaries."],"editor.anchor.line-hash":["Checked line selectors","Select lines with hashes that detect stale content."],"editor.anchor.exact":["Exact text selectors","Locate edit ranges using unique source text."],"editor.stale-anchor":["Stale selection recovery","Provide recovery guidance when an edit selection is outdated."],"ide.ast":["Structural code support","Read code outlines and search or edit exact syntax-tree nodes."],"ide.formatter":["Code formatting","Run configured formatters after edits."],"ide.lint":["Lint checks","Run configured linters and collect their findings."],"ide.changes":["Git changes","Inspect and manage uncommitted changes and undo history."],"ide.lsp":["Language servers","Resolve symbols, rename references and collect language-server diagnostics."],"ide.diagnostics":["Diagnostic views","Show diagnostic findings through read views and sources."]};var N=[A("ide.core",()=>import("./chunk-XSIKDVAR.js")),A("ide.tips",()=>import("./chunk-BB4A5UI3.js")),A("ide.doctor",()=>import("./chunk-ID4RJIVZ.js")),A("ide.languages",()=>import("./entry-37.js"),["ide.doctor"]),A("read.core",()=>import("./entry-47.js")),A("ide.documentation",()=>import("./chunk-VMGZMXEM.js"),["read.core"]),A("read.filesystem",()=>import("./entry-27.js"),["read.core","editor.core"]),A("read.ssh",()=>import("./chunk-SWA5B5B2.js"),["read.filesystem"]),A("read.filesystem.jq",()=>import("./entry-29.js"),["read.filesystem","ide.documentation","ide.doctor"]),A("read.filesystem.image",()=>import("./entry-28.js"),["read.filesystem"]),A("read.filesystem.pdf",()=>import("./entry-30.js"),["read.filesystem"]),A("read.filesystem.text",()=>import("./entry-31.js"),["read.filesystem"]),A("read.web",()=>import("./chunk-GNACBJM3.js"),["read.core"]),A("read.web.html",()=>import("./entry-85.js"),["read.web"]),A("read.web.image",()=>import("./entry-86.js"),["read.web"]),A("read.web.pdf",()=>import("./entry-87.js"),["read.web"]),A("read.web.text",()=>import("./entry-88.js"),["read.web"]),A("search.core",()=>import("./entry-52.js")),A("search.text",()=>import("./entry-53.js"),["search.core"]),A("editor.renderer",()=>import("./entry-80.js"),["editor.core"]),A("editor.core",()=>import("./entry-79.js")),A("editor.anchor.constant",()=>import("./entry-58.js"),["read.core","editor.core"]),A("editor.anchor.line-hash",()=>import("./entry-62.js"),["read.core","editor.core"]),A("editor.anchor.exact",()=>import("./entry-60.js"),["editor.core"]),A("editor.stale-anchor",()=>import("./entry-81.js"),["editor.core"]),A("ide.ast",()=>import("./entry-33.js"),["ide.core","read.core","search.core","editor.core"]),A("ide.formatter",()=>import("./chunk-246NTPOS.js"),["ide.core"]),A("ide.lint",()=>import("./chunk-VNTY7BKC.js"),["ide.core"]),A("ide.changes",()=>import("./chunk-ZV5ETNLQ.js"),["ide.core","read.core","editor.core"]),A("ide.lsp",()=>import("./chunk-3WO2NOEQ.js"),["ide.core","read.core","search.core"]),A("ide.processes",()=>import("./chunk-OM4LYD3S.js")),A("ide.vision",()=>import("./chunk-BR7GRH4A.js"),["ide.processes","read.core","search.core"]),A("ide.debugger",()=>import("./chunk-WMHSVEIT.js"),["ide.processes","read.core","editor.core"]),A("ide.terminal",()=>import("./chunk-W7M3V7FR.js"),["ide.processes","read.core","search.core","editor.core","editor.anchor.constant"]),A("ide.diagnostics",()=>import("./chunk-AUL5FGGK.js"),["ide.core","read.core"])];function A(e,s,f=[],l=!0){return{id:e,name:z[e][0],description:z[e][1],dependencies:f,async register(o,g){await(await s()).default(o,g)},...l?{}:{defaultEnabled:!1}}}u(A,"builtin");function W(e,s,f){return{kind:"choice",id:e,name:s,description:f,default:"compact",group:"ui",values:[{value:"full",label:"Full"},{value:"compact",label:"Compact"},{value:"disabled",label:"Disabled"}]}}u(W,"presentationPreference");var G=[{kind:"choice",id:"ui.codemode",name:"Show tool results from Codemode",description:"Show extra Agent IDE result panels using each tool's presentation setting. Off hides successful panels; errors stay visible. Codemode's own output and other tools are unchanged.",default:"off",group:"ui",values:[{value:"off",label:"Off"},{value:"on",label:"On"}]},W("ui.diffs","Diffs","Choose how mutation and comparison diffs are displayed."),W("ui.read","Read","Choose how Read calls and results are displayed."),W("ui.search","Search","Choose how Search calls and results are displayed."),W("ui.terminal","Terminal","Choose how shell commands and terminal output are displayed."),{kind:"choice",id:"processes.activity",name:"Active Agent IDE processes",description:"Choose detailed process cards, a compact active count, or no persistent Agent IDE process UI.",default:"detailed",group:"ui",values:[{value:"detailed",label:"Detailed cards"},{value:"compact",label:"Compact count"},{value:"off",label:"Off"}]},{kind:"text",id:"vision.sequenceDurationSeconds",name:"Vision sequence duration",description:"Default sequence duration in seconds. Requests may override it, up to 10 seconds.",default:"2",group:"features"},{kind:"text",id:"vision.sequenceIntervalSeconds",name:"Vision sequence interval",description:"Default seconds between sequence frames. A sequence may contain at most 20 frames.",default:"0.5",group:"features"},{kind:"text",id:"vision.imageScale",name:"Vision image scale",description:"Default image downscale from greater than 0 through 1.",default:"0.5",group:"features"},{kind:"text",id:"vision.allowedExecutables",name:"Vision allowed executables",description:"Comma-separated executable file names that may be captured without arbitrary-window access.",default:"",group:"features",placeholder:"Unity.exe,UnrealEditor.exe"}];function q(e,s,f=[]){let l=new Map;for(let m of e){if(l.has(m.id))throw new Error(`Duplicate Pi Agent IDE extension ID: ${m.id}`);l.set(m.id,m)}for(let m of e)for(let x of m.dependencies)if(!l.has(x))throw new Error(`Pi Agent IDE extension ${m.id} has unknown dependency ${x}`);let o=new Set;for(let m of s)l.has(m)&&o.add(m);for(let m of f)if(!l.has(m))throw new Error(`Unknown Pi Agent IDE extension ID in enabled: ${m}`);let g=Ne(l,f,o),y=new Set;for(let m of e)(m.defaultEnabled===!1&&!g.has(m.id)||o.has(m.id))&&y.add(m.id);let E=!0;for(;E;){E=!1;for(let m of e)y.has(m.id)||m.dependencies.every(x=>!y.has(x))||(y.add(m.id),E=!0)}return{enabled:e.filter(m=>!y.has(m.id)),disabled:y}}u(q,"selectBuiltinExtensions");function Ne(e,s,f){let l=new Set,o=[...s];for(;o.length>0;){let g=o.pop();if(!(l.has(g)||f.has(g))){l.add(g);for(let y of e.get(g)?.dependencies??[])l.has(y)||o.push(y)}}return l}u(Ne,"collectForcedOn");import{Input as Le}from"@earendil-works/pi-tui";import{mkdir as De,readFile as Me,writeFile as Oe}from"node:fs/promises";import je from"node:path";import{withFileMutationQueue as $e}from"@earendil-works/pi-coding-agent";async function le(e,s,f=new Map,l=new Map,o){await $e(e,async()=>{let g=await F(e),y={};try{y=JSON.parse(await Me(e,"utf8"))}catch(i){if(!(i instanceof Error&&"code"in i&&i.code==="ENOENT"))throw i}let E=new Set(g.disabled),m=new Set(g.enabled);for(let[i,n]of s)E.delete(i),m.delete(i),n==="disabled"&&E.add(i),n==="enabled"&&m.add(i);let x={...g.preferences};for(let[i,n]of l)n===void 0?delete x[i]:x[i]=n;let S={...g.flags};for(let[i,n]of f)i==="pi-agent-ide-no-animations"&&delete y.noAnimations,i==="pi-agent-ide-no-post-processing"&&delete y.noPostProcessing,n===void 0?delete S[i]:S[i]=n;await De(je.dirname(e),{recursive:!0}),await Oe(e,`${JSON.stringify({...y,disabled:[...E],enabled:[...m],...o===void 0?{}:{preset:o},...f.size>0?{flags:S}:{},...l.size>0?{preferences:x}:{}},null,2)}
|
|
2
|
-
`)})}
|
|
3
|
-
${o.map(g=>` ${JSON.stringify(g)}`).join(`,
|
|
4
|
-
`)}
|
|
5
|
-
]`).join(`,
|
|
6
|
-
`);return{id:"ide-settings",description:"Registered IDE settings, choices, defaults, configuration scopes and inheritance.",triggers:[{tool:"read",resourcePrefixes:["docs:ide-settings"]}],markdown:`# IDE settings
|
|
1
|
+
import{a as F,b as W,c as B,d as he,e as q,f as j}from"./chunk-W7CASEO3.js";import{f as Z}from"./chunk-IM24DB3K.js";import{a as ye}from"./chunk-YGGKGZO2.js";import"./chunk-QUYXINGZ.js";import"./chunk-XLWCSJMR.js";import"./chunk-MPT3R4BL.js";import{f as ce}from"./chunk-T7I2VX3J.js";import{a as pe}from"./chunk-BU7IZLKB.js";import{a as ue,b as fe}from"./chunk-S5PL5DFQ.js";import{K as me,d as ge}from"./chunk-LCWBVOII.js";import{a as re,b as ie,c as ae,e as K,f as le}from"./chunk-OJEIX7OZ.js";import{c as de}from"./chunk-RQ7JJ7GV.js";import"./chunk-ZC65Z3CK.js";import{a as l}from"./chunk-EI7MMDWY.js";var Q={"ide.core":["IDE services","Shared services used by language, formatting and diagnostic modules."],"ide.tips":["Getting started tips","Show contextual guidance while setting up a project."],"ide.documentation":["Progressive agent documentation","Expose packaged guides and attach them on first relevant tool use."],"ide.doctor":["Setup doctor","Check external tools and help configure project support."],"ide.languages":["Language setup","Discover languages and their recommended toolchains."],"ide.processes":["Agent IDE processes","Show active terminal and debugger sessions in one shared process surface."],"ide.vision":["Agent vision","Inspect process metadata and capture supported windows and web pages as images."],"ide.debugger":["Debugger sessions","Debug local programs through addressable DAP sessions and anchored breakpoints."],"ide.terminal":["Terminal sessions","Run and manage local interactive and background terminal processes."],"read.core":["Read tools","Read sources through the configured readers and views."],"read.filesystem":["Local files","Resolve files and folders from the local filesystem."],"read.ssh":["SSH files","Read and edit configured SSH file sources through existing tools."],"read.filesystem.jq":["JSON queries","Query local JSON files through jq read views."],"read.filesystem.image":["Local images","Read local images as visual content."],"read.filesystem.pdf":["Local PDFs","Extract readable content from local PDF documents."],"read.filesystem.text":["Local text","Read local text files with their source coordinates."],"read.web":["Web sources","Read remote sources over HTTP and HTTPS."],"read.web.html":["Web pages","Extract readable content from HTML pages."],"read.web.image":["Web images","Read remote images as visual content."],"read.web.pdf":["Web PDFs","Extract text from remote PDF documents."],"read.web.text":["Web text","Read remote plain-text sources."],"search.core":["Search tools","Run searches through the configured search providers."],"search.text":["Text search","Find text and files and register reusable search selections."],"editor.core":["Editing tools","Make guarded text and whole-file changes, directly or through native Codemode."],"editor.renderer":["Edit previews","Display changes in the shared colored diff panels."],"editor.anchor.constant":["File boundary selectors","Use begin and end to select file boundaries."],"editor.anchor.line-hash":["Checked line selectors","Select lines with hashes that detect stale content."],"editor.anchor.exact":["Exact text selectors","Locate edit ranges using unique source text."],"editor.stale-anchor":["Stale selection recovery","Provide recovery guidance when an edit selection is outdated."],"ide.ast":["Structural code support","Read code outlines and search or edit exact syntax-tree nodes."],"ide.formatter":["Code formatting","Run configured formatters after edits."],"ide.lint":["Lint checks","Run configured linters and collect their findings."],"ide.changes":["Git changes","Inspect and manage uncommitted changes and undo history."],"ide.lsp":["Language servers","Resolve symbols, rename references and collect language-server diagnostics."],"ide.diagnostics":["Diagnostic views","Show diagnostic findings through read views and sources."]};var D=[C("ide.core",()=>import("./chunk-RMI3NMQY.js")),C("ide.tips",()=>import("./chunk-BB4A5UI3.js")),C("ide.doctor",()=>import("./chunk-HSZ4AQ6L.js")),C("ide.languages",()=>import("./entry-39.js"),["ide.doctor"]),C("read.core",()=>import("./entry-49.js")),C("ide.documentation",()=>import("./chunk-SGQWRIRJ.js"),["read.core"]),C("read.filesystem",()=>import("./entry-29.js"),["read.core","editor.core"]),C("read.ssh",()=>import("./chunk-YIXP2ALP.js"),["read.filesystem"]),C("read.filesystem.jq",()=>import("./entry-31.js"),["read.filesystem","ide.documentation","ide.doctor"]),C("read.filesystem.image",()=>import("./entry-30.js"),["read.filesystem"]),C("read.filesystem.pdf",()=>import("./entry-32.js"),["read.filesystem"]),C("read.filesystem.text",()=>import("./entry-33.js"),["read.filesystem"]),C("read.web",()=>import("./chunk-YFP4P2FV.js"),["read.core"]),C("read.web.html",()=>import("./entry-88.js"),["read.web"]),C("read.web.image",()=>import("./entry-89.js"),["read.web"]),C("read.web.pdf",()=>import("./entry-90.js"),["read.web"]),C("read.web.text",()=>import("./entry-91.js"),["read.web"]),C("search.core",()=>import("./entry-54.js")),C("search.text",()=>import("./entry-55.js"),["search.core"]),C("editor.renderer",()=>import("./entry-82.js"),["editor.core"]),C("editor.core",()=>import("./entry-81.js")),C("editor.anchor.constant",()=>import("./entry-60.js"),["read.core","editor.core"]),C("editor.anchor.line-hash",()=>import("./entry-64.js"),["read.core","editor.core"]),C("editor.anchor.exact",()=>import("./entry-62.js"),["editor.core"]),C("editor.stale-anchor",()=>import("./entry-83.js"),["editor.core"]),C("ide.ast",()=>import("./entry-35.js"),["ide.core","read.core","search.core","editor.core"]),C("ide.formatter",()=>import("./chunk-ZJQRLVVV.js"),["ide.core"]),C("ide.lint",()=>import("./chunk-6T7PSDQW.js"),["ide.core"]),C("ide.changes",()=>import("./chunk-XBQR74IK.js"),["ide.core","read.core","editor.core"]),C("ide.lsp",()=>import("./chunk-GSOYVIQS.js"),["ide.core","read.core","search.core"]),C("ide.processes",()=>import("./chunk-OM4LYD3S.js")),C("ide.vision",()=>import("./chunk-SDAH3ECM.js"),["ide.processes","read.core","search.core"]),C("ide.debugger",()=>import("./chunk-PT35ZFLH.js"),["ide.processes","read.core","editor.core"]),C("ide.terminal",()=>import("./chunk-GBUJOR6V.js"),["ide.processes","read.core","search.core","editor.core","editor.anchor.constant"]),C("ide.diagnostics",()=>import("./chunk-RVU73VKN.js"),["ide.core","read.core"])];function C(e,t,d=[],i=!0){return{id:e,name:Q[e][0],description:Q[e][1],dependencies:d,async register(o,f){await(await t()).default(o,f)},...i?{}:{defaultEnabled:!1}}}l(C,"builtin");function G(e,t,d){return{kind:"choice",id:e,name:t,description:d,default:"compact",group:"ui",values:[{value:"full",label:"Full"},{value:"compact",label:"Compact"},{value:"disabled",label:"Disabled"}]}}l(G,"presentationPreference");var V=[{kind:"choice",id:"ui.codemode",name:"Show tool results from Codemode",description:"Show extra Agent IDE result panels using each tool's presentation setting. Off hides successful panels; errors stay visible. Codemode's own output and other tools are unchanged.",default:"off",group:"ui",values:[{value:"off",label:"Off"},{value:"on",label:"On"}]},G("ui.diffs","Diffs","Choose how mutation and comparison diffs are displayed."),G("ui.read","Read","Choose how Read calls and results are displayed."),G("ui.search","Search","Choose how Search calls and results are displayed."),G("ui.terminal","Terminal","Choose how shell commands and terminal output are displayed."),{kind:"choice",id:"processes.activity",name:"Active Agent IDE processes",description:"Choose detailed process cards, a compact active count, or no persistent Agent IDE process UI.",default:"detailed",group:"ui",values:[{value:"detailed",label:"Detailed cards"},{value:"compact",label:"Compact count"},{value:"off",label:"Off"}]},{kind:"text",id:"vision.sequenceDurationSeconds",name:"Vision sequence duration",description:"Default sequence duration in seconds. Requests may override it, up to 10 seconds.",default:"2",group:"features"},{kind:"text",id:"vision.sequenceIntervalSeconds",name:"Vision sequence interval",description:"Default seconds between sequence frames. A sequence may contain at most 20 frames.",default:"0.5",group:"features"},{kind:"text",id:"vision.imageScale",name:"Vision image scale",description:"Default image downscale from greater than 0 through 1.",default:"0.5",group:"features"},{kind:"text",id:"vision.allowedExecutables",name:"Vision allowed executables",description:"Comma-separated executable file names that may be captured without arbitrary-window access.",default:"",group:"features",placeholder:"Unity.exe,UnrealEditor.exe"}];function J(e,t,d=[]){let i=new Map;for(let p of e){if(i.has(p.id))throw new Error(`Duplicate Pi Agent IDE extension ID: ${p.id}`);i.set(p.id,p)}for(let p of e)for(let A of p.dependencies)if(!i.has(A))throw new Error(`Pi Agent IDE extension ${p.id} has unknown dependency ${A}`);let o=new Set;for(let p of t)i.has(p)&&o.add(p);for(let p of d)if(!i.has(p))throw new Error(`Unknown Pi Agent IDE extension ID in enabled: ${p}`);let f=Xe(i,d,o),y=new Set;for(let p of e)(p.defaultEnabled===!1&&!f.has(p.id)||o.has(p.id))&&y.add(p.id);let E=!0;for(;E;){E=!1;for(let p of e)y.has(p.id)||p.dependencies.every(A=>!y.has(A))||(y.add(p.id),E=!0)}return{enabled:e.filter(p=>!y.has(p.id)),disabled:y}}l(J,"selectBuiltinExtensions");function Xe(e,t,d){let i=new Set,o=[...t];for(;o.length>0;){let f=o.pop();if(!(i.has(f)||d.has(f))){i.add(f);for(let y of e.get(f)?.dependencies??[])i.has(y)||o.push(y)}}return i}l(Xe,"collectForcedOn");import{Input as st}from"@earendil-works/pi-tui";import{mkdir as Ke,readFile as Ze,writeFile as Qe}from"node:fs/promises";import et from"node:path";import{withFileMutationQueue as tt}from"@earendil-works/pi-coding-agent";async function be(e,t,d=new Map,i=new Map,o){await tt(e,async()=>{let f=await j(e),y={};try{y=JSON.parse(await Ze(e,"utf8"))}catch(g){if(!(g instanceof Error&&"code"in g&&g.code==="ENOENT"))throw g}let E=new Set(f.disabled),p=new Set(f.enabled);for(let[g,x]of t)E.delete(g),p.delete(g),x==="disabled"&&E.add(g),x==="enabled"&&p.add(g);let A={...f.preferences};for(let[g,x]of i)x===void 0?delete A[g]:A[g]=x;let v={...f.flags};for(let[g,x]of d)g==="pi-agent-ide-no-animations"&&delete y.noAnimations,g==="pi-agent-ide-no-post-processing"&&delete y.noPostProcessing,x===void 0?delete v[g]:v[g]=x;await Ke(et.dirname(e),{recursive:!0}),await Qe(e,`${JSON.stringify({...y,disabled:[...E],enabled:[...p],...o===void 0?{}:{preset:o},...d.size>0?{flags:v}:{},...i.size>0?{preferences:A}:{}},null,2)}
|
|
2
|
+
`)})}l(be,"saveModuleChoices");import{getSettingsListTheme as nt}from"@earendil-works/pi-coding-agent";import{matchesKey as H,SettingsList as ot,truncateToWidth as we,visibleWidth as xe}from"@earendil-works/pi-tui";function ve(e,t,d,i,o=""){let f=["extensions","behavior","ui"],y="extensions",E=l(s=>s==="extensions"?"modules":s==="behavior"?"features":"ui","itemKey"),p=l(s=>s==="extensions"?"modules":s==="behavior"?"features":"ui","changeKey"),A=l(()=>{let s=E(y),r=t()[s]??[];return new ot(r,12,nt(),(n,c)=>{d(p(y),n,c);for(let a of t()[s]??[]){let u=r.find(h=>h.id===a.id);u&&Object.assign(u,a)}},()=>i(!1),{enableSearch:!0})},"createList"),v=A(),g=l(s=>e.fg("borderMuted",s),"border"),x=l((s,r)=>{if(r<=1)return g("\u2502");let n=r-2,c=we(s,n);return`${g("\u2502")}${c}${" ".repeat(Math.max(0,n-xe(c)))}${g("\u2502")}`},"row"),b=l(s=>g(s<=1?"\u251C":`\u251C${"\u2500".repeat(Math.max(0,s-2))}\u2524`),"rule");return{render(s){let r=Math.max(1,s),n=Math.max(1,r-4),c=` Agent IDE settings${o?` \xB7 ${o}`:""} `,a=r<=1?g("\u256D"):`${g("\u256D\u2500")}${e.fg("accent",e.bold(we(c,Math.max(0,r-3),"")))}${g(`${"\u2500".repeat(Math.max(0,r-xe(c)-3))}\u256E`)}`,u={extensions:"Features",behavior:"Behavior",ui:"UI"},h=f.map(T=>T===y?e.fg("accent",e.bold(`[ ${u[T]} ]`)):e.fg("dim",` ${u[T]} `)).join(" "),w=v.render(n).map(T=>x(` ${T} `,r)),m=e.fg("dim"," Tab switch \xB7 Enter change \xB7 Ctrl+S save \xB7 Esc cancel ");return[a,x(` ${h} `,r),b(r),...w,b(r),x(m,r),g(r<=1?"\u2570":`\u2570${"\u2500".repeat(Math.max(0,r-2))}\u256F`)]},invalidate(){v.invalidate()},handleInput(s){H(s,"tab")||H(s,"shift+tab")?(y=f[(f.indexOf(y)+(H(s,"shift+tab")?2:1))%f.length]??"extensions",v=A()):H(s,"ctrl+s")?i(!0):v.handleInput(s)}}}l(ve,"createSettingsPanel");function Ee(e,t=[],d=[]){e.registerCommand("agent-ide-settings",{description:"Configure Agent IDE modules and features",async handler(i,o){if(o.hasUI)try{let f=await o.ui.select("Agent IDE settings \u2014 save scope",["Project","Global"]);if(f===void 0)return;let y=B(process.env,void 0,o.cwd),E=f==="Project"?y.projectPath:y.globalPath,p=await j(E),A=await j(f==="Project"?y.globalPath:y.projectPath),v=new Map,g=new Map,x=new Map,b;if(!await o.ui.custom((r,n,c,a)=>{let u=ve(n,()=>{let h=new Set(p.disabled),w=new Set(p.enabled);for(let[R,S]of v)h.delete(R),w.delete(R),S==="disabled"&&h.add(R),S==="enabled"&&w.add(R);let m=J(D,[...W(D,b??p.preset??"full"),...h,...W(D,A.preset??"full"),...A.disabled],[...w,...A.enabled]);return{modules:D.map(R=>({id:R.id,label:R.name??R.id,description:`${R.description??""} Effective: ${m.disabled.has(R.id)?"off":"on"}.${A.disabled.includes(R.id)?" Disabled in the other scope.":R.dependencies.some(S=>m.disabled.has(S))?" A dependency is disabled.":""}`,currentValue:v.get(R.id)??(p.disabled.includes(R.id)?"disabled":p.enabled.includes(R.id)?"enabled":"default"),values:["default","enabled","disabled"]})),features:[T(),...P("features"),...I("features")],ui:[...P("ui"),...I("ui")]};function T(){let R=b??p.preset??"full";return{id:"preset",label:"Preset",description:"Choose the built-in Agent IDE capability set. Reload required.",currentValue:F.find(S=>S.value===R)?.label??R,values:F.map(S=>S.label)}}function I(R){return d.filter(S=>S.group===R).map(S=>{let O=x.has(S.id)?x.get(S.id):p.preferences?.[S.id];return{id:S.id,label:S.name,description:`${S.description} Default: ${S.kind==="choice"?S.values.find(M=>M.value===S.default)?.label??S.default:S.default||"empty"}.`,currentValue:O===void 0?"default":S.kind==="choice"?S.values.find(M=>M.value===O)?.label??O:O,...S.kind==="choice"?{values:["default",...S.values.map(M=>M.label)]}:{submenu:l((M,U)=>{let _=new st,k=M==="default"?S.default:M;return k.length>0&&_.handleInput(k),_.focused=!0,_.onSubmit=X=>U(X),_.onEscape=()=>U(),_},"submenu")}}})}function P(R){return t.filter(S=>(S.group??"features")===R).map(S=>{let O=g.has(S.id)?g.get(S.id):q(p)[S.id];return{id:S.id,label:S.name,description:S.description,currentValue:O===void 0?"default":O?S.labels?.on??"enabled":S.labels?.off??"disabled",values:["default",S.labels?.off??"disabled",S.labels?.on??"enabled"]}})}},(h,w,m)=>{if(h==="modules")v.set(w,m);else if(w==="preset")b=F.find(T=>T.label===m)?.value;else if(d.some(T=>T.id===w)){let T=d.find(I=>I.id===w);x.set(w,m==="default"||m.length===0?void 0:T?.kind==="choice"?T.values.find(I=>I.label===m)?.value:m)}else g.set(w,m==="default"?void 0:m===(t.find(T=>T.id===w)?.labels?.on??"enabled"))},a,f);return{render:l(h=>u.render(h),"render"),invalidate:l(()=>u.invalidate(),"invalidate"),handleInput(h){u.handleInput(h),r.requestRender()}}})||v.size+g.size+x.size+(b===void 0?0:1)===0)return;if(await be(E,v,g,x,b),o.ui.notify(`Saved ${f.toLowerCase()} Agent IDE settings. Reload required.`,"info"),await o.ui.confirm("Reload Pi?","Reload extensions to apply settings. In-memory extension state may reset.")){await o.reload();return}}catch(f){o.ui.notify(f instanceof Error?f.message:String(f),"error")}}})}l(Ee,"registerModuleSettings");import{readFile as rt}from"node:fs/promises";import ee from"node:path";import{getMarkdownTheme as it}from"@earendil-works/pi-coding-agent";import{Markdown as at,matchesKey as $,ScrollView as lt,truncateToWidth as dt}from"@earendil-works/pi-tui";function ct(){return rt(ee.join(ee.dirname(ee.dirname(import.meta.dirname)),"docs/settings-help.md"),"utf8")}l(ct,"readSettingsHelp");function Ie(e){e.registerCommand("agent-ide-help",{description:"Read the short Agent IDE settings guide",async handler(t,d){if(!(d.mode!=="tui"||!d.hasUI))try{let i=await ct();await d.ui.custom((o,f,y,E)=>new te(i,f,()=>Math.max(5,Math.min(36,o.terminal.rows-4)),()=>o.requestRender(),E),{overlay:!0,overlayOptions:{width:92,margin:1}})}catch(i){d.ui.notify(i instanceof Error?i.message:String(i),"error")}}})}l(Ie,"registerSettingsHelp");var te=class{constructor(t,d,i,o,f){this.content=t;this.theme=d;this.height=i;this.requestRender=o;this.done=f;this.markdown=this.createMarkdown(),this.scroll=new lt(this.markdown)}static{l(this,"SettingsHelpPanel")}markdown;scroll;createMarkdown(){return new at(this.content,0,0,it(),{color:l(t=>this.theme.fg("text",t),"color")})}invalidate(){this.markdown.invalidate()}handleInput(t){if($(t,"escape")){this.done();return}$(t,"up")?this.scroll.scrollBy(-1):$(t,"down")?this.scroll.scrollBy(1):$(t,"pageUp")?this.scroll.scrollBy(-this.scroll.viewportHeight):$(t,"pageDown")||$(t,"space")?this.scroll.scrollBy(this.scroll.viewportHeight):$(t,"home")?this.scroll.scrollToStart():$(t,"end")&&this.scroll.scrollToEnd()}render(t){let d=Math.max(1,t-4),i=this.markdown.render(d),o=Math.max(1,this.height()-4);this.scroll.updateLayout(i.length,o,this.requestRender);let f=i.slice(this.scroll.scrollTop,this.scroll.scrollTop+o);for(;f.length<o;)f.push("");let y=this.theme.fg("border","\u2500".repeat(Math.max(0,t-2))),E=l(p=>this.theme.fg("border","\u2502 ")+dt(p,d,"\u2026",!0)+this.theme.fg("border"," \u2502"),"row");return[this.theme.fg("border","\u256D")+y+this.theme.fg("border","\u256E"),E(this.theme.fg("accent","Agent IDE settings help")),...f.map(E),E(this.theme.fg("muted","\u2191\u2193 scroll \xB7 PgUp/PgDn page \xB7 Home/End \xB7 Esc close")),this.theme.fg("border","\u2570")+y+this.theme.fg("border","\u256F")]}};function Se(e,t){let d=[];return{definitions:d,register(i){if(d.some(o=>o.id===i.id))throw new Error(`Duplicate feature flag: ${i.id}`);d.push(i),e.registerFlag(i.id,{type:"boolean",description:i.description,default:t[i.id]??i.default})}}}l(Se,"createFeatureFlags");function Te(e,t=V){return{id:"ide-settings",description:"Registered IDE settings, choices, defaults, configuration scopes and inheritance.",triggers:[{tool:"read",resourcePrefixes:["docs:ide-settings"]}],get markdown(){let d={preferences:t,flags:e,modules:D.map(({id:o,name:f,description:y,defaultEnabled:E,dependencies:p})=>({id:o,name:f,description:y,default:E!==!1,dependencies:p})),presets:F};return`# IDE settings
|
|
7
3
|
|
|
8
|
-
This catalog describes supported settings, not current saved values or live runtime state. It is generated from the registrations used by /agent-ide-settings. Read both configuration scopes to inspect overrides. Reload or restart applies
|
|
4
|
+
This catalog describes supported settings, not current saved values or live runtime state. It is generated from the registrations used by /agent-ide-settings. Read both configuration scopes to inspect overrides. Reload or restart applies module and startup-only changes; built-in CLI flags may override their saved defaults for an invocation.
|
|
9
5
|
|
|
10
6
|
## Configuration scopes
|
|
11
7
|
|
|
@@ -18,6 +14,8 @@ This catalog describes supported settings, not current saved values or live runt
|
|
|
18
14
|
- A module's default below is its built-in default before preset and dependency selection, not its current effective state.
|
|
19
15
|
- Existing noAnimations and noPostProcessing booleans still work. Their registered flags are pi-agent-ide-no-animations and pi-agent-ide-no-post-processing. Within each scope a flags entry wins over its corresponding legacy boolean. When changing or resetting that flag, remove its legacy boolean in the same scope, as the menu does.
|
|
20
16
|
- Text preference values are strings, not JSON numbers. An empty default means no override; saved strings must be non-empty. Read each description for valid ranges. Do not treat storage validation as validation of every preference value.
|
|
17
|
+
- External settings use these same scopes and storage maps. Their boolean registrations add menu controls, not CLI switches.
|
|
18
|
+
- YOLO skips existing operation confirmation dialogs only; safety checks and remote permissions remain in force. The common setting is pi-agent-ide-yolo. An explicit extension YOLO value wins; Default inherits the common setting. Remembered session permissions are separate from persistent YOLO settings. Saved YOLO values are read for each request and affect following operations without reloading; they do not remove session grants.
|
|
21
19
|
|
|
22
20
|
## Registered settings
|
|
23
21
|
|
|
@@ -25,48 +23,43 @@ Choices carry their saved value and human label. Text settings carry a descripti
|
|
|
25
23
|
|
|
26
24
|
\`\`\`json
|
|
27
25
|
{
|
|
28
|
-
${f}
|
|
26
|
+
${Object.entries(d).map(([o,f])=>` "${o}": [
|
|
27
|
+
${f.map(y=>` ${JSON.stringify(y)}`).join(`,
|
|
28
|
+
`)}
|
|
29
|
+
]`).join(`,
|
|
30
|
+
`)}
|
|
29
31
|
}
|
|
30
32
|
\`\`\`
|
|
31
|
-
`}}
|
|
32
|
-
`)}],details:void 0,isError:
|
|
33
|
+
`}}}l(Te,"createIdeSettingsDocumentation");function Ae(e){let t=new Map,d=new Set;return{api:{...e,registerTool:l(o=>{o.namespace?.name.startsWith("ide_")===!0&&t.set(o.name,{hide:l(()=>e.registerTool({...o,get description(){return o.description},get promptGuidelines(){return o.promptGuidelines},exposure:"hidden"}),"hide"),restore:l(()=>e.registerTool(o),"restore")}),d.has(o.name)?t.get(o.name)?.hide():e.registerTool(o)},"registerTool")},reconcile(o=!1,f=[],y=!1){let E=new Set,p=new Set;for(let b of e.getSettings().defaultTools??[])if(b.startsWith("-"))E.add(b.slice(1)),p.delete(b.slice(1));else{let s=b.startsWith("+")?b.slice(1):b;E.delete(s),p.add(s)}for(let[b,s]of t)E.has(b)!==d.has(b)&&(E.has(b)?(s.hide(),d.add(b)):(s.restore(),d.delete(b)));let A=e.getAllTools().filter(b=>b.exposure!=="hidden"),v=new Set(e.getActiveTools());for(let b of A)o&&!y&&t.has(b.name)&&(p.has(b.name)||b.exposure==="deferred"&&f.includes(b.name))&&v.add(b.name);o&&!E.has("tool_search")&&A.some(b=>b.name==="tool_search")&&A.some(b=>t.has(b.name)&&b.exposure==="deferred")&&v.add("tool_search");let g=e.getActiveTools(),x=[...v].filter(b=>!d.has(b));(x.length!==g.length||x.some(b=>!g.includes(b)))&&e.setActiveTools(x)}}}l(Ae,"createIdeToolAvailability");import{ToolExecutionComponent as Pe}from"@earendil-works/pi-coding-agent";import{Container as ne,Spacer as Ce,Text as z}from"@earendil-works/pi-tui";import{isDeepStrictEqual as ut}from"node:util";import{createCodemodeExtension as ft}from"@earendil-works/pi-coding-agent";function Re(e,t){let d=l(o=>{if(!o.startsWith("mcp__"))return;let f=e.getAllTools(),y=f.find(p=>p.name===o);if(!y||y.namespace||y.exposure==="hidden")return;let E=f.filter(p=>(t.has(p.name)&&p.namespace?.name.startsWith("ide_")===!0||p.name==="codemode"&&p.sourceInfo.source==="builtin"&&p.sourceInfo.path==="builtin:codemode")&&p.exposure!=="hidden"&&p.description===y.description&&ut(p.parameters,y.parameters));return E.length===1?E[0]?.name:void 0},"source"),i;return e.registerToolRenderer((o,f)=>{let y=d(o);return y!=="codemode"?y===void 0?f():t.get(y):(i||ft()({...e,registerTool:l(E=>{let{renderShell:p,renderCall:A,renderResult:v}=E;i={renderShell:p,renderCall:A,renderResult:v}},"registerTool")}),i??f())}),e.on("before_agent_start",()=>{for(let o of e.getAllTools()){let f=d(o.name),y=f===void 0?void 0:t.get(f);if(!y)continue;let E=Object.getOwnPropertyDescriptors(y);delete E.namespace,E.name={value:o.name,enumerable:!0,configurable:!0,writable:!0},E.exposure={value:o.exposure,enumerable:!0,configurable:!0,writable:!0};let p=l(async(v,g,x,b,s)=>{let{result:r,isError:n}=await s.executeTool(y.name,g,{signal:x,onUpdate:b}),{usage:c,...a}=r;return{...a,isError:n}},"execute");E.execute={value:p,enumerable:!0,configurable:!0,writable:!0};let A=Object.defineProperties({},E);e.registerTool(A)}}),d}l(Re,"registerIdeAliasCompatibility");var oe="ide-nested-results",ke=256,Oe=512*1024,Me=8*1024,pt=32*1024,gt=l(()=>({argumentsTruncated:!1,resultsOmitted:!1,callsOmitted:!1,resultsUnavailable:!1}),"retained");function _e(e){let t=e.retention,d=[t?.argumentsTruncated&&"arguments shortened",t?.resultsOmitted&&"result displays omitted",t?.callsOmitted&&"call panels omitted",t?.resultsUnavailable&&"results unavailable"].filter(Boolean);if(d.length>0)return`Nested IDE display: ${d.join("; ")}. Tool execution and parent output are unchanged.`;if(!t&&e.complete===!1)return"Nested IDE display is incomplete; omission details are unavailable."}l(_e,"retentionWarning");function mt(e){let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let d=Math.floor(t),i=Math.floor(d/60);return i<60?`${i}m ${d%60}s`:`${Math.floor(i/60)}h ${i%60}m ${d%60}s`}l(mt,"formatToolDuration");function De(e,t=!1){let d=new Map,i=Re(e,d),o=new Map,f=new Map,y=new Map,E,p=new WeakMap,A=new WeakMap,v=l(r=>{let n=d.get(r),c=n?.renderResult;if(!n||!c)return n;let a=A.get(n);if(!a){let u=new WeakMap;a={...n,renderResult(h,w,m,T){let I=T.lastComponent&&u.get(T.lastComponent),P=c.call(n,h,w,m,{...T,lastComponent:I??T.lastComponent});if(w.isPartial||T.durationMs===void 0)return P;let R=new ne;return R.addChild(P),R.addChild(new Ce(1)),R.addChild(new z(m.fg("muted",`Took ${mt(T.durationMs)}`),0,0)),u.set(R,P),R}},A.set(n,a)}return a},"timedDefinition"),g=l((r,n,c)=>{n.result=c,n.resultOmitted=!1;try{let u=JSON.stringify(r);if(Buffer.byteLength(u)<=Oe){n.result=JSON.parse(JSON.stringify(c));return}}catch{}let a=c.details&&typeof c.details=="object"?Object.entries(c.details).filter(([u,h])=>(u==="source"||u==="fullOutputPath")&&typeof h=="string").map(([u,h])=>`${u}: ${String(h)}`):[];n.result={content:[{type:"text",text:["Result presentation omitted (history size limit or unsupported payload).",...a].join(`
|
|
34
|
+
`)}],details:void 0,isError:c.isError},n.resultOmitted=!0},"retainResult"),x=l(()=>{o.clear(),f.clear(),y.clear()},"clear");e.on("session_start",(r,n)=>{x(),n.mode==="tui"&&n.ui.setWidget(oe,c=>(E=c,{render:l(()=>[],"render"),invalidate:l(()=>{},"invalidate")}))}),e.on("session_tree",x),e.on("session_shutdown",x),e.on("tool_execution_start",(r,n)=>{if(r.parentToolCallId===void 0){let I=i(r.toolName);I!==void 0&&o.set(r.toolCallId,I);return}let c=f.get(r.parentToolCallId)??r.parentToolCallId;if(f.set(r.toolCallId,c),o.get(c)===r.toolName||!d.has(r.toolName))return;let a=y.get(c);if(a||(a={parentToolCallId:c,cwd:n.cwd,calls:[],retention:gt()},y.set(c,a)),a.calls.length>=ke){a.retention.callsOmitted=!0;return}let u=JSON.stringify(r.args),h=pt-a.calls.reduce((I,P)=>I+Buffer.byteLength(JSON.stringify(P.args)),0)-(ke-a.calls.length-1)*2,w=Buffer.byteLength(u)>Math.min(Me,h),m=w?Object.fromEntries(Object.entries(r.args).map(([I,P])=>[I,typeof P=="string"?P.slice(0,200)+(P.length>200?"\u2026 [omitted]":""):"[omitted]"])):JSON.parse(u),T=Buffer.byteLength(JSON.stringify(m))<=Math.min(Me,h)?m:{};a.calls.push({id:r.toolCallId,name:r.toolName,args:T,argumentsTruncated:w})}),e.on("tool_execution_end",r=>{o.delete(r.toolCallId);let n=f.get(r.toolCallId);if(n===void 0)return;f.delete(r.toolCallId);let c=y.get(n),a=c?.calls.find(u=>u.id===r.toolCallId);if(c&&a){typeof r.durationMs=="number"&&Number.isFinite(r.durationMs)&&(a.durationMs=r.durationMs);let u=r.result;g(c,a,{content:u.content.filter(h=>h.type!=="text"||!h.text.startsWith(`
|
|
33
35
|
|
|
34
36
|
---
|
|
35
37
|
|
|
36
|
-
# Guide:`)),details:
|
|
37
|
-
${
|
|
38
|
-
`)}`}],details:void 0,isError:
|
|
39
|
-
`),y=o.join(""),E=
|
|
40
|
-
|
|
41
|
-
${b.notices.join(`
|
|
42
|
-
`)}`:"")},...b.images]);return g.set(t,{source:r,content:d}),d},"limitError");ne(e,{protocol:ee,apiVersion:te,id:"ide-output-retention",setup(t){t.setOutputSaver(o)}}),e.on("session_shutdown",()=>l.dispose());let m=u((t,a)=>{if(t==="message_end"){let c=a;return e.on("message_end",async(d,b)=>{let p=await c(d,b),w=p?.message??d.message;return w.role!=="toolResult"||!w.isError||!f.has(w.toolName)||w.content.some(I=>I.type==="text"&&I.text.startsWith("<system-result"))?p:{...p,message:{...w,content:await E(w.toolCallId,w.content)}}})}let r=a;return t!=="tool_call"?e.on(t,r):e.on("tool_call",async(c,d)=>{let b=await r(c,d);if(!b?.block||!f.has(c.toolName)||b.reason===void 0)return b;let p=await j([{type:"text",text:b.reason}],"",o);return{...b,reason:p.text+(p.notices.length?`
|
|
38
|
+
# Guide:`)),details:u.details,isError:r.isError})}}),e.on("message_end",r=>{if(r.message.role!=="toolResult")return;let n=y.get(r.message.toolCallId);if(!n)return;y.delete(r.message.toolCallId);for(let[h,w]of f)w===n.parentToolCallId&&f.delete(h);let c=n.calls.filter(h=>!h.batched),a={...n,parentToolName:r.message.toolName,calls:[],retention:{...n.retention,argumentsTruncated:c.some(h=>h.argumentsTruncated===!0),resultsOmitted:c.some(h=>h.resultOmitted===!0),resultsUnavailable:c.some(h=>!h.result)}},u=Buffer.byteLength(JSON.stringify(a));for(let h of c){let w=JSON.stringify(h);if(u+=Buffer.byteLength(w)+(a.calls.length>0?1:0),u>Oe){a.retention.callsOmitted=!0;break}a.calls.push(JSON.parse(w))}e.appendEntry(oe,a)}),e.registerEntryRenderer(oe,l(function r(n,c,a){if(!Array.isArray(n.data?.calls))return;let u=t&&n.data.parentToolName==="codemode"&&!c.expanded,h=u?n.data.calls.filter(I=>I.result?.isError):n.data.calls;if(u&&h.length===0){let I=_e(n.data);return I?new z(a.fg("warning",I),0,0):new ne}if(!E)return{render:l(I=>E?r(n,c,a)?.render(I)??[]:[],"render"),invalidate:l(()=>{n.data&&p.get(n.data)?.invalidate()},"invalidate")};let w=_e(n.data),m=u?void 0:p.get(n.data);if(!m){m=new ne;for(let I of h){let P=new Pe(I.name,I.id,I.renderArgs??I.args,{showImages:!0},I.resultOmitted||I.omitted||!I.result?void 0:v(I.name),E,n.data.cwd);I.result?P.updateResult({...I.result,...I.durationMs===void 0||I.groupedResult===!0?{}:{durationMs:I.durationMs}}):P.updateResult({content:[{type:"text",text:"Result unavailable in this saved display."}],isError:!0}),m.addChild(new Ce(1)),m.addChild(P)}w&&m.addChild(new z(a.fg("warning",w),0,0)),u||p.set(n.data,m)}let T=m.children.at(-1);w&&T instanceof z&&T.setText(a.fg("warning",w));for(let I of m.children)I instanceof Pe&&I.setExpanded(c.expanded);return m},"renderEntry"));let b=l(()=>{e.events.on(ye,r=>{let n=r,c=y.get(n.parentToolCallId);if(!c)return;let a=Z(n.result.details),u=n.calls.findLast(w=>!n.unchangedCopyCalls?.includes(w)),h="callIdsByResult"in a&&Array.isArray(a.callIdsByResult)?a.callIdsByResult:[];for(let w of n.calls){let m=c.calls.find(R=>R.id===w);if(!m)continue;let T=a.results?.filter((R,S)=>(h[S]===w||h.length===0&&n.calls.length===1)&&R.data.errors?.some(O=>O.code==="POST_WRITE_FAILED"||O.code==="POST_EDIT_FAILED"))??[];if(m.postWriteFailure=T.length>0,m.postWriteFailure){m.batched=!1,delete m.renderArgs,g(c,m,{content:n.result.content,details:{results:T,effect:"applied"},isError:!0});continue}let I=n.mutationResults?.get(w),P=I?.details.metadata?.copyRollback;if(m.name==="copy"&&I&&(P==="restored"||P==="failed")){m.copyRollback=P,m.batched=!1,g(c,m,{content:I.content,details:Z(I.details),isError:!0});continue}if(m.unchangedCopy=m.name==="copy"&&n.unchangedCopyCalls?.includes(w)===!0,m.batched=!m.unchangedCopy&&w!==u,m.groupedResult=!m.batched&&!m.unchangedCopy&&n.calls.filter(R=>!n.unchangedCopyCalls?.includes(R)).length>1,m.unchangedCopy)g(c,m,{content:[{type:"text",text:"No changes: destination already has this text."}],details:{},isError:!1});else if(m.batched)m.result=void 0;else{new Set(a.mutationRender?.map(S=>S.path)).size>1&&(m.renderArgs={}),m.rollback=a.results?.some(S=>S.data.rollback!==void 0)===!0;let R=m.result?.details?.metadata?.targetUnavailable;g(c,m,{content:n.result.content,details:typeof R=="string"?{...a,metadata:{...a.metadata,targetUnavailable:R}}:a,isError:n.result.isError===!0||m.rollback})}}}),e.on("tool_result",r=>{let n=r.details,c=y.get(r.toolCallId);if(c&&n&&typeof n=="object"&&"editorBatchResults"in n&&Array.isArray(n.editorBatchResults))for(let a of n.editorBatchResults)for(let u of a.data?.operations??[]){let h=c.calls.find(m=>m.id===u.id);if(!h)continue;let w=u.errors.map(m=>m.message);h.rollback||h.postWriteFailure||h.copyRollback!==void 0||h.unchangedCopy&&w.length===0&&u.effect==="not-applied"||(w.length>0||u.effect!=="applied")&&(h.batched=!1,delete h.renderArgs,g(c,h,{content:[{type:"text",text:`${h.name}: ${u.effect}.
|
|
39
|
+
${w.join(`
|
|
40
|
+
`)}`}],details:void 0,isError:w.length>0||u.effect==="unknown"}))}})},"finalize");return{api:{...e,registerTool:l(r=>{d.set(r.name,r),e.registerTool(r)},"registerTool")},finalize:b}}l(De,"createNestedIdeRendering");import{createHash as Et}from"node:crypto";import{createCanvas as ht,loadImage as yt}from"@napi-rs/canvas";import{DEFAULT_MAX_BYTES as bt,DEFAULT_MAX_LINES as wt,truncateHead as xt}from"@earendil-works/pi-coding-agent";var N={bytes:bt,lines:wt,pixels:4e6,images:20,imageBytes:20*1024*1024};async function L(e,t="",d){let i=typeof t=="string"?[t]:t,o=[],f=e.flatMap(n=>{if(n.type!=="text")return[];let c=i.find(a=>a.length>0&&n.text.endsWith(a));return c?(o.push(c),[n.text.slice(0,-c.length)]):[n.text]}).join(`
|
|
41
|
+
`),y=o.join(""),E=xt(f,{maxBytes:N.bytes,maxLines:N.lines}),p=[],A;if(E.truncated&&d!==void 0)try{A=await d(f)}catch{p.push("[Full output could not be saved. Narrow the request to inspect it.]")}E.truncated&&p.push(`[Output truncated: useful content is limited to ${N.bytes} bytes / ${N.lines} lines. Narrow the request or read a smaller source range.]`),A!==void 0&&p.push(`[Full output: ${JSON.stringify(A)}. Read with offset/limit, or read ${JSON.stringify("raw:"+A)} for byte ranges. Available until this runtime is disposed.]`);let v=e.filter(n=>n.type==="image"),g=v.slice(0,N.images),x=[],b=Math.floor(N.pixels/Math.max(1,g.length)),s=0,r=v.length-g.length;for(let[n,c]of g.entries())try{let a=Buffer.from(c.data,"base64"),u=await yt(a),h=Math.min(1,Math.sqrt(b/(u.width*u.height))),w=Math.min(b,Math.max(1,Math.floor(u.height*h))),m=Math.min(Math.floor(b/w),Math.max(1,Math.floor(u.width*h))),T=a,I=c.mimeType;if(h<1||s+T.byteLength>N.imageBytes){let P=ht(m,w);P.getContext("2d").drawImage(u,0,0,m,w),T=await P.encode("png"),I="image/png"}if(s+T.byteLength>N.imageBytes){r++;continue}s+=T.byteLength,x.push({type:"image",data:T.toString("base64"),mimeType:I}),h<1&&p.push(`[Image ${n+1} resized from ${u.width}x${u.height} to ${m}x${w} to fit the shared media budget.]`)}catch{r++,p.push(`[Image ${n+1} could not be decoded and was not returned.]`)}return r>0&&p.push(`[${r} images omitted from the result. Read fewer frames or a smaller image region.]`),{text:E.firstLineExceedsLimit?vt(f):E.content,textTruncated:E.truncated,images:x,notices:p,metadataSuffix:y,fullOutput:A}}l(L,"limitIdeOutput");function vt(e){let t=0,d=0;for(let i of e){let o=Buffer.byteLength(i);if(t+o>N.bytes)break;t+=o,d+=i.length}return e.slice(0,d)}l(vt,"bytePrefix");var je={type:"object",properties:{result:{type:"string",description:"Unchanged registered Search result. Pass this string to other tools to reuse its exact selection."},hasMatches:{anyOf:[{type:"boolean"},{type:"null"}],description:"Whether the original query reported matches, excluding spelling alternatives. Null means unknown. False proves absence only when complete is true."},complete:{anyOf:[{type:"boolean"},{type:"null"}],description:"Whether the search covered its requested scope, independent of display truncation. Null means unknown."}},required:["result","hasMatches","complete"],additionalProperties:!1};function $e(e,t){let d={result:t,hasMatches:null,complete:null};if(!Ne(e)||e.status!=="success"||!Ne(e.data))return d;let i=e.data,o=i.kind==="matches"?i.matches:i.kind==="files"?i.files:void 0;return!Array.isArray(o)||typeof i.complete!="boolean"?d:{result:t,hasMatches:o.length>0,complete:i.complete}}l($e,"searchFacts");function Ne(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}l(Ne,"record");var Be={read:["path"],search:["path"],select:["path"],replace:["path"],insert:["path"],delete:["path"],write:["path"],copy:["path","target"],move:["path","target"],undo:["file"],diff:["before","after"]},It=new Set(["write","replace","insert","delete","copy","move"]),St={anyOf:[{type:"string"},{type:"object",description:"Value returned by a resource provider, such as a computer action outcome.",additionalProperties:!0}]},Fe={type:"object",properties:{type:{const:"image"},data:{type:"string"},mimeType:{type:"string"},note:{type:"string"}},required:["type","data","mimeType","note"]},Tt={anyOf:[{type:"string"},Fe,{type:"object",description:"Several images, such as sequence frames, in source order.",properties:{type:{const:"images"},note:{type:"string"},images:{type:"array",items:{type:"object",properties:Fe.properties}}},required:["type","note","images"]}]};function At(e,t){let d=e.filter(o=>o.type==="image").map(({data:o,mimeType:f})=>({type:"image",data:o,mimeType:f}));if(d.length===0)return;let[i]=d;return d.length===1&&i!==void 0?{...i,note:t}:{type:"images",note:t,images:d}}l(At,"readValue");function Rt(e){let t=Y(e)?e.metadata:void 0,d=Y(t)?t.semanticAction:void 0,i=Y(d)?d.script:void 0;return Y(i)&&!Array.isArray(i)?i:void 0}l(Rt,"providerValue");function Y(e){return e!==null&&typeof e=="object"}l(Y,"record");function Le(e){let t=me(e),d=new Set,i=new ge,o=l(s=>i.saveFile(s),"saveFullOutput"),f=new Map,y=l(s=>Et("sha256").update(JSON.stringify(s)).digest("hex"),"signature"),E=l(async(s,r)=>{let n=y(r),c=f.get(s);if(c&&(c.source===n||y(await c.content)===n))return c.content;let a=L(r,"",o).then(u=>[{type:"text",text:u.text+(u.notices.length?`
|
|
43
42
|
|
|
44
|
-
${
|
|
45
|
-
`)}`:"")}})},"
|
|
43
|
+
${u.notices.join(`
|
|
44
|
+
`)}`:"")},...u.images]);return f.set(s,{source:n,content:a}),a},"limitError");pe(e,{protocol:ue,apiVersion:fe,id:"ide-output-retention",setup(s){s.setOutputSaver(o)}}),e.on("session_shutdown",()=>i.dispose());let p=l((s,r)=>{if(s==="message_end"){let c=r;return e.on("message_end",async(a,u)=>{let h=await c(a,u),w=h?.message??a.message;return w.role!=="toolResult"||!w.isError||!d.has(w.toolName)||w.content.some(m=>m.type==="text"&&m.text.startsWith("<system-result"))?h:{...h,message:{...w,content:await E(w.toolCallId,w.content)}}})}let n=r;return s!=="tool_call"?e.on(s,n):e.on("tool_call",async(c,a)=>{let u=await n(c,a);if(!u?.block||!d.has(c.toolName)||u.reason===void 0)return u;let h=await L([{type:"text",text:u.reason}],"",o);return{...u,reason:h.text+(h.notices.length?`
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
IDE
|
|
49
|
-
</ide_results>`})),e.on("tool_execution_start",t=>{t.parentToolCallId!==void 0&&x.set(t.toolCallId,x.get(t.parentToolCallId)??t.parentToolCallId)}),m("tool_call",(t,a)=>{if(!f.has(t.toolName))return;let r={...t.input};try{for(let c of Te[t.toolName]??[]){let d=r[c];if(d!==void 0)if(t.toolName==="diff"&&d!==null&&typeof d=="object"&&"path"in d)r[c]={...d,path:s.source(d.path,a.cwd,!0)};else{let b=s.source(d,a.cwd,t.toolName==="read"?!0:["write","insert","delete"].includes(t.toolName)?"live":!1);if(t.toolName==="read"&&Array.isArray(b)){let p=s.resolve(b,a.cwd);r[c]=s.register(p.targets,a.cwd,p.complete)}else r[c]=b}}t.toolName==="select"&&r.operation&&typeof r.operation=="object"&&"scopes"in r.operation&&(r.operation={...r.operation,scopes:s.source(r.operation.scopes,a.cwd)});for(let c of["text","content"]){let d=r[c];if(typeof d=="string"&&(d.trimStart().startsWith("<system-result")||/<system-result\b[^>]*><uuid>[a-f\d-]{36}<\/uuid><\/system-result>/iu.test(d)))return{block:!0,reason:"A system result reference is not file content. Do not insert it into a file."}}Object.assign(t.input,r)}catch(c){return{block:!0,reason:c instanceof Error?c.message:String(c)}}});let n=u(t=>{f.add(t.name);let a={},r=Object.getOwnPropertyDescriptors(t);delete r.outputSchema;let c=u(async(...p)=>{let w=await t.execute(...p).catch(async C=>{let P=await j([{type:"text",text:C instanceof Error?C.message:String(C)}],"",o);throw P.notices.length===0?C:new Error(P.text+`
|
|
46
|
+
${h.notices.join(`
|
|
47
|
+
`)}`:"")}})},"on"),A=new Map,v=new Map,g=l(()=>{A.clear(),v.clear(),f.clear()},"clear");e.on("session_start",g),e.on("session_shutdown",g),e.on("before_agent_start",s=>{s.systemPromptOptions.sections.ide_results="Direct IDE calls return readable text. In Codemode, Search returns { result, hasMatches, complete }; pass its result string to other tools for composition. An image Read returns an image block: show it with image(), pass it to models.classify() images, and pass its note string to other tools. Other text results remain strings. The leading system-result envelope is an internal reference, not file content; do not edit it. Compose tools by passing the unchanged result string to a source parameter. Outside Codemode, pass the same text or its UUID. Store/load preserves results within the session. Use returned anchors to choose individual selections. Changed snapshots and previous sessions cannot be reused."}),e.on("tool_execution_start",s=>{s.parentToolCallId!==void 0&&A.set(s.toolCallId,A.get(s.parentToolCallId)??s.parentToolCallId)}),p("tool_call",(s,r)=>{if(!d.has(s.toolName))return;let n={...s.input};try{for(let c of Be[s.toolName]??[]){let a=n[c];if(a!==void 0)if(s.toolName==="diff"&&a!==null&&typeof a=="object"&&"path"in a)n[c]={...a,path:t.source(a.path,r.cwd,!0)};else{let u=t.source(a,r.cwd,s.toolName==="read"?!0:["write","insert","delete"].includes(s.toolName)?"live":!1);if(s.toolName==="read"&&Array.isArray(u)){let h=t.resolve(u,r.cwd);n[c]=t.register(h.targets,r.cwd,h.complete)}else n[c]=u}}s.toolName==="select"&&n.operation&&typeof n.operation=="object"&&"scopes"in n.operation&&(n.operation={...n.operation,scopes:t.source(n.operation.scopes,r.cwd)});for(let c of["text","content"]){let a=n[c];if(typeof a=="string"&&(a.trimStart().startsWith("<system-result")||/<system-result\b[^>]*><uuid>[a-f\d-]{36}<\/uuid><\/system-result>/iu.test(a)))return{block:!0,reason:"A system result reference is not file content. Do not insert it into a file."}}Object.assign(s.input,n)}catch(c){return{block:!0,reason:c instanceof Error?c.message:String(c)}}});let x=l(s=>{d.add(s.name);let r={},n=Object.getOwnPropertyDescriptors(s);delete n.outputSchema,s.name==="search"&&(n.outputSchema={value:je,enumerable:!0,configurable:!0,writable:!0}),s.name==="read"&&(n.outputSchema={value:Tt,enumerable:!0,configurable:!0,writable:!0}),It.has(s.name)&&(n.outputSchema={value:St,enumerable:!0,configurable:!0,writable:!0});let c=l(async(...h)=>{let w=await s.execute(...h).catch(async I=>{let P=await L([{type:"text",text:I instanceof Error?I.message:String(I)}],"",o);throw P.notices.length===0?I:new Error(P.text+`
|
|
50
48
|
|
|
51
49
|
${P.notices.join(`
|
|
52
|
-
`)}`,{cause:
|
|
50
|
+
`)}`,{cause:I})}),m=await L(w.content,Ue(w.details),o),T=m.text+m.metadataSuffix;return{...w,content:[{type:"text",text:T+(m.notices.length?`
|
|
53
51
|
|
|
54
|
-
${
|
|
55
|
-
`)}`:"")},...
|
|
52
|
+
${m.notices.join(`
|
|
53
|
+
`)}`:"")},...m.images]}},"execute");n.execute={value:c,enumerable:!0,configurable:!0,writable:!0};let a=s.renderCall;if(a){let h=l((w,m,T)=>a(Pt(s.name,w),m,T),"renderCall");n.renderCall={value:h,enumerable:!0,configurable:!0,writable:!0}}let u=s.renderResult;if(u){let h=l((w,m,T,I)=>u({...w,content:w.content.map(P=>P.type==="text"?{...P,text:P.text.replace(/^<system-result\b[^>]*><uuid>[a-f\d-]{36}<\/uuid><\/system-result>\n/u,"")}:P)},m,T,I),"renderer");n.renderResult={value:h,enumerable:!0,configurable:!0,writable:!0}}Object.defineProperties(r,n),e.registerTool(r)},"registerTool"),b=l(()=>{e.on("context",async s=>({messages:await Promise.all(s.messages.map(async r=>r.role!=="toolResult"||!r.isError||!d.has(r.toolName)||r.content.some(n=>n.type==="text"&&n.text.startsWith("<system-result"))?r:{...r,content:await E(r.toolCallId,r.content)}))})),e.on("tool_result",async(s,r)=>{if(s.toolName==="codemode"){t.refreshAll();let S=new Set(s.content.flatMap(k=>k.type==="image"?[k.data]:[])),O=(v.get(s.toolCallId)??[]).filter(k=>!S.has(k.data));v.delete(s.toolCallId);for(let[k,X]of A)X===s.toolCallId&&A.delete(k);let M=s.content.filter(k=>k.type==="text"&&k.text.startsWith(`
|
|
56
54
|
|
|
57
55
|
---
|
|
58
56
|
|
|
59
|
-
# Guide:`)),
|
|
57
|
+
# Guide:`)),U=s.content.filter(k=>!M.includes(k)),_=await L([...U,...O],"",o);return{content:[..._.textTruncated?[{type:"text",text:_.text}]:U.filter(k=>k.type==="text"),..._.images,..._.notices.length?[{type:"text",text:`
|
|
60
58
|
|
|
61
59
|
${_.notices.join(`
|
|
62
|
-
`)}`}]:[],...
|
|
63
|
-
`),c=
|
|
60
|
+
`)}`}]:[],...M]}}if(!d.has(s.toolName))return;let n=s.content.filter(S=>S.type==="text").map(S=>S.text).join(`
|
|
61
|
+
`),c=s.structuredContent,a=c!==null&&typeof c=="object"&&"data"in c?c:{status:s.isError?"error":"success",data:c},u=a.data,h=u!==null&&typeof u=="object"&&"effect"in u&&u.effect==="applied"&&"targetUnavailable"in u&&typeof u.targetUnavailable=="string"?u.targetUnavailable:void 0,w=h===void 0?n:`${n}
|
|
64
62
|
|
|
65
|
-
This result has no verified text selection: ${
|
|
66
|
-
Read/Search the file before the next edit; do not repeat the applied edit.`,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<ide_discovery>
|
|
70
|
-
${a.join(`
|
|
71
|
-
`)}
|
|
72
|
-
</ide_discovery>`;return r===x.systemPrompt?void 0:{systemPrompt:r}});let y=ge(e,{"pi-agent-ide-no-animations":s.noAnimations??!1,"pi-agent-ide-no-post-processing":s.noPostProcessing??!1,...s.flags});y.register({id:"pi-agent-ide-developer-mode",name:"Developer mode",description:"Enable development commands, including manual setup-hint previews.",default:!1}),y.register({id:"pi-agent-ide-no-animations",name:"Static edit previews",group:"ui",description:"Show edit results immediately, without animated playback.",default:!1}),y.register({id:"pi-agent-ide-no-post-processing",name:"Skip automatic post-processing",description:"Skip automatic formatting and diagnostics after edits. Explicit diagnostic reads still work.",default:!1}),y.register({id:"pi-agent-ide-vision-arbitrary-windows",name:"Capture arbitrary windows",description:"Allow window:PID capture for processes not owned by Agent IDE. Keep disabled unless the agent may inspect other desktop apps.",default:!1}),y.register({id:"pi-agent-ide-vision-displays",name:"Capture full displays",description:"Allow display screenshots through display: and display:#N resources. Keep disabled unless the agent may inspect the full desktop.",default:!1}),y.register({id:"pi-agent-ide-no-diagnostic-buffer",name:"Immediate diagnostic notices",description:"Send findings immediately instead of combining reports received over five seconds.",group:"ui",default:!1}),y.register({id:"pi-agent-ide-code-review",name:"Jev code review",description:"Review saved edit fragments against project YAML rules in the background. Sends code to a connected Jev provider.",default:!1}),y.register({id:"pi-agent-ide-code-review-capture",name:"Capture code-review rules",description:"Use the packaged skill to propose reusable rules from user review feedback. Save only after confirmation.",default:!1}),fe(e,y.definitions,G),pe(e),Z(e,[me(y.definitions)]);let E=B(N,s.preset??"full"),{enabled:m}=q(N,[...E,...s.disabled],s.enabled);for(let x of m)await x.register(g.api,{preferences:s.preferences??{}});l.finalize(),o.finalize()}u(it,"registerUnifiedPiAgentIde");export{it as default};
|
|
63
|
+
This result has no verified text selection: ${h}
|
|
64
|
+
Read/Search the file before the next edit; do not repeat the applied edit.`,m=We(a),T=t.publish(a,w,r.cwd,m),I=!s.isError&&a.status!=="error",P=s.toolName==="search"&&I?$e(a,T):s.toolName==="read"?I?At(s.content,T):void 0:Rt(s.details),R=A.get(s.toolCallId);if(A.delete(s.toolCallId),R!==void 0){let S=s.content.filter(O=>O.type==="image");S.length&&v.set(R,[...v.get(R)??[],...S])}return{content:[{type:"text",text:T},...s.content.filter(S=>S.type!=="text")],...P!==void 0&&{structuredContent:P}}})},"finalize");return{api:{...e,on:p,registerTool:x},finalize:b}}l(Le,"createIdeTextResults");function Ue(e){if(e===null||typeof e!="object")return[];let t="outputNotice"in e&&typeof e.outputNotice=="string"?[e.outputNotice]:[];if("resources"in e&&Array.isArray(e.resources)){let d=e.resources;for(let i of d)i!==null&&typeof i=="object"&&"details"in i&&t.push(...Ue(i.details))}return t}l(Ue,"outputNotices");function Pt(e,t){let d=l(o=>{if(Array.isArray(o))return o.map(d);if(typeof o!="string")return o;let f=/^<system-result\b[^>]*><uuid>([a-f\d-]{36})<\/uuid>/u.exec(o)?.[1];return f?`RESULT#${f}`:o},"label"),i={...t};for(let o of Be[e]??[])Object.assign(i,{[o]:d(t[o])});return i}l(Pt,"displaySources");function We(e){if(e===null||typeof e!="object"||!("data"in e))return[];let t=e.data;return t===null||typeof t!="object"?[]:"resources"in t&&Array.isArray(t.resources)?t.resources.flatMap(i=>We({data:i})):"files"in t&&Array.isArray(t.files)?t.files.flatMap(i=>i!==null&&typeof i=="object"&&"source"in i&&typeof i.source=="string"&&/^(?:shell|debug):/u.test(i.source)?[i.source]:[]):"source"in t&&typeof t.source=="string"?[t.source]:[]}l(We,"resultResources");function qe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}l(qe,"isRecord");function Ge(e,t){if(!qe(e)||!Array.isArray(e.tools))return e;let d=e.tools,i=d.map(o=>!qe(o)||o.type!=="function"||typeof o.name!="string"||!t.has(o.name)||o.strict!==void 0?o:{...o,strict:!1});return i.some((o,f)=>o!==d[f])?{...e,tools:i}:e}l(Ge,"preserveResponsesToolOmission");function Ve(e,t,d){let i=new Map,o=[],f=[];function y(v,g){le(v,g);for(let x of g){let b=i.get(x.id);if(b)throw new Error(`Setting ${x.id} is already registered by ${b.owner}`)}for(let x of g)if(i.set(x.id,{owner:v,definition:x}),x.kind==="boolean"){let{kind:b,group:s,...r}=x;o.push({...r,...s==="ui"?{group:s}:{}})}else f.push({...x,group:x.group??"features"})}l(y,"register"),y("pi-agent-ide",[...t.map(v=>({...v,kind:"boolean"})),...d]);async function E(v,g){let x=i.get(v)?.definition;if(!x)throw new Error(`Unknown Agent IDE setting: ${v}`);let b=B(process.env,void 0,g),[s,r]=await Promise.all([j(b.globalPath),j(b.projectPath)]),n=x.kind==="boolean"?{...q(s),...q(r)}:{...s.preferences,...r.preferences},c=Object.hasOwn(n,v),a=c?n[v]:x.default;if(a===void 0||(x.kind==="boolean"?typeof a!="boolean":typeof a!="string"))throw new Error(`Invalid saved setting type: ${v}`);if(x.kind==="choice"&&!x.values.some(u=>u.value===a))throw new Error(`Invalid saved setting choice: ${v}`);return{value:a,overridden:c}}l(E,"read");let p=e.events.on(re,v=>{let g=v;try{y(g.owner,g.definitions),g.accept()}catch(x){g.accept(x instanceof Error?x:new Error(String(x)))}}),A=e.events.on(ie,v=>{let g=v;g.accept(E(g.id,g.cwd))});return e.on("session_shutdown",()=>{p(),A()}),e.events.emit(ae,void 0),{flags:o,preferences:f,read:E}}l(Ve,"createAgentIdeSettingsRegistry");import{VERSION as Ye}from"@earendil-works/pi-coding-agent";import{getCurrentTools as Ct}from"@earendil-works/pi-ai";function Je(e){let t=/^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/u.exec(e);if(t===null||se(t,[0,99,1])<0||ze(t,[0,99,1]))throw new Error(`Pi Agent IDE requires Pi 0.99.1 or newer; this host is ${e}. Update Pi before loading the extension.`)}l(Je,"assertSupportedHost");function He(e){let t=/^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?/u.exec(e);return t!==null&&se(t,[1,3,0])>=0&&!ze(t,[1,3,0])}l(He,"hostOwnsToolLoadout");function se(e,t){return e.slice(1,4).map((d,i)=>Number(d)-(t[i]??0)).find(d=>d!==0)??0}l(se,"compareVersion");function ze(e,t){return se(e,t)===0&&e[4]!==void 0}l(ze,"isPrereleaseOf");async function kt(e){Je(Ye);let t=await he(B()),d=t.preferences?.["ui.codemode"]!=="on",i=De(e,d),o=Le(i.api),f=Ae(o.api);e.on("before_provider_request",(v,g)=>{if(g.model?.api!=="openai-responses")return;let x=new Set(e.getAllTools().filter(b=>b.namespace?.name.startsWith("ide_")).map(b=>b.name));return Ge(v.payload,x)}),e.on("session_start",(v,g)=>{if(He(Ye)){f.reconcile(!0,[],!0);return}let x=v.reason==="reload"?[]:Ct(g.sessionManager.getBranch().flatMap(b=>b.type==="message"?[b.message]:[])).map(b=>b.name);f.reconcile(!0,x)}),e.on("before_agent_start",v=>{f.reconcile();let g=v.systemPromptOptions;g.toolSnippets.bash&&(g.toolSnippets.bash=g.toolSnippets.bash.replace("Execute bash commands (ls, grep, find, etc.)","Execute Bash commands"));let x=/^<rules>\n([\s\S]*?)\n<\/rules>$/mu.exec(v.systemPrompt)?.[1];x?.includes("- Use bash for file operations like ls, rg, find")&&(g.sections.rules=x.replace(/(?:^|\n)- Use bash for file operations like ls, rg, find(?=\n|$)/u,"").trim());let b=e.getAllTools().filter(a=>a.exposure!=="hidden"),s=e.getActiveTools(),r=s.includes("tool_search")?"Use tool_search to find":s.includes("codemode")?"Use searchTools inside codemode to find":"Enable native tool_search to find",n=b.filter(a=>a.namespace?.name==="ide_git").map(a=>a.name),c=[...n.length===0?[]:[`${r} ${n.join(" and ")} in ide_git when staging or unstaging selected Git changes.`],...b.some(a=>a.name==="debug"&&a.namespace?.name==="ide_debug")?[`${r} debug in ide_debug when creating a debugger session.`]:[]];g.sections.ide_discovery=c.join(`
|
|
65
|
+
`)});let y=Se(e,{"pi-agent-ide-no-animations":t.noAnimations??!1,"pi-agent-ide-no-post-processing":t.noPostProcessing??!1,...t.flags});y.register({id:"pi-agent-ide-developer-mode",name:"Developer mode",description:"Enable development commands, including manual setup-hint previews.",default:!1}),y.register({id:"pi-agent-ide-no-animations",name:"Static edit previews",group:"ui",description:"Show edit results immediately, without animated playback.",default:!1}),y.register({id:"pi-agent-ide-no-post-processing",name:"Skip automatic post-processing",description:"Skip automatic formatting and diagnostics after edits. Explicit diagnostic reads still work.",default:!1}),y.register({id:"pi-agent-ide-vision-arbitrary-windows",name:"Capture arbitrary windows",description:"Allow window:PID capture for processes not owned by Agent IDE. Keep disabled unless the agent may inspect other desktop apps.",default:!1}),y.register({id:"pi-agent-ide-vision-displays",name:"Capture full displays",description:"Allow display screenshots through display: and display:#N resources. Keep disabled unless the agent may inspect the full desktop.",default:!1}),y.register({id:"pi-agent-ide-no-diagnostic-buffer",name:"Immediate diagnostic notices",description:"Send findings immediately instead of combining reports received over five seconds.",group:"ui",default:!1}),y.register({id:"pi-agent-ide-code-review",name:"Jev code review",description:"Review saved edit fragments against project YAML rules in the background. Sends code to a connected Jev provider.",default:!1}),y.register({id:"pi-agent-ide-code-review-capture",name:"Capture code-review rules",description:"Use the packaged skill to propose reusable rules from user review feedback. Save only after confirmation.",default:!1});let E=Ve(e,[...y.definitions,{id:"pi-agent-ide-yolo",name:"YOLO: allow all operations",description:"Skip existing operation confirmation dialogs unless an extension explicitly disables its YOLO setting. Safety checks and remote permissions still apply.",default:!1,labels:{on:"on",off:"off"}},{id:"pi-agent-ide-filesystem-yolo",name:"YOLO: filesystem operations",description:"Skip filesystem operation confirmations. Default inherits common YOLO; Off disables persistent permission, not remembered session grants. Protected paths stay protected.",default:!1,labels:{on:"on",off:"off"}}],V);de(e,{async isAllowed(v,g){if(v.yoloSetting===void 0)return!1;let x=await K(e.events,v.yoloSetting,g.cwd);if(typeof x.value!="boolean")throw new Error(`Operation approval needs a boolean YOLO setting: ${v.yoloSetting}`);return x.overridden?x.value:(await K(e.events,"pi-agent-ide-yolo",g.cwd)).value===!0}}),Ee(e,E.flags,E.preferences),Ie(e),ce(e,[Te(E.flags,E.preferences)]);let p=W(D,t.preset??"full"),{enabled:A}=J(D,[...p,...t.disabled],t.enabled);for(let v of A)await v.register(f.api,{preferences:t.preferences??{}});i.finalize(),o.finalize()}l(kt,"registerUnifiedPiAgentIde");export{kt as default};
|
|
@@ -4,4 +4,6 @@ Create a session with `debug`, then read the returned `debug:<session>` resource
|
|
|
4
4
|
|
|
5
5
|
Read stopped state before the next action. Use `views: ["breakpoints"]` when breakpoint locations matter. Delete the returned breakpoint resource to remove that breakpoint. Delete the session resource to terminate it. Debug resources survive extension reloads, but program files and anchors may change, so re-read before acting.
|
|
6
6
|
|
|
7
|
+
A session reporting adapter `vscode` runs in the user's VS Code window through DebugMCP; the same resources and actions apply. Its breakpoints and debug session are visible to the user. It shows aggregate values as `<complex value>`; evaluate an expression that formats the value, such as `repr(items)` in Python, to read it. Use `configuration` to launch a `.vscode/launch.json` entry when the program needs arguments or environment or is a compiled executable, and `test` to debug one test. Pass `backend: "native"` with an `adapter` to keep debugging outside VS Code. If `backend: "vscode"` fails, its error names the unmet condition; open the workspace in VS Code or use the native backend.
|
|
8
|
+
|
|
7
9
|
Use an SSH `cwd` to create a target-owned session. Relative program and source paths resolve on that workspace; returned source files and frames keep canonical SSH identities. Launch needs the selected native adapter on the target. Unsupported target recipes fail without using a controller adapter. Delete the session to stop its owned transport; do not signal a target PID as if it were local.
|
|
@@ -16,13 +16,13 @@ Use a returned anchor when it identifies the intended text. Otherwise use the sm
|
|
|
16
16
|
|
|
17
17
|
With `end`, the operation covers complete lines from the first line containing `start` through the last line containing `end`, inclusive. Without `end`, an exact string selects just that fragment.
|
|
18
18
|
|
|
19
|
-
After an exact-text selector fails, exact-text edits are blocked for that file. Find the intended location among the returned current anchors, or use Read/Search for another section. Edit with its anchor. After that edit succeeds, exact text is available again. Do not retry a guessed string.
|
|
19
|
+
After an exact-text selector fails, exact-text edits are blocked for that file, except for Copy destination selectors (`targetStart` and `targetEnd`). Find the intended location among the returned current anchors, or use Read/Search for another section. Edit with its anchor. After that edit succeeds, exact text is available again. Do not retry a guessed string.
|
|
20
20
|
|
|
21
21
|
Re-read after a mutation before reusing line, scope, or individual Search anchors. Complete `SEARCH#...:all` selections retain their existing query-refresh behavior.
|
|
22
22
|
|
|
23
23
|
## Compose results
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Direct results are readable text with a leading system-result envelope. In Codemode, Search returns facts and a `result` string. An image Read returns an image block `{ type: "image", data, mimeType, note }`, or `{ type: "images", note, images }` for several frames; show it with `image()` and pass its `note` string to other tools. Other text results remain strings. The envelope is an internal reference, not file content. Do not edit it or write it into a file. Pass the unchanged result string to another source parameter; outside Codemode you can also pass its UUID. Store/load keeps results in the current session. Read `docs:search-code` for the Search facts.
|
|
26
26
|
|
|
27
27
|
Read results select their requested source windows. Search results select exact matches. Select derives new boundaries. A displayed item reference selects that item; the whole result retains all selections, including those omitted from its preview.
|
|
28
28
|
|
|
@@ -55,7 +55,7 @@ Independent calls share the original snapshots. Combine overlapping edits into o
|
|
|
55
55
|
|
|
56
56
|
An omitted path can inherit the file identified by an anchor, the last read, or the preceding edit in the batch. Supply the path when that would be ambiguous.
|
|
57
57
|
|
|
58
|
-
An ordinary `delete.path` without selectors deletes a whole file, directory, or symlink. Directory and link deletion applies Git protection and
|
|
58
|
+
An ordinary `delete.path` without selectors deletes a whole file, directory, or symlink. Directory and link deletion applies Git protection and the shared host permission policy. User-configured YOLO or a remembered session grant can skip its dialog; no tool argument supplies approval. Protected paths, hooks and target revalidation still apply. Without UI, gated operations fail closed unless YOLO or a session grant permits them. Read `docs:ide-settings` when the user asks to change confirmation settings. Links are unlinked without following their targets. A result input removes only selected text. Ordinary copy/move paths without selectors transfer whole regular files and replace an existing regular destination file.
|
|
59
59
|
|
|
60
60
|
Inside Codemode, await independent edits on disjoint resources concurrently and overlapping resources in order. Pass a pending edit result directly to another source tool for dependent work; that boundary commits the batch before consuming the result.
|
|
61
61
|
|
|
@@ -18,7 +18,7 @@ If the extra branch reports a budget skip, narrow `path` rather than treating th
|
|
|
18
18
|
|
|
19
19
|
## Search resources
|
|
20
20
|
|
|
21
|
-
Search returns readable matches and references in direct calls
|
|
21
|
+
Search returns readable matches and references in direct calls. In Codemode it returns `{ result, hasMatches, complete }`. Pass `result` to other tools to reuse the issued selection, or print it for the readable output. `hasMatches` reports original matches, not spelling alternatives. `complete` reports query coverage, not display truncation. Either fact is `null` when the provider does not report it. Treat `hasMatches: false` as proof of absence only when `complete: true`. An empty successful search is not an error.
|
|
22
22
|
|
|
23
23
|
If Search fails, fix the reported input, scope or provider problem before retrying. Keep the intended search scope; do not treat the failure as zero matches.
|
|
24
24
|
|
|
@@ -52,7 +52,7 @@ Use the displayed `capture NAME: RESULT#...` reference to Search or edit a captu
|
|
|
52
52
|
```js
|
|
53
53
|
const window = await tools.read({ path: "client.ts", offset: 10, limit: 4 });
|
|
54
54
|
const calls = await tools.search({ path: window, query: "ast:request($OPTIONS)" });
|
|
55
|
-
text(calls);
|
|
55
|
+
text(calls.result);
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
Use its displayed OPTIONS reference in the next call. Store/load keeps these result strings across Codemode scripts within the same session.
|
|
@@ -55,11 +55,14 @@ An absent optional part produces no selection. An unsupported part reports avail
|
|
|
55
55
|
|
|
56
56
|
```js
|
|
57
57
|
const found = await tools.search({ path: "client.ts", query: "ast:send($$$ARGS)" });
|
|
58
|
-
const call = await tools.select({
|
|
58
|
+
const call = await tools.select({
|
|
59
|
+
path: found.result,
|
|
60
|
+
operation: { kind: "object", object: "call" },
|
|
61
|
+
});
|
|
59
62
|
const args = await tools.select({ path: call, operation: { kind: "part", part: "arguments" } });
|
|
60
63
|
text(await tools.read({ path: args }));
|
|
61
64
|
const number = await tools.search({ path: args, query: "10" });
|
|
62
|
-
await tools.replace({ path: number, text: "20" });
|
|
65
|
+
await tools.replace({ path: number.result, text: "20" });
|
|
63
66
|
```
|
|
64
67
|
|
|
65
68
|
### List element extents
|
|
@@ -100,13 +103,13 @@ Repeat the operation after interruption. Do not treat cancellation as an empty r
|
|
|
100
103
|
|
|
101
104
|
```js
|
|
102
105
|
const candidates = await tools.search({ path: "notes.txt", query: "regex:<[^>]+>" });
|
|
103
|
-
const protectedText = await tools.search({ path: candidates, query: "KEEP" });
|
|
106
|
+
const protectedText = await tools.search({ path: candidates.result, query: "KEEP" });
|
|
104
107
|
const editable = await tools.select({
|
|
105
|
-
path: candidates,
|
|
106
|
-
operation: { kind: "difference", scopes: protectedText },
|
|
108
|
+
path: candidates.result,
|
|
109
|
+
operation: { kind: "difference", scopes: protectedText.result },
|
|
107
110
|
});
|
|
108
111
|
const found = await tools.search({ path: editable, query: "old" });
|
|
109
|
-
await tools.replace({ path: found, text: "new" });
|
|
112
|
+
await tools.replace({ path: found.result, text: "new" });
|
|
110
113
|
```
|
|
111
114
|
|
|
112
115
|
## Composition limits
|
package/docs/code-review.md
CHANGED
|
@@ -79,6 +79,11 @@ The background message names the file, snapshot, provider/model, rule and inspec
|
|
|
79
79
|
Expand it to read the evidence. Findings can wake an idle agent, like ordinary diagnostics.
|
|
80
80
|
Unavailable and insufficient-context notices do not start a new turn by themselves.
|
|
81
81
|
|
|
82
|
+
In fullscreen Activity, delayed feedback appears beside the edit that saved the checked
|
|
83
|
+
version, including the outer Codemode call for nested edits. It is not repeated in
|
|
84
|
+
Conversation. A newer edit cannot take ownership of an older review; superseded work
|
|
85
|
+
is discarded. Feedback without a recorded tool owner keeps the ordinary message fallback.
|
|
86
|
+
|
|
82
87
|
No generated explanation is attributed to Jev. No findings does not mean the code passed
|
|
83
88
|
a complete review. Provider failures never undo edits or suppress regular diagnostics.
|
|
84
89
|
|
package/docs/configuration.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
Open `/agent-ide-settings` inside Pi and choose Project or Global. The Features tab lists human-readable module names and descriptions. The Behavior tab lists registered behavior options, including boolean switches and editable text values. Tab switches tabs; typing filters the current list. Enter changes an override, Ctrl+S saves, and Esc cancels.
|
|
6
6
|
|
|
7
|
-
Default removes the selected scope’s override. Module descriptions show effective state and dependency restrictions. Feature values in project settings override global values. Saving offers a reload
|
|
7
|
+
Default removes the selected scope’s override. Module descriptions show effective state and dependency restrictions. Feature values in project settings override global values. Saving offers a reload for startup-only settings. YOLO policy reads saved values for each request, so its changes affect following operations without reload. The command stays available even when every optional module is disabled.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Boolean overrides are stored under `flags` in `extensions.json`, keyed by their registered setting ID. Choice and text values are stored under `preferences`. External settings use the same menu and scopes but do not add CLI switches. Existing `noAnimations` and `noPostProcessing` fields still work; changing the corresponding feature in the menu replaces that field with its flag override.
|
|
10
10
|
|
|
11
11
|
Agent Vision adds separate opt-ins for **Capture arbitrary windows** and **Capture full displays**. Both default to off. Its text settings control the default sequence duration, frame interval, image scale, and a comma-separated list of exact executable file names that may be captured without arbitrary-window access. Press Enter to edit a text value, Enter again to commit it, then Ctrl+S to save.
|
|
12
12
|
|
|
@@ -16,15 +16,31 @@ The UI tab contains separate presentation settings for diffs, Read, Search, and
|
|
|
16
16
|
|
|
17
17
|
All user-configurable presentation and behavior preferences belong in Agent IDE settings. New options must carry a human name, explanation and default in their registration. Presentation options belong in the UI tab.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Built-in boolean options that need a Pi CLI flag use `createFeatureFlags().register` with an ID, human name, description and default. External extensions use the [public settings API](extensions.md#settings) for boolean, choice and text settings; no separate menu entry or storage implementation is needed.
|
|
20
20
|
|
|
21
21
|
Obsolete IDs in `disabled` are ignored. They do not stop IDE startup. Malformed configuration and unknown IDs in `enabled` still report configuration errors.
|
|
22
22
|
|
|
23
23
|
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.
|
|
24
24
|
|
|
25
|
+
## Operation confirmations and YOLO
|
|
26
|
+
|
|
27
|
+
Open `/agent-ide-settings`, choose Project or Global, and find the YOLO controls in the Behavior tab:
|
|
28
|
+
|
|
29
|
+
- **YOLO: allow all operations** (`pi-agent-ide-yolo`) skips existing operation dialogs from participating extensions.
|
|
30
|
+
- **YOLO: filesystem operations** (`pi-agent-ide-filesystem-yolo`) controls filesystem dialogs separately.
|
|
31
|
+
- Loaded extensions can register their own controls, including GitHub and Linear YOLO.
|
|
32
|
+
|
|
33
|
+
These YOLO settings default to Off. Project overrides Global for each key. An explicit extension On or Off wins over the common setting. Default removes only the selected scope's override: it inherits an extension value from the lower scope, if present, then the common YOLO setting. Set the filesystem override to Off to disable its persistent permission even when common YOLO is On; a remembered session grant still applies. Save with Ctrl+S; the menu offers a reload.
|
|
34
|
+
|
|
35
|
+
A required operation dialog offers **Deny**, **Allow once**, and **Allow for session**, and points to `/agent-ide-settings`. Deny or dismissal leaves the operation unapplied. Allow once covers only the current request. Allow for session covers later requests with the same extension owner and dialog category, including other targets. It is available when the host can store session entries.
|
|
36
|
+
|
|
37
|
+
Session grants survive `/reload` and reopening the saved Pi session. They follow its current branch; a new independent session or a branch without the grant asks again. Turning YOLO Off does not remove a remembered session grant.
|
|
38
|
+
|
|
39
|
+
YOLO and session grants skip confirmation only. Protected paths, hooks, target revalidation and remote authorization still apply. Without UI, an operation that needs confirmation is refused unless YOLO or a session grant permits it. YOLO does not add approval gates to previously ungated routes.
|
|
40
|
+
|
|
25
41
|
## Agent-assisted settings
|
|
26
42
|
|
|
27
|
-
Ask the agent to explain Pi Agent IDE or configure it for your tasks. For example: “Help me configure Pi Agent IDE for my workflow.” You can also run `/skill:configure-agent-ide` with your request. For an explanation, the agent describes the relevant settings without changing them. Before making changes, it asks whether to use Project or Global scope unless you already specified it. The shipped skill reads the registered `docs:ide-settings` catalog and both saved scopes before changing only the agreed settings. Default restores inheritance;
|
|
43
|
+
Ask the agent to explain Pi Agent IDE or configure it for your tasks. For example: “Help me configure Pi Agent IDE for my workflow.” You can also run `/skill:configure-agent-ide` with your request. For an explanation, the agent describes the relevant settings without changing them. Before making changes, it asks whether to use Project or Global scope unless you already specified it. The shipped skill reads the registered `docs:ide-settings` catalog and both saved scopes before changing only the agreed settings. Default restores inheritance. Saved YOLO changes affect following operations; startup-only changes need reload or restart.
|
|
28
44
|
|
|
29
45
|
The catalog lists supported settings and defaults, not current effective values. When documentation is disabled, the skill can inspect the installed configuration guide and registrations without enabling unrelated modules.
|
|
30
46
|
|
|
@@ -119,6 +135,8 @@ Standalone editing tools validate source snapshots before writing. Native Codemo
|
|
|
119
135
|
|
|
120
136
|
Automatic diagnostic findings are grouped for five seconds from the first finding. The UI tab’s **Immediate diagnostic notices** option (`pi-agent-ide-no-diagnostic-buffer`) disables this delay. Combined notices keep each file and reporting tool identifiable. Empty completed diagnostic reads tell the agent that checks finished without findings, but do not draw an empty diagnostic panel. Pending, unavailable and incomplete checks are not reported as clean.
|
|
121
137
|
|
|
138
|
+
Late diagnostic summaries retain the tool call that produced the checked file version, when known. Split-history extensions can place them beside that call without making edits wait or rewriting completed tool results. A buffered agent notification can cover several calls; the visible summaries keep those owners separate.
|
|
139
|
+
|
|
122
140
|
Start Pi with either or both flags:
|
|
123
141
|
|
|
124
142
|
```sh
|
|
@@ -215,6 +233,20 @@ Regex diagnostic parsers run with multiline matching. Set `columnBase: 0` when a
|
|
|
215
233
|
|
|
216
234
|
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.
|
|
217
235
|
|
|
236
|
+
## VS Code debugger
|
|
237
|
+
|
|
238
|
+
When the project is open in VS Code, `debug` can run the session there through Microsoft's [DebugMCP](https://github.com/microsoft/DebugMCP) extension. You see the session and its breakpoints in VS Code, and VS Code chooses the debugger from `launch.json` or the file type. Install the extension yourself:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
code --install-extension ozzafar.debugmcpextension
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
The default `backend: "auto"` uses VS Code only when a VS Code window with DebugMCP has the local project open, that window has no active debug session, and the call passes no `args` or `mainClass`. Otherwise it uses the native adapter. `backend: "vscode"` fails with the reason instead of falling back, and `backend: "native"` never uses VS Code. Pass program arguments or environment through a `launch.json` configuration named in `configuration`, or debug one test with `test`. VS Code picks a debugger from a source file's type, so a compiled executable such as an `.exe` always needs a `configuration`, for example a `cppvsdbg` or `cppdbg` entry. The debugger extension that configuration uses must be installed in the VS Code profile of that window; if VS Code does not start the session within 60 seconds, `start` fails with that hint and the session can be started again.
|
|
245
|
+
|
|
246
|
+
Pi stops only the VS Code session it started and removes only the breakpoints it added; a breakpoint you already set at the same line is reused and kept. DebugMCP listens on port 3001. If you changed `debugmcp.serverPort`, set `PI_DEBUGMCP_PORT` to the same port before starting Pi. Doctor reports whether the VS Code backend is available.
|
|
247
|
+
|
|
248
|
+
In remote VS Code windows such as Remote-WSL, DebugMCP does not report the stopped frame's file. Pi then takes it from its breakpoint on that line or from the previous stop in the same function, and otherwise shows only the function and line.
|
|
249
|
+
|
|
218
250
|
## Java debugger
|
|
219
251
|
|
|
220
252
|
Java uses Microsoft java-debug through a private JDT LS process on Linux and native Windows. Kotlin still uses fwcd's adapter.
|