pi-agent-ide 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -40
- package/README.md +15 -8
- package/dist/{chunk-ICDI27GZ.js → chunk-235QMMVA.js} +1 -1
- package/dist/{chunk-N7LMRL64.js → chunk-47SPPIXK.js} +1 -1
- package/dist/chunk-4DIUPEDF.js +2 -0
- package/dist/{chunk-JMVDFOTQ.js → chunk-57F5GTHO.js} +1 -1
- package/dist/{chunk-NULNW6GK.js → chunk-6FGLAVPJ.js} +1 -1
- package/dist/{chunk-KL776TGR.js → chunk-6H32W35W.js} +1 -1
- package/dist/{chunk-QP2QSQ4U.js → chunk-6OJ565FL.js} +1 -1
- package/dist/{chunk-TWWND6NI.js → chunk-6R3Y4AD3.js} +1 -1
- package/dist/{chunk-CPZJPGLG.js → chunk-6T7PSDQW.js} +1 -1
- package/dist/{chunk-4OYVLXWD.js → chunk-6TJPMBUQ.js} +1 -1
- package/dist/{chunk-SBLKPTL3.js → chunk-6XFUICD7.js} +1 -1
- package/dist/chunk-7VSVJRRF.js +28 -0
- package/dist/{chunk-7JV4VN73.js → chunk-AAC77UD4.js} +1 -1
- package/dist/chunk-ANM3Y5FO.js +11 -0
- package/dist/chunk-BB4A5UI3.js +5 -0
- package/dist/{chunk-7TJ6DWW3.js → chunk-CPELC6JE.js} +1 -1
- package/dist/chunk-FTPC44FP.js +33 -0
- package/dist/{chunk-SBNR4WZF.js → chunk-GSOYVIQS.js} +1 -1
- package/dist/{chunk-Z3PGADVA.js → chunk-HSRH76JN.js} +1 -1
- package/dist/{chunk-CSXHCSTH.js → chunk-HSZ4AQ6L.js} +1 -1
- package/dist/chunk-I6NPILT5.js +1 -0
- package/dist/chunk-K7SRNBIV.js +1 -0
- package/dist/{chunk-R5XJSEOE.js → chunk-LCWBVOII.js} +3 -3
- package/dist/{chunk-MZXX353D.js → chunk-LEJKDYCK.js} +1 -1
- package/dist/{chunk-3G54ZL2L.js → chunk-NJ7C4KMA.js} +1 -1
- package/dist/{chunk-CTJV77FR.js → chunk-NUM3YQGK.js} +1 -1
- package/dist/chunk-OJEIX7OZ.js +1 -0
- package/dist/{chunk-EY65TFHJ.js → chunk-PJL3UVMJ.js} +1 -1
- package/dist/{chunk-E4HPRLRB.js → chunk-QT3EAHOG.js} +1 -1
- package/dist/{chunk-HCN5W76B.js → chunk-RIJMXO43.js} +1 -1
- package/dist/chunk-RMI3NMQY.js +23 -0
- package/dist/chunk-RQ7JJ7GV.js +4 -0
- package/dist/{chunk-4XPUN4QN.js → chunk-RVU73VKN.js} +1 -1
- package/dist/{chunk-OJX3RJ5A.js → chunk-RW2GTYQI.js} +1 -1
- package/dist/{chunk-PNP2KNGP.js → chunk-SDAH3ECM.js} +1 -1
- package/dist/chunk-SGQWRIRJ.js +10 -0
- package/dist/{chunk-IUSLSROY.js → chunk-SMIFCAAX.js} +1 -1
- package/dist/chunk-SWBJS3U4.js +1 -0
- package/dist/chunk-T7MWQQIF.js +3 -0
- package/dist/{chunk-RAZP42IQ.js → chunk-VAXLSPPU.js} +1 -1
- package/dist/{chunk-XZDOVPRC.js → chunk-VMTOFEXF.js} +1 -1
- package/dist/{chunk-7HDK3NRQ.js → chunk-VXP5BMW7.js} +1 -1
- package/dist/{chunk-WE42GBGU.js → chunk-XAHU42FP.js} +3 -3
- package/dist/{chunk-UBH6X3D3.js → chunk-XBQR74IK.js} +1 -1
- package/dist/{chunk-7NS3QUIE.js → chunk-XG7QNAKW.js} +1 -1
- package/dist/{chunk-GW6NZQTQ.js → chunk-XLWCSJMR.js} +1 -1
- package/dist/{chunk-2K65BSXS.js → chunk-XXLLY66B.js} +1 -1
- package/dist/chunk-YFP4P2FV.js +1 -0
- package/dist/{chunk-75SWXD2Z.js → chunk-YIXP2ALP.js} +1 -1
- package/dist/{chunk-MOJ5RR35.js → chunk-ZJQRLVVV.js} +1 -1
- package/dist/entry-0.js +1 -1
- package/dist/entry-1.js +1 -1
- package/dist/entry-10.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-12.js +1 -1
- package/dist/entry-13.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-15.js +1 -1
- package/dist/entry-16.js +1 -1
- package/dist/entry-17.js +1 -1
- package/dist/entry-18.js +1 -0
- package/dist/entry-19.js +1 -1
- package/dist/entry-2.js +1 -1
- package/dist/entry-20.js +1 -1
- package/dist/entry-22.js +1 -1
- package/dist/entry-23.js +1 -1
- package/dist/entry-24.js +1 -1
- package/dist/entry-25.js +1 -1
- package/dist/entry-26.js +1 -2
- package/dist/entry-27.js +1 -1
- package/dist/entry-28.js +1 -4
- package/dist/entry-29.js +2 -1
- package/dist/entry-3.js +1 -1
- package/dist/entry-30.js +1 -1
- package/dist/entry-31.js +4 -1
- package/dist/entry-32.js +1 -18
- package/dist/entry-33.js +1 -1
- package/dist/entry-34.js +1 -1
- package/dist/entry-35.js +18 -1
- package/dist/entry-36.js +1 -1
- package/dist/entry-37.js +1 -1
- package/dist/entry-38.js +1 -1
- package/dist/entry-39.js +1 -1
- package/dist/entry-4.js +1 -1
- package/dist/entry-40.js +1 -1
- package/dist/entry-41.js +1 -1
- package/dist/entry-42.js +1 -1
- package/dist/entry-43.js +1 -1
- package/dist/entry-44.js +1 -1
- package/dist/entry-45.js +1 -1
- package/dist/entry-46.js +1 -25
- package/dist/entry-47.js +1 -1
- package/dist/entry-48.js +1 -1
- package/dist/entry-49.js +25 -1
- package/dist/entry-5.js +1 -1
- package/dist/entry-50.js +1 -1
- package/dist/entry-51.js +1 -3
- package/dist/entry-52.js +1 -13
- package/dist/entry-53.js +1 -1
- package/dist/entry-54.js +3 -1
- package/dist/entry-55.js +13 -1
- package/dist/entry-56.js +1 -1
- package/dist/entry-57.js +1 -1
- package/dist/entry-58.js +1 -1
- package/dist/entry-59.js +1 -1
- package/dist/entry-6.js +1 -1
- package/dist/entry-60.js +1 -1
- package/dist/entry-61.js +1 -1
- package/dist/entry-62.js +1 -0
- package/dist/entry-63.js +1 -1
- package/dist/entry-64.js +1 -0
- package/dist/entry-65.js +0 -1
- package/dist/entry-66.js +1 -1
- package/dist/entry-67.js +0 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-7.js +1 -1
- package/dist/entry-70.js +1 -1
- package/dist/entry-71.js +1 -1
- package/dist/entry-72.js +1 -0
- package/dist/entry-73.js +1 -1
- package/dist/entry-74.js +1 -0
- package/dist/entry-75.js +0 -1
- package/dist/entry-76.js +1 -1
- package/dist/entry-77.js +0 -1
- package/dist/entry-78.js +1 -80
- package/dist/entry-79.js +1 -21
- package/dist/entry-8.js +1 -1
- package/dist/entry-80.js +1 -2
- package/dist/entry-81.js +80 -1
- package/dist/entry-82.js +22 -1
- package/dist/entry-83.js +2 -1
- package/dist/entry-84.js +1 -3
- package/dist/entry-85.js +1 -1
- package/dist/entry-86.js +1 -1
- package/dist/entry-87.js +1 -1
- package/dist/entry-88.js +3 -0
- package/dist/entry-89.js +1 -0
- package/dist/entry-9.js +1 -1
- package/dist/entry-90.js +1 -0
- package/dist/entry-91.js +1 -0
- package/dist/pi-agent-ide.js +53 -31
- package/docs/agent-guides/debugger.md +2 -0
- package/docs/agent-guides/editing.md +3 -3
- package/docs/agent-guides/search-code.md +5 -3
- package/docs/agent-guides/select-code.md +9 -6
- package/docs/agent-guides/ssh.md +1 -1
- package/docs/code-review.md +5 -0
- package/docs/configuration.md +52 -8
- package/docs/development.md +9 -13
- package/docs/directory-operations.md +1 -1
- package/docs/extensions.md +99 -2
- package/docs/releases.md +1 -1
- package/docs/settings-help.md +39 -0
- package/docs/structured-results.md +11 -6
- package/docs/tools.md +1 -0
- package/docs/user-hooks.md +4 -2
- package/node_modules/pi-agent-doctor/package.json +7 -10
- package/node_modules/pi-agent-doctor/runtime/entry-26.js +1 -0
- package/node_modules/pi-agent-doctor/runtime/entry-27.js +1 -0
- package/node_modules/pi-agent-documentation/package.json +2 -2
- package/node_modules/pi-agent-documentation/runtime/entry-28.js +1 -0
- package/node_modules/pi-agent-filesystem/package.json +8 -8
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-jq/package.json +6 -7
- package/node_modules/pi-agent-filesystem-jq/runtime/entry-31.js +2 -0
- package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/runtime/entry-33.js +2 -0
- package/node_modules/pi-agent-ide-ast/package.json +15 -41
- package/node_modules/pi-agent-ide-ast/runtime/entry-34.js +1 -0
- package/node_modules/pi-agent-ide-ast/src/select-schema.ts +6 -5
- package/node_modules/pi-agent-ide-changes/package.json +10 -11
- package/node_modules/pi-agent-ide-changes/runtime/entry-36.js +1 -0
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +6 -5
- package/node_modules/pi-agent-ide-formatter/package.json +4 -4
- package/node_modules/pi-agent-ide-languages/package.json +3 -3
- package/node_modules/pi-agent-ide-languages/runtime/entry-39.js +2 -0
- package/node_modules/pi-agent-ide-lint/package.json +8 -8
- package/node_modules/pi-agent-ide-lint/runtime/entry-40.js +2 -0
- package/node_modules/pi-agent-ide-lsp/package.json +10 -13
- package/node_modules/pi-agent-ide-lsp/runtime/entry-41.js +2 -0
- package/node_modules/pi-agent-image/package.json +3 -3
- package/node_modules/pi-agent-invariant/package.json +2 -2
- package/node_modules/pi-agent-pdf/package.json +3 -4
- package/node_modules/pi-agent-read/package.json +12 -12
- package/node_modules/pi-agent-read/runtime/entry-46.js +0 -1
- package/node_modules/pi-agent-read/runtime/entry-49.js +2 -0
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-resource/src/resource-error.ts +11 -0
- package/node_modules/pi-agent-resource/src/result-targets.ts +9 -0
- package/node_modules/pi-agent-search/package.json +9 -9
- package/node_modules/pi-agent-search/runtime/entry-51.js +0 -1
- package/node_modules/pi-agent-search/runtime/entry-52.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-54.js +2 -0
- package/node_modules/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-search/src/api/presentation.ts +10 -2
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +6 -5
- package/node_modules/pi-agent-search/src/api/search.ts +7 -0
- package/node_modules/pi-agent-search/src/core/search-core.ts +23 -3
- package/node_modules/pi-agent-search-text/index.ts +2 -0
- package/node_modules/pi-agent-search-text/package.json +14 -14
- package/node_modules/pi-agent-search-text/runtime/entry-55.js +1 -0
- package/node_modules/pi-agent-search-text/runtime/entry-57.js +1 -0
- package/node_modules/pi-agent-search-text/src/search-backend.ts +18 -10
- package/node_modules/pi-agent-search-text/src/search-session.ts +68 -9
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text/runtime/entry-59.js +1 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-60.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/package.json +5 -6
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-61.js +1 -0
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-62.js +2 -0
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-64.js +2 -0
- package/node_modules/pi-agent-text-editor/index.ts +2 -0
- package/node_modules/pi-agent-text-editor/package.json +26 -34
- package/node_modules/pi-agent-text-editor/runtime/entry-78.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-79.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-80.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-81.js +2 -0
- package/node_modules/pi-agent-text-editor/src/api/delete-guard.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +5 -0
- package/node_modules/pi-agent-text-editor/src/api/native-edit-batch-event.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/delete-policy.ts +6 -12
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +4 -1
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +40 -11
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +18 -9
- package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +29 -20
- package/node_modules/pi-agent-text-editor/src/core/temporary-directories.ts +13 -9
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +16 -8
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +118 -36
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +7 -4
- package/node_modules/pi-agent-text-editor/src/core/text-edit-origin.ts +38 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +106 -48
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +35 -14
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +22 -1
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +39 -44
- package/node_modules/pi-agent-text-editor/src/core/write-agent-result.ts +3 -1
- package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +6 -5
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -8
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-82.js +2 -0
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +35 -2
- package/node_modules/pi-agent-text-editor-stale-anchor/index.ts +17 -0
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +6 -5
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-84.js +1 -0
- package/node_modules/pi-agent-tool-ui/package.json +6 -2
- package/node_modules/pi-agent-tool-ui/runtime/entry-85.js +1 -0
- package/node_modules/pi-agent-tool-ui/runtime/entry-86.js +1 -0
- package/node_modules/pi-agent-tool-ui/src/operation-approval.ts +271 -0
- package/node_modules/pi-agent-web/package.json +8 -11
- package/node_modules/pi-agent-web-html/package.json +3 -5
- package/node_modules/pi-agent-web-html/runtime/entry-88.js +2 -0
- package/node_modules/pi-agent-web-image/package.json +4 -4
- package/node_modules/pi-agent-web-image/runtime/entry-89.js +2 -0
- package/node_modules/pi-agent-web-pdf/package.json +4 -4
- package/node_modules/pi-agent-web-pdf/runtime/entry-90.js +2 -0
- package/node_modules/pi-agent-web-text/package.json +4 -4
- package/node_modules/pi-agent-web-text/runtime/entry-91.js +2 -0
- package/package.json +65 -53
- package/skills/configure-agent-ide/SKILL.md +38 -0
- package/src/api/approval.ts +5 -0
- package/src/api/content.ts +6 -0
- package/src/api/settings.ts +198 -0
- package/src/api/tips.ts +3 -0
- package/src/backend/debugger-registration.ts +5 -1
- package/src/code-review/extension.ts +10 -4
- package/src/code-review/reviewer.ts +8 -0
- package/src/composite/host-version.ts +29 -5
- package/src/composite/ide-alias-rendering.ts +97 -0
- package/src/composite/nested-tool-rendering.ts +90 -9
- package/src/composite/preferences.ts +13 -0
- package/src/composite/search-facts.ts +45 -0
- package/src/composite/settings-documentation.ts +68 -0
- package/src/composite/settings-help.ts +106 -0
- package/src/composite/settings-registry.ts +94 -0
- package/src/composite/text-results.ts +170 -30
- package/src/composite/tool-availability.ts +11 -2
- package/src/core/diagnostic-entry.ts +31 -8
- package/src/core/diagnostic-store.ts +19 -3
- package/src/core/extension.ts +7 -2
- package/src/documentation/extension.ts +12 -0
- package/src/documentation/registry.ts +10 -2
- package/src/documentation/search.ts +166 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +8 -8
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +6 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-31.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-32.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-33.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-29.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +8 -11
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -5
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-88.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-89.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-90.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-91.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-87.js +2 -0
- package/src/extensions/pi-agent-read/package.json +12 -12
- package/src/extensions/pi-agent-read/runtime/entry-46.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-47.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-49.js +2 -0
- package/src/extensions/pi-agent-search/package.json +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +2 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +14 -14
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-55.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-56.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-57.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-backend.ts +18 -10
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +68 -9
- package/src/extensions/pi-agent-search/runtime/entry-51.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-52.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-53.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-54.js +2 -0
- package/src/extensions/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/presentation.ts +10 -2
- package/src/extensions/pi-agent-search/src/api/search-parameters.ts +6 -5
- package/src/extensions/pi-agent-search/src/api/search.ts +7 -0
- package/src/extensions/pi-agent-search/src/core/search-core.ts +23 -3
- package/src/extensions/pi-agent-text-editor/index.ts +2 -0
- package/src/extensions/pi-agent-text-editor/package.json +26 -34
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +4 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-60.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-61.js +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-62.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-63.js +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-64.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -8
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-82.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +35 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.ts +17 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +6 -5
- package/src/extensions/pi-agent-text-editor/runtime/entry-78.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-79.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-80.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-81.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/delete-guard.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +5 -0
- package/src/extensions/pi-agent-text-editor/src/api/native-edit-batch-event.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/delete-policy.ts +6 -12
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +4 -1
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +40 -11
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +18 -9
- package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +29 -20
- package/src/extensions/pi-agent-text-editor/src/core/temporary-directories.ts +13 -9
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +16 -8
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +118 -36
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +7 -4
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-origin.ts +38 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +106 -48
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +35 -14
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +22 -1
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +39 -44
- package/src/extensions/pi-agent-text-editor/src/core/write-agent-result.ts +3 -1
- package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +6 -5
- package/src/pi-agent-ide.ts +74 -15
- package/src/plugins/pi-agent-ide-ast/package.json +15 -41
- package/src/plugins/pi-agent-ide-ast/runtime/entry-34.js +1 -0
- package/src/plugins/pi-agent-ide-ast/src/select-schema.ts +6 -5
- package/src/plugins/pi-agent-ide-changes/package.json +10 -11
- package/src/plugins/pi-agent-ide-changes/runtime/entry-36.js +1 -0
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +6 -5
- package/src/plugins/pi-agent-ide-debugger/index.ts +158 -55
- package/src/plugins/pi-agent-ide-debugger/src/debugmcp-client.ts +118 -0
- package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +47 -0
- package/src/plugins/pi-agent-ide-debugger/src/renderer.ts +2 -0
- package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +146 -1
- package/src/plugins/pi-agent-ide-debugger/src/ui.ts +12 -0
- package/src/plugins/pi-agent-ide-debugger/src/vscode-backend.ts +497 -0
- package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
- package/src/plugins/pi-agent-ide-languages/package.json +3 -3
- package/src/plugins/pi-agent-ide-languages/runtime/entry-39.js +2 -0
- package/src/plugins/pi-agent-ide-lint/package.json +8 -8
- package/src/plugins/pi-agent-ide-lint/runtime/entry-40.js +2 -0
- package/src/plugins/pi-agent-ide-lsp/package.json +10 -13
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-41.js +2 -0
- package/src/plugins/pi-agent-ide-terminal/index.ts +2 -0
- package/src/plugins/pi-agent-ide-terminal/src/origin.ts +30 -0
- package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +34 -0
- package/src/plugins/pi-agent-ide-terminal/src/tools.ts +11 -2
- package/src/plugins/pi-agent-ide-terminal/src/types.ts +9 -0
- package/src/plugins/pi-agent-ide-terminal/src/ui.ts +72 -26
- package/src/tips/core.ts +5 -2
- package/src/tips/extension.ts +30 -2
- package/src/tips/persistence.ts +29 -27
- package/src/tips/setup-hint.ts +19 -0
- package/dist/chunk-3ZGDMTMD.js +0 -25
- package/dist/chunk-5KFVDYCI.js +0 -1
- package/dist/chunk-ABFCAOU5.js +0 -1
- package/dist/chunk-BIG45IPN.js +0 -2
- package/dist/chunk-BMOJTJJJ.js +0 -3
- package/dist/chunk-BQ67M4NC.js +0 -3
- package/dist/chunk-IH5NW5JX.js +0 -11
- package/dist/chunk-NRZO5KJT.js +0 -9
- package/dist/chunk-O36UC74T.js +0 -1
- package/dist/chunk-OLI3JPHJ.js +0 -28
- package/dist/chunk-SSWUUBIR.js +0 -1
- package/dist/chunk-UUJJRXHG.js +0 -29
- package/dist/entry-21.js +0 -1
- package/docs/research/apply-native-capability-matrix.md +0 -174
- package/docs/research/apply-read-latency.md +0 -221
- package/docs/research/codemode-write-context.md +0 -56
- package/docs/research/lpt-393-fuzzy-results/file.json +0 -152
- package/docs/research/lpt-393-fuzzy-results/repo.json +0 -122
- package/docs/research/lpt-393-search-fuzzy-fallback.md +0 -97
- package/docs/research/native-codemode-batch-decision.md +0 -31
- package/docs/research/native-codemode-batching.md +0 -65
- package/node_modules/pi-agent-doctor/runtime/entry-19.js +0 -1
- package/node_modules/pi-agent-doctor/runtime/entry-20.js +0 -1
- package/node_modules/pi-agent-doctor/runtime/entry-21.js +0 -1
- package/node_modules/pi-agent-filesystem/runtime/entry-26.js +0 -2
- package/node_modules/pi-agent-filesystem-image/runtime/entry-27.js +0 -2
- package/node_modules/pi-agent-filesystem-jq/runtime/entry-28.js +0 -2
- package/node_modules/pi-agent-ide-ast/runtime/entry-31.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-33.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-34.js +0 -2
- package/node_modules/pi-agent-ide-languages/runtime/entry-36.js +0 -2
- package/node_modules/pi-agent-image/runtime/entry-39.js +0 -1
- package/node_modules/pi-agent-invariant/runtime/entry-40.js +0 -1
- package/node_modules/pi-agent-pdf/runtime/entry-41.js +0 -1
- package/node_modules/pi-agent-search/runtime/entry-49.js +0 -1
- package/node_modules/pi-agent-search-text/runtime/entry-52.js +0 -2
- package/node_modules/pi-agent-search-text/runtime/entry-54.js +0 -1
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-57.js +0 -2
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-59.js +0 -2
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-60.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-61.js +0 -2
- package/node_modules/pi-agent-text-editor/runtime/entry-62.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-64.js +0 -1
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-79.js +0 -2
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-80.js +0 -2
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-81.js +0 -1
- package/node_modules/pi-agent-tool-ui/runtime/entry-82.js +0 -1
- package/node_modules/pi-agent-web-html/runtime/entry-84.js +0 -2
- package/node_modules/pi-agent-web-image/runtime/entry-85.js +0 -2
- package/node_modules/pi-agent-web-pdf/runtime/entry-86.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-27.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-28.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-29.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-26.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-84.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-85.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-86.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-87.js +0 -2
- package/src/extensions/pi-agent-read/runtime/entry-42.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-43.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-44.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-52.js +0 -2
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-53.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-54.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-49.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-50.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-57.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-59.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-60.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-61.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-79.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-80.js +0 -2
- package/src/extensions/pi-agent-text-editor/runtime/entry-62.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-63.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-64.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-31.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-32.js +0 -2
- package/src/plugins/pi-agent-ide-changes/runtime/entry-33.js +0 -1
- package/src/plugins/pi-agent-ide-changes/runtime/entry-34.js +0 -2
- package/src/plugins/pi-agent-ide-languages/runtime/entry-36.js +0 -2
- /package/node_modules/{pi-agent-documentation → pi-agent-doctor}/runtime/entry-25.js +0 -0
- /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem}/runtime/entry-29.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
- /package/node_modules/{pi-agent-ide-ast → pi-agent-filesystem-pdf}/runtime/entry-32.js +0 -0
- /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-image}/runtime/entry-42.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-invariant}/runtime/entry-43.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-44.js +0 -0
- /package/node_modules/{pi-agent-resource → pi-agent-read}/runtime/entry-47.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-read}/runtime/entry-48.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-50.js +0 -0
- /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-53.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-56.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-search-text}/runtime/entry-58.js +0 -0
- /package/node_modules/{pi-agent-text-editor → pi-agent-text-anchor-line-hash}/runtime/entry-63.js +0 -0
- /package/node_modules/{pi-agent-web → pi-agent-text-editor-stale-anchor}/runtime/entry-83.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web}/runtime/entry-87.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
- /package/src/extensions/{pi-agent-search → pi-agent-read}/runtime/entry-48.js +0 -0
- /package/src/extensions/{pi-agent-text-editor/plugins/pi-agent-text-anchor-exact → pi-agent-search/plugins/pi-agent-search-text}/runtime/entry-58.js +0 -0
- /package/src/extensions/{pi-agent-read/extensions/pi-agent-web → pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor}/runtime/entry-83.js +0 -0
- /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.2 — 2026-10-20
|
|
4
|
+
|
|
5
|
+
### Debug through VS Code
|
|
6
|
+
|
|
7
|
+
- When the project is open in a VS Code window with the [DebugMCP](https://github.com/microsoft/DebugMCP) extension, `debug` runs the session in that window by default. You see its breakpoints and session in VS Code, and the same `debug:` resources, Insert actions and Delete work as before. Install the extension with `code --install-extension ozzafar.debugmcpextension`.
|
|
8
|
+
- Choose the backend with `backend`: `auto` (default) uses VS Code only for a local project open in a DebugMCP window with no active debug session and no `args` or `mainClass`; `vscode` fails with the unmet condition instead of falling back; `native` always uses the installed adapter. `adapter` is now required only for native sessions.
|
|
9
|
+
- Launch a `.vscode/launch.json` entry with `configuration`, for example to pass arguments or debug a compiled executable, or debug one test with `test`.
|
|
10
|
+
- Pi never takes over a debug session you started and removes only the breakpoints it added. Set `PI_DEBUGMCP_PORT` if you changed `debugmcp.serverPort`. Doctor reports whether the VS Code backend is available and shows the install command when DebugMCP is missing.
|
|
11
|
+
- On Windows, find the VS Code window regardless of drive-letter case. A start that VS Code never begins fails after 60 seconds with a hint and can be retried. In Remote-WSL windows, stopped frames keep their function and line, and the file is taken from Pi's breakpoint when VS Code does not report it.
|
|
12
|
+
- A failed debugger action, such as a start that cannot launch, shows the debugger's own reason instead of "file operation failed".
|
|
13
|
+
|
|
14
|
+
### Terminal
|
|
15
|
+
|
|
16
|
+
- On Windows, finished terminal sessions no longer leave a `conhost.exe` process running until Pi exits, and short PowerShell commands start about three times faster.
|
|
17
|
+
- Keep only the 50 most recently finished terminal sessions in memory. Older sessions are released; their full output log stays on disk, and background sessions whose completion you have not yet received are kept.
|
|
18
|
+
- Show delayed terminal completion notices under the call that launched the command.
|
|
19
|
+
|
|
20
|
+
### Codemode
|
|
21
|
+
|
|
22
|
+
- Search in Codemode returns `{ result, hasMatches, complete }`, so scripts can check for matches without parsing text. Pass `result` to other tools as before; direct Search output is unchanged.
|
|
23
|
+
- Read of an image returns a native image value that scripts can pass to `image()` or `models.classify()`. Multi-frame reads return every frame.
|
|
24
|
+
- Nested IDE panels show each call's recorded execution time.
|
|
25
|
+
- Extensions that provide resources can return a value to Codemode scripts, and their receipts stay visible in nested panels.
|
|
26
|
+
- Local MCP aliases of IDE tools, such as those from Claude connectors, keep the native IDE results and Codemode rendering.
|
|
27
|
+
|
|
28
|
+
### Approvals and YOLO
|
|
29
|
+
|
|
30
|
+
- Operation approvals use one shared dialog with **Deny**, **Allow once** and **Allow for session**, shown one at a time and marked as waiting in Herdr. Other extensions can use the same dialog. Without a UI, the operation is refused.
|
|
31
|
+
- Add **YOLO: allow all operations** and **YOLO: filesystem operations** in `/agent-ide-settings`. They are off by default; extensions can register their own YOLO setting, and an explicit extension setting wins over the common one.
|
|
32
|
+
|
|
33
|
+
### Editing
|
|
34
|
+
|
|
35
|
+
- A write that was saved stays reported as applied even when reading it back fails.
|
|
36
|
+
- A rejected Copy destination no longer blocks a valid source selection.
|
|
37
|
+
- Issued result references are checked before filename anchors, and rejected references show a safe reason in the panel.
|
|
38
|
+
|
|
39
|
+
### Feedback placement
|
|
40
|
+
|
|
41
|
+
- Late diagnostics summaries and advisory code-review notices appear under the tool call that caused them.
|
|
42
|
+
|
|
43
|
+
### Pi 1.3
|
|
44
|
+
|
|
45
|
+
- On Pi 1.3.0 and newer, resumed sessions keep Pi's restored tool loadout, so a tool removed with `--tools -name` stays off. Tools excluded in settings remain unavailable. Pi 0.99.1 or newer is still supported.
|
|
46
|
+
|
|
47
|
+
## 0.8.1 — 2026-10-11
|
|
48
|
+
|
|
49
|
+
### Settings and help
|
|
50
|
+
|
|
51
|
+
- Ask the agent to explain Pi Agent IDE or configure it for your workflow. The new setup skill uses the registered settings catalog, asks for Project or Global scope and preserves unrelated settings.
|
|
52
|
+
- Open `/agent-ide-help` for a short, scrollable settings guide. A one-time setup hint appears across the installation without entering the model's context.
|
|
53
|
+
- Choose **Show tool results from Codemode**, an Off/On setting that defaults to Off. It controls extra successful IDE panels, not Codemode's script or output. On follows each tool's presentation setting; errors and expanded history remain available.
|
|
54
|
+
- Add **Developer mode**, off by default. It enables `/agent-ide-tip` for manually previewing the setup hint; automatic startup hints remain independent.
|
|
55
|
+
|
|
56
|
+
### Search and editing
|
|
57
|
+
|
|
58
|
+
- Search packaged guides through `docs:all` or one `docs:<id>`, with literal or regex queries, case and whole-word options, and bounded results. Guide matches are read-only.
|
|
59
|
+
- Keep result-scoped Search inside selected source ranges, including Boolean queries and text containing colons. Reject changed numbered Search references while preserving query refresh for complete all-match references.
|
|
60
|
+
- Preserve issued selections when Codemode batches same-file edits. Return verified follow-up targets for Replace and Insert after formatting, keep unrelated edits concurrent and count grouped replacements per file correctly.
|
|
61
|
+
- Preserve blocked-edit recovery feedback and bound errors even when a later guard replaces them. Explain failed writes and require rereading resources before retrying uncertain effects.
|
|
62
|
+
|
|
63
|
+
### Filesystem guards
|
|
64
|
+
|
|
65
|
+
- Apply temporary-directory cleanup rules consistently to Delete and removed Move endpoints. Recognize exact `tmp`, `.tmp`, `temp` and `.temp` path components while preserving protected-path, tracked-content and hook checks. Show Herdr's waiting state during filesystem approval dialogs.
|
|
66
|
+
|
|
3
67
|
## 0.8.0 — 2026-10-09
|
|
4
68
|
|
|
5
69
|
### SSH workspaces
|
|
@@ -20,12 +84,9 @@
|
|
|
20
84
|
- Resolve temporary-deletion settings from the remote account and project. Local settings do not grant remote deletion permission; protected paths, tracked contents and hooks remain guarded.
|
|
21
85
|
- Clean up only processes owned by each SSH command channel, including descendants that start new sessions. Report interrupted operations and uncertain cleanup honestly rather than claiming rollback or successful termination.
|
|
22
86
|
|
|
23
|
-
###
|
|
87
|
+
### Known limits
|
|
24
88
|
|
|
25
|
-
-
|
|
26
|
-
- Split core Linux integration checks into four CI jobs with separate logs and reports, and combine their results for the required validation gate.
|
|
27
|
-
- Split independent SSH hook checks into separate real-Pi sessions so Read guards, Move guards and saved-edit feedback keep their full coverage within the existing run limits.
|
|
28
|
-
- Document a known Java/Kotlin adapter issue: `fwcd/kotlin-debug-adapter` 0.4.4 can run past verified breakpoints. The issue was reproduced locally and over SSH; those recipes remain available, but a verified breakpoint does not guarantee a stop.
|
|
89
|
+
- `fwcd/kotlin-debug-adapter` 0.4.4 can run past verified breakpoints; a verified breakpoint does not guarantee a stop.
|
|
29
90
|
|
|
30
91
|
## 0.7.3 — 2026-10-09
|
|
31
92
|
|
|
@@ -45,16 +106,10 @@
|
|
|
45
106
|
- Delete declarations through direct `symbol:` paths. Route `symbol:<file>#<selector>#name` replacement through semantic rename in native Codemode rather than declaration-text replacement.
|
|
46
107
|
- Keep original source selections behind compact AST Read overviews. Follow-up tools use the requested source range, not the displayed outline.
|
|
47
108
|
|
|
48
|
-
### Display
|
|
109
|
+
### Display
|
|
49
110
|
|
|
50
111
|
- Explain shortened arguments, omitted result displays, omitted call panels and unavailable results separately in saved nested IDE displays.
|
|
51
112
|
- Hide internal result references from Stage's user-facing output and retain breakpoint-removal labels after deletion.
|
|
52
|
-
- Add an opt-in real-model capability matrix for direct and native Codemode routes. Free coverage checks do not call models or prove model execution; paid runs retain their evidence.
|
|
53
|
-
- Reuse recent full CI evidence only for identical trees and verification conditions. Promotion and versioned candidates still run their required full checks.
|
|
54
|
-
- Permit Bubblewrap user namespaces through a per-binary AppArmor profile on restricted Ubuntu CI runners. Keep the runner-wide restriction enabled and require a real sandbox launch before unit checks.
|
|
55
|
-
- Keep links to excluded tests and benchmarks usable in the public npm package by linking to the public repository.
|
|
56
|
-
- Update integration checks for compact Write receipts while retaining saved-byte, formatting, hook, output-recovery and native-panel contracts. Run sandbox semantic rename with the pinned Pi host and CI language-server toolchain.
|
|
57
|
-
- Reduce shared-runner integration concurrency to three processes to keep Pi startup within existing run limits and the complete suite within the unchanged job budget. Retain native Codemode failure traces.
|
|
58
113
|
|
|
59
114
|
## 0.7.2 — 2026-10-08
|
|
60
115
|
|
|
@@ -87,12 +142,6 @@
|
|
|
87
142
|
- Refresh debugger state when delayed stop or exit events arrive. Track adapter-relocated breakpoints and later binding changes, and refresh displayed local variables after evaluation.
|
|
88
143
|
- Preserve omitted optional IDE tool arguments on Copilot's Responses route instead of letting implicit strictness turn them into required fields. Explicit strictness and other tools remain unchanged.
|
|
89
144
|
|
|
90
|
-
### Verification and maintenance
|
|
91
|
-
|
|
92
|
-
- Add real-Pi stress coverage for every callable IDE tool, direct and nested output, provider text and images, limit/view/offset/scope combinations and complete saved-output recovery. Include the reported Search case of 10,114 matches across 1,725 files with `limit=80`.
|
|
93
|
-
- Keep real debugger checks running in separate, non-blocking jobs with their own reports, outside shared CI totals. Pure debugger unit tests and editor checks, including Delete, still block the release.
|
|
94
|
-
- Automatically import newly opened GitHub issues into Linear, with stable issue IDs to avoid duplicate imports.
|
|
95
|
-
|
|
96
145
|
## 0.7.1 — 2026-10-05
|
|
97
146
|
|
|
98
147
|
- Reduced prompt size by keeping internal result structures out of agent-facing tool schemas.
|
|
@@ -126,18 +175,6 @@
|
|
|
126
175
|
|
|
127
176
|
- Keep whole replacements visible when old and new blocks share no trimmed line. Avoid unnecessary character refinement while preserving the existing time, pairing and size limits, precise small-edit highlights and truthful unavailable state for unfinished comparisons.
|
|
128
177
|
|
|
129
|
-
### Packaging
|
|
130
|
-
|
|
131
|
-
- Fix a documentation link to excluded tests so public package validation succeeds.
|
|
132
|
-
|
|
133
|
-
### Verification
|
|
134
|
-
|
|
135
|
-
- Run the full integration suite in four standalone CI shards with separate reports and retained logs, without raising timeouts or skipping tests. Close each scenario's Pi process instead of accumulating shared fixture hosts.
|
|
136
|
-
- Check that each final file is formatted once without requiring independent files to finish in a fixed order.
|
|
137
|
-
- Make the shell-result scenario independent of background completion timing while keeping separate completion-delivery coverage.
|
|
138
|
-
- Run Windows source and installed-package checks without a retained shared harness workspace, avoiding locks on the shared cleanup directory.
|
|
139
|
-
- Retry transient Windows test-workspace removal locks a bounded number of times after the Pi process tree exits; persistent locks still fail. Retain Windows host traces on failure without changing test timeouts or assertions.
|
|
140
|
-
|
|
141
178
|
## 0.6.4 — 2026-10-03
|
|
142
179
|
|
|
143
180
|
### Native Pi integration
|
|
@@ -149,11 +186,10 @@
|
|
|
149
186
|
- Run disjoint Read, Search, and editing operations concurrently while preserving ordering and rollback protection for shared resources.
|
|
150
187
|
- Attach first-use guides without blocking or replaying tool calls, and preserve guidance across nested calls and session navigation.
|
|
151
188
|
- Keep IDE panels visible for nested calls, show final batch diffs without duplicate bookkeeping panels, and preserve bounded history and native usage accounting.
|
|
152
|
-
- Verify IDE tool coexistence with native MCP tools and resources.
|
|
153
189
|
|
|
154
|
-
###
|
|
190
|
+
### Installation
|
|
155
191
|
|
|
156
|
-
- Fix Windows
|
|
192
|
+
- Fix Windows package entrypoint resolution and installation from npm archives.
|
|
157
193
|
|
|
158
194
|
### Editing and reading
|
|
159
195
|
|
|
@@ -162,7 +198,7 @@
|
|
|
162
198
|
- Bound large committed Apply results before serialization and keep full results addressable.
|
|
163
199
|
- Preserve structured source data when AST output exceeds the preview budget.
|
|
164
200
|
- Run independent post-read handlers concurrently while applying their transforms in order.
|
|
165
|
-
- Document
|
|
201
|
+
- Document jq views for JSONL inspection.
|
|
166
202
|
|
|
167
203
|
### Search and presentation
|
|
168
204
|
|
|
@@ -192,11 +228,6 @@
|
|
|
192
228
|
- Bound replayable DAP events so noisy debug targets do not grow the queue without limit.
|
|
193
229
|
- Check each debugger's own executable or configured adapter path instead of applying Python or JavaScript probes to unrelated adapters.
|
|
194
230
|
|
|
195
|
-
### Verification
|
|
196
|
-
|
|
197
|
-
- Temporarily skip the flaky Windows Java public-Pi startup test. Keep Linux public-Pi and native Windows Java lifecycle checks enabled.
|
|
198
|
-
- Retain unit test reports immediately and stop before integration tests when the unit suite fails. Keep content checks independent of wall-clock load and allow independent formatters to finish in either order.
|
|
199
|
-
|
|
200
231
|
## 0.6.3 — 2026-09-27
|
|
201
232
|
|
|
202
233
|
### Editing
|
|
@@ -429,7 +460,6 @@
|
|
|
429
460
|
- Fix CSharpier detection and diagnostic commands or parsers for .NET, Go, PHP, HTML, CSS, and Java. Keep project-wide lint findings attached to the correct file.
|
|
430
461
|
- Treat a failed linter with no parsed findings as a failure, not a clean check.
|
|
431
462
|
- Use the language server's advertised diagnostic mode, fixing Java and Go servers that publish diagnostics without supporting pull requests.
|
|
432
|
-
- Verify native mini-projects with real formatting, lint, language diagnostics, and separate compiler or behavior checks before and after formatting.
|
|
433
463
|
|
|
434
464
|
## 0.2.0 — 2026-09-05
|
|
435
465
|
|
package/README.md
CHANGED
|
@@ -24,10 +24,14 @@
|
|
|
24
24
|
|
|
25
25
|
<div align="center">
|
|
26
26
|
|
|
27
|
-
[](https://huggingface.co/spaces/alexshpunt/benchmark-explorer?card=harness%3Api-agent-ide%40latest)
|
|
27
|
+
[](https://huggingface.co/spaces/alexshpunt/benchmark-explorer?card=harness%3Api-agent-ide-codemode%40latest)
|
|
28
28
|
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
+
Ask your agent to explain Pi Agent IDE or configure it for your workflow. For example: “Help me configure Pi Agent IDE for my tasks.” The agent checks the available settings and asks whether to save changes for this project or globally.
|
|
32
|
+
|
|
33
|
+
To configure it yourself, read the [short settings guide](./docs/settings-help.md), run `/agent-ide-help`, or open `/agent-ide-settings` inside Pi.
|
|
34
|
+
|
|
31
35
|
## Summary
|
|
32
36
|
|
|
33
37
|
Pi Agent IDE gives the [Pi coding agent](https://pi.dev/) a small set of development tools for understanding, changing, running, debugging, and observing software. The same tools work with local resources and configured Linux SSH targets.
|
|
@@ -45,7 +49,7 @@ Pi Agent IDE gives the [Pi coding agent](https://pi.dev/) a small set of develop
|
|
|
45
49
|
|
|
46
50
|
### Combine tools through direct calls or native Codemode
|
|
47
51
|
|
|
48
|
-
All IDE tools support direct calls and Pi's built-in Codemode. The agent can combine reading, search, selection and editing into one workflow, with the same source checks
|
|
52
|
+
All IDE tools support direct calls and Pi's built-in Codemode. The agent can combine reading, search, selection and editing into one workflow, with the same source checks in both modes.
|
|
49
53
|
|
|
50
54
|
For example, this script finds a checklist item, selects its complete line, and marks it done:
|
|
51
55
|
|
|
@@ -77,7 +81,7 @@ Views change how the same resource is presented. The agent can request source st
|
|
|
77
81
|
|
|
78
82
|
### Find anything through `search`
|
|
79
83
|
|
|
80
|
-
`search` provides one interface for paths, exact text, regular expressions, AST patterns, symbols, references, code relationships, process discovery, and retained terminal output.
|
|
84
|
+
`search` provides one interface for paths, exact text, regular expressions, AST patterns, symbols, references, code relationships, process discovery, and retained terminal output. File matches are reusable guarded references, so the agent can pass a selection directly to `read` or an editing tool. Search packaged guides through `docs:all` or one `docs:<id>`; guide matches are read-only and do not authorize edits.
|
|
81
85
|
|
|
82
86
|
<div align="center">
|
|
83
87
|
|
|
@@ -140,6 +144,8 @@ The terminal is a first-class cross-platform interface. The agent can run comman
|
|
|
140
144
|
|
|
141
145
|
Debugger sessions use the same resource model. The agent can set breakpoints, inspect stack frames and variables, evaluate expressions, step through execution, and return to a running session later.
|
|
142
146
|
|
|
147
|
+
When the project is open in VS Code with the [DebugMCP](https://github.com/microsoft/DebugMCP) extension, the agent debugs it there by default, so you can follow the session in your editor. See [VS Code debugger](./docs/configuration.md#vs-code-debugger).
|
|
148
|
+
|
|
143
149
|
<div align="center">
|
|
144
150
|
|
|
145
151
|
[](assets/summary/debugging.png)
|
|
@@ -172,7 +178,7 @@ Filesystem and HTTP reads, resource views, content converters, search backends,
|
|
|
172
178
|
|
|
173
179
|
A person can see the agent's edits, diffs, diagnostics, running processes, debugger state, and failures. Bounded presentation keeps live output readable without discarding the underlying result. Guarded snapshots and first-class undo make mistakes visible and recovery inexpensive.
|
|
174
180
|
|
|
175
|
-
Direct calls
|
|
181
|
+
Direct calls show tool panels and diffs using each tool's presentation setting. Extra successful IDE panels from Codemode are off by default; turn on **Show tool results from Codemode** in `/agent-ide-settings` to show them. Codemode's own script and output are unchanged. Errors and expanded history remain available, and a batch of edits shows the final diff for each file rather than intermediate cards.
|
|
176
182
|
|
|
177
183
|
<div align="center">
|
|
178
184
|
|
|
@@ -184,13 +190,13 @@ Direct calls and native Codemode both show tool panels and diffs. A batch of edi
|
|
|
184
190
|
|
|
185
191
|
Built-in debugger recipes cover C, C++, C#, Dart, Elixir, Go, Java, JavaScript, Julia, Kotlin, Lua, PHP, PowerShell, Python, R, Ruby, Rust, shell scripts, Swift, TypeScript, and Zig. Formatting, linting, AST, language-server, and debugger support follows the tools and configuration available in each project.
|
|
186
192
|
|
|
187
|
-
Known issue: the
|
|
193
|
+
Known issue: the Kotlin adapter (`fwcd/kotlin-debug-adapter` 0.4.4) can run past verified breakpoints. This was reproduced with JDK 17 and 21 both locally and over SSH. Its recipe remains available, but a verified breakpoint is not proof that execution will stop there. Java uses `java-debug / JDT LS`, not this adapter.
|
|
188
194
|
|
|
189
195
|
Windows and WSL are first-class supported environments alongside Linux. Run `/pi-agent-ide-doctor` to see the exact capabilities available on the current machine.
|
|
190
196
|
|
|
191
197
|
### Built through data-driven development
|
|
192
198
|
|
|
193
|
-
Pi Agent IDE is developed through daily use on real software and measured with the [Explicit Edit Benchmark](https://github.com/alexshpunt/explicit-edit-benchmark).
|
|
199
|
+
Pi Agent IDE is developed through daily use on real software and measured with the [Explicit Edit Benchmark](https://github.com/alexshpunt/explicit-edit-benchmark). The badge tracks the [Codemode-enabled profile](https://huggingface.co/spaces/alexshpunt/benchmark-explorer?card=harness%3Api-agent-ide-codemode%40latest), with native Codemode alongside standalone IDE tools. [Earlier standalone-only observations](https://huggingface.co/spaces/alexshpunt/benchmark-explorer?card=harness%3Api-agent-ide%40latest) remain separate. A profile's badge appears after its first accepted observation; not every release has a run. All observations are available in the [published dataset](https://huggingface.co/datasets/alexshpunt/explicit-edit-benchmark).
|
|
194
200
|
|
|
195
201
|
The project is also used to develop itself. Weak interactions, missing affordances, and agent failure modes appear in real work instead of remaining theoretical. Problems are fixed as they are found, and the tools evolve through regular releases.
|
|
196
202
|
|
|
@@ -198,7 +204,7 @@ Pi Agent IDE is experimental and under active development. Interfaces and behavi
|
|
|
198
204
|
|
|
199
205
|
## Installation
|
|
200
206
|
|
|
201
|
-
Install [Pi](https://pi.dev/) **0.99.1 or newer** first, then install Pi Agent IDE from npm. Development and integration tests use Pi 1.
|
|
207
|
+
Install [Pi](https://pi.dev/) **0.99.1 or newer** first, then install Pi Agent IDE from npm. Development and integration tests use Pi 1.3.0. Older hosts are rejected with an upgrade message.
|
|
202
208
|
|
|
203
209
|
```bash
|
|
204
210
|
pi install npm:pi-agent-ide
|
|
@@ -264,12 +270,13 @@ If something breaks, behaves badly, or does not fit your workflow, please [open
|
|
|
264
270
|
| [Result composition](./docs/structured-results.md) | Passing results between tools, reference lifetime, and commit boundaries |
|
|
265
271
|
| [Selection](./docs/agent-guides/select-code.md) | Text ranges, AST parts, and combining selections |
|
|
266
272
|
| [Directory operations](./docs/directory-operations.md) | Copy, Move, Delete, symlinks, guards, and partial failures |
|
|
273
|
+
| [Settings guide](./docs/settings-help.md) | Choosing settings, scope, saving and output presentation |
|
|
267
274
|
| [Configuration](./docs/configuration.md) | Project tools, SSH targets, Doctor, and presentation settings |
|
|
268
275
|
| [SSH guide](./docs/agent-guides/ssh.md) | Agent setup and supported remote operations |
|
|
269
276
|
| [File hooks](./docs/user-hooks.md) | Inspect, change, or deny reads and edits |
|
|
270
277
|
| [Writing extensions](./docs/extensions.md) | Resolvers, views, anchors, search backends, and IDE plugins |
|
|
271
278
|
| [Architecture](./docs/architecture.md) | Module boundaries, protocols, and the umbrella extension |
|
|
272
|
-
| [Development](./docs/development.md) | Checkout setup, tests, and
|
|
279
|
+
| [Development](./docs/development.md) | Checkout setup, tests, and package builds |
|
|
273
280
|
| [Releases](./docs/releases.md) | Nightly builds, release candidates, verification, and publication |
|
|
274
281
|
|
|
275
282
|
## License
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as E}from"./chunk-
|
|
1
|
+
import{o as E}from"./chunk-LCWBVOII.js";import{e as f}from"./chunk-ZPT5D4VP.js";import{a as o}from"./chunk-EI7MMDWY.js";import{Type as e}from"typebox";import{Value as n}from"typebox/value";import{execFile as I}from"node:child_process";import{lstat as O,readdir as k,readFile as _,readlink as L,realpath as h}from"node:fs/promises";import i from"node:path";import v from"node:os";import{promisify as C}from"node:util";var F=C(I);function A(t){return t.isSymbolicLink()?"symlink":t.isDirectory()?"directory":t.isFile()?"file":"other"}o(A,"kind");function R(t){return JSON.stringify([t.dev,t.ino,t.birthtimeMs,t.ctimeMs,t.mtimeMs,t.size,t.mode])}o(R,"revision");async function x(t){return O(t).catch(r=>{if(r.code!=="ENOENT")throw r})}o(x,"optionalStat");async function b(t){try{return await h(t)}catch(r){if(r.code!=="ENOENT"||await x(t))throw r;return i.join(await b(i.dirname(t)),i.basename(t))}}o(b,"resolveParent");async function S(t,r){let c=i.join(await b(i.dirname(t)),i.basename(t)),l=[],p=o(async(s,d)=>{r?.throwIfAborted();let a=await x(s);if(a===void 0){if(d!=="")throw Object.assign(new Error("Transfer entry disappeared"),{code:"TRANSFER_TARGET_CHANGED"});return}let T={relativePath:d,kind:A(a),revision:R(a),identity:{device:String(a.dev),inode:String(a.ino)},mode:a.mode,...a.isSymbolicLink()?{link:(await L(s,{encoding:"buffer"})).toString("base64")}:{}};if(l.push(T),T.kind==="directory"){for(let m of(await k(s)).sort())await p(i.join(s,m),d===""?m:`${d}/${m}`);let y=await x(s);if(y===void 0||R(y)!==T.revision)throw Object.assign(new Error("Transfer directory changed while inspecting its children"),{code:"TRANSFER_TARGET_CHANGED"})}},"walk");return await p(c,""),{path:c,entries:l}}o(S,"snapshotLocalObjects");var N={owner:"local",async temporaryEnvironment(t){t?.throwIfAborted();let r=process.env.PI_CODING_AGENT_DIR?.trim();return{home:v.homedir(),temporary:v.tmpdir(),...r?{agentDirectory:i.resolve(r)}:{}}},pathStyle:"native",realpath:h,async inspect(t){let r=await O(t);return{kind:A(r),revision:R(r),identity:{device:String(r.dev),inode:String(r.ino)},mode:r.mode}},read:o(t=>_(t,"utf8"),"read"),async git(t,r,c){let l=Object.fromEntries(Object.entries(process.env).filter(([s])=>!s.startsWith("GIT_"))),{stdout:p}=await F("git",["-C",t,...r],{env:{...l,GIT_OPTIONAL_LOCKS:"0"},signal:c,timeout:5e3,maxBuffer:16*1024*1024});return p},source:o(t=>t,"source"),snapshot:S};var u="pi-agent-text-editor",P=32,oe="pi-agent-text-editor/position",ie="pi-agent-text-editor/search",ne=`${u}/core/ready`,se=`${u}/plugin/register`,g=e.Function([],e.Unknown()),D=e.Object({tryResolve:g},{additionalProperties:!0}),j=e.Object({lineNumber:e.Integer({minimum:1}),column:e.Integer({minimum:0})}),M=e.Object({start:j,end:j,linewise:e.Optional(e.Boolean())}),G=e.Object({source:e.String({minLength:1}),ranges:e.Optional(e.Array(M))}),q=e.Union([e.Object({kind:e.Literal("not-handled")},{additionalProperties:!0}),e.Object({kind:e.Literal("resolved"),targets:e.Array(G,{minItems:1})},{additionalProperties:!0}),e.Object({kind:e.Literal("rejected"),rejection:e.Object({code:e.Union([e.Literal("invalid"),e.Literal("stale"),e.Literal("missing"),e.Literal("ambiguous")]),reason:e.String(),contextRange:e.Optional(e.Object({offset:e.Number(),limit:e.Number()}))})},{additionalProperties:!0}),e.Object({kind:e.Literal("failed"),error:e.Unknown()},{additionalProperties:!0})]),V=e.String({pattern:"\\S"}),X=e.Object({resolver:e.Unknown(),priority:e.Optional(e.Number())}),U=e.Object({resolver:e.Unknown(),resources:e.Optional(e.Unknown()),kind:e.String({pattern:"\\S"}),type:e.Union([e.Literal("major"),e.Literal("auxiliary"),e.Literal("constant")]),priority:e.Optional(e.Number())}),H=e.Object({protocol:e.Literal(u),apiVersion:e.Literal(P)}),w=e.Object({protocol:e.Literal(u),apiVersion:e.Literal(P),id:e.String(),setup:g}),K=e.Object({plugin:w,accept:g});function ae(t){return n.Check(V,t)}o(ae,"isTextEditorToolId");function ce(t){if(!n.Check(X,t))return!1;let r=t;return E(r.resolver)&&(!("priority"in r)||typeof r.priority=="number")}o(ce,"isResourceResolverRegistration");function le(t){if(!n.Check(U,t))return!1;let r=t;return f(r.resolver)&&(!("resources"in r)||n.Check(D,r.resources))&&(!("priority"in r)||typeof r.priority=="number")}o(le,"isTextAnchorResolverRegistration");function pe(t){return n.Check(q,t)}o(pe,"isTextAnchorResourceResolutionAttempt");function de(t){return n.Check(H,t)}o(de,"isTextEditorCoreReady");function ue(t){return n.Check(w,t)}o(ue,"isTextEditorPlugin");function Te(t){return n.Check(K,t)}o(Te,"isTextEditorPluginRegistrationRequest");export{S as a,N as b,u as c,P as d,oe as e,ie as f,ne as g,se as h,ae as i,ce as j,le as k,pe as l,de as m,ue as n,Te as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,d,e as u}from"./chunk-
|
|
1
|
+
import{c,d,e as u}from"./chunk-VAXLSPPU.js";import{a as r}from"./chunk-EI7MMDWY.js";function E(t,o){let s=r(()=>{let e,i={plugin:o,accept(g){if(e!==void 0)throw new Error(`Plugin ${o.id} registration was accepted more than once`);e=g}};return t.events.emit(d,i),e},"announce"),n=r(()=>{},"unsubscribe");n=t.events.on(c,e=>{if(!u(e))throw new Error("Invalid pi-agent-search core readiness event");let i=s();if(i===void 0)throw new Error("pi-agent-search core announced readiness without accepting the plugin");n(),i.catch(()=>{})}),t.on("session_shutdown",n);let a=s();if(a!==void 0)return n(),a}r(E,"connectSearchPlugin");export{E as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as k,e as f}from"./chunk-I6NPILT5.js";import{a as v,b}from"./chunk-PS2B6THP.js";import{a as s}from"./chunk-EI7MMDWY.js";import h from"node:path";import{pathToFileURL as T}from"node:url";function P(e,n,r,o,i,a=[],l=[]){let c=a.map(t=>({kind:"note",text:t}));c.push(...b(e.flatMap(t=>{let p=h.isAbsolute(t.source),D=p&&i?h.relative(i,t.source)||h.basename(t.source):t.source,z=p?T(t.source).href:/^https?:/iu.test(t.source)?t.source:void 0,x=t.endLineNumber??t.lineNumber;return(x===t.lineNumber?[t.lineText]:[t.lineText,...t.matchedText.split(/\r\n|\n|\r/u).slice(1)]).slice(0,20).map((R,m)=>({source:t.source,label:D,...z===void 0?{}:{link:z},...p?{}:{badge:t.source.startsWith("docs:")?"DOC":/^https?:/iu.test(t.source)?"WEB":"SH"},lineNumber:t.lineNumber+m,text:R,ranges:[{from:m?0:t.startColumn,to:t.lineNumber+m===x?t.endColumn:R.length}]}))}))),e.length||c.push({kind:"note",text:"No matches found"}),e.some(t=>(t.endLineNumber??t.lineNumber)-t.lineNumber>=20)&&c.push({kind:"note",text:"\u2026 source preview shortened"}),c.push(...l.map(t=>({kind:"note",text:t,expandedOnly:!0})));let u=`${e.length}${n?"":"+"}`,y=new Set(e.map(t=>t.source)),F=e.length>0&&e.every(t=>h.isAbsolute(t.source));return new v({summary:`${u} ${e.length===1?"match":"matches"} in ${y.size} ${F?y.size===1?"file":"files":y.size===1?"source":"sources"}`,rows:c},r,o)}s(P,"renderSearchMatches");function $(e,n){return e.targets.some(r=>r.source===n.source&&r.ranges.some(o=>(o.start.lineNumber<n.lineNumber||o.start.lineNumber===n.lineNumber&&o.start.column<=n.startColumn)&&(o.end.lineNumber>(n.endLineNumber??n.lineNumber)||o.end.lineNumber===(n.endLineNumber??n.lineNumber)&&o.end.column>=n.endColumn)))}s($,"containsSearchMatch");import{Value as N}from"typebox/value";var d={candidates:5,previewMatches:3,identifiers:2e4,identifierLength:80,vocabularyBytes:8*1024*1024,matchesPerCandidate:200,verificationBytes:4*1024*1024,timeoutMs:2e3};function I(e){return N.Check(k,e)}s(I,"isFuzzyResultData");function g(e){return e.length>=5&&e.length<=d.identifierLength&&/^[A-Za-z_$][A-Za-z0-9_$]*$/u.test(e)&&/[A-Za-z]/u.test(e)}s(g,"isFuzzyQuery");var S=class{static{s(this,"FuzzyVocabulary")}names=new Set;bytes=0;limited=!1;account(n){return this.bytes+=n,this.bytes>d.vocabularyBytes&&(this.limited=!0),!this.limited}add(n){if(!(this.limited||!g(n)||this.names.has(n))){if(this.names.size===d.identifiers){this.limited=!0;return}this.names.add(n)}}addText(n){if(this.account(Buffer.byteLength(n))){for(let r of n.matchAll(/[A-Za-z_$][A-Za-z0-9_$]*/gu))if(this.add(r[0]),this.limited)break}}};function w(e){return e.replace(/([A-Z]+)([A-Z][a-z])/gu,"$1 $2").replace(/([a-z0-9])([A-Z])/gu,"$1 $2").split(/[^A-Za-z0-9]+/u).filter(Boolean).map(n=>n.toLowerCase())}s(w,"splitName");function C(e,n){return e.length===n.length&&e.every((r,o)=>r===n[o])}s(C,"same");function L(e,n){if(e.length<5||n.length<5||Math.abs(e.length-n.length)>1||/\d/u.test(e+n))return!1;let r=0;for(;r<Math.min(e.length,n.length)&&e[r]===n[r];)r++;if(e.length===n.length)return e.slice(r+1)===n.slice(r+1)||e[r]===n[r+1]&&e[r+1]===n[r]&&e.slice(r+2)===n.slice(r+2);let o=e.length<n.length?e:n,i=e.length<n.length?n:e;return o.slice(r)===i.slice(r+1)}s(L,"oneTypo");function M(e,n){if(e.join("")===n.join(""))return{kind:"normalized",reason:"same spelling with different case or separators"};let r=e.length<n.length?e:n,o=e.length<n.length?n:e;if(o.length===r.length+1&&r.length>=2&&r.every(l=>l.length>=3)){let l=C(r,o.slice(1)),c=C(r,o.slice(0,-1));if(l||c)return{kind:"component",reason:`${e.length>n.length?"remove":"add"} ${l?"leading":"trailing"} component '${l?o[0]:o.at(-1)}'`}}if(e.length!==n.length)return;let i=e.flatMap((l,c)=>{let u=n[c];return u!==void 0&&l!==u?[{word:l,other:u}]:[]}),a=i[0];if(!(i.length!==1||!a||!L(a.word,a.other)))return{kind:"typo",reason:`one character edit: '${a.word}' \u2192 '${a.other}'`}}s(M,"relation");var A={normalized:0,component:1,typo:2};function E(e,n){if(!g(e))return[];let r=w(e);if(r.length===0)return[];let o=[];for(let i of new Set(n)){if(i===e||!g(i))continue;let a=M(r,w(i));a&&o.push({identifier:i,...a})}return o.sort((i,a)=>A[i.kind]-A[a.kind]||(i.identifier<a.identifier?-1:i.identifier>a.identifier?1:0)).slice(0,d.candidates)}s(E,"rankFuzzyIdentifiers");function _(e,n,r){return{identifier:e.identifier,kind:e.kind,reason:e.reason,matchCount:e.matches.length,fileCount:new Set(e.matches.map(o=>o.source)).size,selection:{...f(e.matches.slice(0,d.previewMatches),e.complete,n,r),truncated:e.matches.length>d.previewMatches}}}s(_,"fuzzyCandidateData");function O(e){let n=e.selection.complete?"":"+",r=e.selection.all?.line??e.selection.matches[0]?.references?.line,o=e.selection.matches[0],i=r??o?.source;return[`Possible name: ${e.identifier} (${e.reason})`,`${e.matchCount}${n} ${e.matchCount===1&&e.selection.complete?"match":"matches"} in ${e.fileCount}${n} ${e.fileCount===1&&e.selection.complete?"file":"files"}`,`Exact alternative: ${JSON.stringify(e.identifier)} (case-sensitive, whole identifier)`,...e.selection.complete?[]:["Capture limit reached; no complete all reference. Inspect the returned location; do not treat this candidate as a complete match set."],...i?[`Read: ${i}${r||!o?"":` \xB7 line ${o.range.startLine}`}`]:[]].join(`
|
|
2
|
+
`)}s(O,"formatFuzzyCandidate");export{P as a,$ as b,d as c,I as d,g as e,S as f,E as g,_ as h,O as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-EI7MMDWY.js";var a="pi-agent-ide-tips",c=1,T="pi-agent-ide-tips/core/ready",f="pi-agent-ide-tips/provider/register";function P(e){return t(e)&&e.protocol===a&&e.apiVersion===c}r(P,"isTipCoreReady");function u(e){return!t(e)||typeof e.accept!="function"||!t(e.provider)?!1:e.provider.protocol===a&&e.provider.apiVersion===c&&typeof e.provider.id=="string"&&e.provider.id.length>0&&typeof e.provider.getTip=="function"}r(u,"isTipProviderRegistrationRequest");function t(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}r(t,"isRecord");function
|
|
1
|
+
import{a as r}from"./chunk-EI7MMDWY.js";var a="pi-agent-ide-tips",c=1,T="pi-agent-ide-tips/core/ready",f="pi-agent-ide-tips/provider/register";function P(e){return t(e)&&e.protocol===a&&e.apiVersion===c}r(P,"isTipCoreReady");function u(e){return!t(e)||typeof e.accept!="function"||!t(e.provider)?!1:e.provider.protocol===a&&e.provider.apiVersion===c&&typeof e.provider.id=="string"&&e.provider.id.length>0&&typeof e.provider.getTip=="function"}r(u,"isTipProviderRegistrationRequest");function t(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}r(t,"isRecord");function R(e,d){let s=r(()=>{let o,n={provider:d,accept(y){if(o!==void 0)throw new Error(`Tip provider ${d.id} was accepted more than once`);o=y}};return e.events.emit(f,n),o},"announce"),i=r(()=>{},"unsubscribe");i=e.events.on(T,o=>{if(!P(o))throw new Error("Invalid tip core readiness event");let n=s();if(n===void 0)throw new Error("Tip core did not accept the provider");i(),n.catch(()=>{})}),e.on("session_shutdown",i);let p=s();if(p!==void 0)return i(),p}r(R,"connectTipProvider");export{R as a,a as b,c,T as d,f as e,P as f,u as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I}from"./chunk-
|
|
1
|
+
import{a as I}from"./chunk-6XFUICD7.js";import{g as r}from"./chunk-PJL3UVMJ.js";import{a as l}from"./chunk-EI7MMDWY.js";import{readFile as S}from"node:fs/promises";async function m(h,t,o){o?.throwIfAborted(),w??=S(new URL("./vision-capture-worker.py",new URL("../src/backend/vision-capture.ts",import.meta.url).href),"utf8");let s=await I(h,"python3",["-c",await w,JSON.stringify({kind:"probe"})],t,{signal:o,timeoutMs:5e3,maxBytes:128*1024});if(o?.throwIfAborted(),s.exitCode!==0)throw new r("CAPABILITY_UNAVAILABLE",t,"not-applied");let e;try{e=JSON.parse(s.stdout.toString("utf8"))}catch{throw new r("INVALID_RESPONSE",t,"not-applied")}if(typeof e!="object"||e===null)throw new r("INVALID_RESPONSE",t,"not-applied");if("display"in e&&e.display===!0&&"window"in e&&typeof e.window=="boolean"&&(e.window||"error"in e&&e.error==="CAPABILITY_UNAVAILABLE"))return{display:{ok:!0,detail:"Target X11 connection opened without pixels; capture opt-in unchanged"},window:{ok:e.window,detail:e.window?"Target X-Resource 1.2 is available; individual window authorization is not checked":`CAPABILITY_UNAVAILABLE: ${t} (trusted X11 client identity unavailable)`}};let n="error"in e&&typeof e.error=="string"&&y.has(e.error)?e.error:"INVALID_RESPONSE";throw new r(n,t,"not-applied")}l(m,"probeSshCapture");var w,E=Buffer.from([137,80,78,71,13,10,26,10]),y=new Set(["DESKTOP_UNAVAILABLE","CAPABILITY_UNAVAILABLE","ENOENT","EACCES","STALE_PROCESS","AMBIGUOUS_WINDOW","WINDOW_OBSCURED","CONTENT_LIMIT","PIXEL_LIMIT","BYTE_LIMIT"]);async function g(h,t,o,s){s?.throwIfAborted();let e=o.kind==="window"?"window:":"display:";if(!t.startsWith(`${e}ssh://`))throw new r("INVALID_SOURCE",t,"not-applied");let n=new URL(t.slice(e.length)),p=o.kind==="window"?o.pid:o.index;if(n.username||n.password||n.port||n.search||!Number.isSafeInteger(p)||(o.kind==="window"?p<1||n.pathname!==`/${p}`||n.hash!=="":p<0||n.pathname!=="/"||n.hash!==`#${p}`&&!(p===0&&n.hash==="")))throw new r("INVALID_SOURCE",t,"not-applied");try{let a=h.resolve(`ssh://${n.hostname}/`);if(!a)throw new r("UNSUPPORTED_SOURCE",t,"not-applied");w??=S(new URL("./vision-capture-worker.py",new URL("../src/backend/vision-capture.ts",import.meta.url).href),"utf8");let i=await I(a.backend.target,"python3",["-c",await w,JSON.stringify(o)],t,{signal:s,timeoutMs:1e4,maxBytes:20*1024*1024});if(s?.throwIfAborted(),i.exitCode!==0)throw new r("CAPABILITY_UNAVAILABLE",t,"not-applied");if(i.stdout.subarray(0,8).equals(E)){if(i.stdout.length<33||i.stdout.length>20*1024*1024||i.stdout.toString("ascii",12,16)!=="IHDR")throw new r("INVALID_RESPONSE",t,"not-applied");let A=i.stdout.readUInt32BE(16),f=i.stdout.readUInt32BE(20);if(A<1||f<1||A*f>16*1024*1024)throw new r("PIXEL_LIMIT",t,"not-applied");return i.stdout}let d;try{d=JSON.parse(i.stdout.toString("utf8"))}catch{throw new r("INVALID_RESPONSE",t,"not-applied")}let c=typeof d=="object"&&d!==null&&"error"in d&&typeof d.error=="string"&&y.has(d.error)?d.error:"INVALID_RESPONSE";throw new r(c,t,"not-applied")}catch(a){throw a instanceof r?new r(a.code,t,a.effect):a}}l(g,"captureSshFrame");export{m as a,g as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-NUM3YQGK.js";import{g as s}from"./chunk-PJL3UVMJ.js";import{a as o}from"./chunk-EI7MMDWY.js";async function h(r,c,d){try{await r.stop()}catch(t){if(!(t instanceof s)||t.code!=="TRANSPORT_FAILED"||!r.identity)throw t;let e;try{e=await n(c,d,r.pid)}catch(i){throw new AggregateError([t,i],"Owned SSH cleanup could not be reconciled",{cause:i})}if(e===void 0||e.identity!==r.identity)return;throw t}}o(h,"stopOwnedSshProcess");export{h as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as m,j as g,k as x,o as h}from"./chunk-
|
|
1
|
+
import{f as m,j as g,k as x,o as h}from"./chunk-LCWBVOII.js";import{a as i}from"./chunk-EI7MMDWY.js";import{Type as r}from"typebox";import{Value as y}from"typebox/value";import{Type as l}from"typebox";var u=l.Object({path:l.Optional(l.String({description:"What to read: a supported resource such as a file or directory path, URL, returned temp: reference, SEARCH# or RESULT# reference, or registered protocol source. Supply a path; an empty call cannot select a source."})),offset:l.Optional(l.Number({description:"For raw: sources, use a zero-based byte offset; negative offsets count from the file end. For other sources: first line to return, numbered from 1. Omit or use 0 to start at line 1; -1 starts at the last line, -10 at the tenth line from the end. For path#anchor, SEARCH or RESULT# selections, count from its containing line instead: 0 or 1 starts there, 2 starts one line later, -1 one line earlier. For image and sequence views, offset is a zero-based row-major grid cell index and requires limit."})),limit:l.Optional(l.Number({description:"For raw: sources, use a non-negative byte count (0 reads no bytes). Otherwise, maximum lines from the selected starting position. Output is bounded; omit for the default read. For image and sequence views, limit is the square grid cell size in pixels; omit offset to select cell 0, or omit both for the bounded full image."})),views:l.Optional(l.Array(l.String(),{description:`Optional source-specific presentations. Combine views when both presentations are needed, for example ["anchors", "ast"]. Omit for the source's default presentation.`}))}),L={path:"Source to read: a resource path, unchanged source result or its UUID. Supply a source; an empty call cannot select one. temp:<id> reads saved output. raw:<local-file> reads original bytes from a regular file; relative, absolute and file:// paths are accepted.",offset:"For raw: sources, a zero-based integer byte offset; negative offsets count from the file end. For text sources, the first line to return, numbered from 1. Omit or use 0 to start at line 1; -1 starts at the last line, -10 at the tenth line from the end.",limit:"For raw: sources, a non-negative integer byte count (0 reads no bytes). For text sources, the maximum lines from the selected starting position. Omit for the default read. For other non-text sources, use only a range form described for that source.",views:"Source-specific presentations. Omit for the source's default presentation. Supply settings after a colon using the syntax below. Combine views only when their contracts allow it. raw: sources do not accept views."};function _(e){let n=i((s,a)=>({...s,description:[L[a],e[a]].filter(R=>R!==void 0).join(`
|
|
2
2
|
`)}),"describe");return{...u,properties:{path:n(u.properties.path,"path"),offset:n(u.properties.offset,"offset"),limit:n(u.properties.limit,"limit"),views:n(u.properties.views,"views")}}}i(_,"describeReadParameters");import{Type as t}from"typebox";var k=t.Object({value:t.String(),kind:t.String(),state:t.Optional(t.String())},{additionalProperties:!1}),w=t.Object({lineNumber:t.Integer(),content:t.String(),lineEnding:t.String(),anchors:t.Optional(t.Array(t.String()))},{additionalProperties:!1}),P=t.Object({path:t.String(),offset:t.Integer()},{additionalProperties:!1}),f={source:t.String(),truncated:t.Boolean(),continuation:t.Optional(P),fullResult:t.Optional(t.String())},b=t.Object({...f,kind:t.Literal("text"),target:t.Optional(t.String()),lines:t.Array(w),startLine:t.Integer(),endLine:t.Integer(),totalLines:t.Integer(),references:t.Optional(t.Array(k))},{additionalProperties:!1}),S=t.Object({...f,kind:t.Literal("bytes"),bytes:t.Array(t.Integer({minimum:0,maximum:255})),byteOffset:t.Integer(),byteLength:t.Integer(),totalBytes:t.Integer()},{additionalProperties:!1}),v=t.Union([t.Object({type:t.Literal("text"),text:t.String()},{additionalProperties:!1}),t.Object({type:t.Literal("image"),mimeType:t.String()},{additionalProperties:!1})]),T=t.Object({...f,kind:t.Literal("native"),blocks:t.Array(v)},{additionalProperties:!1}),p=t.Union([t.Object({kind:t.Literal("recovery"),source:t.String(),candidates:t.Array(t.Object({path:t.String()},{additionalProperties:!1}))},{additionalProperties:!1}),b,S,T,t.Object({kind:t.Literal("resources"),source:t.Optional(t.String()),resources:t.Array(t.Union([b,S,T])),truncated:t.Boolean(),fullResult:t.Optional(t.String())},{additionalProperties:!1})]),C=m(p);function E(e){return{lineNumber:e.lineNumber,content:e.content,lineEnding:e.lineEnding,...e.anchors===void 0?{}:{anchors:[...e.anchors]}}}i(E,"publicLine");function O(e){if(e.kind==="resources"){let o=e.resources.map(d=>O(d));return{kind:e.kind,...e.source===void 0?{}:{source:e.source},resources:o,truncated:o.some(d=>typeof d=="object"&&d!==null&&"truncated"in d&&d.truncated===!0)}}if(e.kind==="bytes"){let o=e.bytes.slice(0,32768),d=e.truncated===!0||o.length<e.bytes.length;return{kind:e.kind,source:e.source,bytes:o,byteOffset:e.byteOffset,byteLength:o.length,totalBytes:e.totalBytes,truncated:d,...e.byteOffset+o.length<e.totalBytes?{continuation:{path:e.source,offset:e.byteOffset+o.length}}:{}}}if(e.kind==="native")return{kind:e.kind,source:e.source,truncated:!1,blocks:e.blocks.map(o=>{if(o.type==="text")return{type:o.type,text:o.text};if(o.type==="image")return{type:o.type,mimeType:o.mimeType};throw new TypeError("Custom content requires a structured adapter")})};let n=[],s=0;for(let o of e.lines){let d=E(o);if(s+=Buffer.byteLength(JSON.stringify(d)),n.length>=2e3||s>512*1024)break;n.push(d)}if(n.length===0&&e.lines.length>0)throw new RangeError("Selected line exceeds the structured window; use a raw byte range or a source-specific view");let a=n.length<e.lines.length,R=n.at(-1)?.lineNumber??e.startLine-1;return{kind:e.kind,source:e.source,...e.target===void 0?{}:{target:e.target},lines:n,startLine:n[0]?.lineNumber??0,endLine:n.at(-1)?.lineNumber??0,totalLines:e.totalLines,truncated:a,...e.target===void 0?{}:{target:e.target},...e.references===void 0?{}:{references:e.references},...a||R<e.totalLines?{continuation:{path:e.source,offset:R+1}}:{}}}i(O,"publicData");function D(e){let n=e.details.failure,s=n?.cause instanceof x?n.cause:void 0;if(e.isError||n!==void 0)return g(e,p,{status:"error",...n?.candidates?.length&&n.source!==void 0?{data:{kind:"recovery",source:n.source,candidates:n.candidates}}:{},errors:[{code:s?.code??n?.code??"READ_FAILED",message:s===void 0?n?.message??"Read failed":`${s.code}: ${n?.source??s.source}`,...n?.source===void 0?{}:{source:n.source}}]});try{if(e.script===void 0)throw new TypeError("Read handler must return structured script data");let a=O(e.script);return g(e,p,{status:"success",data:e.details.temporarySource!==void 0&&typeof a=="object"&&a!==null?{...a,fullResult:e.details.temporarySource}:a,errors:[]})}catch(a){return g(e,p,{status:"error",errors:[{code:a instanceof RangeError?"STRUCTURED_RESULT_TOO_LARGE":"STRUCTURED_ADAPTER_REQUIRED",message:a instanceof Error?a.message:String(a)}]})}}i(D,"structuredRead");var c=r.Function([],r.Unknown()),A=r.Object({resolver:r.Unknown(),matchesCall:r.Optional(c),renderCall:r.Optional(c),priority:r.Optional(r.Number()),renderResult:r.Optional(c),preserveTruncatedOutput:r.Optional(r.Boolean())}),F=r.Object({resolver:r.Unknown(),priority:r.Optional(r.Number())}),N=r.Object({id:r.String({pattern:"\\S"}),priority:r.Optional(r.Number()),resolve:c}),U=r.Object({view:r.String({pattern:"\\S"}),contentKind:r.Optional(r.Union([r.Literal("text"),r.Literal("any")])),includes:r.Optional(r.Array(r.String({pattern:"\\S"}))),presenter:r.Object({id:r.String(),present:c}),priority:r.Optional(r.Number())}),j=r.Object({resolvedBy:r.String({pattern:"\\S"}),contentKind:r.Union([r.Literal("text"),r.Literal("any")])}),I=r.Union([r.Object({stage:r.Literal("pre-read"),handler:c}),r.Object({stage:r.Literal("read"),when:j,handler:c}),r.Object({stage:r.Literal("post-read"),handler:c})]);function J(e){if(!y.Check(F,e))return!1;let n=e,s=n.resolver;return typeof s.id=="string"&&s.id.length>0&&typeof s.tryResolve=="function"&&(!("priority"in n)||typeof n.priority=="number")}i(J,"isTextTargetResolverRegistration");function Y(e){if(!y.Check(A,e))return!1;let n=e;return h(n.resolver)?n.resolver.id!=="any"&&(!("priority"in n)||typeof n.priority=="number")&&(!("matchesCall"in n)||typeof n.matchesCall=="function")&&(!("renderCall"in n)||typeof n.renderCall=="function")&&"matchesCall"in n=="renderCall"in n&&(!("renderResult"in n)||typeof n.renderResult=="function"):!1}i(Y,"isResourceResolverRegistration");function X(e){return y.Check(I,e)}i(X,"isReadHandlerRegistration");function Z(e){return y.Check(U,e)}i(Z,"isReadViewRegistration");function ee(e){return y.Check(N,e)}i(ee,"isFragmentResolverRegistration");function te(e){return B(e)?e.kind==="not-handled"?!0:e.kind==="failed"?typeof e.message=="string"&&e.message.length>0:e.kind==="resolved"&&typeof e.originLine=="number":!1}i(te,"isReadFragmentResolution");function B(e){return typeof e=="object"&&e!==null}i(B,"isRecord");export{u as a,_ as b,p as c,C as d,D as e,J as f,Y as g,X as h,Z as i,ee as j,te as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f,b as u}from"./chunk-
|
|
1
|
+
import{a as f,b as u}from"./chunk-6XFUICD7.js";import{g as o}from"./chunk-PJL3UVMJ.js";import{b as w}from"./chunk-VDP5CQHM.js";import{a as d}from"./chunk-EI7MMDWY.js";import{readFile as R}from"node:fs/promises";import{Type as i}from"typebox";import{Value as g}from"typebox/value";var y=i.Object({url:i.String(),status:i.Integer({minimum:200,maximum:599}),statusText:i.String(),headers:i.Array(i.Tuple([i.String(),i.String()])),body:i.String()}),b=new Set(["INVALID_SOURCE","BYTE_LIMIT","TIMEOUT","HTTP_FAILED"]),m;async function S(n,s,t,c){c?.throwIfAborted(),m??=R(new URL("./web-http-worker.py",new URL("../src/backend/web-http.ts",import.meta.url).href),"utf8");try{let e=await f(n,"python3",["-c",await m,JSON.stringify({url:s.href,timeoutSeconds:30})],t,{signal:c,timeoutMs:3e4,maxBytes:33554432});if(e.exitCode!==0)throw new o("HTTP_FAILED",t,"not-applied");let r;try{r=JSON.parse(e.stdout.toString("utf8"))}catch{throw new o("INVALID_RESPONSE",t,"not-applied")}if(typeof r=="object"&&r!==null&&"error"in r)throw new o(typeof r.error=="string"&&b.has(r.error)?r.error:"INVALID_RESPONSE",t,"not-applied");if(!g.Check(y,r))throw new o("INVALID_RESPONSE",t,"not-applied");let h=Buffer.from(r.body,"base64");if(h.toString("base64")!==r.body||h.length>16*1024*1024)throw new o("INVALID_RESPONSE",t,"not-applied");let a;try{let p=new URL(r.url);if(!["http:","https:"].includes(p.protocol)||p.username||p.password)throw new Error("Invalid native HTTP redirect");a=new Response([204,205,304].includes(r.status)?null:h,{status:r.status,statusText:r.statusText,headers:r.headers}),Object.defineProperty(a,"url",{value:p.href})}catch{throw new o("INVALID_RESPONSE",t,"not-applied")}return a}catch(e){throw e instanceof o?new o(e.code,t,e.effect):e}}d(S,"fetchSshWebResponse");function I(n){if(!/^web:/iu.test(n))return;let s=/^web:ssh:\/\/([a-z0-9._-]+)\/(https?:\/\/.+)$/iu.exec(n);if(!s?.[1]||!s[2])throw new o("INVALID_SOURCE",n,"not-applied");let t;try{t=new URL(s[2])}catch{throw new o("INVALID_SOURCE",n,"not-applied")}if(t.username||t.password)throw new o("INVALID_SOURCE",n,"not-applied");return{target:s[1],url:t,source:`web:ssh://${s[1]}/${t.href}`}}d(I,"parseSshWebSource");function D(n,s){return{id:"ssh-web",async tryResolve(t,c){try{let e=I(t);if(!e)return{kind:"not-handled"};c.signal?.throwIfAborted();let r=s.resolve(`ssh://${e.target}/`);if(!r)throw new o("UNSUPPORTED_SOURCE",e.source,"not-applied");let a=await w(n,{fetch:d(async(p,l)=>S(r.backend.target,e.url,e.source,l?.signal??void 0),"fetch"),browser:{load(p,l){return u(r.backend.target,p,e.source,l)}}}).tryResolve(e.url.href,c);return a.kind!=="resolved"?a:{kind:"resolved",resource:{...a.resource,source:e.source}}}catch(e){return{kind:"failed",error:e instanceof o?new o(e.code,t,e.effect):e}}}}}d(D,"createSshWebResolver");export{I as a,D as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-QT3EAHOG.js";import{a as w}from"./chunk-SMIFCAAX.js";import{a as E,b as g}from"./chunk-VXP5BMW7.js";import{b as S}from"./chunk-RW2GTYQI.js";import{a as u,b as v,c as U}from"./chunk-RIJMXO43.js";import"./chunk-VMTOFEXF.js";import"./chunk-CPELC6JE.js";import{g as l}from"./chunk-PJL3UVMJ.js";import{a as p,b as O,c as f,e as j}from"./chunk-MKEC3U2M.js";import{c as R}from"./chunk-W7CASEO3.js";import"./chunk-TOYN4W4F.js";import"./chunk-YJ6T3PEP.js";import"./chunk-S72FVLUX.js";import"./chunk-K5G4FDXD.js";import"./chunk-LCWBVOII.js";import"./chunk-ZAWRSA7N.js";import"./chunk-OFILFO6D.js";import{c as P}from"./chunk-IMGIDBCC.js";import"./chunk-BXGMMZT3.js";import"./chunk-756K3LJY.js";import"./chunk-ZC65Z3CK.js";import{a as s}from"./chunk-EI7MMDWY.js";import h from"node:path";import{fileURLToPath as x}from"node:url";function A(i){let c=E(i),T=w(i);return{async resolveProject(e,o){if(e.startsWith("ssh://")||o.startsWith("ssh://")){let n=i.resolve(e,o);if(!n)throw new l("UNSUPPORTED_SOURCE",e,"not-applied");let a=i.resolve(o);if(a&&a.location.target!==n.location.target)throw new l("UNSUPPORTED_SOURCE",e,"not-applied");let r=await C(n.backend,n.location.path,a?.location.path,"linters",p);return r?{projectRoot:r.cwd,external:r.external}:void 0}if(e.includes("://")||o.includes("://"))throw new l("UNSUPPORTED_SOURCE",e,"not-applied");let t=await P(o,e,"linters",p);return t===void 0?void 0:{projectRoot:t,external:t!==h.resolve(o)}},async loadRegistry(e,o){let t=i.resolve(e);return O.fromDirectory(e,{includeGlobal:!o,requireBuiltInEvidence:!0,...t?{layerAccess:c,executableAvailability:s(n=>S(t.backend,t.location.path,n),"executableAvailability"),recipeEvidence:s(n=>g(t.backend,t.location.path,n),"recipeEvidence")}:{}})},async run(e,o){let t=i.resolve(o.filePath);if(!t)return f(e,o);let n=i.resolve(o.projectRoot);if(!n||n.location.target!==t.location.target)throw new l("UNSUPPORTED_SOURCE",o.filePath,"not-applied");let a=e.check.cwd==="file"?h.posix.dirname(t.location.path):n.location.path;return f(e,{...o,processAccess:T,acceptsFile(r){if(r.startsWith("ssh://")){let d=i.resolve(r);return d?.location.target===t.location.target&&d.location.path===t.location.path}let m=r.startsWith("file:")?x(r):r;return m.includes("://")?!1:h.posix.resolve(a,m)===t.location.path}})}}}s(A,"createOwnedLintRuntime");async function L(i){let c=new U(await v(u(R())));await j(i,A(c))}s(L,"registerOwnedLint");export{A as createOwnedLintRuntime,L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,d as C}from"./chunk-
|
|
1
|
+
import{c as S,d as C}from"./chunk-4DIUPEDF.js";import{a as h}from"./chunk-EI7MMDWY.js";import z from"node:path";import{pathToFileURL as x}from"node:url";function b(e,n){let r=new Map;for(let t of e){let i=r.get(t.source)??[];i.push(t),r.set(t.source,i)}let a=new Set,u=e.length,s=[...r].sort(([t,i],[d,m])=>m.length-i.length||t.localeCompare(d));for(let[t,i]of s){if(u<=n)break;a.add(t),u-=i.length-1}let c=[],o=n,l=[...r].sort(([t],[i])=>Number(a.has(t))-Number(a.has(i))||t.localeCompare(i));for(let[t,i]of l){if(!a.has(t)){if(i.length>o)continue;c.push({kind:"detailed",source:t,matches:i}),o-=i.length;continue}if(o<1)continue;o--;let d=new Map;for(let g of i)d.set(g.lineText,(d.get(g.lineText)??0)+1);let m=r.size===1?[...d].sort(([g,p],[F,w])=>w-p||g.localeCompare(F)).slice(0,o).map(([g,p])=>({text:g,matchCount:p})):[];o-=m.length,c.push({kind:"compacted",source:t,matchCount:i.length,uniqueLineCount:d.size,groups:m})}return c.sort((t,i)=>t.source.localeCompare(i.source)),{files:c}}h(b,"planSearchPresentation");function N(e,n,r,a,u,s=50){let c=b(n,s),o=new Set(n.map(t=>t.source)).size,l=c.files.map(t=>t.kind==="detailed"?L(t.source,t.matches,a):{path:M(t.source,a),link:x(t.source).href,matchCount:t.matchCount,uniqueLineCount:t.uniqueLineCount,groups:t.groups,lines:[]});return{...u!==void 0&&{sessionId:u},query:e,matchCount:n.length,fileCount:o,...c.files.length<o?{omittedFileCount:o-l.length,omittedMatchCount:n.length-l.reduce((t,i)=>t+i.matchCount,0)}:{},complete:r,files:l}}h(N,"createSearchToolDetails");function $(e,n){return{fileCount:new Set(e.flatMap(r=>r.matches.map(a=>a.source))).size,groups:e.map(r=>{let u=N(r.identifier,r.matches.slice(0,S.previewMatches),r.complete,n).files.map(s=>{let c=s.lines.map(o=>{let l=Math.max(0,(o.ranges[0]?.from??0)-64),t=Math.min(o.text.length,(o.ranges[0]?.to??0)+64),i=l>0?"\u2026":"",d=o.ranges.filter(m=>m.from>=l&&m.to<=t).map(m=>({from:m.from-l+i.length,to:m.to-l+i.length}));return{...o,text:i+o.text.slice(l,t)+(t<o.text.length?"\u2026":""),ranges:d,matchCount:d.length}});return{...s,lines:c,matchCount:c.reduce((o,l)=>o+l.matchCount,0)}});return{identifier:r.identifier,files:u}})}}h($,"createFuzzyPresentation");function k(e){return f(e)&&y(e.fileCount)&&Array.isArray(e.groups)&&e.groups.every(n=>f(n)&&typeof n.identifier=="string"&&Array.isArray(n.files)&&n.files.every(R))}h(k,"isFuzzyPresentation");function E(e){if(!f(e)||typeof e.query!="string"||!y(e.matchCount)||!y(e.fileCount)||e.omittedFileCount!==void 0&&!y(e.omittedFileCount)||e.omittedMatchCount!==void 0&&!y(e.omittedMatchCount)||typeof e.complete!="boolean"||e.sessionId!==void 0&&typeof e.sessionId!="string"||e.fuzzy!==void 0&&!C(e.fuzzy)||e.fuzzyPresentation!==void 0&&!k(e.fuzzyPresentation)||!Array.isArray(e.files)||!e.files.every(R))return!1;let n=e.files;return e.fileCount===n.length+(e.omittedFileCount??0)&&e.matchCount===n.reduce((r,a)=>r+a.matchCount,0)+(e.omittedMatchCount??0)}h(E,"isSearchToolDetails");function L(e,n,r){let a=new Map;for(let s of n){let c=a.get(s.lineNumber);if(c!==void 0&&c.text!==s.lineText)throw new Error(`Search results disagree about line ${String(s.lineNumber)} in ${e}.`);let o=c??{lineNumber:s.lineNumber,text:s.lineText,ranges:[]};o.ranges.push({from:s.startColumn,to:s.endColumn}),a.set(s.lineNumber,o)}let u=[...a.values()].sort((s,c)=>s.lineNumber-c.lineNumber).map(s=>{let c=[...s.ranges].sort((o,l)=>o.from-l.from||o.to-l.to);return{lineNumber:s.lineNumber,text:s.text,matchCount:c.length,ranges:c}});return{path:M(e,r),link:x(e).href,matchCount:n.length,lines:u}}h(L,"createSearchResultFile");function R(e){if(!f(e)||typeof e.path!="string"||typeof e.link!="string"||!y(e.matchCount)||!Array.isArray(e.lines)||!e.lines.every(P))return!1;let n=e.lines,r=e.groups,a=new Set(n.flatMap(u=>u.logicalMatchIds??[]));return(r===void 0||Array.isArray(r)&&r.every(u=>f(u)&&typeof u.text=="string"&&y(u.matchCount)))&&(e.uniqueLineCount===void 0||y(e.uniqueLineCount))&&(n.length===0||(a.size>0?a.size===e.matchCount:e.matchCount===n.reduce((u,s)=>u+s.matchCount,0)))}h(R,"isSearchResultFile");function P(e){return f(e)&&Number.isSafeInteger(e.lineNumber)&&e.lineNumber>=1&&typeof e.text=="string"&&y(e.matchCount)&&Array.isArray(e.ranges)&&e.ranges.length===e.matchCount&&(e.logicalMatchIds===void 0||Array.isArray(e.logicalMatchIds)&&e.logicalMatchIds.every(n=>typeof n=="string"))&&e.ranges.every(n=>A(n,e.text))}h(P,"isSearchResultLine");function A(e,n){return f(e)&&Number.isSafeInteger(e.from)&&Number.isSafeInteger(e.to)&&e.from>=0&&e.to>e.from&&e.to<=n.length}h(A,"isSearchResultRange");function f(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}h(f,"isRecord");function y(e){return Number.isSafeInteger(e)&&e>=0}h(y,"isCount");function M(e,n){if(e.includes("://"))return e;let r=z.relative(n,e);return r.length>0&&!r.startsWith("..")&&!z.isAbsolute(r)?r:e}h(M,"displaySource");export{b as a,N as b,$ as c,E as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
1
|
+
import{a as d}from"./chunk-VMTOFEXF.js";import{g as n}from"./chunk-PJL3UVMJ.js";import{a as p}from"./chunk-EI7MMDWY.js";import{readFile as h}from"node:fs/promises";import{Type as m}from"typebox";import{Value as g}from"typebox/value";async function f(s,a,e,o,t){return d(s,a,e,o,{...t,effect:"not-applied"})}p(f,"readOwnedSshCommand");var S=m.Object({html:m.String(),source:m.String()}),u=new Set(["CAPABILITY_UNAVAILABLE","INVALID_SOURCE","BYTE_LIMIT","TIMEOUT","HTTP_FAILED","BROWSER_FAILED","CANCELLED"]),l;async function B(s,a,e,o){let t=await w(s,a,e,o,"html");if(!g.Check(S,t)||Buffer.byteLength(t.html,"utf8")>16*1024*1024)throw new n("INVALID_RESPONSE",e,"not-applied");let r=new URL(t.source);if(!["http:","https:"].includes(r.protocol)||r.username||r.password)throw new n("INVALID_RESPONSE",e,"not-applied");return t}p(B,"readSshBrowserPage");async function N(s,a,e,o){let t=await w(s,a,e,{signal:o,timeoutMs:3e4},"image");if(typeof t!="object"||t===null||!("png"in t)||typeof t.png!="string")throw new n("INVALID_RESPONSE",e,"not-applied");let r=Buffer.from(t.png,"base64");if(r.toString("base64")!==t.png||r.length>20*1024*1024||!r.subarray(0,8).equals(Buffer.from("89504e470d0a1a0a","hex")))throw new n("INVALID_RESPONSE",e,"not-applied");return r}p(N,"captureSshBrowserImage");async function R(s,a,e){let o=await w(s,new URL("about:blank"),a,{signal:e,timeoutMs:3e4},"probe");if(!g.Check(m.Object({ready:m.Literal(!0)}),o))throw new n("INVALID_RESPONSE",a,"not-applied")}p(R,"probeSshBrowser");async function w(s,a,e,o,t){o.signal?.throwIfAborted(),l??=h(new URL("./web-browser-worker.mjs",new URL("../src/backend/web-browser.ts",import.meta.url).href),"utf8");try{let r=await f(s,"node",["--input-type=module","-e",await l,JSON.stringify({kind:t,url:a.href,timeoutMs:o.timeoutMs})],e,{signal:o.signal,timeoutMs:o.timeoutMs,maxBytes:33554432});if(r.exitCode!==0)throw new n("BROWSER_FAILED",e,"not-applied");let i;try{i=JSON.parse(r.stdout.toString("utf8"))}catch{throw new n("INVALID_RESPONSE",e,"not-applied")}if(typeof i=="object"&&i!==null&&"error"in i)throw new n(typeof i.error=="string"&&u.has(i.error)?i.error:"INVALID_RESPONSE",e,"not-applied");return i}catch(r){throw r instanceof n?new n(r.code==="ENOENT"?"CAPABILITY_UNAVAILABLE":r.code,e,r.effect):r}}p(w,"runBrowser");export{f as a,B as b,N as c,R as d};
|