@ensocode/server 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +117 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-MGNURJ72.js +6 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-4WDOP7MF.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-4KSTFUIK.js +19 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-4UNPP53I.js +55 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-CCYGJPSU.js +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-FF6XOTWB.js} +9 -9
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-FMPAMX2W.js +82 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-H4W2F2IO.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-JLFZH7C6.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-LCB5FO32.js +4 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-GN3QYODH.js → chunk-LQUBM7HF.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-MABPTPMF.js +30 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-MPEFJ3RP.js +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-EBFHJFEE.js → chunk-PYBKJQVF.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-VKJQ6CME.js +8 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-B46VJEHW.js → chunk-VUPOM3AH.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-WL4TUXY7.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-XM4MQFQV.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ZKNSXGL5.js +1243 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-35W4A75E.js} +7 -7
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-WKRH5HZA.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/codemode-worker.js +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-GEVPKQF6.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-L2EEDV3L.js} +5 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/github-copilot.js +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-generative-ai-INGKNW72.js → google-generative-ai-VSMFCHJU.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-vertex-IBTX6MBF.js → google-vertex-35UTLZJN.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-Z3SS4FP4.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-LWJTUFIM.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-YYIXDJWF.js +10 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-completions-EJNYB6IX.js → openai-completions-X2I4TQ2L.js} +3 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-GG3FBAIF.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-responses-5CX3GG6R.js +4 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-WHNK2UQG.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-5CXWY5I7.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-J5ZSBGTX.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-KA2SBSSD.js} +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-7ZY53V4K.js +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli-runtime.js +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-command.js +26 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-login.d.ts +15 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-login.js +232 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-logout.d.ts +14 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-logout.js +57 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-terminal.d.ts +17 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-terminal.js +63 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js +3 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts +5 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +7 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +25 -6
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +139 -50
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +3 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js +3 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/cache-warmer.d.ts +4 -37
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/cache-warmer.js +11 -89
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +2 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +10 -5
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +1 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +9 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +28 -6
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts +2 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.d.ts +12 -37
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.js +42 -121
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts +52 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +20 -19
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.d.ts +5 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js +11 -4
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts +10 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +50 -5
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/pi-ai-schemas.d.ts +4 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/preferred-providers.d.ts +17 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/preferred-providers.js +24 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +18 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-composer.js +3 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-matching.d.ts +6 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-matching.js +8 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/radius-mcp.d.ts +13 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/radius-mcp.js +29 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/runtime-credentials.d.ts +8 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/runtime-credentials.js +15 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.d.ts +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.js +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +35 -5
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.d.ts +23 -14
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.js +182 -41
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +8 -7
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +82 -36
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts +5 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +87 -75
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +2 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/powershell.js +15 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts +8 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +141 -25
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.d.ts +4 -14
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.js +23 -29
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.js +4 -4
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.js +34 -12
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/client.d.ts +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/client.js +23 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/ui.js +15 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.d.ts +2 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.js +49 -14
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/config.js +4 -7
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.js +4 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.d.ts +11 -49
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.js +56 -319
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.d.ts +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.js +4 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.d.ts +4 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.js +7 -5
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.d.ts +2 -23
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.js +6 -58
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.js +18 -6
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/main.js +46 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js +12 -4
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +5 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js +12 -4
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.d.ts +5 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.js +10 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/diff.js +11 -5
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +9 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +1 -18
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/mermaid.d.ts +2 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/mermaid.js +25 -20
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +14 -6
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/oauth-selector.d.ts +10 -3
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/oauth-selector.js +32 -5
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/provider-brand.d.ts +14 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/provider-brand.js +66 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/radius-login-selector.d.ts +1 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/radius-login-selector.js +6 -37
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +12 -4
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tree-selector.d.ts +1 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tree-selector.js +19 -10
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +11 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +110 -63
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +4 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +19 -10
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +53 -23
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +39 -8
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts +2 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js +12 -6
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js +3 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/terminal-question.d.ts +8 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/terminal-question.js +24 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/web-url.d.ts +12 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/web-url.js +20 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/cli.md +14 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +27 -7
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/keybindings.md +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/llama-cpp.md +4 -7
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/models-configuration.md +6 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/models.md +2 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/prompt-templates.md +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +4 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/plan-mode/index.ts +23 -13
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/plan-mode/utils.ts +42 -16
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/subagent/README.md +14 -11
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/subagent/index.ts +392 -171
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +2 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
- package/out/node_modules/@earendil-works/pi-coding-agent/examples/tsconfig.json +63 -35
- package/out/node_modules/@earendil-works/pi-coding-agent/package.json +7 -7
- package/out/node_modules/@earendil-works/pi-coding-agent/schemas/models.schema.json +29 -0
- package/out/node_modules/@earendil-works/pi-coding-agent/schemas/settings.schema.json +1 -1
- package/out/phone/assets/{abnfDiagram-VCTEODGH-7wNFPVNX.js → abnfDiagram-VCTEODGH-6JYofuK8.js} +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-D7mwyuxS.js +1 -0
- package/out/phone/assets/{architectureDiagram-5GKGNRK7-CnuIop2x.js → architectureDiagram-5GKGNRK7-BeLeAQB1.js} +1 -1
- package/out/phone/assets/{blockDiagram-I7D4REHJ-JVET2iOX.js → blockDiagram-I7D4REHJ-uXn3vhT2.js} +1 -1
- package/out/phone/assets/{c4Diagram-7LVT6UL2-BLFmpm8Y.js → c4Diagram-7LVT6UL2-CjzMFRll.js} +1 -1
- package/out/phone/assets/channel-BsGN1oT0.js +1 -0
- package/out/phone/assets/{chunk-4HAMMTFA-t_CWzvX0.js → chunk-4HAMMTFA-BA8HaYy2.js} +1 -1
- package/out/phone/assets/{chunk-75Z2AOVW-Ck9s4XbN.js → chunk-75Z2AOVW-BhIfO9es.js} +1 -1
- package/out/phone/assets/{chunk-DU6HZSFF-Clg-W8ZP.js → chunk-DU6HZSFF-BTLBHwj-.js} +1 -1
- package/out/phone/assets/{chunk-F27PBJKO-Dg6DF7tm.js → chunk-F27PBJKO-CUw8NZk8.js} +1 -1
- package/out/phone/assets/{chunk-GMAD6QVW-tyN1lr56.js → chunk-GMAD6QVW-bZOKnRyM.js} +1 -1
- package/out/phone/assets/{chunk-GVQU2GXP-Cp6zlp3q.js → chunk-GVQU2GXP-B0WIm1dS.js} +1 -1
- package/out/phone/assets/{chunk-IMKFNOWR-DivN0qgp.js → chunk-IMKFNOWR-DWND4rEr.js} +1 -1
- package/out/phone/assets/{chunk-L3NEJ4N5-H6AVmtE_.js → chunk-L3NEJ4N5-DgMknY3k.js} +1 -1
- package/out/phone/assets/{chunk-OSK3NFVY-D8Gtw0_S.js → chunk-OSK3NFVY-C5aEouov.js} +1 -1
- package/out/phone/assets/{chunk-P2QGCYS3-RZSHAUZq.js → chunk-P2QGCYS3-D2ID3RxV.js} +1 -1
- package/out/phone/assets/{chunk-POPQ4Y6H-BVS8pZqz.js → chunk-POPQ4Y6H-C1lOuNpV.js} +1 -1
- package/out/phone/assets/{chunk-PWAF6VOD-D7FryQWf.js → chunk-PWAF6VOD-CfqWQZRE.js} +1 -1
- package/out/phone/assets/{chunk-SHT3W25Y-DGdqMpPQ.js → chunk-SHT3W25Y-p37Dlvn4.js} +1 -1
- package/out/phone/assets/{chunk-SVP7TREG-BwyiT08_.js → chunk-SVP7TREG-CSSqW-zb.js} +1 -1
- package/out/phone/assets/{chunk-TICWLB2K-CY7mq27-.js → chunk-TICWLB2K-Bse5ne4b.js} +1 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-a1PUvjC2.js +1 -0
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-a1PUvjC2.js +1 -0
- package/out/phone/assets/{cynefin-OW5HDTMX-ep90c-ad.js → cynefin-OW5HDTMX-BGQqPhYk.js} +1 -1
- package/out/phone/assets/{cynefinDiagram-5FMLGOSQ-M8djyXi6.js → cynefinDiagram-5FMLGOSQ-Cz3XWaxY.js} +1 -1
- package/out/phone/assets/{dagre-GXQ25YYZ-Qp6_rUFB.js → dagre-GXQ25YYZ-CjAF6lSz.js} +1 -1
- package/out/phone/assets/desk-1McWacjU.js +2 -0
- package/out/phone/assets/{diagram-S7CK7UJ4-78nJmih8.js → diagram-S7CK7UJ4-B135cp5a.js} +1 -1
- package/out/phone/assets/{diagram-UQ7AKVKN-DK3Lux6Z.js → diagram-UQ7AKVKN-C4pCe0fQ.js} +1 -1
- package/out/phone/assets/{diagram-VSXAHHWV-8uHrV5vL.js → diagram-VSXAHHWV-CYkCrin2.js} +1 -1
- package/out/phone/assets/{diagram-VX7I27RA-DM2jP_ep.js → diagram-VX7I27RA-CT_vufh_.js} +1 -1
- package/out/phone/assets/{diagram-Z3DM3KII-Dk6weE7F.js → diagram-Z3DM3KII-XEkkXu3P.js} +1 -1
- package/out/phone/assets/{ebnfDiagram-PWID7BFC-CcOU0Q-s.js → ebnfDiagram-PWID7BFC-DfLyeXjw.js} +1 -1
- package/out/phone/assets/{erDiagram-RLTQ6QDP-Cv4zHR88.js → erDiagram-RLTQ6QDP-pKNbKkAP.js} +1 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-DcUsfQiW.js +1 -0
- package/out/phone/assets/flowDiagram-HODETNUW-sUobw8zi.js +1 -0
- package/out/phone/assets/{ganttDiagram-EL5Y4UJY-DpMAd_jd.js → ganttDiagram-EL5Y4UJY-Df4E50Mj.js} +1 -1
- package/out/phone/assets/{gitGraph-4MIJSDKK-CeZWGC9r.js → gitGraph-4MIJSDKK-CkjzZeFD.js} +1 -1
- package/out/phone/assets/{gitGraphDiagram-WWUBYQGX-6QsSrkNy.js → gitGraphDiagram-WWUBYQGX-CBxfRAfy.js} +1 -1
- package/out/phone/assets/{info-A6RAGUB7-C-8QwtyE.js → info-A6RAGUB7-CHFXa2pw.js} +1 -1
- package/out/phone/assets/{infoDiagram-27XIBGKW-BEywxx6y.js → infoDiagram-27XIBGKW-K0DnZhi4.js} +1 -1
- package/out/phone/assets/{ishikawaDiagram-5VMMS53U-Dv5MWe8O.js → ishikawaDiagram-5VMMS53U-DTQF2ZuR.js} +1 -1
- package/out/phone/assets/{journeyDiagram-3NMN7TZE-rZqFk8KG.js → journeyDiagram-3NMN7TZE-wBltkU2i.js} +1 -1
- package/out/phone/assets/{kanban-definition-UXKFOSKX-Vbp8P778.js → kanban-definition-UXKFOSKX-BZpcOajP.js} +1 -1
- package/out/phone/assets/{line-DtO-RzWq.js → line-BflnZFgp.js} +1 -1
- package/out/phone/assets/main-CnA1zWP8.css +1 -0
- package/out/phone/assets/main-Crtf_g8h.js +1643 -0
- package/out/phone/assets/{mermaid-parser.core-CZ9_GWM0.js → mermaid-parser.core-BiCTmcqa.js} +3 -3
- package/out/phone/assets/{mermaid.core-B15T44DF.js → mermaid.core-D3TwYaLF.js} +4 -4
- package/out/phone/assets/{mindmap-definition-YA3MSWOX-BgFUJmH3.js → mindmap-definition-YA3MSWOX-Cz0aS_6Y.js} +1 -1
- package/out/phone/assets/{packet-AYTQ26CC--RETlRVk.js → packet-AYTQ26CC-DW-djbhd.js} +1 -1
- package/out/phone/assets/{pegDiagram-XKGWAZYB-D7jmN93W.js → pegDiagram-XKGWAZYB-CE0sZZAE.js} +1 -1
- package/out/phone/assets/{pie-WAS4IAKB-CxG1AbYJ.js → pie-WAS4IAKB-CKGFlXok.js} +1 -1
- package/out/phone/assets/{pieDiagram-E7YTZNPT-CHxSdknk.js → pieDiagram-E7YTZNPT-BrnQ32_6.js} +1 -1
- package/out/phone/assets/{quadrantDiagram-AXDQQJYC-707LGShZ.js → quadrantDiagram-AXDQQJYC-BrxDAygB.js} +1 -1
- package/out/phone/assets/{radar-RG4KPBEZ-BBg9aR2Q.js → radar-RG4KPBEZ-Bo2f5QyA.js} +1 -1
- package/out/phone/assets/{railroad-74A4TZTK-BvqQaIGQ.js → railroad-74A4TZTK-BZEmm0Ha.js} +1 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-CGiIT1ZV.js +1 -0
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-C85Q3c0J.js +1 -0
- package/out/phone/assets/railroad-peg-WCYAUIDC-8qPPCLgU.js +1 -0
- package/out/phone/assets/{railroadDiagram-O6MQD6OU-BQUOk6Jm.js → railroadDiagram-O6MQD6OU-BvOyUNMC.js} +1 -1
- package/out/phone/assets/{requirementDiagram-BXWQKSXE-ByuJLR7x.js → requirementDiagram-BXWQKSXE-T42N3TW5.js} +1 -1
- package/out/phone/assets/{sankeyDiagram-P5KCCOFB-CaWA3qV1.js → sankeyDiagram-P5KCCOFB-0us9ErVV.js} +1 -1
- package/out/phone/assets/{sequenceDiagram-WJ2MYXX4--wDiyJo9.js → sequenceDiagram-WJ2MYXX4-BMcYh2ll.js} +1 -1
- package/out/phone/assets/{stateDiagram-D77RDMKH-ScVywISP.js → stateDiagram-D77RDMKH-CgP9dUc3.js} +1 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-WM4CNSf-.js +1 -0
- package/out/phone/assets/storage-CahQ0cyN.js +1 -0
- package/out/phone/assets/{swimlanes-42K2YHIH-Da4TbCnQ.js → swimlanes-42K2YHIH-VnE4ceCW.js} +1 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-65AiMWVp.js +8 -0
- package/out/phone/assets/{timeline-definition-24CTP7MA-Csp8wyPz.js → timeline-definition-24CTP7MA-tH3izgae.js} +1 -1
- package/out/phone/assets/{treeView-Q6P3EWNA-DP_TpAnB.js → treeView-Q6P3EWNA-CVFDOC7i.js} +1 -1
- package/out/phone/assets/{treemap-WGGIJYW6-CDX7X9Iz.js → treemap-WGGIJYW6-vmikHzt3.js} +1 -1
- package/out/phone/assets/{vennDiagram-4TSXK5OY-DU4FDr9s.js → vennDiagram-4TSXK5OY-b8ttDCR-.js} +1 -1
- package/out/phone/assets/{wardley-WFR3VGLG-DJY3i8km.js → wardley-WFR3VGLG-D32vKoC1.js} +1 -1
- package/out/phone/assets/{wardleyDiagram-VM6X3IG4-CDWkRMg4.js → wardleyDiagram-VM6X3IG4-CMkaIPVH.js} +1 -1
- package/out/phone/assets/{xychartDiagram-S5SC5T6Z-DAWohWCi.js → xychartDiagram-S5SC5T6Z-pLYDcql3.js} +1 -1
- package/out/phone/desk.html +2 -2
- package/out/phone/index.html +3 -3
- package/out/renderer/assets/{abnfDiagram-VCTEODGH-CyBOQPqT.js → abnfDiagram-VCTEODGH-N6OiVFQx.js} +1 -1
- package/out/renderer/assets/{arc-JLdYPu0k.js → arc-CXVc3U0J.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-5GKGNRK7-Bq5gy8K8.js → architectureDiagram-5GKGNRK7-BT5CXpcQ.js} +1 -1
- package/out/renderer/assets/{blockDiagram-I7D4REHJ-Bno0lw2B.js → blockDiagram-I7D4REHJ-C32Vqzip.js} +1 -1
- package/out/renderer/assets/{c4Diagram-7LVT6UL2-BC6INPz6.js → c4Diagram-7LVT6UL2-qjwL2BP8.js} +1 -1
- package/out/renderer/assets/channel-B1Cv56hA.js +1 -0
- package/out/renderer/assets/{chunk-2Q5K7J3B-CcyqDHha.js → chunk-2Q5K7J3B-YC6CQiyD.js} +1 -1
- package/out/renderer/assets/{chunk-5VM5RSS4-QSbyABj3.js → chunk-5VM5RSS4-E-kluPz3.js} +1 -1
- package/out/renderer/assets/{chunk-F27PBJKO-4574JVSg.js → chunk-F27PBJKO-Bhx1_P75.js} +1 -1
- package/out/renderer/assets/{chunk-IMKFNOWR-DCaKjC49.js → chunk-IMKFNOWR-Dgb_730B.js} +1 -1
- package/out/renderer/assets/{chunk-JWPE2WC7-CbFsKOIM.js → chunk-JWPE2WC7-COQNHw4u.js} +1 -1
- package/out/renderer/assets/{chunk-POPQ4Y6H-B6j8RfR6.js → chunk-POPQ4Y6H-CQz4hRgP.js} +1 -1
- package/out/renderer/assets/{chunk-SVP7TREG-kRAl0a5G.js → chunk-SVP7TREG-DGp9XQFd.js} +1 -1
- package/out/renderer/assets/{chunk-TICWLB2K-BgG8vTk6.js → chunk-TICWLB2K-CovR1uHr.js} +1 -1
- package/out/renderer/assets/{chunk-XXDRQBXY-DdqB8mBq.js → chunk-XXDRQBXY-gVmqSU5b.js} +1 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-CDWgELaf.js +1 -0
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-CDWgELaf.js +1 -0
- package/out/renderer/assets/{cose-bilkent-JH36ORCC-HfctEoii.js → cose-bilkent-JH36ORCC-DD4PEqt_.js} +1 -1
- package/out/renderer/assets/{cynefin-OW5HDTMX-BNigpbGU.js → cynefin-OW5HDTMX-DNsYCrBx.js} +1 -1
- package/out/renderer/assets/{cynefinDiagram-5FMLGOSQ-CL-lRXZ7.js → cynefinDiagram-5FMLGOSQ-CoSzqs25.js} +1 -1
- package/out/renderer/assets/{cytoscape-fcose-B40eUKiT.js → cytoscape-fcose-CV0MpCmk.js} +1 -1
- package/out/renderer/assets/{dagre-GXQ25YYZ-D7VwJTHe.js → dagre-GXQ25YYZ-BxpTPeHN.js} +1 -1
- package/out/renderer/assets/{diagram-S7CK7UJ4-CAp3JWMB.js → diagram-S7CK7UJ4-Df_OM1vW.js} +1 -1
- package/out/renderer/assets/{diagram-UQ7AKVKN-H_c4KXAy.js → diagram-UQ7AKVKN-iovjmny_.js} +1 -1
- package/out/renderer/assets/{diagram-VSXAHHWV-CsEX84Cq.js → diagram-VSXAHHWV-BMrwlcQx.js} +1 -1
- package/out/renderer/assets/{diagram-VX7I27RA-ebIy3O1D.js → diagram-VX7I27RA-DqLh449X.js} +1 -1
- package/out/renderer/assets/{diagram-Z3DM3KII-BtVfEzv9.js → diagram-Z3DM3KII-CH_W77UO.js} +1 -1
- package/out/renderer/assets/{ebnfDiagram-PWID7BFC-C25YK-UV.js → ebnfDiagram-PWID7BFC-yjzodXoL.js} +1 -1
- package/out/renderer/assets/{erDiagram-RLTQ6QDP-1imAb8Go.js → erDiagram-RLTQ6QDP-DXxhvHYS.js} +1 -1
- package/out/renderer/assets/{flowDiagram-HODETNUW-OwceYbhd.js → flowDiagram-HODETNUW-b2AWCAaB.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-EL5Y4UJY-DDoN4Uki.js → ganttDiagram-EL5Y4UJY-COkyXL3K.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-WWUBYQGX-yrrX43-g.js → gitGraphDiagram-WWUBYQGX-BYPqy5fh.js} +1 -1
- package/out/renderer/assets/globals-DX-8GWfJ.css +1 -0
- package/out/renderer/assets/globals-y5_C1IiJ.js +2539 -0
- package/out/renderer/assets/index-CHJ6mVl2.js +117 -0
- package/out/renderer/assets/{infoDiagram-27XIBGKW-BoYY6yGv.js → infoDiagram-27XIBGKW-DNg-VxlH.js} +1 -1
- package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-BbtGOrLg.js → ishikawaDiagram-5VMMS53U-DProTI6a.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-3NMN7TZE-BWTb58Kr.js → journeyDiagram-3NMN7TZE-BWhC4n3f.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UXKFOSKX-BSN2oIEH.js → kanban-definition-UXKFOSKX-CHJRR0qi.js} +1 -1
- package/out/renderer/assets/{layout-k2BpK8-6.js → layout-D8t6q8k0.js} +1 -1
- package/out/renderer/assets/{linear-DFArNkXT.js → linear-Cxb1p4iF.js} +1 -1
- package/out/renderer/assets/{mermaid.core-DthanE8x.js → mermaid.core-CFNOEUmc.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-YA3MSWOX-BhETDMxE.js → mindmap-definition-YA3MSWOX-Ba78cyY4.js} +1 -1
- package/out/renderer/assets/{pegDiagram-XKGWAZYB-B9w_o-Iv.js → pegDiagram-XKGWAZYB-C7zqoWMk.js} +1 -1
- package/out/renderer/assets/{pieDiagram-E7YTZNPT-klH2bEkC.js → pieDiagram-E7YTZNPT-g304yFeX.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-DerYxAqw.js → quadrantDiagram-AXDQQJYC-Bwn3gGTO.js} +1 -1
- package/out/renderer/assets/{railroadDiagram-O6MQD6OU-D4EFSRd0.js → railroadDiagram-O6MQD6OU-DRetS8pv.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-BXWQKSXE-C4O9MABZ.js → requirementDiagram-BXWQKSXE-CHz0FVZ7.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-ILgR3far.js → sankeyDiagram-P5KCCOFB-BYGRDIG9.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-SHHY6jka.js → sequenceDiagram-WJ2MYXX4-B60RuFFk.js} +1 -1
- package/out/renderer/assets/settings-Cd128yRb.js +34 -0
- package/out/renderer/assets/{sizeCapture-INFHLROL-CX9hC7Eu.js → sizeCapture-INFHLROL-CB-i3Fmz.js} +1 -1
- package/out/renderer/assets/{stateDiagram-D77RDMKH-CZ1zq3yT.js → stateDiagram-D77RDMKH-CJOcikAJ.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-BosPi5SR.js +1 -0
- package/out/renderer/assets/{swimlanes-42K2YHIH-BxCpUxk0.js → swimlanes-42K2YHIH-Buap2upT.js} +1 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-B7TQEEbL.js +8 -0
- package/out/renderer/assets/{timeline-definition-24CTP7MA-BZrSf5qo.js → timeline-definition-24CTP7MA-BdQta3QT.js} +1 -1
- package/out/renderer/assets/{vennDiagram-4TSXK5OY-g01Cyb5O.js → vennDiagram-4TSXK5OY-BynM2l28.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-Bt_RS10y.js → wardleyDiagram-VM6X3IG4-FZjDO9FY.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-DuwmVyP6.js → xychartDiagram-S5SC5T6Z-pJPSISxM.js} +1 -1
- package/out/renderer/index.html +3 -3
- package/out/renderer/plugin-view.html +66 -0
- package/out/renderer/settings.html +4 -4
- package/out/renderer/web-preload.js +1 -1
- package/out/server/agent.js +2355 -469
- package/out/server/chunks/{agent-D37_gFfr.js → agent--Q7N17bY.js} +567 -183
- package/out/server/chunks/{gpuBackendInstall-FekvL7Rv.js → gpuBackendInstall-P7COXJlD.js} +6 -5
- package/out/server/chunks/{loadProvider-CSeEHHnd.js → loadProvider-DvvFIF6F.js} +2 -2
- package/out/server/chunks/{manifest-Bj0K5UgY.js → manifest-BvEa5QR3.js} +220 -22
- package/out/server/chunks/{workflowPresets-DBDQwf8e.js → workflowPresets-CuLnfQqa.js} +3936 -675
- package/out/server/index.js +5666 -851
- package/out/server/plugin-host.js +42 -6
- package/package.json +7 -7
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-44DLKSKE.js +0 -1234
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +0 -10
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
- package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-O76XM3OB.js +0 -2
- package/out/phone/assets/architecture-7GRP2DOG-_byK4-L4.js +0 -1
- package/out/phone/assets/channel-Dgd_LVvp.js +0 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-C83rE770.js +0 -1
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-C83rE770.js +0 -1
- package/out/phone/assets/desk-DOJjOIls.js +0 -2
- package/out/phone/assets/eventmodeling-NTZA5JFV-7mnBgbcg.js +0 -1
- package/out/phone/assets/flowDiagram-HODETNUW-sLsydHyr.js +0 -1
- package/out/phone/assets/main-CX13EK2l.js +0 -1636
- package/out/phone/assets/main-DZEEX8Mv.css +0 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-Cm1qeEMZ.js +0 -1
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-MFhpnZ_W.js +0 -1
- package/out/phone/assets/railroad-peg-WCYAUIDC-DCsilESk.js +0 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-D1LtnHXy.js +0 -1
- package/out/phone/assets/storage-DBoRTPSQ.js +0 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-C2SWpfVX.js +0 -8
- package/out/renderer/assets/channel-C0GtgNRj.js +0 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-DUyds1A3.js +0 -1
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-DUyds1A3.js +0 -1
- package/out/renderer/assets/globals-C6gFTVZy.css +0 -1
- package/out/renderer/assets/globals-CYDlkaHa.js +0 -2509
- package/out/renderer/assets/index-D1rFnBbz.js +0 -116
- package/out/renderer/assets/settings-DB_fAikP.js +0 -33
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-NCbr7wNQ.js +0 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N--ymqRTT2.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { stat as fsStat } from "node:fs/promises";
|
|
2
2
|
import { createInterface } from "node:readline";
|
|
3
3
|
import { spawn } from "child_process";
|
|
4
4
|
import path from "path";
|
|
@@ -11,7 +11,9 @@ import { DEFAULT_MAX_BYTES, formatSize, GREP_MAX_LINE_LENGTH, truncateHead, trun
|
|
|
11
11
|
const grepSchema = Type.Object({
|
|
12
12
|
pattern: Type.String({ description: "Search pattern (regex or literal string)" }),
|
|
13
13
|
path: Type.Optional(Type.String({ description: "Directory or file to search (default: current directory)" })),
|
|
14
|
-
glob: Type.Optional(Type.String({
|
|
14
|
+
glob: Type.Optional(Type.String({
|
|
15
|
+
description: "Filter files by glob pattern, relative to path, e.g. '*.ts', 'src/**/*.ts' or '**/*.spec.ts'. A pattern without '/' matches file names at any depth",
|
|
16
|
+
})),
|
|
15
17
|
ignoreCase: Type.Optional(Type.Boolean({ description: "Case-insensitive search (default: false)" })),
|
|
16
18
|
literal: Type.Optional(Type.Boolean({ description: "Treat pattern as literal string instead of regex (default: false)" })),
|
|
17
19
|
context: Type.Optional(Type.Number({ description: "Number of lines to show before and after each match (default: 0)" })),
|
|
@@ -24,8 +26,15 @@ export const grepToolSystemPromptContribution = {
|
|
|
24
26
|
const DEFAULT_LIMIT = 100;
|
|
25
27
|
const defaultGrepOperations = {
|
|
26
28
|
isDirectory: async (p) => (await fsStat(p)).isDirectory(),
|
|
27
|
-
readFile: (p) => fsReadFile(p, "utf-8"),
|
|
28
29
|
};
|
|
30
|
+
/** Decode a ripgrep JSON text field (path or line). Non-UTF-8 data arrives base64-encoded in `bytes`. */
|
|
31
|
+
function decodeRgText(data) {
|
|
32
|
+
if (typeof data?.text === "string")
|
|
33
|
+
return data.text;
|
|
34
|
+
if (typeof data?.bytes === "string")
|
|
35
|
+
return Buffer.from(data.bytes, "base64").toString("utf-8");
|
|
36
|
+
return "";
|
|
37
|
+
}
|
|
29
38
|
export function createGrepToolDefinition(cwd, options) {
|
|
30
39
|
const customOps = options?.operations;
|
|
31
40
|
return {
|
|
@@ -64,32 +73,18 @@ export function createGrepToolDefinition(cwd, options) {
|
|
|
64
73
|
settle(() => reject(new Error(`Path not found: ${searchPath}`)));
|
|
65
74
|
return;
|
|
66
75
|
}
|
|
67
|
-
|
|
68
|
-
const
|
|
76
|
+
// Clamp so String() never yields exponent notation, which rg rejects.
|
|
77
|
+
const contextValue = context && context > 0 ? Math.min(Math.floor(context), Number.MAX_SAFE_INTEGER) : 0;
|
|
78
|
+
const effectiveLimit = Math.max(1, Math.floor(limit ?? DEFAULT_LIMIT));
|
|
69
79
|
const formatPath = (filePath) => {
|
|
70
80
|
if (isDirectory) {
|
|
71
|
-
const relative = path.relative(searchPath, filePath);
|
|
81
|
+
const relative = path.relative(searchPath, path.resolve(searchPath, filePath));
|
|
72
82
|
if (relative && !relative.startsWith("..")) {
|
|
73
83
|
return relative.replace(/\\/g, "/");
|
|
74
84
|
}
|
|
75
85
|
}
|
|
76
86
|
return path.basename(filePath);
|
|
77
87
|
};
|
|
78
|
-
const fileCache = new Map();
|
|
79
|
-
const getFileLines = async (filePath) => {
|
|
80
|
-
let lines = fileCache.get(filePath);
|
|
81
|
-
if (!lines) {
|
|
82
|
-
try {
|
|
83
|
-
const content = await ops.readFile(filePath);
|
|
84
|
-
lines = content.replace(/\r\n/g, "\n").split("\n");
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
lines = [];
|
|
88
|
-
}
|
|
89
|
-
fileCache.set(filePath, lines);
|
|
90
|
-
}
|
|
91
|
-
return lines;
|
|
92
|
-
};
|
|
93
88
|
// --no-config: the tool contract (literal, glob, limit, ...) must not depend on
|
|
94
89
|
// ambient user config like RIPGREP_CONFIG_PATH. Users can customize via bash or extensions.
|
|
95
90
|
const args = ["--no-config", "--json", "--line-number", "--color=never", "--hidden"];
|
|
@@ -97,10 +92,20 @@ export function createGrepToolDefinition(cwd, options) {
|
|
|
97
92
|
args.push("--ignore-case");
|
|
98
93
|
if (literal)
|
|
99
94
|
args.push("--fixed-strings");
|
|
95
|
+
// rg never matches a leading "./" ("./src/*.ts" finds nothing), so drop it; "!" negates.
|
|
100
96
|
if (glob)
|
|
101
|
-
args.push("--glob", glob);
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
args.push("--glob", glob.replace(/^(!?)(?:\.\/)+/, "$1"));
|
|
98
|
+
// rg emits the surrounding lines as `context` events, so no matched file is ever read here (#9276).
|
|
99
|
+
if (contextValue > 0)
|
|
100
|
+
args.push("--context", String(contextValue));
|
|
101
|
+
// rg roots --glob at its own cwd, so a directory search runs inside searchPath (#11807).
|
|
102
|
+
// It searches "." because rg canonicalizes its cwd: with an absolute path, a symlinked
|
|
103
|
+
// searchPath (macOS /tmp) would no longer lie under the glob root.
|
|
104
|
+
args.push("--", pattern, isDirectory ? "." : searchPath);
|
|
105
|
+
const child = spawn(rgPath, args, {
|
|
106
|
+
cwd: isDirectory ? searchPath : undefined,
|
|
107
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
108
|
+
});
|
|
104
109
|
const rl = createInterface({ input: child.stdout });
|
|
105
110
|
let stderr = "";
|
|
106
111
|
let matchCount = 0;
|
|
@@ -127,33 +132,40 @@ export function createGrepToolDefinition(cwd, options) {
|
|
|
127
132
|
child.stderr?.on("data", (chunk) => {
|
|
128
133
|
stderr += chunk.toString();
|
|
129
134
|
});
|
|
130
|
-
|
|
135
|
+
// Size of the full output, including lines past the byte cap that are counted but not stored.
|
|
136
|
+
let outputBytes = 0;
|
|
137
|
+
let outputLineCount = 0;
|
|
138
|
+
let lastFile;
|
|
139
|
+
// Set at the last allowed match. rg still sends that match's trailing context, kept up to
|
|
140
|
+
// trailingContextEnd, and the limit notice waits for proof of one more match.
|
|
141
|
+
let limitHit = false;
|
|
142
|
+
let trailingContextEnd = 0;
|
|
143
|
+
let done = false;
|
|
144
|
+
const finish = () => {
|
|
145
|
+
done = true;
|
|
146
|
+
stopChild(true);
|
|
147
|
+
};
|
|
148
|
+
const pushLine = (filePath, lineNumber, lineText, isMatch) => {
|
|
149
|
+
lastFile = filePath;
|
|
131
150
|
const relativePath = formatPath(filePath);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
block.push(`${relativePath}:${current}: ${truncatedText}`);
|
|
148
|
-
else
|
|
149
|
-
block.push(`${relativePath}-${current}- ${truncatedText}`);
|
|
150
|
-
}
|
|
151
|
-
return block;
|
|
151
|
+
// Strip only the line terminator: a lone CR inside a line is content, as in the read tool.
|
|
152
|
+
const sanitized = lineText.replace(/\r?\n?$/, "");
|
|
153
|
+
// Truncate long lines so grep output stays compact.
|
|
154
|
+
const { text: truncatedText, wasTruncated } = truncateLine(sanitized);
|
|
155
|
+
if (wasTruncated)
|
|
156
|
+
linesTruncated = true;
|
|
157
|
+
const line = isMatch
|
|
158
|
+
? `${relativePath}:${lineNumber}: ${truncatedText}`
|
|
159
|
+
: `${relativePath}-${lineNumber}- ${truncatedText}`;
|
|
160
|
+
// Byte truncation below drops everything past the cap, so keep counting but stop storing (#9276).
|
|
161
|
+
// outputBytes counts a newline after every line; the joined output has one fewer.
|
|
162
|
+
if (outputBytes - 1 <= DEFAULT_MAX_BYTES)
|
|
163
|
+
outputLines.push(line);
|
|
164
|
+
outputBytes += Buffer.byteLength(line, "utf-8") + 1;
|
|
165
|
+
outputLineCount++;
|
|
152
166
|
};
|
|
153
|
-
// Collect matches during streaming, then format them after rg exits.
|
|
154
|
-
const matches = [];
|
|
155
167
|
rl.on("line", (line) => {
|
|
156
|
-
if (!line.trim()
|
|
168
|
+
if (done || !line.trim())
|
|
157
169
|
return;
|
|
158
170
|
let event;
|
|
159
171
|
try {
|
|
@@ -162,24 +174,40 @@ export function createGrepToolDefinition(cwd, options) {
|
|
|
162
174
|
catch {
|
|
163
175
|
return;
|
|
164
176
|
}
|
|
165
|
-
|
|
177
|
+
const isMatch = event.type === "match";
|
|
178
|
+
if (!isMatch && event.type !== "context")
|
|
179
|
+
return;
|
|
180
|
+
const filePath = decodeRgText(event.data?.path);
|
|
181
|
+
const lineNumber = event.data?.line_number;
|
|
182
|
+
if (!filePath || typeof lineNumber !== "number")
|
|
183
|
+
return;
|
|
184
|
+
const lineText = decodeRgText(event.data?.lines);
|
|
185
|
+
if (!limitHit) {
|
|
186
|
+
pushLine(filePath, lineNumber, lineText, isMatch);
|
|
187
|
+
if (!isMatch)
|
|
188
|
+
return;
|
|
166
189
|
matchCount++;
|
|
167
|
-
const filePath = event.data?.path?.text;
|
|
168
|
-
const lineNumber = event.data?.line_number;
|
|
169
|
-
const lineText = event.data?.lines?.text;
|
|
170
|
-
if (filePath && typeof lineNumber === "number")
|
|
171
|
-
matches.push({ filePath, lineNumber, lineText });
|
|
172
190
|
if (matchCount >= effectiveLimit) {
|
|
173
|
-
|
|
174
|
-
|
|
191
|
+
limitHit = true;
|
|
192
|
+
trailingContextEnd = lineNumber + contextValue;
|
|
175
193
|
}
|
|
194
|
+
return;
|
|
176
195
|
}
|
|
196
|
+
const inWindow = filePath === lastFile && lineNumber <= trailingContextEnd;
|
|
197
|
+
// A match inside the last match's trailing context is shown as context.
|
|
198
|
+
if (inWindow)
|
|
199
|
+
pushLine(filePath, lineNumber, lineText, false);
|
|
200
|
+
// Only another match proves that the limit cut results off.
|
|
201
|
+
if (isMatch)
|
|
202
|
+
matchLimitReached = true;
|
|
203
|
+
if (matchLimitReached && !(inWindow && lineNumber < trailingContextEnd))
|
|
204
|
+
finish();
|
|
177
205
|
});
|
|
178
206
|
child.on("error", (error) => {
|
|
179
207
|
cleanup();
|
|
180
208
|
settle(() => reject(new Error(`Failed to run ripgrep: ${error.message}`)));
|
|
181
209
|
});
|
|
182
|
-
child.on("close",
|
|
210
|
+
child.on("close", (code) => {
|
|
183
211
|
cleanup();
|
|
184
212
|
if (aborted) {
|
|
185
213
|
settle(() => reject(new Error("Operation aborted")));
|
|
@@ -194,27 +222,11 @@ export function createGrepToolDefinition(cwd, options) {
|
|
|
194
222
|
settle(() => resolve({ content: [{ type: "text", text: "No matches found" }], details: undefined }));
|
|
195
223
|
return;
|
|
196
224
|
}
|
|
197
|
-
// Format matches after streaming finishes so custom readFile() backends can be async.
|
|
198
|
-
for (const match of matches) {
|
|
199
|
-
if (contextValue === 0 && match.lineText !== undefined) {
|
|
200
|
-
const relativePath = formatPath(match.filePath);
|
|
201
|
-
const sanitized = match.lineText
|
|
202
|
-
.replace(/\r\n/g, "\n")
|
|
203
|
-
.replace(/\r/g, "")
|
|
204
|
-
.replace(/\n$/, "");
|
|
205
|
-
const { text: truncatedText, wasTruncated } = truncateLine(sanitized);
|
|
206
|
-
if (wasTruncated)
|
|
207
|
-
linesTruncated = true;
|
|
208
|
-
outputLines.push(`${relativePath}:${match.lineNumber}: ${truncatedText}`);
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
const block = await formatBlock(match.filePath, match.lineNumber);
|
|
212
|
-
outputLines.push(...block);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
225
|
const rawOutput = outputLines.join("\n");
|
|
216
226
|
// Apply byte truncation. There is no line limit here because the match limit already capped rows.
|
|
217
227
|
const truncation = truncateHead(rawOutput, { maxLines: Number.MAX_SAFE_INTEGER });
|
|
228
|
+
truncation.totalLines = outputLineCount;
|
|
229
|
+
truncation.totalBytes = outputBytes - 1;
|
|
218
230
|
let output = truncation.content;
|
|
219
231
|
const details = {};
|
|
220
232
|
// Build actionable notices for truncation and match limits.
|
|
@@ -38,7 +38,8 @@ export function createLsToolDefinition(cwd, options) {
|
|
|
38
38
|
(async () => {
|
|
39
39
|
try {
|
|
40
40
|
const dirPath = resolveToCwd(path || ".", ctx?.cwd || cwd);
|
|
41
|
-
|
|
41
|
+
// A limit of 0 would list nothing and report "(empty directory)", so it means 1.
|
|
42
|
+
const effectiveLimit = Math.max(1, Math.floor(limit ?? DEFAULT_LIMIT));
|
|
42
43
|
// Check if path exists.
|
|
43
44
|
if (!(await ops.exists(dirPath))) {
|
|
44
45
|
reject(new Error(`Path not found: ${dirPath}`));
|
|
@@ -1,15 +1,28 @@
|
|
|
1
|
+
import { win32 } from "node:path";
|
|
1
2
|
import { getPowerShellConfig } from "../../utils/shell.js";
|
|
2
3
|
import { createLocalShellOperations, createShellToolDefinition, } from "./bash.js";
|
|
3
4
|
import { wrapToolDefinition } from "./tool-definition-wrapper.js";
|
|
4
5
|
const UTF8_OUTPUT_PREFIX = "try { [Console]::OutputEncoding=[System.Text.Encoding]::UTF8 } catch {}\n";
|
|
6
|
+
// Windows PowerShell 5.1 turns redirected native stderr into error records and sets $? to false, so
|
|
7
|
+
// `git push 2>&1 | Select-Object -Last 3` exits 1 although git exited 0 (#8842). PowerShell 7 does not.
|
|
8
|
+
// Exit 0 when the last failure is only such a record and the native command exited 0; otherwise keep the
|
|
9
|
+
// -Command rule: 0 when the last statement succeeded, 1 when it failed. The lone `;` keeps an unfinished last
|
|
10
|
+
// statement, such as `Get-ChildItem |`, a parse error instead of continuing into the suffix and running.
|
|
11
|
+
const WINDOWS_POWERSHELL_EXIT_SUFFIX = '\n;\nif ($?) { exit 0 }\nif (($LASTEXITCODE -eq 0) -and ("$($Error[0].FullyQualifiedErrorId)" -like "NativeCommandError*")) { exit 0 }\nexit 1';
|
|
5
12
|
export const powershellToolSystemPromptContribution = {
|
|
6
13
|
snippet: "Execute PowerShell commands",
|
|
7
14
|
guidelines: ["You can inspect PI_* environment variables for current model and session details."],
|
|
8
15
|
};
|
|
9
16
|
export function createLocalPowerShellOperations() {
|
|
10
|
-
const operations = createLocalShellOperations("PowerShell", getPowerShellConfig);
|
|
11
17
|
return {
|
|
12
|
-
exec: (command, cwd, options) =>
|
|
18
|
+
exec: async (command, cwd, options) => {
|
|
19
|
+
const shellConfig = getPowerShellConfig();
|
|
20
|
+
// A final backtick would continue the user's last line into the suffix, so leave such commands unchanged.
|
|
21
|
+
const suffix = win32.basename(shellConfig.shell).toLowerCase() === "powershell.exe" && !command.endsWith("`")
|
|
22
|
+
? WINDOWS_POWERSHELL_EXIT_SUFFIX
|
|
23
|
+
: "";
|
|
24
|
+
return createLocalShellOperations("PowerShell", () => shellConfig).exec(`${UTF8_OUTPUT_PREFIX}${command}${suffix}`, cwd, options);
|
|
25
|
+
},
|
|
13
26
|
};
|
|
14
27
|
}
|
|
15
28
|
const powershellToolConfig = {
|
|
@@ -40,6 +40,14 @@ export interface ReadOperations {
|
|
|
40
40
|
access: (absolutePath: string) => Promise<void>;
|
|
41
41
|
/** Detect image MIME type, return null or undefined for non-images */
|
|
42
42
|
detectImageMimeType?: (absolutePath: string) => Promise<string | null | undefined>;
|
|
43
|
+
/**
|
|
44
|
+
* Stream file contents in chunks. When present, text files are read through it and only the lines
|
|
45
|
+
* that will be shown are kept in memory; otherwise readFile loads the whole file. Stop reading when
|
|
46
|
+
* the signal aborts; the read tool also stops consuming the stream then.
|
|
47
|
+
*/
|
|
48
|
+
createReadStream?: (absolutePath: string, options: {
|
|
49
|
+
signal?: AbortSignal;
|
|
50
|
+
}) => AsyncIterable<Uint8Array>;
|
|
43
51
|
}
|
|
44
52
|
export interface ReadToolOptions {
|
|
45
53
|
/** Whether to auto-resize images. Default: true */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { constants } from "fs";
|
|
2
|
-
import { access as fsAccess, readFile as fsReadFile } from "fs/promises";
|
|
2
|
+
import { access as fsAccess, open as fsOpen, readFile as fsReadFile } from "fs/promises";
|
|
3
3
|
import { Type } from "typebox";
|
|
4
|
+
import { TextDecoder } from "util";
|
|
4
5
|
import { processImage } from "../../utils/image-process.js";
|
|
5
6
|
import { detectSupportedImageMimeTypeFromFile } from "../../utils/mime.js";
|
|
6
7
|
import { resolveReadPathAsync } from "./path-utils.js";
|
|
@@ -28,9 +29,26 @@ const readOutputSchema = Type.Union([
|
|
|
28
29
|
]);
|
|
29
30
|
const defaultReadOperations = {
|
|
30
31
|
readFile: (path) => fsReadFile(path),
|
|
32
|
+
createReadStream: readLocalFileChunks,
|
|
31
33
|
access: (path) => fsAccess(path, constants.R_OK),
|
|
32
34
|
detectImageMimeType: detectSupportedImageMimeTypeFromFile,
|
|
33
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Stream a local file the way fs.readFile reads it: a regular file up to its size when opened, so text
|
|
38
|
+
* appended during the read is not counted and a growing file still ends; a file reporting size 0 (such
|
|
39
|
+
* as /proc files) and other file types until EOF.
|
|
40
|
+
*/
|
|
41
|
+
async function* readLocalFileChunks(path, { signal }) {
|
|
42
|
+
const handle = await fsOpen(path, "r");
|
|
43
|
+
try {
|
|
44
|
+
const stats = await handle.stat();
|
|
45
|
+
const end = stats.isFile() && stats.size > 0 ? stats.size - 1 : undefined;
|
|
46
|
+
yield* handle.createReadStream({ end, signal, autoClose: false });
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
await handle.close();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
34
52
|
/** The image block and its note, or the text for text files and images that could not be processed. */
|
|
35
53
|
function toReadOutput(content) {
|
|
36
54
|
const text = content.find((block) => block.type === "text")?.text ?? "";
|
|
@@ -43,6 +61,115 @@ function getNonVisionImageNote(model) {
|
|
|
43
61
|
}
|
|
44
62
|
return "[Current model does not support images. The image will be omitted from this request.]";
|
|
45
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Whether a range can be streamed. Other values (fractional, negative limit) keep the whole-file path,
|
|
66
|
+
* whose array slicing defines what they select, for example limit -1 as all lines but the last.
|
|
67
|
+
*/
|
|
68
|
+
function isStreamableRange(offset, limit) {
|
|
69
|
+
return ((offset === undefined || Number.isInteger(offset)) &&
|
|
70
|
+
(limit === undefined || (Number.isInteger(limit) && limit >= 0)));
|
|
71
|
+
}
|
|
72
|
+
/** Select lines from a whole file in memory: for operations without createReadStream and unusual ranges. */
|
|
73
|
+
function selectLinesFromBuffer(buffer, startLine, limit) {
|
|
74
|
+
const allLines = buffer.toString("utf-8").split("\n");
|
|
75
|
+
const endLine = limit === undefined ? undefined : Math.min(startLine + limit, allLines.length);
|
|
76
|
+
const truncation = truncateHead(allLines.slice(startLine, endLine).join("\n"));
|
|
77
|
+
const firstLineBytes = truncation.firstLineExceedsLimit ? Buffer.byteLength(allLines[startLine], "utf-8") : 0;
|
|
78
|
+
return { totalFileLines: allLines.length, truncation, firstLineBytes };
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Select lines from a file read in chunks. Only lines truncateHead can show are stored; the rest are
|
|
82
|
+
* counted, so memory does not grow with the file. Stops reading when the signal aborts.
|
|
83
|
+
*/
|
|
84
|
+
async function selectLinesFromStream(chunks, startLine, limit, signal) {
|
|
85
|
+
const endLine = limit === undefined ? Number.POSITIVE_INFINITY : startLine + limit;
|
|
86
|
+
// Non-fatal UTF-8 that keeps a byte order mark decodes like Buffer.toString("utf-8").
|
|
87
|
+
const decoder = new TextDecoder("utf-8", { ignoreBOM: true });
|
|
88
|
+
const storedLines = [];
|
|
89
|
+
let storedBytes = 0;
|
|
90
|
+
let storedPastCaps = false;
|
|
91
|
+
let line = 0;
|
|
92
|
+
let selectedLines = 0;
|
|
93
|
+
let selectedBytes = 0;
|
|
94
|
+
let firstLineBytes = 0;
|
|
95
|
+
let lastLineEmpty = true;
|
|
96
|
+
// The selected line being read: its text, while it is stored, and its size.
|
|
97
|
+
let pieces = [];
|
|
98
|
+
let lineBytes = 0;
|
|
99
|
+
let lineHasText = false;
|
|
100
|
+
const appendToLine = (text, start, end) => {
|
|
101
|
+
lineHasText = true;
|
|
102
|
+
if (!pieces)
|
|
103
|
+
return;
|
|
104
|
+
const piece = text.slice(start, end);
|
|
105
|
+
// A line over the byte cap is never shown, and a first line over it is only measured: never store
|
|
106
|
+
// all of a 1 GB line.
|
|
107
|
+
if (lineBytes <= DEFAULT_MAX_BYTES)
|
|
108
|
+
pieces.push(piece);
|
|
109
|
+
lineBytes += Buffer.byteLength(piece, "utf-8");
|
|
110
|
+
};
|
|
111
|
+
const finishLine = () => {
|
|
112
|
+
if (pieces) {
|
|
113
|
+
if (selectedLines === 0)
|
|
114
|
+
firstLineBytes = lineBytes;
|
|
115
|
+
// Storing continues one line past the caps: truncateHead ignores a trailing empty line, so the
|
|
116
|
+
// line after the cap must be there for it to decide truncation as for the full text.
|
|
117
|
+
if (storedLines.length > DEFAULT_MAX_LINES || storedBytes > DEFAULT_MAX_BYTES)
|
|
118
|
+
storedPastCaps = true;
|
|
119
|
+
const text = pieces.join("");
|
|
120
|
+
storedBytes += Buffer.byteLength(text, "utf-8") + (storedLines.length > 0 ? 1 : 0);
|
|
121
|
+
storedLines.push(text);
|
|
122
|
+
}
|
|
123
|
+
selectedLines++;
|
|
124
|
+
lastLineEmpty = !lineHasText;
|
|
125
|
+
pieces = storedPastCaps ? undefined : [];
|
|
126
|
+
lineBytes = 0;
|
|
127
|
+
lineHasText = false;
|
|
128
|
+
};
|
|
129
|
+
const select = (text) => {
|
|
130
|
+
let position = 0;
|
|
131
|
+
// Start of the selected text in this piece, measured as a whole: the joined lines' size.
|
|
132
|
+
let selectionStart = -1;
|
|
133
|
+
while (true) {
|
|
134
|
+
const selected = line >= startLine && line < endLine;
|
|
135
|
+
if (selected && selectionStart === -1)
|
|
136
|
+
selectionStart = position;
|
|
137
|
+
const newline = text.indexOf("\n", position);
|
|
138
|
+
const end = newline === -1 ? text.length : newline;
|
|
139
|
+
if (selected && end > position)
|
|
140
|
+
appendToLine(text, position, end);
|
|
141
|
+
if (newline === -1)
|
|
142
|
+
break;
|
|
143
|
+
if (selected) {
|
|
144
|
+
finishLine();
|
|
145
|
+
if (line + 1 === endLine) {
|
|
146
|
+
selectedBytes += Buffer.byteLength(text.slice(selectionStart, newline), "utf-8");
|
|
147
|
+
selectionStart = -1;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
line++;
|
|
151
|
+
position = newline + 1;
|
|
152
|
+
}
|
|
153
|
+
if (selectionStart !== -1)
|
|
154
|
+
selectedBytes += Buffer.byteLength(text.slice(selectionStart), "utf-8");
|
|
155
|
+
};
|
|
156
|
+
for await (const chunk of chunks) {
|
|
157
|
+
// Leaving the loop closes the stream.
|
|
158
|
+
if (signal?.aborted)
|
|
159
|
+
throw new Error("Operation aborted");
|
|
160
|
+
select(decoder.decode(chunk, { stream: true }));
|
|
161
|
+
}
|
|
162
|
+
select(decoder.decode());
|
|
163
|
+
if (line >= startLine && line < endLine)
|
|
164
|
+
finishLine();
|
|
165
|
+
const truncation = {
|
|
166
|
+
...truncateHead(storedLines.join("\n")),
|
|
167
|
+
// truncateHead's counts for the joined selected lines, which drop a trailing empty line.
|
|
168
|
+
totalLines: selectedBytes === 0 ? 0 : selectedLines - (lastLineEmpty ? 1 : 0),
|
|
169
|
+
totalBytes: selectedBytes,
|
|
170
|
+
};
|
|
171
|
+
return { totalFileLines: line + 1, truncation, firstLineBytes };
|
|
172
|
+
}
|
|
46
173
|
export function createReadToolDefinition(cwd, options) {
|
|
47
174
|
const autoResizeImages = options?.autoResizeImages ?? true;
|
|
48
175
|
const fallbackResizeOptions = options?.resizeOptions;
|
|
@@ -107,35 +234,24 @@ export function createReadToolDefinition(cwd, options) {
|
|
|
107
234
|
}
|
|
108
235
|
}
|
|
109
236
|
else {
|
|
110
|
-
// Read text content.
|
|
111
|
-
const buffer = await ops.readFile(absolutePath);
|
|
112
|
-
const textContent = buffer.toString("utf-8");
|
|
113
|
-
const allLines = textContent.split("\n");
|
|
114
|
-
const totalFileLines = allLines.length;
|
|
115
|
-
// Apply offset if specified. Convert from 1-indexed input to 0-indexed array access.
|
|
237
|
+
// Read text content. Convert offset from 1-indexed input to 0-indexed line access.
|
|
116
238
|
const startLine = offset ? Math.max(0, offset - 1) : 0;
|
|
117
239
|
const startLineDisplay = startLine + 1;
|
|
240
|
+
const { totalFileLines, truncation, firstLineBytes } = ops.createReadStream && isStreamableRange(offset, limit)
|
|
241
|
+
? await selectLinesFromStream(ops.createReadStream(absolutePath, { signal }), startLine, limit, signal)
|
|
242
|
+
: selectLinesFromBuffer(await ops.readFile(absolutePath), startLine, limit);
|
|
243
|
+
if (aborted)
|
|
244
|
+
return;
|
|
118
245
|
// Check if offset is out of bounds.
|
|
119
|
-
if (startLine >=
|
|
120
|
-
throw new Error(`Offset ${offset} is beyond end of file (${
|
|
121
|
-
}
|
|
122
|
-
let selectedContent;
|
|
123
|
-
let userLimitedLines;
|
|
124
|
-
// If limit is specified by the user, honor it first. Otherwise truncateHead decides.
|
|
125
|
-
if (limit !== undefined) {
|
|
126
|
-
const endLine = Math.min(startLine + limit, allLines.length);
|
|
127
|
-
selectedContent = allLines.slice(startLine, endLine).join("\n");
|
|
128
|
-
userLimitedLines = endLine - startLine;
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
selectedContent = allLines.slice(startLine).join("\n");
|
|
246
|
+
if (startLine >= totalFileLines) {
|
|
247
|
+
throw new Error(`Offset ${offset} is beyond end of file (${totalFileLines} lines total)`);
|
|
132
248
|
}
|
|
133
|
-
//
|
|
134
|
-
const
|
|
249
|
+
// A user-specified limit is honored before truncation.
|
|
250
|
+
const userLimitedLines = limit === undefined ? undefined : Math.min(startLine + limit, totalFileLines) - startLine;
|
|
135
251
|
let outputText;
|
|
136
252
|
if (truncation.firstLineExceedsLimit) {
|
|
137
253
|
// First line alone exceeds the byte limit. Point the model at a bash fallback.
|
|
138
|
-
const firstLineSize = formatSize(
|
|
254
|
+
const firstLineSize = formatSize(firstLineBytes);
|
|
139
255
|
outputText = `[Line ${startLineDisplay} is ${firstLineSize}, exceeds ${formatSize(DEFAULT_MAX_BYTES)} limit. Use bash: sed -n '${startLineDisplay}p' ${path} | head -c ${DEFAULT_MAX_BYTES}]`;
|
|
140
256
|
details = { truncation };
|
|
141
257
|
}
|
|
@@ -152,9 +268,9 @@ export function createReadToolDefinition(cwd, options) {
|
|
|
152
268
|
}
|
|
153
269
|
details = { truncation };
|
|
154
270
|
}
|
|
155
|
-
else if (userLimitedLines !== undefined && startLine + userLimitedLines <
|
|
271
|
+
else if (userLimitedLines !== undefined && startLine + userLimitedLines < totalFileLines) {
|
|
156
272
|
// User-specified limit stopped early, but the file still has more content.
|
|
157
|
-
const remaining =
|
|
273
|
+
const remaining = totalFileLines - (startLine + userLimitedLines);
|
|
158
274
|
const nextOffset = startLine + userLimitedLines + 1;
|
|
159
275
|
outputText = `${truncation.content}\n\n[${remaining} more lines in file. Use offset=${nextOffset} to continue.]`;
|
|
160
276
|
}
|
|
@@ -67,18 +67,8 @@ export declare function truncateLine(line: string, maxChars?: number): {
|
|
|
67
67
|
text: string;
|
|
68
68
|
wasTruncated: boolean;
|
|
69
69
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/** Characters left out. */
|
|
75
|
-
removedChars: number;
|
|
76
|
-
totalBytes: number;
|
|
77
|
-
totalLines: number;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Keep the start and the end of `content`, half of `maxBytes` each, and replace the middle with a
|
|
81
|
-
* `…N chars truncated…` marker, like Codex does for tool output. Cuts only at character boundaries.
|
|
82
|
-
*/
|
|
83
|
-
export declare function truncateMiddle(content: string, maxBytes: number): MiddleTruncationResult;
|
|
70
|
+
/** Returns at most the first `maxUnits` UTF-16 code units of `text`, without splitting a surrogate pair. */
|
|
71
|
+
export declare function sliceHead(text: string, maxUnits: number): string;
|
|
72
|
+
/** Returns at most the last `maxUnits` UTF-16 code units of `text`, without splitting a surrogate pair. */
|
|
73
|
+
export declare function sliceTail(text: string, maxUnits: number): string;
|
|
84
74
|
//# sourceMappingURL=truncate.d.ts.map
|
|
@@ -210,35 +210,29 @@ export function truncateLine(line, maxChars = GREP_MAX_LINE_LENGTH) {
|
|
|
210
210
|
if (line.length <= maxChars) {
|
|
211
211
|
return { text: line, wasTruncated: false };
|
|
212
212
|
}
|
|
213
|
-
return { text: `${line
|
|
213
|
+
return { text: `${sliceHead(line, maxChars)}... [truncated]`, wasTruncated: true };
|
|
214
214
|
}
|
|
215
|
-
/**
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
return
|
|
237
|
-
content: `${head}…${removedChars} chars truncated…${tail}`,
|
|
238
|
-
truncated: true,
|
|
239
|
-
removedChars,
|
|
240
|
-
totalBytes: buf.length,
|
|
241
|
-
totalLines,
|
|
242
|
-
};
|
|
215
|
+
/** Returns at most the first `maxUnits` UTF-16 code units of `text`, without splitting a surrogate pair. */
|
|
216
|
+
export function sliceHead(text, maxUnits) {
|
|
217
|
+
const end = Math.max(0, maxUnits);
|
|
218
|
+
// A lone high surrogate before the cut would be invalid UTF-16; keep the whole character out instead.
|
|
219
|
+
return isHighSurrogate(text.charCodeAt(end - 1)) && isLowSurrogate(text.charCodeAt(end))
|
|
220
|
+
? text.slice(0, end - 1)
|
|
221
|
+
: text.slice(0, end);
|
|
222
|
+
}
|
|
223
|
+
/** Returns at most the last `maxUnits` UTF-16 code units of `text`, without splitting a surrogate pair. */
|
|
224
|
+
export function sliceTail(text, maxUnits) {
|
|
225
|
+
if (maxUnits <= 0)
|
|
226
|
+
return "";
|
|
227
|
+
const start = Math.max(0, text.length - maxUnits);
|
|
228
|
+
return isLowSurrogate(text.charCodeAt(start)) && isHighSurrogate(text.charCodeAt(start - 1))
|
|
229
|
+
? text.slice(start + 1)
|
|
230
|
+
: text.slice(start);
|
|
231
|
+
}
|
|
232
|
+
function isHighSurrogate(code) {
|
|
233
|
+
return code >= 0xd800 && code <= 0xdbff;
|
|
234
|
+
}
|
|
235
|
+
function isLowSurrogate(code) {
|
|
236
|
+
return code >= 0xdc00 && code <= 0xdfff;
|
|
243
237
|
}
|
|
244
238
|
//# sourceMappingURL=truncate.js.map
|
package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { CodemodeSandbox, loadQuickJSWasm, parseCodemodeSource, renderToolSample, toCodemodeIdentifier, } from "@earendil-works/pi-codemode";
|
|
6
6
|
import { getCodemodeWorkerSpecifier, getQuickJSWasmPath } from "../../config.js";
|
|
7
|
-
import { formatSize } from "../../core/tools/truncate.js";
|
|
7
|
+
import { formatSize, sliceHead, sliceTail } from "../../core/tools/truncate.js";
|
|
8
8
|
import { combineUsage } from "../../core/usage-totals.js";
|
|
9
9
|
import { writeOutputFile } from "../../utils/output-files.js";
|
|
10
10
|
import { Bm25Ranker, createToolSearchDocument, DEFAULT_TOOL_SEARCH_LIMIT } from "../tool-search/tool.js";
|
|
@@ -71,7 +71,7 @@ function releaseCodemodeWorker() {
|
|
|
71
71
|
}
|
|
72
72
|
const MODEL_TYPES = new Set(["chat", "image", "classifier"]);
|
|
73
73
|
function truncateText(text, maxChars) {
|
|
74
|
-
return text.length > maxChars ? `${text
|
|
74
|
+
return text.length > maxChars ? `${sliceHead(text, maxChars - 3)}...` : text;
|
|
75
75
|
}
|
|
76
76
|
function previewArgs(args) {
|
|
77
77
|
if (args === undefined)
|
|
@@ -395,8 +395,8 @@ async function truncateOutput(items, maxTokens) {
|
|
|
395
395
|
const headChars = Math.floor(budget / 2);
|
|
396
396
|
const tailChars = budget - headChars;
|
|
397
397
|
const removed = combined.length - headChars - tailChars;
|
|
398
|
-
const head = combined
|
|
399
|
-
const tail =
|
|
398
|
+
const head = sliceHead(combined, headChars);
|
|
399
|
+
const tail = sliceTail(combined, tailChars);
|
|
400
400
|
let text = `Warning: truncated output (original token count: ${Math.ceil(combined.length / CHARS_PER_TOKEN)})\nTotal output lines: ${combined.split("\n").length}\n\n${head}…${Math.ceil(removed / CHARS_PER_TOKEN)} tokens truncated…${tail}`;
|
|
401
401
|
const spilled = await spillOutput(combined);
|
|
402
402
|
text +=
|