@ensocode/server 0.3.3 → 0.3.5
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-CLgfII9z.js → abnfDiagram-VCTEODGH-k76opPl1.js} +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-DFA8x3QF.js +1 -0
- package/out/phone/assets/{architectureDiagram-5GKGNRK7-I2RDn32D.js → architectureDiagram-5GKGNRK7-yxQH9IuZ.js} +1 -1
- package/out/phone/assets/{blockDiagram-I7D4REHJ-D5xNQZkS.js → blockDiagram-I7D4REHJ-DoHteZpO.js} +1 -1
- package/out/phone/assets/{c4Diagram-7LVT6UL2-CRKpzdlA.js → c4Diagram-7LVT6UL2-DQVO6L4q.js} +1 -1
- package/out/phone/assets/channel-BBjWfdZr.js +1 -0
- package/out/phone/assets/{chunk-4HAMMTFA-CcezrqKz.js → chunk-4HAMMTFA-N9Rw4SGW.js} +1 -1
- package/out/phone/assets/{chunk-75Z2AOVW-DDCXp4y1.js → chunk-75Z2AOVW-DKJ8pOxp.js} +1 -1
- package/out/phone/assets/{chunk-DU6HZSFF-CjWveEkB.js → chunk-DU6HZSFF-BqGW8Nbd.js} +1 -1
- package/out/phone/assets/{chunk-F27PBJKO-Bgl_xI02.js → chunk-F27PBJKO-PkFmkghF.js} +1 -1
- package/out/phone/assets/{chunk-GMAD6QVW-EmL8nOme.js → chunk-GMAD6QVW-C9VeD3Jk.js} +1 -1
- package/out/phone/assets/{chunk-GVQU2GXP-Dox_nphF.js → chunk-GVQU2GXP-COhntOeE.js} +1 -1
- package/out/phone/assets/{chunk-IMKFNOWR-BapGpI4S.js → chunk-IMKFNOWR-B87ghLVD.js} +1 -1
- package/out/phone/assets/{chunk-L3NEJ4N5-Cq_UZI8A.js → chunk-L3NEJ4N5-C3N2izjg.js} +1 -1
- package/out/phone/assets/{chunk-OSK3NFVY-2VVlErAd.js → chunk-OSK3NFVY-DaAlvVhz.js} +1 -1
- package/out/phone/assets/{chunk-P2QGCYS3-Cci-G-p1.js → chunk-P2QGCYS3-BQpKr8IZ.js} +1 -1
- package/out/phone/assets/{chunk-POPQ4Y6H-CJ47EOfE.js → chunk-POPQ4Y6H-B2TZMY6U.js} +1 -1
- package/out/phone/assets/{chunk-PWAF6VOD-D9dLdFqC.js → chunk-PWAF6VOD-CgRhpUJy.js} +1 -1
- package/out/phone/assets/{chunk-SHT3W25Y-BlGSiWZn.js → chunk-SHT3W25Y-BySMFA99.js} +1 -1
- package/out/phone/assets/{chunk-SVP7TREG-C0zdsa_A.js → chunk-SVP7TREG-EDGanDUX.js} +1 -1
- package/out/phone/assets/{chunk-TICWLB2K-DAQW8nQU.js → chunk-TICWLB2K-BtCZ8R2k.js} +1 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CXXjdIIU.js +1 -0
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CXXjdIIU.js +1 -0
- package/out/phone/assets/{cynefin-OW5HDTMX-_zsx5mdV.js → cynefin-OW5HDTMX-CdZmp44V.js} +1 -1
- package/out/phone/assets/{cynefinDiagram-5FMLGOSQ-Cww-w0ex.js → cynefinDiagram-5FMLGOSQ-BCz9KwUb.js} +1 -1
- package/out/phone/assets/{dagre-GXQ25YYZ-C0i7DPqX.js → dagre-GXQ25YYZ-CgFeNgh6.js} +1 -1
- package/out/phone/assets/desk-C_b7mE6l.js +2 -0
- package/out/phone/assets/{diagram-S7CK7UJ4-Bx-G5hYz.js → diagram-S7CK7UJ4-CwvaZIBf.js} +1 -1
- package/out/phone/assets/{diagram-UQ7AKVKN-DaTblkjV.js → diagram-UQ7AKVKN-DqnD4XoZ.js} +1 -1
- package/out/phone/assets/{diagram-VSXAHHWV-gmN2e1b4.js → diagram-VSXAHHWV-Kqc9GudQ.js} +1 -1
- package/out/phone/assets/{diagram-VX7I27RA-WYtRtOo8.js → diagram-VX7I27RA-B_0DLDQ0.js} +1 -1
- package/out/phone/assets/{diagram-Z3DM3KII-Cr6uUB5B.js → diagram-Z3DM3KII-CppKBEPW.js} +1 -1
- package/out/phone/assets/{ebnfDiagram-PWID7BFC-BCicfvpA.js → ebnfDiagram-PWID7BFC-DeYPNCu9.js} +1 -1
- package/out/phone/assets/{erDiagram-RLTQ6QDP-B3QlJvfQ.js → erDiagram-RLTQ6QDP-MsfxDUmk.js} +1 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-D4a6gbOs.js +1 -0
- package/out/phone/assets/flowDiagram-HODETNUW-BBTtB5oX.js +1 -0
- package/out/phone/assets/{ganttDiagram-EL5Y4UJY-LYy2mfCh.js → ganttDiagram-EL5Y4UJY-DaScS1os.js} +1 -1
- package/out/phone/assets/{gitGraph-4MIJSDKK-dT22Z2jG.js → gitGraph-4MIJSDKK-C-FzqpZm.js} +1 -1
- package/out/phone/assets/{gitGraphDiagram-WWUBYQGX-DHNdY57l.js → gitGraphDiagram-WWUBYQGX-4Yv-hAwf.js} +1 -1
- package/out/phone/assets/{info-A6RAGUB7-nIu8NSOs.js → info-A6RAGUB7-CGLEP4t7.js} +1 -1
- package/out/phone/assets/{infoDiagram-27XIBGKW-DGkWZIMT.js → infoDiagram-27XIBGKW-DapEgYQa.js} +1 -1
- package/out/phone/assets/{ishikawaDiagram-5VMMS53U-C8EPXru-.js → ishikawaDiagram-5VMMS53U-D1B2lZSG.js} +1 -1
- package/out/phone/assets/{journeyDiagram-3NMN7TZE-Dyd9L3l3.js → journeyDiagram-3NMN7TZE-BSAtMVJw.js} +1 -1
- package/out/phone/assets/{kanban-definition-UXKFOSKX-DehTYcsL.js → kanban-definition-UXKFOSKX-CfZ4oI7A.js} +1 -1
- package/out/phone/assets/{line-Db4SulF4.js → line-DAXmUM4p.js} +1 -1
- package/out/phone/assets/main-B0yD1pMI.js +1643 -0
- package/out/phone/assets/main-DNRbLxEx.css +1 -0
- package/out/phone/assets/{mermaid-parser.core-D7h_8WV8.js → mermaid-parser.core-IObm7oM0.js} +3 -3
- package/out/phone/assets/{mermaid.core-Dw_E5kj4.js → mermaid.core-C1wA-mhD.js} +4 -4
- package/out/phone/assets/{mindmap-definition-YA3MSWOX-_5Mxqxsy.js → mindmap-definition-YA3MSWOX-3ph0EaB9.js} +1 -1
- package/out/phone/assets/{packet-AYTQ26CC-_cgeMDdN.js → packet-AYTQ26CC-BbDAe9Au.js} +1 -1
- package/out/phone/assets/{pegDiagram-XKGWAZYB-BhBwaNEr.js → pegDiagram-XKGWAZYB-EsuDcX_3.js} +1 -1
- package/out/phone/assets/{pie-WAS4IAKB-BepY80_0.js → pie-WAS4IAKB-BQfIj1fu.js} +1 -1
- package/out/phone/assets/{pieDiagram-E7YTZNPT-CQQgqmI8.js → pieDiagram-E7YTZNPT-Cw19z5Ip.js} +1 -1
- package/out/phone/assets/{quadrantDiagram-AXDQQJYC-DEEatC1J.js → quadrantDiagram-AXDQQJYC-Bqwz_sa8.js} +1 -1
- package/out/phone/assets/{radar-RG4KPBEZ-BqsiI_qQ.js → radar-RG4KPBEZ-Dmp-89iD.js} +1 -1
- package/out/phone/assets/{railroad-74A4TZTK-C_2pEUjD.js → railroad-74A4TZTK-dq2H8w8Y.js} +1 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-DddVaVQM.js +1 -0
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-BjvyqMjh.js +1 -0
- package/out/phone/assets/railroad-peg-WCYAUIDC-lBl4CV1_.js +1 -0
- package/out/phone/assets/{railroadDiagram-O6MQD6OU-B7786u7W.js → railroadDiagram-O6MQD6OU-D2Sbc7Wn.js} +1 -1
- package/out/phone/assets/{requirementDiagram-BXWQKSXE-Ci3b5uwm.js → requirementDiagram-BXWQKSXE-CLNUqxbl.js} +1 -1
- package/out/phone/assets/{sankeyDiagram-P5KCCOFB-PwT2gJjH.js → sankeyDiagram-P5KCCOFB-Dme5iwcw.js} +1 -1
- package/out/phone/assets/{sequenceDiagram-WJ2MYXX4-H6sgB5RI.js → sequenceDiagram-WJ2MYXX4-C5dYSwPE.js} +1 -1
- package/out/phone/assets/{stateDiagram-D77RDMKH-BxyRe7OB.js → stateDiagram-D77RDMKH-BuxkPvJ6.js} +1 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-Exd8xDBD.js +1 -0
- package/out/phone/assets/storage-p-WxHA1h.js +1 -0
- package/out/phone/assets/{swimlanes-42K2YHIH-DWT3f1Hk.js → swimlanes-42K2YHIH-DHyXnytv.js} +1 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-B62_42fO.js +8 -0
- package/out/phone/assets/{timeline-definition-24CTP7MA-D67esSVY.js → timeline-definition-24CTP7MA-Bm8Z0u2Z.js} +1 -1
- package/out/phone/assets/{treeView-Q6P3EWNA-BTIfu3Qr.js → treeView-Q6P3EWNA-DFUxvDDO.js} +1 -1
- package/out/phone/assets/{treemap-WGGIJYW6-DkPf6LQc.js → treemap-WGGIJYW6-CMC-hwzt.js} +1 -1
- package/out/phone/assets/{vennDiagram-4TSXK5OY-DRMRxJ4f.js → vennDiagram-4TSXK5OY-CNL4gZsd.js} +1 -1
- package/out/phone/assets/{wardley-WFR3VGLG-hOvC_8-W.js → wardley-WFR3VGLG-CHQoq9KJ.js} +1 -1
- package/out/phone/assets/{wardleyDiagram-VM6X3IG4-a5aYRgrw.js → wardleyDiagram-VM6X3IG4-DAuBfK1O.js} +1 -1
- package/out/phone/assets/{xychartDiagram-S5SC5T6Z-DXjoRFDL.js → xychartDiagram-S5SC5T6Z-B2T9ECKd.js} +1 -1
- package/out/phone/desk.html +2 -2
- package/out/phone/index.html +3 -3
- package/out/renderer/assets/{abnfDiagram-VCTEODGH-DhskujJf.js → abnfDiagram-VCTEODGH-gdhrQbX6.js} +1 -1
- package/out/renderer/assets/{arc-BcW67t47.js → arc-D6-Q4l2d.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-5GKGNRK7-D-x057Ia.js → architectureDiagram-5GKGNRK7-C4y0SbLT.js} +1 -1
- package/out/renderer/assets/{blockDiagram-I7D4REHJ-DR3sZkhW.js → blockDiagram-I7D4REHJ-DrsoSFRK.js} +1 -1
- package/out/renderer/assets/{c4Diagram-7LVT6UL2-CQ4lScWs.js → c4Diagram-7LVT6UL2-1DD8BlM8.js} +1 -1
- package/out/renderer/assets/channel-Sck-tAAK.js +1 -0
- package/out/renderer/assets/{chunk-2Q5K7J3B-CtT0yqF3.js → chunk-2Q5K7J3B-DRyc0B7g.js} +1 -1
- package/out/renderer/assets/{chunk-5VM5RSS4-DlCfddrY.js → chunk-5VM5RSS4-BJe8SghE.js} +1 -1
- package/out/renderer/assets/{chunk-F27PBJKO-BAJ5dGzo.js → chunk-F27PBJKO-BIipq4SK.js} +1 -1
- package/out/renderer/assets/{chunk-IMKFNOWR-Dlah_YbP.js → chunk-IMKFNOWR-D5Ak3Xd9.js} +1 -1
- package/out/renderer/assets/{chunk-JWPE2WC7-BiXd3nUZ.js → chunk-JWPE2WC7-BcaWCpW-.js} +1 -1
- package/out/renderer/assets/{chunk-POPQ4Y6H-Ch86i4EJ.js → chunk-POPQ4Y6H-C1TwLrrN.js} +1 -1
- package/out/renderer/assets/{chunk-SVP7TREG-z3inDV-H.js → chunk-SVP7TREG-DDOXG_t3.js} +1 -1
- package/out/renderer/assets/{chunk-TICWLB2K-B34A2AKD.js → chunk-TICWLB2K-BqT15hZi.js} +1 -1
- package/out/renderer/assets/{chunk-XXDRQBXY-Do_L0wRR.js → chunk-XXDRQBXY-D01ts6SC.js} +1 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-DnB4QNNe.js +1 -0
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-DnB4QNNe.js +1 -0
- package/out/renderer/assets/{cose-bilkent-JH36ORCC-BQraKmgl.js → cose-bilkent-JH36ORCC-C7NVrT2_.js} +1 -1
- package/out/renderer/assets/{cynefin-OW5HDTMX-BwixoR4r.js → cynefin-OW5HDTMX-2LxdFmSk.js} +1 -1
- package/out/renderer/assets/{cynefinDiagram-5FMLGOSQ-BLTBma3J.js → cynefinDiagram-5FMLGOSQ-_AN_Mulc.js} +1 -1
- package/out/renderer/assets/{cytoscape-fcose-BRpJ5tyq.js → cytoscape-fcose-COZkZZmX.js} +1 -1
- package/out/renderer/assets/{dagre-GXQ25YYZ-aWsjA_wn.js → dagre-GXQ25YYZ-BUTwlM6j.js} +1 -1
- package/out/renderer/assets/{diagram-S7CK7UJ4-Cur2zK4q.js → diagram-S7CK7UJ4-CseZZ-y2.js} +1 -1
- package/out/renderer/assets/{diagram-UQ7AKVKN-DlrY8YcD.js → diagram-UQ7AKVKN-Cb7llS-8.js} +1 -1
- package/out/renderer/assets/{diagram-VSXAHHWV-BBdjreqR.js → diagram-VSXAHHWV-CtuGqQvp.js} +1 -1
- package/out/renderer/assets/{diagram-VX7I27RA-XiWMdc8S.js → diagram-VX7I27RA-BA8eov-1.js} +1 -1
- package/out/renderer/assets/{diagram-Z3DM3KII-CBB5leat.js → diagram-Z3DM3KII-VZOjj6Hg.js} +1 -1
- package/out/renderer/assets/{ebnfDiagram-PWID7BFC-nl8RPo8j.js → ebnfDiagram-PWID7BFC-YBIrle6d.js} +1 -1
- package/out/renderer/assets/{erDiagram-RLTQ6QDP-C_oaG80x.js → erDiagram-RLTQ6QDP-BiKyPEqW.js} +1 -1
- package/out/renderer/assets/{flowDiagram-HODETNUW-nDoVZFS7.js → flowDiagram-HODETNUW-7wmZyLHw.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-EL5Y4UJY-DOrcuM3Q.js → ganttDiagram-EL5Y4UJY-D4j4GJaT.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-WWUBYQGX-D_DB3jro.js → gitGraphDiagram-WWUBYQGX-BqveM1NI.js} +1 -1
- package/out/renderer/assets/globals-C9M_MZZV.js +2539 -0
- package/out/renderer/assets/globals-l3kDGoYH.css +1 -0
- package/out/renderer/assets/index-BzSTiwH2.js +117 -0
- package/out/renderer/assets/{infoDiagram-27XIBGKW-BbBrANxo.js → infoDiagram-27XIBGKW-DLPLnIFP.js} +1 -1
- package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-7UlfWlWV.js → ishikawaDiagram-5VMMS53U-48drIAMR.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-3NMN7TZE-CJP9bosH.js → journeyDiagram-3NMN7TZE-vjigqUq_.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UXKFOSKX-D772kW7T.js → kanban-definition-UXKFOSKX-CpsYVONZ.js} +1 -1
- package/out/renderer/assets/{layout-BzVfJEvx.js → layout-DqfoORoO.js} +1 -1
- package/out/renderer/assets/{linear-DBjhr05m.js → linear-CJzBBHcp.js} +1 -1
- package/out/renderer/assets/{mermaid.core-CJpNSowm.js → mermaid.core-DdrGP-Hn.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-YA3MSWOX-C2oqlH5E.js → mindmap-definition-YA3MSWOX-D68tLNxp.js} +1 -1
- package/out/renderer/assets/{pegDiagram-XKGWAZYB-CcZ8Hae-.js → pegDiagram-XKGWAZYB-DkgLTcrv.js} +1 -1
- package/out/renderer/assets/{pieDiagram-E7YTZNPT-DTw-_k2D.js → pieDiagram-E7YTZNPT-bz5NuX1w.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-D5eX0DO7.js → quadrantDiagram-AXDQQJYC-o_VKLyJA.js} +1 -1
- package/out/renderer/assets/{railroadDiagram-O6MQD6OU-DzpBB_Re.js → railroadDiagram-O6MQD6OU-Dkf03e07.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-BXWQKSXE-UbOUXLgl.js → requirementDiagram-BXWQKSXE-CBUz_3YU.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-jRbXLLsa.js → sankeyDiagram-P5KCCOFB-B0pjUr9g.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-s0WBQQPf.js → sequenceDiagram-WJ2MYXX4-ClugIL0e.js} +1 -1
- package/out/renderer/assets/settings-DvhrDn2q.js +34 -0
- package/out/renderer/assets/{sizeCapture-INFHLROL-DvUs5rDx.js → sizeCapture-INFHLROL-D6y0rctc.js} +1 -1
- package/out/renderer/assets/{stateDiagram-D77RDMKH-C1_V497y.js → stateDiagram-D77RDMKH-DiftQepS.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-DxB2-9tl.js +1 -0
- package/out/renderer/assets/{swimlanes-42K2YHIH-BulPeZ6y.js → swimlanes-42K2YHIH-DhuTjCNj.js} +1 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-CYDUqExO.js +8 -0
- package/out/renderer/assets/{timeline-definition-24CTP7MA-gQ5OygZn.js → timeline-definition-24CTP7MA-CrXqgptd.js} +1 -1
- package/out/renderer/assets/{vennDiagram-4TSXK5OY-A8QyA5Ix.js → vennDiagram-4TSXK5OY-CDm8SO8U.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-CfP6E41T.js → wardleyDiagram-VM6X3IG4-CxyunHwQ.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-DTG5UHh7.js → xychartDiagram-S5SC5T6Z-CvC5YMSy.js} +1 -1
- package/out/renderer/index.html +3 -3
- package/out/renderer/plugin-view.html +39 -0
- package/out/renderer/settings.html +4 -4
- package/out/renderer/web-preload.js +1 -1
- package/out/server/agent.js +2022 -860
- package/out/server/chunks/{agent-BhQn6jGA.js → agent-_G_O-Cpa.js} +359 -227
- package/out/server/chunks/{gpuBackendInstall-CdExgjGi.js → gpuBackendInstall-Cb6TFh_8.js} +11 -9
- package/out/server/chunks/{loadProvider-BnkyjMSW.js → loadProvider-Be9Lu1Oi.js} +7 -20
- package/out/server/chunks/{manifest-2odvnxjZ.js → manifest-CB63GQ-i.js} +129 -6
- package/out/server/chunks/{workflowPresets-DqSsjOj6.js → workflowPresets-Djlp5LPV.js} +4004 -2054
- package/out/server/index.js +8251 -6660
- package/out/server/plugin-host.js +36 -26
- package/package.json +10 -10
- 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-CQOPTv6S.js +0 -1
- package/out/phone/assets/channel-DdXebl9x.js +0 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-BCctWEp1.js +0 -1
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-BCctWEp1.js +0 -1
- package/out/phone/assets/desk-mfuEW2n4.js +0 -2
- package/out/phone/assets/eventmodeling-NTZA5JFV-BtfapP6M.js +0 -1
- package/out/phone/assets/flowDiagram-HODETNUW-BsyiyBtD.js +0 -1
- package/out/phone/assets/main-Dv9ve8mT.css +0 -1
- package/out/phone/assets/main-uMMbioCA.js +0 -1638
- package/out/phone/assets/railroad-abnf-HS5TGJTU-TmODpceI.js +0 -1
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-BTCjNR9u.js +0 -1
- package/out/phone/assets/railroad-peg-WCYAUIDC-DjhKNo8j.js +0 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-Cncmf_cL.js +0 -1
- package/out/phone/assets/storage-D9RW_4__.js +0 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-DAahG4fH.js +0 -8
- package/out/renderer/assets/channel-CudRig7z.js +0 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-DL20WkD0.js +0 -1
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-DL20WkD0.js +0 -1
- package/out/renderer/assets/globals-Bkw7iiQG.css +0 -1
- package/out/renderer/assets/globals-D1ocHHQV.js +0 -2533
- package/out/renderer/assets/index-Cm5iq85v.js +0 -117
- package/out/renderer/assets/settings-DxYo7s4h.js +0 -34
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-C9dfLXR8.js +0 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-LXwy6qGO.js +0 -8
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* so each branch sees the values written on its own path.
|
|
22
22
|
*/
|
|
23
23
|
import { join } from "node:path";
|
|
24
|
-
import { renderToolOutputType, renderToolSample, toCodemodeIdentifier } from "@earendil-works/pi-codemode/declarations";
|
|
24
|
+
import { renderToolOutputType, renderToolSample, resolveSchemaRef, toCodemodeIdentifier, } from "@earendil-works/pi-codemode/declarations";
|
|
25
25
|
import { CODEMODE_SOURCE_GRAMMAR } from "@earendil-works/pi-codemode/source";
|
|
26
26
|
import { Type } from "typebox";
|
|
27
27
|
import { getDocsPath } from "../../config.js";
|
|
@@ -161,21 +161,23 @@ export function createCodemodeDescription(tools, options = {}) {
|
|
|
161
161
|
/**
|
|
162
162
|
* The field names of an object schema, `{ output, exit_code, full_output_path? }`, with the fields of
|
|
163
163
|
* object-typed fields `depth` levels deep: `{ content, structuredContent?: { results } }`, and the
|
|
164
|
-
* value of `const` fields: `{ action: "start", id }`. Undefined for other schemas.
|
|
164
|
+
* value of `const` fields: `{ action: "start", id }`. Undefined for other schemas. Local `$ref`s resolve
|
|
165
|
+
* against `root`.
|
|
165
166
|
*/
|
|
166
|
-
function describeFields(schema, depth) {
|
|
167
|
-
|
|
167
|
+
function describeFields(schema, root, depth) {
|
|
168
|
+
const resolved = followRef(schema, root);
|
|
169
|
+
if (typeof resolved !== "object" || resolved === null)
|
|
168
170
|
return undefined;
|
|
169
|
-
const { type, properties, required } =
|
|
171
|
+
const { type, properties, required } = resolved;
|
|
170
172
|
if (type !== "object" || typeof properties !== "object" || properties === null)
|
|
171
173
|
return undefined;
|
|
172
174
|
const requiredNames = new Set(Array.isArray(required) ? required : []);
|
|
173
175
|
const fields = Object.entries(properties).map(([name, field]) => {
|
|
174
|
-
const constValue = field?.const;
|
|
176
|
+
const constValue = followRef(field, root)?.const;
|
|
175
177
|
const nested = constValue !== undefined
|
|
176
178
|
? JSON.stringify(constValue)
|
|
177
179
|
: depth > 0
|
|
178
|
-
? describeFields(field, depth - 1)
|
|
180
|
+
? describeFields(field, root, depth - 1)
|
|
179
181
|
: undefined;
|
|
180
182
|
return `${name}${requiredNames.has(name) ? "" : "?"}${nested ? `: ${nested}` : ""}`;
|
|
181
183
|
});
|
|
@@ -191,7 +193,7 @@ function describeOutput(name, schema) {
|
|
|
191
193
|
const type = renderToolOutputType(schema);
|
|
192
194
|
if (type === "string")
|
|
193
195
|
return "a string";
|
|
194
|
-
const fields = describeFields(schema, 1) ?? describeUnionFields(schema);
|
|
196
|
+
const fields = schema === undefined ? undefined : (describeFields(schema, schema, 1) ?? describeUnionFields(schema, schema));
|
|
195
197
|
if (fields)
|
|
196
198
|
return `\`${fields}\``;
|
|
197
199
|
if (!type.includes("\n"))
|
|
@@ -202,16 +204,36 @@ function describeOutput(name, schema) {
|
|
|
202
204
|
* The field names of each variant of an `anyOf`/`oneOf` whose variants are all objects, joined by
|
|
203
205
|
* `|`.
|
|
204
206
|
*/
|
|
205
|
-
function describeUnionFields(schema) {
|
|
206
|
-
|
|
207
|
+
function describeUnionFields(schema, root) {
|
|
208
|
+
const resolved = followRef(schema, root);
|
|
209
|
+
if (typeof resolved !== "object" || resolved === null)
|
|
207
210
|
return undefined;
|
|
208
|
-
const { anyOf, oneOf } =
|
|
211
|
+
const { anyOf, oneOf } = resolved;
|
|
209
212
|
const variants = anyOf ?? oneOf;
|
|
210
213
|
if (!Array.isArray(variants) || variants.length === 0)
|
|
211
214
|
return undefined;
|
|
212
|
-
const described = variants.map((variant) => describeFields(variant, 0));
|
|
215
|
+
const described = variants.map((variant) => describeFields(variant, root, 0));
|
|
213
216
|
return described.every((fields) => fields !== undefined) ? described.join(" | ") : undefined;
|
|
214
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* The subschema the local `$ref` chain of `schema` names in `root`, so MCP output schemas that put their models in
|
|
220
|
+
* `$defs` still show field names. Remote, missing, and cyclic references stop at the schema holding them.
|
|
221
|
+
*/
|
|
222
|
+
function followRef(schema, root) {
|
|
223
|
+
const seen = new Set();
|
|
224
|
+
let current = schema;
|
|
225
|
+
while (typeof current === "object" && current !== null && !seen.has(current)) {
|
|
226
|
+
const ref = current.$ref;
|
|
227
|
+
if (typeof ref !== "string")
|
|
228
|
+
break;
|
|
229
|
+
const target = resolveSchemaRef(ref, root);
|
|
230
|
+
if (target === undefined)
|
|
231
|
+
break;
|
|
232
|
+
seen.add(current);
|
|
233
|
+
current = target;
|
|
234
|
+
}
|
|
235
|
+
return current;
|
|
236
|
+
}
|
|
215
237
|
/**
|
|
216
238
|
* A declared tool's description followed by how scripts call it and what the call resolves to. The
|
|
217
239
|
* arguments are the tool's declared parameters, so they are not repeated.
|
|
@@ -49,6 +49,8 @@ export declare class LlamaClient {
|
|
|
49
49
|
readonly serverUrl: string;
|
|
50
50
|
private readonly apiKey;
|
|
51
51
|
constructor(serverUrl: string, apiKey?: string);
|
|
52
|
+
/** Fetches from the server, naming the server and the network-level cause when the connection fails. */
|
|
53
|
+
private fetchServer;
|
|
52
54
|
private request;
|
|
53
55
|
list(options?: {
|
|
54
56
|
reload?: boolean;
|
|
@@ -113,6 +113,14 @@ export function normalizeLlamaServerUrl(value) {
|
|
|
113
113
|
export function llamaInferenceUrl(serverUrl) {
|
|
114
114
|
return `${normalizeLlamaServerUrl(serverUrl)}/v1`;
|
|
115
115
|
}
|
|
116
|
+
function connectionErrorDetail(error) {
|
|
117
|
+
const cause = error instanceof Error ? error.cause : undefined;
|
|
118
|
+
if (cause instanceof Error && cause.message)
|
|
119
|
+
return cause.message;
|
|
120
|
+
if (cause && typeof cause === "object" && "code" in cause && typeof cause.code === "string")
|
|
121
|
+
return cause.code;
|
|
122
|
+
return error instanceof Error ? error.message : String(error);
|
|
123
|
+
}
|
|
116
124
|
export class LlamaClient {
|
|
117
125
|
serverUrl;
|
|
118
126
|
apiKey;
|
|
@@ -120,6 +128,19 @@ export class LlamaClient {
|
|
|
120
128
|
this.serverUrl = normalizeLlamaServerUrl(serverUrl);
|
|
121
129
|
this.apiKey = apiKey;
|
|
122
130
|
}
|
|
131
|
+
/** Fetches from the server, naming the server and the network-level cause when the connection fails. */
|
|
132
|
+
async fetchServer(path, init) {
|
|
133
|
+
try {
|
|
134
|
+
return await fetch(`${this.serverUrl}${path}`, init);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
if (init.signal?.aborted)
|
|
138
|
+
throw error;
|
|
139
|
+
throw new Error(`Could not reach llama.cpp server at ${this.serverUrl}: ${connectionErrorDetail(error)}`, {
|
|
140
|
+
cause: error,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
123
144
|
async request(path, init = {}) {
|
|
124
145
|
const headers = new Headers(init.headers);
|
|
125
146
|
if (init.body !== undefined)
|
|
@@ -128,7 +149,7 @@ export class LlamaClient {
|
|
|
128
149
|
headers.set("Authorization", `Bearer ${this.apiKey}`);
|
|
129
150
|
const timeout = AbortSignal.timeout(15_000);
|
|
130
151
|
const signal = init.signal ? AbortSignal.any([init.signal, timeout]) : timeout;
|
|
131
|
-
const response = await
|
|
152
|
+
const response = await this.fetchServer(path, { ...init, headers, signal });
|
|
132
153
|
let payload;
|
|
133
154
|
try {
|
|
134
155
|
payload = await response.json();
|
|
@@ -183,7 +204,7 @@ export class LlamaClient {
|
|
|
183
204
|
const headers = new Headers();
|
|
184
205
|
if (this.apiKey)
|
|
185
206
|
headers.set("Authorization", `Bearer ${this.apiKey}`);
|
|
186
|
-
const response = await
|
|
207
|
+
const response = await this.fetchServer("/models/sse", { headers, signal });
|
|
187
208
|
if (!response.ok || !response.body)
|
|
188
209
|
throw new Error(`llama.cpp SSE returned HTTP ${response.status}`);
|
|
189
210
|
const reader = response.body.getReader();
|
|
@@ -71,6 +71,8 @@ class HuggingFaceSearch extends Container {
|
|
|
71
71
|
results = [];
|
|
72
72
|
filteredResults = [];
|
|
73
73
|
selectedIndex = 0;
|
|
74
|
+
// Whether the user moved the selection since the query last changed.
|
|
75
|
+
selectionTouched = false;
|
|
74
76
|
query = "";
|
|
75
77
|
status = "Type at least 2 characters";
|
|
76
78
|
debounce;
|
|
@@ -123,7 +125,7 @@ class HuggingFaceSearch extends Container {
|
|
|
123
125
|
}
|
|
124
126
|
this.tui.requestRender();
|
|
125
127
|
}
|
|
126
|
-
filterResults() {
|
|
128
|
+
filterResults(preferredId) {
|
|
127
129
|
if (this.query) {
|
|
128
130
|
const matches = new Set(fuzzyFilter(this.results, this.query, (model) => model.id).map((model) => model.id));
|
|
129
131
|
this.filteredResults = this.results.filter((model) => matches.has(model.id));
|
|
@@ -131,7 +133,11 @@ class HuggingFaceSearch extends Container {
|
|
|
131
133
|
else {
|
|
132
134
|
this.filteredResults = this.results;
|
|
133
135
|
}
|
|
134
|
-
|
|
136
|
+
const preferredIndex = preferredId ? this.filteredResults.findIndex((model) => model.id === preferredId) : -1;
|
|
137
|
+
if (preferredIndex >= 0)
|
|
138
|
+
this.selectedIndex = preferredIndex;
|
|
139
|
+
else
|
|
140
|
+
this.selectedIndex = Math.min(this.selectedIndex, Math.max(0, this.filteredResults.length - 1));
|
|
135
141
|
this.updateResults();
|
|
136
142
|
}
|
|
137
143
|
scheduleSearch() {
|
|
@@ -163,10 +169,12 @@ class HuggingFaceSearch extends Container {
|
|
|
163
169
|
this.cache.set(query.toLowerCase(), results);
|
|
164
170
|
if (this.closed || request.signal.aborted || this.query !== query)
|
|
165
171
|
return;
|
|
172
|
+
// Keep the row the user browsed to while the search was in flight; otherwise show the best match.
|
|
173
|
+
const selectedId = this.selectionTouched ? this.filteredResults[this.selectedIndex]?.id : undefined;
|
|
166
174
|
this.results = results;
|
|
167
175
|
this.selectedIndex = 0;
|
|
168
176
|
this.status = results.length === 0 ? "No GGUF models found" : "";
|
|
169
|
-
this.filterResults();
|
|
177
|
+
this.filterResults(selectedId);
|
|
170
178
|
}
|
|
171
179
|
catch (error) {
|
|
172
180
|
if (this.closed || request.signal.aborted || this.query !== query)
|
|
@@ -193,6 +201,7 @@ class HuggingFaceSearch extends Container {
|
|
|
193
201
|
if (this.keybindings.matches(data, "tui.select.up")) {
|
|
194
202
|
if (this.filteredResults.length > 0) {
|
|
195
203
|
this.selectedIndex = this.selectedIndex === 0 ? this.filteredResults.length - 1 : this.selectedIndex - 1;
|
|
204
|
+
this.selectionTouched = true;
|
|
196
205
|
this.updateResults();
|
|
197
206
|
}
|
|
198
207
|
return;
|
|
@@ -200,6 +209,7 @@ class HuggingFaceSearch extends Container {
|
|
|
200
209
|
if (this.keybindings.matches(data, "tui.select.down")) {
|
|
201
210
|
if (this.filteredResults.length > 0) {
|
|
202
211
|
this.selectedIndex = this.selectedIndex === this.filteredResults.length - 1 ? 0 : this.selectedIndex + 1;
|
|
212
|
+
this.selectionTouched = true;
|
|
203
213
|
this.updateResults();
|
|
204
214
|
}
|
|
205
215
|
return;
|
|
@@ -208,6 +218,7 @@ class HuggingFaceSearch extends Container {
|
|
|
208
218
|
if (pageIndex !== undefined) {
|
|
209
219
|
if (this.filteredResults.length > 0) {
|
|
210
220
|
this.selectedIndex = pageIndex;
|
|
221
|
+
this.selectionTouched = true;
|
|
211
222
|
this.updateResults();
|
|
212
223
|
}
|
|
213
224
|
return;
|
|
@@ -228,6 +239,7 @@ class HuggingFaceSearch extends Container {
|
|
|
228
239
|
if (query === this.query)
|
|
229
240
|
return;
|
|
230
241
|
this.query = query;
|
|
242
|
+
this.selectionTouched = false;
|
|
231
243
|
this.scheduleSearch();
|
|
232
244
|
}
|
|
233
245
|
}
|
|
@@ -10,6 +10,8 @@ export interface McpCommandOptions {
|
|
|
10
10
|
agentDir: string;
|
|
11
11
|
/** Defaults to `mcp-auth.json` in the agent directory. */
|
|
12
12
|
credentials?: McpOAuthCredentialStore;
|
|
13
|
+
/** Token of a pi provider, for servers with `auth.provider`. Defaults to the agent directory's `auth.json`. */
|
|
14
|
+
providerToken?: (provider: string) => Promise<string | undefined>;
|
|
13
15
|
/** Defaults to the platform browser. */
|
|
14
16
|
openUrl?: (url: string) => void;
|
|
15
17
|
/** Defaults to console output. */
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
import { join } from "node:path";
|
|
9
|
-
import { createInterface } from "node:readline/promises";
|
|
10
9
|
import chalk from "chalk";
|
|
11
10
|
import { APP_NAME, CONFIG_DIR_NAME } from "../../config.js";
|
|
12
11
|
import { validateMcpServerConfig } from "../../core/mcp-servers.js";
|
|
12
|
+
import { ModelRuntime } from "../../core/model-runtime.js";
|
|
13
13
|
import { ProjectTrustStore } from "../../core/trust-manager.js";
|
|
14
14
|
import { openBrowser } from "../../utils/open-browser.js";
|
|
15
|
+
import { questionTerminal } from "../../utils/terminal-question.js";
|
|
15
16
|
import { addMcpServerConfig, getMcpToolExposure, loadMcpConfig, removeMcpServerConfig, } from "./config.js";
|
|
16
17
|
import { createDefaultTransport, McpOAuthCredentialStore, McpServerConnection, McpServerLog, McpSignInCancelledError, signInMcpServer, } from "./runtime.js";
|
|
17
18
|
const HELP = `${chalk.bold("Usage:")}
|
|
@@ -66,16 +67,42 @@ function describeTransport(entry) {
|
|
|
66
67
|
const { config } = entry;
|
|
67
68
|
return "url" in config ? config.url : [config.command, ...(config.args ?? [])].join(" ");
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function getAuthProvider(entry) {
|
|
71
|
+
return "url" in entry.config ? entry.config.auth?.provider : undefined;
|
|
72
|
+
}
|
|
73
|
+
function createConnection(entry, options, credentials, providerToken) {
|
|
70
74
|
return new McpServerConnection({
|
|
71
75
|
entry,
|
|
72
76
|
cwd: options.cwd,
|
|
73
77
|
createTransport: createDefaultTransport,
|
|
74
78
|
credentials,
|
|
79
|
+
providerToken,
|
|
75
80
|
log: new McpServerLog(join(options.agentDir, "mcp.log")),
|
|
76
81
|
onTools: () => { },
|
|
77
82
|
});
|
|
78
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Reads provider tokens from the agent directory's credentials, refreshing expired OAuth tokens like a
|
|
86
|
+
* session does. The model runtime is created on the first request, so servers without `auth.provider`
|
|
87
|
+
* do not load it.
|
|
88
|
+
*/
|
|
89
|
+
function createProviderTokenReader(agentDir) {
|
|
90
|
+
let runtime;
|
|
91
|
+
return async (provider) => {
|
|
92
|
+
runtime ??= ModelRuntime.create({
|
|
93
|
+
authPath: join(agentDir, "auth.json"),
|
|
94
|
+
modelsPath: join(agentDir, "models.json"),
|
|
95
|
+
refreshOnCreate: false,
|
|
96
|
+
});
|
|
97
|
+
try {
|
|
98
|
+
return (await (await runtime).getAuth(provider))?.auth.apiKey;
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
// Missing or unrefreshable credentials: the server's 401 then reports that sign-in is needed.
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
79
106
|
/** Short spellings of options. `-l`/`--local` match `pi install`. */
|
|
80
107
|
const OPTION_ALIASES = new Map([["-l", "--local"]]);
|
|
81
108
|
/**
|
|
@@ -141,6 +168,7 @@ export async function runMcpCommand(args, options) {
|
|
|
141
168
|
? `${projectConfig} is ignored because the project is not trusted. Start ${APP_NAME} in the project to trust it.`
|
|
142
169
|
: undefined;
|
|
143
170
|
const credentials = options.credentials ?? new McpOAuthCredentialStore();
|
|
171
|
+
const providerToken = options.providerToken ?? createProviderTokenReader(options.agentDir);
|
|
144
172
|
switch (command) {
|
|
145
173
|
case "list": {
|
|
146
174
|
const parsed = parseOptions(rest, { json: "flag" }, error);
|
|
@@ -150,7 +178,7 @@ export async function runMcpCommand(args, options) {
|
|
|
150
178
|
error(`Usage: ${APP_NAME} mcp list [--json]\n${HELP_HINT}`);
|
|
151
179
|
return 1;
|
|
152
180
|
}
|
|
153
|
-
return list(loaded, parsed.values.has("json"), untrustedNote, options, credentials, log);
|
|
181
|
+
return list(loaded, parsed.values.has("json"), untrustedNote, options, credentials, providerToken, log);
|
|
154
182
|
}
|
|
155
183
|
case "login":
|
|
156
184
|
case "logout": {
|
|
@@ -173,7 +201,12 @@ export async function runMcpCommand(args, options) {
|
|
|
173
201
|
error(`MCP server "${name}" is defined in ${entry.source}, not in the project; omit --local.`);
|
|
174
202
|
return 1;
|
|
175
203
|
}
|
|
176
|
-
const
|
|
204
|
+
const authProvider = getAuthProvider(entry);
|
|
205
|
+
if (authProvider) {
|
|
206
|
+
error(`MCP server "${name}" uses the credentials of provider "${authProvider}". Run "${APP_NAME} auth ${command} ${authProvider}".`);
|
|
207
|
+
return 1;
|
|
208
|
+
}
|
|
209
|
+
const connection = createConnection(entry, options, credentials, providerToken);
|
|
177
210
|
const url = connection.oauthUrl;
|
|
178
211
|
if (!url) {
|
|
179
212
|
error(`MCP server "${name}" does not use OAuth. Only HTTP servers without an Authorization header do.`);
|
|
@@ -370,8 +403,9 @@ function remove(args, projectConfig, options, log, error) {
|
|
|
370
403
|
error(`No ${scope} MCP server named "${name}" in ${path}.${other ? ` It is defined in ${other.source}${other.scope === "project" ? "; use --local" : "; omit --local"}.` : ""}`);
|
|
371
404
|
return 1;
|
|
372
405
|
}
|
|
373
|
-
async function list(loaded, json, untrustedNote, options, credentials, log) {
|
|
406
|
+
async function list(loaded, json, untrustedNote, options, credentials, providerToken, log) {
|
|
374
407
|
const reports = await Promise.all(loaded.servers.map(async (entry) => {
|
|
408
|
+
const authProvider = getAuthProvider(entry);
|
|
375
409
|
const report = {
|
|
376
410
|
name: entry.name,
|
|
377
411
|
scope: entry.scope ?? "global",
|
|
@@ -380,12 +414,13 @@ async function list(loaded, json, untrustedNote, options, credentials, log) {
|
|
|
380
414
|
enabled: entry.config.enabled !== false,
|
|
381
415
|
exposure: entry.config.exposure ?? "codemode",
|
|
382
416
|
transport: describeTransport(entry),
|
|
417
|
+
...(authProvider ? { authProvider } : {}),
|
|
383
418
|
state: "disabled",
|
|
384
419
|
tools: [],
|
|
385
420
|
};
|
|
386
421
|
if (!report.enabled)
|
|
387
422
|
return report;
|
|
388
|
-
const connection = createConnection(entry, options, credentials);
|
|
423
|
+
const connection = createConnection(entry, options, credentials, providerToken);
|
|
389
424
|
try {
|
|
390
425
|
await connection.getClient();
|
|
391
426
|
}
|
|
@@ -425,8 +460,11 @@ async function list(loaded, json, untrustedNote, options, credentials, log) {
|
|
|
425
460
|
log(` ${report.transport}`);
|
|
426
461
|
if (report.override)
|
|
427
462
|
log(` project override: ${report.override}`);
|
|
428
|
-
if (report.state === "needs-auth")
|
|
429
|
-
log(
|
|
463
|
+
if (report.state === "needs-auth") {
|
|
464
|
+
log(report.authProvider
|
|
465
|
+
? ` sign in with: /login ${report.authProvider} in ${APP_NAME}`
|
|
466
|
+
: ` sign in with: ${APP_NAME} mcp login ${report.name}`);
|
|
467
|
+
}
|
|
430
468
|
if (report.tools.length > 0) {
|
|
431
469
|
const tools = report.tools.map((tool) => {
|
|
432
470
|
const exposure = report.toolExposure?.[tool];
|
|
@@ -496,7 +534,7 @@ async function login(entry, connection, url, timeoutMs, options, credentials, lo
|
|
|
496
534
|
}
|
|
497
535
|
/**
|
|
498
536
|
* The pasted redirect URL in a terminal; otherwise only the browser callback can finish the sign-in.
|
|
499
|
-
* Resolves to undefined
|
|
537
|
+
* Resolves to undefined on cancellation or EOF, or when the callback arrives or the sign-in times out.
|
|
500
538
|
*/
|
|
501
539
|
async function waitForRedirectUrl(signal, interactive) {
|
|
502
540
|
if (!interactive) {
|
|
@@ -504,17 +542,14 @@ async function waitForRedirectUrl(signal, interactive) {
|
|
|
504
542
|
await new Promise((resolve) => signal.addEventListener("abort", resolve, { once: true }));
|
|
505
543
|
return undefined;
|
|
506
544
|
}
|
|
507
|
-
const readline = createInterface({ input: process.stdin, output: process.stderr });
|
|
508
545
|
try {
|
|
509
|
-
return await
|
|
546
|
+
return await questionTerminal("If the browser cannot reach this machine, paste the URL it was redirected to: ", {
|
|
510
547
|
signal,
|
|
548
|
+
output: process.stderr,
|
|
511
549
|
});
|
|
512
550
|
}
|
|
513
551
|
catch {
|
|
514
552
|
return undefined;
|
|
515
553
|
}
|
|
516
|
-
finally {
|
|
517
|
-
readline.close();
|
|
518
|
-
}
|
|
519
554
|
}
|
|
520
555
|
//# sourceMappingURL=cli.js.map
|
|
@@ -30,15 +30,12 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
32
32
|
import { dirname, join } from "node:path";
|
|
33
|
+
import { isMcpServerOverride, mcpNamespace } from "@earendil-works/pi-mcp";
|
|
33
34
|
import { CONFIG_DIR_NAME } from "../../config.js";
|
|
34
|
-
import {
|
|
35
|
+
import { validateMcpServerConfig } from "../../core/mcp-servers.js";
|
|
35
36
|
import { stripBom } from "../../utils/text.js";
|
|
36
37
|
export { getMcpToolExposure } from "../../core/mcp-servers.js";
|
|
37
38
|
const OVERRIDE_KEYS = ["enabled", "exposure", "toolExposure"];
|
|
38
|
-
/** Whether an entry overrides a server defined elsewhere instead of defining one. */
|
|
39
|
-
function isOverride(value) {
|
|
40
|
-
return value.command === undefined && value.url === undefined && value.type === undefined;
|
|
41
|
-
}
|
|
42
39
|
function isRecord(value) {
|
|
43
40
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44
41
|
}
|
|
@@ -63,7 +60,7 @@ function readConfigFile(path, scope, state) {
|
|
|
63
60
|
else if (parsed.autoEnableCodemode !== undefined)
|
|
64
61
|
errors.push(`${path}: autoEnableCodemode must be a boolean`);
|
|
65
62
|
for (const [name, value] of Object.entries(parsed.mcpServers ?? {})) {
|
|
66
|
-
if (scope === "project" && isRecord(value) &&
|
|
63
|
+
if (scope === "project" && isRecord(value) && isMcpServerOverride(value)) {
|
|
67
64
|
const base = servers.get(name);
|
|
68
65
|
const extra = Object.keys(value).filter((key) => !OVERRIDE_KEYS.includes(key));
|
|
69
66
|
if (!base) {
|
|
@@ -130,7 +127,7 @@ export function updateMcpServerConfig(path, name, patch, options = {}) {
|
|
|
130
127
|
}
|
|
131
128
|
if (!isRecord(server))
|
|
132
129
|
throw new Error(`${path} does not define MCP server "${name}"`);
|
|
133
|
-
const keepDefaults =
|
|
130
|
+
const keepDefaults = isMcpServerOverride(server);
|
|
134
131
|
if (patch.enabled !== undefined) {
|
|
135
132
|
if (patch.enabled && !keepDefaults)
|
|
136
133
|
delete server.enabled;
|
|
@@ -26,15 +26,16 @@
|
|
|
26
26
|
* current session for registered servers.
|
|
27
27
|
*/
|
|
28
28
|
import { join, resolve } from "node:path";
|
|
29
|
+
import { createMcpToolName, mcpNamespace } from "@earendil-works/pi-mcp";
|
|
29
30
|
import { getAgentDir } from "../../config.js";
|
|
30
|
-
import {
|
|
31
|
+
import { sliceHead } from "../../core/tools/truncate.js";
|
|
31
32
|
import { openBrowser } from "../../utils/open-browser.js";
|
|
32
33
|
import { CODEMODE_TOOL_NAME } from "../codemode/tool.js";
|
|
33
34
|
import { TOOL_SEARCH_TOOL_NAME } from "../tool-search/tool.js";
|
|
34
35
|
import { getMcpToolExposure, loadMcpConfig, updateMcpServerConfig, } from "./config.js";
|
|
35
36
|
import { createMcpResourceToolDefinitions, LIST_MCP_RESOURCE_TEMPLATES_TOOL, LIST_MCP_RESOURCES_TOOL, READ_MCP_RESOURCE_TOOL, } from "./resources.js";
|
|
36
37
|
import { loadMcpRuntime } from "./runtime.lazy.js";
|
|
37
|
-
import { createMcpToolDefinition,
|
|
38
|
+
import { createMcpToolDefinition, createMcpToolRenderers } from "./tools.js";
|
|
38
39
|
import { showMcpManager } from "./ui.js";
|
|
39
40
|
const DEFAULT_STARTUP_WAIT_MS = 10_000;
|
|
40
41
|
const RESOURCE_TOOL_NAMES = new Set([
|
|
@@ -93,7 +94,7 @@ function serversSectionIntro(reaches) {
|
|
|
93
94
|
function truncate(text, max) {
|
|
94
95
|
if (text.length <= max)
|
|
95
96
|
return text;
|
|
96
|
-
return max <= 1 ? "" : `${text
|
|
97
|
+
return max <= 1 ? "" : `${sliceHead(text, max - 1).trimEnd()}…`;
|
|
97
98
|
}
|
|
98
99
|
/** First line of the configured description, or of the server instructions once connected. */
|
|
99
100
|
function serverSummary(server) {
|
|
@@ -1,37 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OAuth sign-in for remote MCP servers.
|
|
2
|
+
* OAuth sign-in for remote MCP servers: pi's credential store and its side of the sign-in.
|
|
3
3
|
*
|
|
4
4
|
* Connections never start a browser flow on their own. They send the stored access token and, after
|
|
5
5
|
* a 401, try the stored refresh token. When that is not possible they fail with
|
|
6
|
-
* `McpOAuthAuthorizationRequiredError`, and the user signs in through `/mcp`, which
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* `McpOAuthAuthorizationRequiredError`, and the user signs in through `/mcp` or `pi mcp login`, which
|
|
7
|
+
* run pi-mcp's sign-in (PKCE, pi's Client ID Metadata Document or dynamic client registration) against
|
|
8
|
+
* a loopback callback or a pasted redirect URL.
|
|
9
9
|
*
|
|
10
10
|
* Credentials live in `<agent-dir>/mcp-auth.json`, keyed by server name and URL.
|
|
11
11
|
*/
|
|
12
|
-
import type
|
|
13
|
-
import { type McpOAuthState, type McpOAuthStateStore, type OAuthChallenge } from "@earendil-works/pi-mcp/oauth";
|
|
12
|
+
import { type McpAuthProvider, type McpOAuthServerStore, type McpOAuthSettings, type McpOAuthState, type OAuthChallenge } from "@earendil-works/pi-mcp/oauth";
|
|
14
13
|
import { type AuthStorageBackend } from "../../core/auth-storage.ts";
|
|
15
|
-
export interface McpOAuthSettings {
|
|
16
|
-
clientId?: string;
|
|
17
|
-
/** Already resolved. */
|
|
18
|
-
clientSecret?: string;
|
|
19
|
-
callbackPort?: number;
|
|
20
|
-
/** Loopback redirect URI; see `McpOAuthConfig.callbackUrl`. */
|
|
21
|
-
callbackUrl?: string;
|
|
22
|
-
/** Scopes to request, separated by spaces. */
|
|
23
|
-
scope?: string;
|
|
24
|
-
/** `client_name` for dynamic client registration. Default: `APP_NAME`. */
|
|
25
|
-
clientName?: string;
|
|
26
|
-
/** See `McpOAuthConfig.clientRegistration`. */
|
|
27
|
-
clientRegistration?: "auto" | "dcr" | "cimd";
|
|
28
|
-
/** See `McpOAuthConfig.authServerMetadataUrl`. */
|
|
29
|
-
authServerMetadataUrl?: URL;
|
|
30
|
-
}
|
|
31
|
-
export interface McpOAuthServerStore extends McpOAuthStateStore {
|
|
32
|
-
/** Run `fn` while no other process refreshes the server's tokens. */
|
|
33
|
-
withRefreshLock<T>(fn: () => Promise<T>): Promise<T>;
|
|
34
|
-
}
|
|
35
14
|
/** Per-server OAuth state (client registration, tokens, pending PKCE verifier) in `mcp-auth.json`. */
|
|
36
15
|
export declare class McpOAuthCredentialStore {
|
|
37
16
|
private readonly backend;
|
|
@@ -42,6 +21,7 @@ export declare class McpOAuthCredentialStore {
|
|
|
42
21
|
/**
|
|
43
22
|
* A lock file per server. When the process exits, proper-lockfile removes the locks it holds; when
|
|
44
23
|
* it is killed, the lock goes stale because it is no longer renewed, and the next process takes it over.
|
|
24
|
+
* Throws `McpRefreshLockBusyError` when another process holds the lock for the whole wait.
|
|
45
25
|
*/
|
|
46
26
|
private withRefreshLock;
|
|
47
27
|
/** The stored tokens of a server, for noticing sign-ins done by another process. Does not take over legacy state. */
|
|
@@ -50,23 +30,7 @@ export declare class McpOAuthCredentialStore {
|
|
|
50
30
|
remove(name: string, serverUrl: string): boolean;
|
|
51
31
|
private write;
|
|
52
32
|
}
|
|
53
|
-
|
|
54
|
-
/** Resolves when no refresh is running, so shutdown does not drop rotated tokens before they are saved. */
|
|
55
|
-
settled(): Promise<void>;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Auth provider for MCP connections: sends the stored access token and refreshes it when it is about
|
|
59
|
-
* to expire or after a 401. Throws `McpOAuthAuthorizationRequiredError` when the user has to sign in,
|
|
60
|
-
* including when the server asks for more scope (`insufficient_scope`). `onChallenge` receives the
|
|
61
|
-
* server's `WWW-Authenticate` challenge so sign-in can use its resource metadata URL and scope.
|
|
62
|
-
* `settings` is only called when a refresh is needed, so a secret that fails to resolve fails the
|
|
63
|
-
* refresh instead of the whole connection setup.
|
|
64
|
-
*
|
|
65
|
-
* Many servers rotate refresh tokens, so two refreshes with the same refresh token lose the grant.
|
|
66
|
-
* Requests in this process share one refresh, and other processes are kept out by the store's
|
|
67
|
-
* refresh lock, held from reading the tokens to saving new ones. Tokens that changed meanwhile
|
|
68
|
-
* (another process refreshed them, or the user signed in) are used without refreshing.
|
|
69
|
-
*/
|
|
33
|
+
/** pi-mcp's `createMcpAuthProvider` with pi's client identity. */
|
|
70
34
|
export declare function createMcpAuthProvider(options: {
|
|
71
35
|
serverUrl: string;
|
|
72
36
|
store: McpOAuthServerStore;
|
|
@@ -83,17 +47,15 @@ export interface McpSignInPrompt {
|
|
|
83
47
|
*/
|
|
84
48
|
promptForRedirectUrl(signal: AbortSignal): Promise<string | undefined>;
|
|
85
49
|
}
|
|
86
|
-
export declare class McpSignInCancelledError extends Error {
|
|
87
|
-
constructor();
|
|
88
|
-
}
|
|
89
50
|
/**
|
|
90
51
|
* Sign in to an MCP server. Uses the stored refresh token when possible; otherwise runs the browser
|
|
91
|
-
* authorization code flow
|
|
92
|
-
* step with `McpSignInCancelledError`; requests to
|
|
52
|
+
* authorization code flow against a loopback callback or a pasted redirect URL. Tokens are saved to
|
|
53
|
+
* `store`. Aborting `signal` stops the sign-in at any step with `McpSignInCancelledError`; requests to
|
|
54
|
+
* the authorization server are also time-limited.
|
|
93
55
|
*/
|
|
94
56
|
export declare function signInMcpServer(options: {
|
|
95
57
|
serverUrl: string;
|
|
96
|
-
store:
|
|
58
|
+
store: McpOAuthServerStore;
|
|
97
59
|
settings: McpOAuthSettings;
|
|
98
60
|
challenge?: OAuthChallenge;
|
|
99
61
|
prompt: McpSignInPrompt;
|