dal-code 1.0.50 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1050 -5
- package/NOTICE +17 -1
- package/dist/bundle/chunks/anthropic-messages-NK5NGKAI.js +5 -0
- package/dist/bundle/chunks/anthropic.js +74 -0
- package/dist/bundle/chunks/azure-openai-responses-VEASENYL.js +1 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +88 -0
- package/dist/bundle/chunks/chunk-3YGHTGYM.js +7 -0
- package/dist/bundle/chunks/chunk-4LDEEFCY.js +1 -0
- package/dist/bundle/chunks/chunk-4UTLMBZZ.js +13 -0
- package/dist/bundle/chunks/chunk-4VJJ6NXH.js +8 -0
- package/dist/bundle/chunks/chunk-567OJLS7.js +1 -0
- package/dist/bundle/chunks/chunk-5AGIVGSV.js +5 -0
- package/dist/bundle/chunks/chunk-6EEJ4MZH.js +1 -0
- package/dist/bundle/chunks/chunk-6QGV3IWD.js +5 -0
- package/dist/bundle/chunks/chunk-723ZGEZ2.js +1 -0
- package/dist/bundle/chunks/chunk-7DDKXS2Q.js +1 -0
- package/dist/bundle/chunks/chunk-7ZC4UXSL.js +1 -0
- package/dist/bundle/chunks/chunk-A5CI3CVQ.js +1 -0
- package/dist/bundle/chunks/chunk-AAQZXQA7.js +1 -0
- package/dist/bundle/chunks/chunk-ANL2BCIQ.js +15 -0
- package/dist/bundle/chunks/chunk-CF5GWZHW.js +30 -0
- package/dist/bundle/chunks/chunk-CS4T4O5O.js +1 -0
- package/dist/bundle/chunks/chunk-D2WTLI2T.js +19 -0
- package/dist/bundle/chunks/chunk-DLKRCASW.js +17 -0
- package/dist/bundle/chunks/chunk-EH7SFF47.js +129 -0
- package/dist/bundle/chunks/chunk-FFMDRXC4.js +9 -0
- package/dist/bundle/chunks/chunk-HEFI7NO7.js +1 -0
- package/dist/bundle/chunks/chunk-IEBK4HQA.js +1 -0
- package/dist/bundle/chunks/chunk-JXWJOIH4.js +1 -0
- package/dist/bundle/chunks/chunk-K7VBBYTT.js +1 -0
- package/dist/bundle/chunks/chunk-KJW3E2CB.js +9 -0
- package/dist/bundle/chunks/chunk-L2ZPNLYD.js +1 -0
- package/dist/bundle/chunks/chunk-LVVZS2NO.js +11 -0
- package/dist/bundle/chunks/chunk-ML5DIOWR.js +1 -0
- package/dist/bundle/chunks/chunk-ON7ZX67F.js +30 -0
- package/dist/bundle/chunks/chunk-OQWPBJCS.js +81 -0
- package/dist/bundle/chunks/chunk-P7FPUEYA.js +1 -0
- package/dist/bundle/chunks/chunk-PGXDEOVV.js +1 -0
- package/dist/bundle/chunks/chunk-PJACZCIR.js +1 -0
- package/dist/bundle/chunks/chunk-PRRNXB7S.js +1 -0
- package/dist/bundle/chunks/chunk-R47JBGS3.js +1 -0
- package/dist/bundle/chunks/chunk-RDZVAGPR.js +1 -0
- package/dist/bundle/chunks/chunk-SE42OS3U.js +21 -0
- package/dist/bundle/chunks/chunk-TK2WJTRC.js +3 -0
- package/dist/bundle/chunks/chunk-TMTOQ7H7.js +1 -0
- package/dist/bundle/chunks/chunk-UTB4DTYQ.js +1 -0
- package/dist/bundle/chunks/chunk-UVKMBM5X.js +56 -0
- package/dist/bundle/chunks/chunk-WIZGOHKY.js +9 -0
- package/dist/bundle/chunks/chunk-XAS5HHBW.js +1180 -0
- package/dist/bundle/chunks/chunk-XDBGA662.js +43 -0
- package/dist/bundle/chunks/chunk-XJFQKN3N.js +2 -0
- package/dist/bundle/chunks/chunk-YWNDPXVM.js +25 -0
- package/dist/bundle/chunks/chunk-ZG74NES2.js +1 -0
- package/dist/bundle/chunks/cli-GXB5WYKG.js +52 -0
- package/dist/bundle/chunks/cli-YPE3BB5X.js +30 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-B7WOBGWO.js +1 -0
- package/dist/bundle/chunks/codemode-worker.js +480 -0
- package/dist/bundle/chunks/dist-D3WIBXB5.js +10 -0
- package/dist/bundle/chunks/easter-egg-3d-5TFBCTIS.js +1 -0
- package/dist/bundle/chunks/execute-27QCJECT.js +506 -0
- package/dist/bundle/chunks/github-copilot.js +1 -0
- package/dist/bundle/chunks/google-generative-ai-MBMRBHSZ.js +1 -0
- package/dist/bundle/chunks/google-vertex-S2ZFBDPP.js +1 -0
- package/dist/bundle/chunks/http-proxy-KF35JLJN.js +1 -0
- package/dist/bundle/chunks/https-proxy-agent-LVOO5TPL.js +12 -0
- package/dist/bundle/chunks/image-resize-worker.js +1 -0
- package/dist/bundle/chunks/jiti-loader-GL4HJFAD.js +20 -0
- package/dist/bundle/chunks/jiti-static-loader-2RCDI6B4.js +1 -0
- package/dist/bundle/chunks/kimi-coding.js +1 -0
- package/dist/bundle/chunks/lib-4AVRLBHM.js +8 -0
- package/dist/bundle/chunks/llama-cpp-classify-S4LVGNNY.js +21 -0
- package/dist/bundle/chunks/mcp-6LJKGKJQ.js +10 -0
- package/dist/bundle/chunks/meta.js +1 -0
- package/dist/bundle/chunks/mistral-conversations-C7LUXIEY.js +4 -0
- package/dist/bundle/chunks/multipart-parser-FMGQ7342.js +2 -0
- package/dist/bundle/chunks/node-AUOGOBCN.js +1 -0
- package/dist/bundle/chunks/node-ZTHARAQV.js +15 -0
- package/dist/bundle/chunks/office-5OWKTZOA.js +419 -0
- package/dist/bundle/chunks/openai-chatgpt.js +74 -0
- package/dist/bundle/chunks/openai-codex-responses-YQQXJ24E.js +9 -0
- package/dist/bundle/chunks/openai-codex.js +74 -0
- package/dist/bundle/chunks/openai-completions-7CMH2FKD.js +6 -0
- package/dist/bundle/chunks/openai-decisions-AOGZTREY.js +4 -0
- package/dist/bundle/chunks/openai-responses-ZSOGZ3MK.js +3 -0
- package/dist/bundle/chunks/openrouter-images-AHXST2TH.js +1 -0
- package/dist/bundle/chunks/openrouter.js +74 -0
- package/dist/bundle/chunks/pi-messages-QERJLMZ6.js +7 -0
- package/dist/bundle/chunks/radius.js +74 -0
- package/dist/bundle/chunks/review-5G56KIWY.js +80 -0
- package/dist/bundle/chunks/rewind-2OYLDDHH.js +8 -0
- package/dist/bundle/chunks/router-776Z7G7G.js +3 -0
- package/dist/bundle/chunks/runtime-NKPT25KD.js +1 -0
- package/dist/bundle/chunks/sdk-TVC4GDUX.js +1 -0
- package/dist/bundle/chunks/src-QKGKDFSU.js +3 -0
- package/dist/bundle/chunks/sync-JBDC3YBK.js +7 -0
- package/dist/bundle/chunks/typesafe-system-one-MMNGGQ46.js +1 -0
- package/dist/bundle/chunks/usage-BDCIALHO.js +1 -0
- package/dist/bundle/chunks/virtual-modules-25RQ6XTV.js +1 -0
- package/dist/bundle/chunks/xai.js +1 -0
- package/dist/bundle/cli-runtime.js +2 -0
- package/dist/bundle/cli.js +2 -0
- package/dist/bundle/index.js +1 -0
- package/dist/bundle/rpc-entry.js +2 -0
- package/dist/cli/args.js +1 -1
- package/dist/cli/auth-command.js +9 -6
- package/dist/cli/auth-login.js +2 -0
- package/dist/cli/auth-logout.js +1 -0
- package/dist/cli/auth-terminal.js +5 -0
- package/dist/cli/config-selector.js +1 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.js +1 -1
- package/dist/core/agent-session-runtime.js +1 -1
- package/dist/core/agent-session-services.js +1 -1
- package/dist/core/agent-session.d.ts +8 -1
- package/dist/core/agent-session.js +12 -9
- package/dist/core/auth-storage.js +1 -1
- package/dist/core/bash-executor.js +1 -1
- package/dist/core/bug-report.js +3 -3
- package/dist/core/cache-warmer.d.ts +3 -15
- package/dist/core/cache-warmer.js +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +3 -2
- package/dist/core/compaction/branch-summarization.js +5 -5
- package/dist/core/compaction/compaction.d.ts +1 -0
- package/dist/core/compaction/compaction.js +14 -14
- package/dist/core/compaction/tool-output-pruning.js +1 -1
- package/dist/core/compaction/utils.d.ts +0 -1
- package/dist/core/compaction/utils.js +8 -8
- package/dist/core/exec.d.ts +2 -0
- package/dist/core/exec.js +1 -1
- package/dist/core/export-html/template.css +9 -0
- package/dist/core/export-html/template.js +46 -39
- package/dist/core/export-html/tool-renderer.js +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/pi-ai-extension-view.js +1 -0
- package/dist/core/extensions/runner.js +1 -1
- package/dist/core/extensions/types.d.ts +25 -7
- package/dist/core/extensions/virtual-modules.js +1 -1
- package/dist/core/keybindings.d.ts +1 -1
- package/dist/core/keybindings.js +1 -1
- package/dist/core/mcp-servers.d.ts +6 -17
- package/dist/core/mcp-servers.js +1 -1
- package/dist/core/model-config.d.ts +1912 -2211
- package/dist/core/model-config.js +4 -4
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-runtime.d.ts +1 -0
- package/dist/core/model-runtime.js +1 -1
- package/dist/core/package-manager.d.ts +10 -1
- package/dist/core/package-manager.js +2 -2
- package/dist/core/pi-ai-schemas.js +1 -0
- package/dist/core/pi-manifest.js +1 -1
- package/dist/core/preferred-providers.js +1 -0
- package/dist/core/project-trust.js +2 -2
- package/dist/core/prompt-templates.js +2 -2
- package/dist/core/provider-composer.js +1 -1
- package/dist/core/provider-matching.js +1 -0
- package/dist/core/radius-mcp.js +1 -0
- package/dist/core/remote-catalog-provider.js +1 -1
- package/dist/core/resource-loader.d.ts +3 -1
- package/dist/core/resource-loader.js +1 -1
- package/dist/core/runtime-credentials.js +1 -1
- package/dist/core/sdk.js +1 -1
- package/dist/core/session-cwd.js +3 -7
- package/dist/core/session-manager.d.ts +1 -0
- package/dist/core/session-manager.js +12 -12
- package/dist/core/settings-defaults.js +1 -1
- package/dist/core/settings-manager.d.ts +4 -0
- package/dist/core/settings-manager.js +1 -1
- package/dist/core/settings-schema.d.ts +4 -2
- package/dist/core/settings-schema.js +1 -1
- package/dist/core/skills.js +3 -3
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/source-info.d.ts +8 -0
- package/dist/core/source-info.js +1 -1
- package/dist/core/system-prompt.js +3 -3
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.js +15 -15
- package/dist/core/tools/edit-diff.d.ts +9 -4
- package/dist/core/tools/edit-diff.js +22 -15
- package/dist/core/tools/edit.d.ts +3 -3
- package/dist/core/tools/edit.js +3 -3
- package/dist/core/tools/find.d.ts +2 -2
- package/dist/core/tools/find.js +10 -11
- package/dist/core/tools/grep.d.ts +3 -3
- package/dist/core/tools/grep.js +8 -12
- package/dist/core/tools/ls.d.ts +2 -2
- package/dist/core/tools/ls.js +4 -4
- package/dist/core/tools/powershell.js +6 -2
- package/dist/core/tools/read.d.ts +5 -2
- package/dist/core/tools/read.js +20 -19
- package/dist/core/tools/render-utils.js +5 -5
- package/dist/core/tools/renderers/write.js +10 -10
- package/dist/core/tools/tool-definition-wrapper.d.ts +11 -0
- package/dist/core/tools/truncate.d.ts +2 -8
- package/dist/core/tools/truncate.js +10 -10
- package/dist/core/tools/write.d.ts +2 -2
- package/dist/core/trust-manager.js +2 -2
- package/dist/core/usage-totals.js +1 -1
- package/dist/dal/builtins.js +2 -2
- package/dist/dal/manifest.d.ts +1 -0
- package/dist/dal/manifest.js +1 -1
- package/dist/dal/safety-net.js +11 -3
- package/dist/extensions/codemode/execute.js +12 -12
- package/dist/extensions/codemode/renderer.js +6 -6
- package/dist/extensions/codemode/tool.d.ts +2 -1
- package/dist/extensions/codemode/tool.js +11 -10
- package/dist/extensions/llama/client.js +5 -5
- package/dist/extensions/llama/ui.js +2 -2
- package/dist/extensions/mcp/cli.js +21 -19
- package/dist/extensions/mcp/config.js +2 -2
- package/dist/extensions/mcp/index.js +7 -7
- package/dist/extensions/mcp/oauth.d.ts +3 -22
- package/dist/extensions/mcp/oauth.js +2 -2
- package/dist/extensions/mcp/resources.d.ts +1 -1
- package/dist/extensions/mcp/resources.js +1 -1
- package/dist/extensions/mcp/runtime.d.ts +2 -2
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/extensions/mcp/tools.d.ts +1 -8
- package/dist/extensions/mcp/tools.js +4 -9
- package/dist/extensions/mcp/ui.js +1 -1
- package/dist/extensions/tool-search/tool.js +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/main.js +4 -4
- package/dist/modes/interactive/components/assistant-message.d.ts +4 -1
- package/dist/modes/interactive/components/assistant-message.js +2 -2
- package/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
- package/dist/modes/interactive/components/branch-summary-message.js +2 -2
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +5 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +2 -2
- package/dist/modes/interactive/components/config-selector.js +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -1
- package/dist/modes/interactive/components/custom-entry.js +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +5 -2
- package/dist/modes/interactive/components/custom-message.js +3 -3
- package/dist/modes/interactive/components/diff.js +3 -3
- package/dist/modes/interactive/components/extension-editor.d.ts +1 -0
- package/dist/modes/interactive/components/extension-editor.js +1 -1
- package/dist/modes/interactive/components/extension-selector.js +2 -2
- package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
- package/dist/modes/interactive/components/login-dialog.js +1 -1
- package/dist/modes/interactive/components/markdown-transform.js +1 -1
- package/dist/modes/interactive/components/mermaid.js +4 -4
- package/dist/modes/interactive/components/model-selector.d.ts +1 -0
- package/dist/modes/interactive/components/model-selector.js +2 -2
- package/dist/modes/interactive/components/oauth-selector.d.ts +2 -1
- package/dist/modes/interactive/components/oauth-selector.js +1 -1
- package/dist/modes/interactive/components/provider-brand.js +1 -0
- package/dist/modes/interactive/components/radius-login-selector.js +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +2 -1
- package/dist/modes/interactive/components/session-selector.js +2 -2
- package/dist/modes/interactive/components/settings-submenu.js +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +2 -2
- package/dist/modes/interactive/components/tool-execution.d.ts +1 -0
- package/dist/modes/interactive/components/tool-execution.js +3 -3
- package/dist/modes/interactive/components/tree-selector.d.ts +2 -0
- package/dist/modes/interactive/components/tree-selector.js +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +2 -1
- package/dist/modes/interactive/components/user-message.js +1 -1
- package/dist/modes/interactive/external-editor.js +3 -3
- package/dist/modes/interactive/interactive-mode.d.ts +10 -1
- package/dist/modes/interactive/interactive-mode.js +45 -40
- package/dist/modes/interactive/model-search.js +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +4 -0
- package/dist/modes/interactive/theme/theme.js +3 -6
- package/dist/modes/print-mode.js +7 -7
- package/dist/modes/rpc/rpc-mode.js +1 -1
- package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-compat/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-learn/package.json +5 -2
- package/dist/node_modules/@dalcode/dal-learn/src/engine.js +4 -4
- package/dist/node_modules/@dalcode/dal-learn/src/extract.js +31 -5
- package/dist/node_modules/@dalcode/dal-learn/src/index.js +16 -16
- package/dist/node_modules/@dalcode/dal-learn/src/learn-mode.js +1 -0
- package/dist/node_modules/@dalcode/dal-learn/src/lesson-events.js +1 -0
- package/dist/node_modules/@dalcode/dal-learn/src/lessons.js +4 -3
- package/dist/node_modules/@dalcode/dal-learn/src/project-map.js +2 -2
- package/dist/node_modules/@dalcode/dal-learn/src/safety.js +2 -2
- package/dist/node_modules/@dalcode/dal-learn/src/signals.js +6 -5
- package/dist/node_modules/@dalcode/dal-learn/src/store.js +3 -2
- package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +4 -3
- package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +4 -3
- package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-router/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-sync/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-sync/src/core.js +2 -2
- package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-workflow/src/todo-snapshot.js +2 -2
- package/dist/node_modules/@dalcode/dal-workflow/src/todo.js +3 -3
- package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/README.md +8 -6
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +2 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +8 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-ai/README.md +58 -39
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +5 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +2 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +4 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +2 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +9 -9
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +3 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +3 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/strict-tool-limits.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/meta.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/trusted-url.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/cache-warming.d.ts +21 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/cache-warming.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/cli.js +5 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/index.d.ts +3 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/index.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/lazy-bedrock-provider.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/lazy-oauth.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +4 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/all.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.d.ts +485 -498
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/azure.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual-cn.json +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.d.ts +65 -65
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual-cn.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual-cn.models.d.ts +5 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual-cn.models.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius-config.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/schema-builders.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/telemetry.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/types.d.ts +4 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/openrouter-cost.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/streaming-json.d.ts +26 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/streaming-json.js +4 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/{typebox-helpers.d.ts → string-enum.d.ts} +2 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/string-enum.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.js +2 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +4 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/package.json +12 -5
- package/dist/node_modules/@earendil-works/pi-codemode/README.md +2 -2
- package/dist/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-codemode/dist/declarations.js +4 -4
- package/dist/node_modules/@earendil-works/pi-codemode/dist/index.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-codemode/dist/index.js +1 -1
- package/dist/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +2 -0
- package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/CHANGELOG.md +32 -0
- package/dist/node_modules/@earendil-works/pi-mcp/README.md +60 -5
- package/dist/node_modules/@earendil-works/pi-mcp/dist/config.d.ts +45 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/config.js +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/index.d.ts +5 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/index.js +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/dist/input-schema.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/input-schema.js +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/naming.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/naming.js +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/auth-provider.d.ts +18 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/auth-provider.js +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/callback.js +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/client-settings.d.ts +42 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/client-settings.js +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.js +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.js +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/index.d.ts +5 -1
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/index.js +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/loopback.d.ts +22 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/loopback.js +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/sign-in.d.ts +28 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/sign-in.js +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/types.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/types.js +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/dist/output-limit.d.ts +8 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/output-limit.js +11 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/lines.js +1 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/pipe.d.ts +34 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/pipe.js +2 -0
- package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/stdio.d.ts +1 -4
- package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/stdio.js +2 -2
- package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.js +6 -4
- package/dist/node_modules/@earendil-works/pi-mcp/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-schema/CHANGELOG.md +37 -0
- package/dist/node_modules/@earendil-works/pi-schema/LICENSE +21 -0
- package/dist/node_modules/@earendil-works/pi-schema/README.md +319 -0
- package/dist/node_modules/@earendil-works/pi-schema/THIRD_PARTY_NOTICES/typebox-LICENSE +23 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/annotations.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/builders.d.ts +89 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/builders.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/checks.d.ts +51 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/checks.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/coerce.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/compiler.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/explain.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/date.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/date_time.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/duration.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/email.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/hostname.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idn_email.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idn_hostname.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/format/bidi.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/format/puny.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/hostname.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/idn-hostname.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/ascii.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/puny.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/unicode.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/pattern/pattern.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/ipv4.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/ipv6.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/iri.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/iri_reference.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/json_pointer.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/json_pointer_uri_fragment.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/regex.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/relative_json_pointer.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/time.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uri.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uri_reference.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uri_template.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/url.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uuid.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/index.d.ts +4 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/resolver.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/shared.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/typebox-static.d.ts +54 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/typebox-static.js +0 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/types.d.ts +25 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/types.js +0 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/validator.d.ts +20 -0
- package/dist/node_modules/@earendil-works/pi-schema/dist/validator.js +1 -0
- package/dist/node_modules/@earendil-works/pi-schema/package.json +43 -0
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.js +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.js +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/render.js +2 -2
- package/dist/node_modules/@earendil-works/pi-telemetry/package.json +3 -1
- package/dist/node_modules/@earendil-works/pi-tui/README.md +2 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.js +3 -3
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +4 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +11 -10
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/text.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/index.d.ts +2 -2
- package/dist/node_modules/@earendil-works/pi-tui/dist/index.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/keys.js +5 -5
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/program-status.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +4 -4
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +13 -13
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui.js +2 -2
- package/dist/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/utils.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/dist/package-manager-cli.js +17 -16
- package/dist/utils/ansi.js +1 -1
- package/dist/utils/changelog.js +3 -3
- package/dist/utils/clipboard-command.js +1 -1
- package/dist/utils/image-resize-core.js +1 -1
- package/dist/utils/image-resize.js +1 -1
- package/dist/utils/open-browser.js +1 -1
- package/dist/utils/paths.js +1 -1
- package/dist/utils/shell.js +3 -3
- package/dist/utils/syntax-highlight.js +4 -4
- package/dist/utils/terminal-question.js +1 -0
- package/dist/utils/tools-manager.js +1 -1
- package/dist/utils/web-url.js +1 -0
- package/examples/extensions/README.md +2 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +14 -14
- package/examples/extensions/debug-provider.ts +2 -2
- package/examples/extensions/gondolin/package-lock.json +19 -29
- package/examples/extensions/gondolin/package.json +2 -2
- package/examples/extensions/plan-mode/index.ts +20 -9
- package/examples/extensions/plan-mode/utils.ts +42 -16
- package/examples/extensions/preset.ts +2 -0
- package/examples/extensions/reload-runtime.ts +17 -5
- package/examples/extensions/subagent/README.md +14 -11
- package/examples/extensions/subagent/index.ts +392 -171
- package/examples/extensions/todo.ts +7 -0
- package/examples/extensions/tools.ts +2 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +20 -20
- package/examples/tsconfig.json +208 -0
- package/npm-shrinkwrap.json +407 -383
- package/package.json +6 -7
- package/examples/extensions/sandbox/index.ts +0 -327
- package/examples/extensions/sandbox/package-lock.json +0 -92
- package/examples/extensions/sandbox/package.json +0 -19
- /package/dist/node_modules/@earendil-works/pi-mcp/{LICENSES → THIRD_PARTY_NOTICES}/modelcontextprotocol-typescript-sdk.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-plugins",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
24
|
-
"@dalcode/dal-skills": "1.0.
|
|
25
|
-
"@dalcode/deepailab": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
24
|
+
"@dalcode/dal-skills": "1.0.52",
|
|
25
|
+
"@dalcode/deepailab": "1.0.52",
|
|
26
26
|
"typebox": "1.3.27"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-recall",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Search past sessions: a local full-text index of earlier conversations the model can query with session_search. Adapted from @henryqw/pi-session-recall 5.1.4 (MIT).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
24
24
|
"typebox": "1.3.27"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-remote",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "`dal remote enable|disable|status|pair|logs`: installs the phone daemon (a pinned, integrity-checked npm package) and runs it as a systemd user service or a launchd agent, so the DAL Code phone app can reach this machine.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
22
|
+
"@dalcode/dal-pi-kit": "1.0.52"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-review",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Code review: a read-only reviewer sub-agent over uncommitted changes, a base branch, a commit, a PR or a supplied diff, returning structured, deduplicated findings. /review in the TUI, dal -p, RPC and the SDK.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
23
|
-
"@dalcode/dal-subagent": "1.0.
|
|
22
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
23
|
+
"@dalcode/dal-subagent": "1.0.52",
|
|
24
24
|
"typebox": "1.3.7"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-rewind",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Git checkpoints for DAL: a snapshot after every turn that changes files, /rewind, Esc+Esc, safe restore, undo. Adapted from pi-rewind 0.5.0 (MIT, arpagon).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
24
|
+
"@dalcode/dal-pi-kit": "1.0.52"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-router",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@dalcode/dal-guard": "1.0.
|
|
33
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
34
|
-
"@dalcode/dal-tool-catalog": "1.0.
|
|
35
|
-
"@dalcode/deepailab": "1.0.
|
|
36
|
-
"@earendil-works/pi-tui": "1.0.
|
|
32
|
+
"@dalcode/dal-guard": "1.0.52",
|
|
33
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
34
|
+
"@dalcode/dal-tool-catalog": "1.0.52",
|
|
35
|
+
"@dalcode/deepailab": "1.0.52",
|
|
36
|
+
"@earendil-works/pi-tui": "1.0.52"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@earendil-works/pi-coding-agent": "^1.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-rtk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Uses rtk, when the user has installed it, to compress the output of shell commands the agent runs. Does nothing when rtk is not installed; never installs it.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.52"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-skills",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
26
|
-
"@dalcode/deepailab": "1.0.
|
|
25
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
26
|
+
"@dalcode/deepailab": "1.0.52",
|
|
27
27
|
"typebox": "1.3.7"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-statusline",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "A scriptable status line under the footer: a template or a command of the user's choosing. Grown from the status-line and custom-footer extension examples.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.52"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-structured",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "dal -p --output-schema: the final answer as JSON that matches a JSON Schema, with a non-zero exit when it does not. Grown from the structured-output extension example.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
22
22
|
"typebox": "1.3.27"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-subagent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
22
|
-
"@dalcode/dal-guard": "1.0.
|
|
23
|
-
"@earendil-works/pi-agent-core": "1.0.
|
|
24
|
-
"@earendil-works/pi-ai": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
22
|
+
"@dalcode/dal-guard": "1.0.52",
|
|
23
|
+
"@earendil-works/pi-agent-core": "1.0.52",
|
|
24
|
+
"@earendil-works/pi-ai": "1.0.52",
|
|
25
25
|
"typebox": "1.3.7"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-sync",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Opt-in sync of personal skills and personal lessons through the signed-in DeepAILab account, so other computers pick them up (/sync).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dalcode/dal-learn": "1.0.
|
|
25
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
26
|
-
"@dalcode/deepailab": "1.0.
|
|
24
|
+
"@dalcode/dal-learn": "1.0.52",
|
|
25
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
26
|
+
"@dalcode/deepailab": "1.0.52"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
`,{mode:384}))}u(M,"
|
|
1
|
+
var U=Object.defineProperty;var u=(e,s)=>U(e,"name",{value:s,configurable:!0});var Z=Object.defineProperty,a=u((e,s)=>Z(e,"name",{value:s,configurable:!0}),"c");import{createHash as tt,randomBytes as et}from"node:crypto";import{existsSync as N,mkdirSync as E,readdirSync as st,readFileSync as B,rmSync as F,statSync as nt}from"node:fs";import{join as h}from"node:path";import{readLessons as C,updateLessons as O}from"@dalcode/dal-learn/lessons";import{redact as P}from"@dalcode/dal-learn/safety";import{withFileLockSync as ot,writeFileAtomicSync as W}from"@dalcode/dal-pi-kit";const z=256*1024,$=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,K=1;class rt extends Error{static{u(this,"un")}static{a(this,"SyncHttpError")}status;constructor(s){super(`dal sync request failed (${s})`),this.status=s}}const w=a(e=>h(e,"skills"),"skillsDir"),j=a(e=>h(e,"learned","user"),"userLessonsDir"),k=a(e=>h(e,"sync","state.json"),"statePath");function A(e){return Array.isArray(e)?`[${e.map(A).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).filter(([,s])=>s!==void 0).sort(([s],[n])=>s<n?-1:s>n?1:0).map(([s,n])=>`${JSON.stringify(s)}:${A(n)}`).join(",")}}`:JSON.stringify(e)}u(A,"E"),a(A,"stable");function S(e){return tt("sha256").update(A(e)).digest("hex")}u(S,"I"),a(S,"contentHash");function L(e){return typeof e=="string"?P(e):Array.isArray(e)?e.map(L):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([s,n])=>[s,L(n)])):e}u(L,"A"),a(L,"redactDeep");const T=["section","content","rootCause","signature","fix","status","risk","helpful","harmful","neutral","injections","lastInjectedAt","created","updated","activatedAt","activatedBy","lastHelpfulAt","retiredAt","retiredReason"],it=["helpful","harmful","neutral","injections"],at=["lastInjectedAt","lastHelpfulAt"];function V(e,s){const n={...s};for(const o of it){const r=e[o]??0,c=typeof s[o]=="number"?s[o]:0;r>c&&(n[o]=r)}for(const o of at){const r=e[o],c=typeof s[o]=="string"?s[o]:void 0;r&&(!c||Date.parse(r)>Date.parse(c))&&(n[o]=r)}return n}u(V,"U"),a(V,"mergeLesson");function _(e){const s={};for(const n of T)e[n]!==void 0&&(s[n]=e[n]);return L(s)}u(_,"X"),a(_,"lessonContent");function q(e){const s=w(e);if(!N(s))return[];const n=[];for(const o of st(s)){if(!$.test(o)||o.length>64)continue;const r=h(s,o,"SKILL.md");let c,y;try{const d=nt(r);if(!d.isFile())continue;c=B(r,"utf8"),y=d.mtimeMs}catch{continue}const m={name:o,body:P(c)};n.push({id:`skill.${o}`,kind:"skill",content:m,hash:S(m),updatedAt:y})}return n}u(q,"Y"),a(q,"readSkills");function X(e){const s=j(e);return N(h(s,"lessons.json"))?(C(s).lessons.some(n=>n.scope==="user"&&!n.syncId)&&O(s,n=>({...n,lessons:n.lessons.map(o=>o.scope==="user"&&!o.syncId?{...o,syncId:x()}:o)})),C(s).lessons.filter(n=>n.scope==="user"&&typeof n.syncId=="string").map(n=>{const o=_(n);return{id:`lesson.${n.syncId}`,kind:"lesson",content:o,hash:S(o),updatedAt:Date.parse(n.updated)||0}})):[]}u(X,"G"),a(X,"readLessonItems");function x(){return et(8).toString("hex")}u(x,"Q"),a(x,"newSyncId");function D(e){return[...q(e),...X(e)]}u(D,"F"),a(D,"readLocalItems");function R(e,s,n,o=()=>!1){if(s.startsWith("skill.")){const d=s.slice(6);if(!$.test(d)||typeof n.body!="string")return;E(h(w(e),d),{recursive:!0}),W(h(w(e),d,"SKILL.md"),n.body);return}if(!s.startsWith("lesson."))return;const r=s.slice(7),c={};for(const d of T)n[d]!==void 0&&(c[d]=n[d]);const y=c.content;if(typeof y!="string"||!y)return;const m=j(e);E(m,{recursive:!0,mode:448}),O(m,d=>{const v=d.lessons,I=v.find(f=>f.syncId===r)??v.find(f=>f.scope==="user"&&(!f.syncId||o(f.syncId))&&f.content===c.content);if(I)return{...d,lessons:v.map(f=>f===I?{...f,...V(f,c),syncId:r}:f)};const g=new Date().toISOString(),b={id:`u-${String(d.nextId).padStart(4,"0")}`,scope:"user",section:"general",rootCause:"",status:"candidate",risk:[],sessions:[],evidence:[],helpful:0,harmful:0,feedback:[],created:g,updated:g,...c,content:y,syncId:r};return{...d,nextId:d.nextId+1,lessons:[...v,b]}})}u(R,"Z"),a(R,"applyRemoteItem");function Y(e,s){if(s.startsWith("skill.")){const o=s.slice(6);$.test(o)&&F(h(w(e),o),{recursive:!0,force:!0});return}const n=s.slice(7);O(j(e),o=>({...o,lessons:o.lessons.filter(r=>r.syncId!==n)}))}u(Y,"fn"),a(Y,"removeLocalItem");function H(e){try{const s=JSON.parse(B(k(e),"utf8"));if(s.formatVersion!==K||typeof s.account!="string")return;const n=s.items&&typeof s.items=="object"?s.items:{};return{account:s.account,items:n,lastRun:typeof s.lastRun=="string"?s.lastRun:void 0,lastError:typeof s.lastError=="string"?s.lastError:void 0,lastErrorStatus:typeof s.lastErrorStatus=="number"?s.lastErrorStatus:void 0}}catch{return}}u(H,"nn"),a(H,"readState");function M(e,s){const n=k(e);E(h(e,"sync"),{recursive:!0,mode:448}),ot(n,()=>W(n,`${JSON.stringify({formatVersion:K,...s},null," ")}
|
|
2
|
+
`,{mode:384}))}u(M,"en"),a(M,"writeState");function G(e){F(k(e),{force:!0})}u(G,"ln"),a(G,"clearState");async function Q(e,s,n){const o=H(e),r={account:s,items:o?.account===s?{...o.items}:{}},c={uploaded:0,downloaded:0,deletedRemote:0,conflicts:0,refused:[]},y=a(()=>M(e,{...r,lastRun:new Date().toISOString()}),"save"),m=new Map((await n.manifest()).map(t=>[t.id,t]));let d=new Map(D(e).map(t=>[t.id,t]));const v=a(t=>{const i=`lesson.${t}`;return!r.items[i]&&!m.has(i)},"neverSynced"),I=new Set,g=a((t,i)=>{R(e,t,i.content,v),r.items[t]={version:i.version,hash:S(i.content)},I.add(t),c.downloaded++},"apply"),b=a(async t=>{const i=await n.get(t);return i?(g(t,i),!0):!1},"download"),f=a(async(t,i)=>{const l=r.items[t.id];if(l?.refused===t.hash)return;if(Buffer.byteLength(JSON.stringify(t.content))>z){r.items[t.id]={version:l?.version??0,hash:l?.hash??"",refused:t.hash},c.refused.push(t.id);return}const p=await n.put(t.id,t.kind,i,t.content);p.status==="written"?(r.items[t.id]={version:p.version,hash:t.hash},c.uploaded++):p.status==="conflict"?c.conflicts++:(r.items[t.id]={version:l?.version??0,hash:l?.hash??"",refused:t.hash},c.refused.push(t.id))},"upload");for(const t of m.values()){const i=r.items[t.id]?.remoteDeleted?void 0:r.items[t.id],l=d.get(t.id);if(!l){if(i&&i.version===t.version){await n.remove(t.id)&&c.deletedRemote++,delete r.items[t.id];continue}await b(t.id);continue}if(i&&i.version===t.version)continue;if(i&&l.hash===i.hash){await b(t.id);continue}const p=await n.get(t.id);if(!p)continue;const J=S(p.content);if(J===l.hash){r.items[t.id]={version:p.version,hash:J};continue}c.conflicts++,Date.parse(t.updatedAt)>l.updatedAt?g(t.id,p):await f(l,p.version)}d=new Map(D(e).map(t=>[t.id,t]));for(const t of I){const i=d.get(t);i&&r.items[t]&&(r.items[t].hash=i.hash)}for(const t of d.values()){const i=r.items[t.id],l=m.get(t.id);if(l){i&&i.version===l.version&&t.hash!==i.hash&&await f(t,l.version);continue}if(i&&t.hash===i.hash){!i.remoteDeleted&&i.version>0&&(r.items[t.id]={...i,remoteDeleted:!0});continue}await f(t,0)}for(const t of Object.keys(r.items))!d.has(t)&&!m.has(t)&&delete r.items[t];return y(),c}u(Q,"mn"),a(Q,"runSync");export{z as MAX_ITEM_BYTES,rt as SyncHttpError,R as applyRemoteItem,G as clearState,S as contentHash,x as newSyncId,D as readLocalItems,H as readState,Y as removeLocalItem,Q as runSync,w as skillsDir,k as statePath,j as userLessonsDir,M as writeState};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-telemetry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@dalcode/dal-learn": "1.0.
|
|
29
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
30
|
-
"@dalcode/deepailab": "1.0.
|
|
28
|
+
"@dalcode/dal-learn": "1.0.52",
|
|
29
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
30
|
+
"@dalcode/deepailab": "1.0.52"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-terminal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Host terminal context: a terminal_read tool and @terminal mentions, registered only when the embedding host advertises the terminal capability.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
22
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
23
23
|
"typebox": "1.3.7"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-tool-catalog",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
22
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
23
23
|
"typebox": "1.3.7"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-usage",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "/usage: tokens and cost across all sessions, by day, model and project, with sub-agent spend counted once. Adapted from @tmustier/pi-usage-extension 0.9.5 (MIT).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.52"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-web",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
28
|
-
"@dalcode/deepailab": "1.0.
|
|
27
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
28
|
+
"@dalcode/deepailab": "1.0.52",
|
|
29
29
|
"typebox": "1.3.27",
|
|
30
30
|
"unpdf": "1.8.1"
|
|
31
31
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-workflow",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
20
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
21
21
|
"typebox": "1.3.27"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)}
|
|
1
|
+
var V=Object.defineProperty;var r=(u,t)=>V(u,"name",{value:t,configurable:!0});var $=Object.defineProperty,a=r((u,t)=>$(u,"name",{value:t,configurable:!0}),"a");import{t as D,tm as i}from"@dalcode/dal-pi-kit";import{Type as p}from"typebox";function T(u,t){return p.Unsafe({type:"string",enum:u,...t?.description?{description:t.description}:{},...t?.default?{default:t.default}:{}})}r(T,"_"),a(T,"StringEnum");import{fill as c}from"./shared.js";import{classicState as K,TODO_MARK as U,todoResultDetails as H,withUnattendedNote as P}from"./todo.js";const d=50,h=160,X=40,G=["pending","in_progress","completed","deleted"];function g(u){return u==="pending"||u==="in_progress"||u==="completed"}r(g,"v"),a(g,"isSnapshotStatus");function _(u){return u.length>0&&u.length<=X&&!/\s/u.test(u)}r(_,"U"),a(_,"validKey");function y(u){return u==="completed"?"done":u}r(y,"T"),a(y,"toTodoStatus");function f(u){return u.tasks.map((t,e)=>({id:e+1,text:t.subject,status:y(t.status)}))}r(f,"b"),a(f,"snapshotTodos");function O(u,t){return u.length===t.length&&u.every((e,s)=>e.key===t[s].key&&e.subject===t[s].subject&&e.status===t[s].status)}r(O,"V"),a(O,"sameTasks");function v(u){return JSON.stringify({key:u,subject:i("\u4E00\u53E5\u8BDD\u8BF4\u660E\u8FD9\u4E00\u9879"),status:"pending"})}r(v,"j"),a(v,"newItemExample");function b(u,t){if(t.baseVersion!==void 0&&t.baseVersion!==u.version)throw new Error(c(i("\u6E05\u5355\u5DF2\u7ECF\u662F v{current}\uFF0C\u8FD9\u6B21\u5199\u5165\u57FA\u4E8E v{base}\u3002\u6309\u7ED3\u679C\u91CC\u6700\u65B0\u7684\u6E05\u5355\u91CD\u5199\u3002"),{current:u.version,base:t.baseVersion}));if(t.tasks.length>d)throw new Error(c(i("\u6E05\u5355\u6700\u591A {max} \u9879"),{max:d}));const e=new Map(u.tasks.map(o=>[o.key,o])),s=new Set,n=[],B=new Set;for(const[o,E]of t.tasks.entries()){const F=E.key.trim();if(!_(F))throw new Error(c(i("\u7B2C {n} \u9879\u7684 key \u8981 1-40 \u4E2A\u5B57\u7B26\uFF0C\u4E0D\u80FD\u6709\u7A7A\u683C"),{n:o+1}));if(s.has(F))throw new Error(c(i("key \u91CD\u590D\uFF1A{key}"),{key:F}));s.add(F);const x=e.get(F);if(E.status==="deleted"){B.add(F);continue}const m=(E.subject??x?.subject??"").trim();if(!m)throw new Error(c(i("\u65B0\u7684\u4E00\u9879 {key} \u9700\u8981 subject\uFF0C\u5199\u6210 {example}\uFF1B\u5DF2\u6709\u7684\u9879\u53EA\u5199 key \u548C\u8981\u6539\u7684\u5B57\u6BB5"),{key:F,example:v(F)}));if(m.length>h)throw new Error(c(i("{key} \u7684 subject \u4E0D\u80FD\u8D85\u8FC7 {max} \u4E2A\u5B57\u7B26"),{key:F,max:h}));const k=E.status??x?.status;if(k===void 0)throw new Error(c(i("\u65B0\u7684\u4E00\u9879 {key} \u9700\u8981 status\uFF0C\u5199\u6210 {example}"),{key:F,example:v(F)}));if(!g(k))throw new Error(c(i("{key} \u7684 status \u65E0\u6548\uFF1A{status}\uFF1B\u53EA\u80FD\u662F pending\u3001in_progress\u3001completed\uFF0C\u5220\u9664\u8FD9\u4E00\u9879\u7528 deleted"),{key:F,status:k}));n.push({key:F,subject:m,status:k})}const l=u.tasks.filter(o=>!B.has(o.key));let C;if(t.tasks.length===0)C=[];else if(l.every(o=>s.has(o.key)))C=n;else{const o=new Map(n.map(E=>[E.key,E]));C=[...l.map(E=>o.get(E.key)??E),...n.filter(E=>!e.has(E.key))]}if(C.length>d)throw new Error(c(i("\u6E05\u5355\u6700\u591A {max} \u9879"),{max:d}));const A=C.filter(o=>o.status==="in_progress");if(A.length>1)throw new Error(c(i("\u540C\u4E00\u65F6\u95F4\u53EA\u80FD\u6709\u4E00\u9879 in_progress\uFF0C\u8FD9\u6B21\u6709 {count} \u9879\uFF1A{keys}"),{count:A.length,keys:A.map(o=>o.key).join(", ")}));return{version:O(u.tasks,C)?u.version:u.version+1,tasks:C}}r(b,"H"),a(b,"writeSnapshot");function w(u){if(!u||typeof u!="object")return;const t=u;if(typeof t.version!="number"||!Number.isSafeInteger(t.version)||t.version<0||!Array.isArray(t.tasks))return;const e=[];for(const s of t.tasks){if(!s||typeof s!="object")return;const n=s;if(typeof n.key!="string"||typeof n.subject!="string"||!g(n.status))return;e.push({key:n.key,subject:n.subject,status:n.status})}return{version:t.version,tasks:e}}r(w,"K"),a(w,"storedSnapshot");function S(u){let t={version:0,tasks:[]};for(const e of u){const s=w(e);if(s){t=s;continue}const n=K(e);n&&(t={version:t.version+1,tasks:n.todos.map(B=>({key:`t${B.id}`,subject:B.text,status:B.status==="done"?"completed":B.status}))})}return t}r(S,"P"),a(S,"replaySnapshot");function j(u){if(u.tasks.length===0)return c(i("\u5F85\u529E\u5DF2\u6E05\u7A7A\uFF08v{version}\uFF09"),{version:u.version});const t=u.tasks.filter(e=>e.status==="completed").length;return[c(i("\u5F85\u529E v{version}\uFF08{done}/{total} \u5B8C\u6210\uFF09\uFF1A"),{version:u.version,done:t,total:u.tasks.length}),...u.tasks.map(e=>`${U[y(e.status)]} ${e.key} ${e.subject}`)].join(`
|
|
2
|
+
`)}r(j,"$"),a(j,"formatSnapshot");function M(u){return{engine:"snapshot",version:u.version,tasks:u.tasks.map(t=>({...t})),todos:f(u),nextId:u.tasks.length+1}}r(M,"X"),a(M,"snapshotDetails");const J=p.Object({tasks:p.Array(p.Object({key:p.String({description:D("\u8FD9\u4E00\u9879\u7684\u56FA\u5B9A\u6807\u8BC6\uFF0C1-40 \u4E2A\u5B57\u7B26\u3001\u4E0D\u542B\u7A7A\u683C\uFF0C\u5EFA\u8BAE\u7528\u82F1\u6587\u77ED\u8BCD\uFF0C\u5982 inspect\u3001write-tests")}),subject:p.Optional(p.String({description:D("\u8FD9\u4E00\u9879\u505A\u4EC0\u4E48\uFF0C\u4E00\u53E5\u8BDD\uFF1B\u65B0\u7684\u4E00\u9879\u5FC5\u586B\uFF0C\u5DF2\u6709\u7684\u9879\u7701\u7565\u5373\u4E0D\u53D8")})),status:p.Optional(T(G,{description:D("pending \u672A\u5F00\u59CB\u3001in_progress \u8FDB\u884C\u4E2D\u3001completed \u5DF2\u5B8C\u6210\u3001deleted \u4ECE\u6E05\u5355\u5220\u9664\uFF1B\u65B0\u7684\u4E00\u9879\u5FC5\u586B\uFF0C\u5DF2\u6709\u7684\u9879\u7701\u7565\u5373\u4E0D\u53D8")}))}),{description:D("\u8981\u65B0\u589E\u6216\u4FEE\u6539\u7684\u9879\u3002\u5DF2\u6709\u7684\u9879\u53EA\u5199 key \u548C\u8981\u6539\u7684\u5B57\u6BB5\uFF0C\u6CA1\u5199\u5230\u7684\u9879\u4FDD\u6301\u4E0D\u53D8\uFF1B\u65B0\u7684\u4E00\u9879\u8981\u5199 key\u3001subject\u3001status\uFF1B\u5220\u9664\u4E00\u9879\u5199 status: deleted\uFF1B\u7A7A\u6570\u7EC4\u8868\u793A\u6E05\u7A7A")}),baseVersion:p.Optional(p.Integer({description:D("\u4E0A\u6B21\u7ED3\u679C\u91CC\u7684\u7248\u672C\u53F7 v\uFF1B\u586B\u4E86\u5C31\u4F1A\u62D2\u7EDD\u57FA\u4E8E\u8FC7\u671F\u6E05\u5355\u7684\u5199\u5165"),minimum:0}))});function N(u){return P(D('\u4EFB\u52A1\u6E05\u5355\uFF0C\u53EA\u5728\u7528\u6237\u8981\u6C42\u5217\u8BA1\u5212\u6216\u6E05\u5355\u3001\u6216\u4EFB\u52A1\u786E\u5B9E\u5206\u6210\u51E0\u4E2A\u9636\u6BB5\u65F6\u7528\uFF1B\u5176\u4ED6\u4EFB\u52A1\u4E0D\u8981\u7528\u3002\u7B2C\u4E00\u6B21\u8C03\u7528\u5199\u51FA\u6574\u4EFD\u8BA1\u5212\uFF0C\u6BCF\u4E00\u9879\u90FD\u8981\u6709 key\u3001subject\u3001status\u3002\u4E4B\u540E\u53EA\u5199\u8981\u6539\u7684\u9879\uFF1A\u5DF2\u6709\u7684\u9879\u5199 key \u548C\u53D8\u5316\u7684\u5B57\u6BB5\uFF08\u5982 {"key":"inspect","status":"completed"}\uFF09\uFF0C\u6CA1\u5199\u5230\u7684\u9879\u4FDD\u6301\u4E0D\u53D8\uFF1B\u65B0\u52A0\u7684\u9879\u8981\u5199 subject \u548C status\uFF1B\u5220\u9664\u4E00\u9879\u5199 status: deleted\u3002\u540C\u4E00\u65F6\u95F4\u6700\u591A\u4E00\u9879 in_progress\uFF0C\u5B8C\u6210\u4E00\u6B65\u5E76\u5F00\u59CB\u4E0B\u4E00\u6B65\u7528\u4E00\u6B21\u8C03\u7528\u540C\u65F6\u6539\u4E24\u9879\u3002todo \u8C03\u7528\u8981\u548C\u540C\u4E00\u6B65\u7684\u5B9E\u9645\u5DE5\u5177\u8C03\u7528\uFF08read\u3001edit\u3001bash \u7B49\uFF09\u653E\u5728\u540C\u4E00\u6B21\u56DE\u590D\u91CC\uFF0C\u4E0D\u8981\u5355\u72EC\u5360\u4E00\u8F6E\u3002\u6E05\u5355\u8DDF\u968F\u5F53\u524D\u5BF9\u8BDD\u5206\u652F\u3002'),u)}r(N,"G"),a(N,"snapshotDescription");function I(){let u={version:0,tasks:[]},t=[];return{name:"snapshot",todos:a(()=>t,"todos"),restore(e){u=S(H(e)),t=f(u)},register(e,s,n){e.registerTool({name:"todo",label:D("\u5F85\u529E\u6E05\u5355"),description:N(s),promptSnippet:D("todo - \u7528\u6237\u8981\u6C42\u6216\u4EFB\u52A1\u5206\u591A\u4E2A\u9636\u6BB5\u65F6\u7528\u6E05\u5355\u8DDF\u8E2A\u8FDB\u5EA6\uFF08\u5148\u5199\u6574\u4EFD\u8BA1\u5212\uFF0C\u4E4B\u540E\u53EA\u5199\u8981\u6539\u7684\u9879\uFF0C\u548C\u5B9E\u9645\u5DE5\u5177\u8C03\u7528\u540C\u4E00\u8F6E\uFF09"),parameters:J,async execute(B,l,C,A,o){return u=b(u,l),t=f(u),n(o),{content:[{type:"text",text:j(u)}],details:M(u)}}})}}}r(I,"q"),a(I,"createSnapshotEngine");export{d as MAX_SNAPSHOT_TASKS,h as MAX_SUBJECT_LENGTH,I as createSnapshotEngine,j as formatSnapshot,S as replaySnapshot,f as snapshotTodos,w as storedSnapshot,y as toTodoStatus,b as writeSnapshot};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var L=Object.defineProperty;var
|
|
2
|
-
`):c("\u5F85\u529E\u6E05\u5355\u662F\u7A7A\u7684"),"list");case"set":{const e=(n.items??[]).map(r=>({text:r.text.trim(),status:r.status??"pending"})).filter(r=>r.text.length>0);if(e.length===0){const r=c("set \u9700\u8981\u6574\u4EFD\u6E05\u5355 items");return E(r,"set",r)}u=e.map((r,B)=>({id:B+1,text:r.text,status:r.status})),t=u.length+1;const p=u.filter(r=>r.status==="done").length;return E(`${
|
|
1
|
+
var L=Object.defineProperty;var F=(u,t)=>L(u,"name",{value:t,configurable:!0});var z=Object.defineProperty,o=F((u,t)=>z(u,"name",{value:t,configurable:!0}),"s");import{existsSync as G,readFileSync as M}from"node:fs";import{join as J}from"node:path";import{t as f,tm as c}from"@dalcode/dal-pi-kit";import{getAgentDir as k}from"@earendil-works/pi-coding-agent";import{Type as l}from"typebox";function A(u,t){return l.Unsafe({type:"string",enum:u,...t?.description?{description:t.description}:{},...t?.default?{default:t.default}:{}})}F(A,"S"),o(A,"StringEnum");import{fill as g}from"./shared.js";import{createSnapshotEngine as H}from"./todo-snapshot.js";const I="snapshot";function O(u){if(typeof u!="string")return;const t=u.trim().toLowerCase();return t==="classic"||t==="snapshot"?t:void 0}F(O,"_"),o(O,"parseEngine");function x(u=process.env,t=k()){const i=O(u.DAL_TODO_ENGINE);if(i)return i;const a=J(t,"settings.json");if(G(a))try{const d=JSON.parse(M(a,"utf8")).todo,s=d&&typeof d=="object"?O(d.engine):void 0;if(s)return s}catch{}return I}F(x,"A"),o(x,"todoEngine");const N=["pending","in_progress","done"],K=l.Object({action:A(["set","list","add","update","remove","toggle","clear"],{description:f("\u64CD\u4F5C\uFF1Aset \u4E00\u6B21\u5199\u5165\u6574\u4EFD\u6E05\u5355\uFF08items\uFF0C\u66FF\u6362\u539F\u6E05\u5355\uFF1B\u66F4\u65B0\u591A\u9879\u72B6\u6001\u4E5F\u7528\u5B83\uFF09\u3001list \u67E5\u770B\u3001add \u65B0\u589E\u4E00\u9879\u3001update \u4FEE\u6539\u4E00\u9879\u3001remove \u5220\u9664\u3001toggle \u5207\u6362\u5B8C\u6210\u3001clear \u6E05\u7A7A")}),items:l.Optional(l.Array(l.Object({text:l.String(),status:l.Optional(A(N))}),{description:f("\u6574\u4EFD\u6E05\u5355\uFF08set \u5FC5\u586B\uFF09\uFF0C\u6309\u987A\u5E8F")})),text:l.Optional(l.String({description:f("\u5F85\u529E\u5185\u5BB9\uFF08add \u5FC5\u586B\uFF0Cupdate \u53EF\u9009\uFF09")})),id:l.Optional(l.Number({description:f("\u5F85\u529E\u7F16\u53F7\uFF08update / remove / toggle \u5FC5\u586B\uFF09")})),status:l.Optional(A(N,{description:f("\u72B6\u6001\uFF08add / update \u53EF\u9009\uFF09\uFF1Apending \u672A\u5F00\u59CB\u3001in_progress \u8FDB\u884C\u4E2D\u3001done \u5DF2\u5B8C\u6210")}))}),$={pending:"\u25CB",in_progress:"\u25D0",done:"\u2713"};function m(u){return`${$[u.status]} #${u.id} ${u.text}`}F(m,"E"),o(m,"formatTodo");function T(u){if(!u||typeof u!="object")return;const t=u;if(typeof t.id!="number"||typeof t.text!="string")return;const i=t.status==="pending"||t.status==="in_progress"||t.status==="done"?t.status:t.done===!0?"done":"pending";return{id:t.id,text:t.text,status:i}}F(T,"R"),o(T,"normalizeTodo");function b(u){if(!u||typeof u!="object")return;const t=u;if(!(!Array.isArray(t.todos)||typeof t.nextId!="number"))return{todos:t.todos.map(T).filter(i=>i!==void 0),nextId:t.nextId}}F(b,"F"),o(b,"classicState");function S(u){const t=[];for(const i of u.sessionManager.getBranch()){if(i.type!=="message")continue;const a=i.message;a.role!=="toolResult"||a.toolName!=="todo"||t.push(a.details)}return t}F(S,"H"),o(S,"todoResultDetails");function U(u){const t=f("\u4EFB\u52A1\u6E05\u5355\uFF0C\u53EA\u5728\u7528\u6237\u8981\u6C42\u5217\u8BA1\u5212\u6216\u6E05\u5355\u3001\u6216\u4EFB\u52A1\u786E\u5B9E\u5206\u6210\u51E0\u4E2A\u9636\u6BB5\u65F6\u7528\uFF1B\u5176\u4ED6\u4EFB\u52A1\u4E0D\u8981\u7528\u3002\u7528 set \u4E00\u6B21\u5199\u5165\u6574\u4EFD\u6E05\u5355\uFF0C\u4E4B\u540E\u72B6\u6001\u6709\u53D8\u5316\u65F6\u4E5F\u7528 set \u6574\u4EFD\u5199\u56DE\u3002todo \u8C03\u7528\u8981\u548C\u540C\u4E00\u6B65\u7684\u5B9E\u9645\u5DE5\u5177\u8C03\u7528\uFF08read\u3001edit\u3001bash \u7B49\uFF09\u653E\u5728\u540C\u4E00\u6B21\u56DE\u590D\u91CC\uFF0C\u4E0D\u8981\u5355\u72EC\u5360\u4E00\u8F6E\u3002\u6E05\u5355\u8DDF\u968F\u5F53\u524D\u5BF9\u8BDD\u5206\u652F\u3002");return _(t,u)}F(U,"G"),o(U,"todoDescription");function _(u,t){return t?`${u}${f("\u8FD9\u662F\u65E0\u4EBA\u503C\u5B88\u7684\u8FD0\u884C\uFF08\u6CA1\u6709\u4EBA\u770B\u6E05\u5355\uFF09\uFF0C\u9664\u975E\u4EFB\u52A1\u786E\u5B9E\u5F88\u957F\uFF0C\u5426\u5219\u4E0D\u7528\u5B83\u3002")}`:u}F(_,"J"),o(_,"withUnattendedNote");function w(){let u=[],t=1;const i=o(()=>u.length>0&&u.every(a=>a.status==="done"),"allDone");return{name:"classic",todos:o(()=>u,"todos"),restore(a){u=[],t=1;for(const d of S(a)){const s=b(d);s&&(u=s.todos,t=s.nextId)}},register(a,d,s){a.registerTool({name:"todo",label:f("\u5F85\u529E\u6E05\u5355"),description:U(d),promptSnippet:f("todo - \u7528\u6237\u8981\u6C42\u6216\u4EFB\u52A1\u5206\u591A\u4E2A\u9636\u6BB5\u65F6\u7528\u6E05\u5355\u8DDF\u8E2A\u8FDB\u5EA6\uFF08set \u6574\u4EFD\u5199\u5165\uFF0C\u548C\u5B9E\u9645\u5DE5\u5177\u8C03\u7528\u540C\u4E00\u8F6E\uFF09"),parameters:K,async execute(D,n,q,Q,R){const E=o((e,p,r)=>{s(R);const B={action:p,todos:u.map(C=>({...C})),nextId:t};return r&&(B.error=r),{content:[{type:"text",text:e}],details:B}},"result"),h=o(e=>e===void 0?void 0:u.find(p=>p.id===e),"find"),y=o(()=>{const e=g(c("\u627E\u4E0D\u5230\u7F16\u53F7\u4E3A #{id} \u7684\u5F85\u529E"),{id:String(n.id)});return E(e,n.action,e)},"notFound"),v=o(()=>{const e=c("\u7F3A\u5C11\u5F85\u529E\u7F16\u53F7 id");return E(e,n.action,e)},"needsId");switch(n.action){case"list":return E(u.length?u.map(m).join(`
|
|
2
|
+
`):c("\u5F85\u529E\u6E05\u5355\u662F\u7A7A\u7684"),"list");case"set":{const e=(n.items??[]).map(r=>({text:r.text.trim(),status:r.status??"pending"})).filter(r=>r.text.length>0);if(e.length===0){const r=c("set \u9700\u8981\u6574\u4EFD\u6E05\u5355 items");return E(r,"set",r)}u=e.map((r,B)=>({id:B+1,text:r.text,status:r.status})),t=u.length+1;const p=u.filter(r=>r.status==="done").length;return E(`${g(c("\u6E05\u5355\u5DF2\u66F4\u65B0\uFF08{done}/{total} \u5B8C\u6210\uFF09\uFF1A"),{done:p,total:u.length})}
|
|
3
3
|
${u.map(m).join(`
|
|
4
|
-
`)}`,"set")}case"add":{const e=n.text?.trim();if(!e){const C=c("\u65B0\u589E\u5F85\u529E\u9700\u8981\u586B\u5199\u5185\u5BB9 text");return E(C,"add",C)}const p=i();p&&(u=[],t=1);const r={id:t++,text:e,status:n.status??"pending"};u.push(r);const B=
|
|
4
|
+
`)}`,"set")}case"add":{const e=n.text?.trim();if(!e){const C=c("\u65B0\u589E\u5F85\u529E\u9700\u8981\u586B\u5199\u5185\u5BB9 text");return E(C,"add",C)}const p=i();p&&(u=[],t=1);const r={id:t++,text:e,status:n.status??"pending"};u.push(r);const B=g(c("\u5DF2\u65B0\u589E\u5F85\u529E #{id}\uFF1A{text}"),{id:r.id,text:r.text});return E(p?`${c("\u4E0A\u4E00\u4EFD\u6E05\u5355\u5DF2\u5168\u90E8\u5B8C\u6210\uFF0C\u5F00\u59CB\u65B0\u6E05\u5355\u3002")}${B}`:B,"add")}case"update":{if(n.id===void 0)return v();const e=h(n.id);return e?(n.text?.trim()&&(e.text=n.text.trim()),n.status&&(e.status=n.status),E(g(c("\u5DF2\u66F4\u65B0\u5F85\u529E\uFF1A{todo}"),{todo:m(e)}),"update")):y()}case"remove":{if(n.id===void 0)return v();const e=h(n.id);return e?(u=u.filter(p=>p!==e),E(g(c("\u5DF2\u5220\u9664\u5F85\u529E #{id}\uFF1A{text}"),{id:e.id,text:e.text}),"remove")):y()}case"toggle":{if(n.id===void 0)return v();const e=h(n.id);return e?(e.status=e.status==="done"?"pending":"done",E(g(c("\u5DF2\u66F4\u65B0\u5F85\u529E\uFF1A{todo}"),{todo:m(e)}),"toggle")):y()}case"clear":{const e=u.length;return u=[],t=1,E(g(c("\u5DF2\u6E05\u7A7A {count} \u6761\u5F85\u529E"),{count:e}),"clear")}default:{const e=g(c("\u4E0D\u652F\u6301\u7684\u64CD\u4F5C\uFF1A{action}"),{action:String(n.action)});return E(e,"list",e)}}}})}}}F(w,"M"),o(w,"createClassicEngine");function j(u){return u==="snapshot"?H():w()}F(j,"N"),o(j,"createEngine");function P(u){let t=j(x());function i(d){const s=t.todos();if(s.length===0||s.every(n=>n.status==="done")){d.ui.setPanel("dal-todos",void 0);return}const D=s.filter(n=>n.status==="done").length;d.ui.setPanel("dal-todos",{title:g(f("\u5F85\u529E {done}/{total}"),{done:D,total:s.length}),lines:s.map(m),placement:"aux"})}F(i,"r"),o(i,"updatePanel");function a(d){t.restore(d),i(d)}return F(a,"a"),o(a,"reconstruct"),u.on("session_start",async(d,s)=>{const D=x();D!==t.name&&(t=j(D)),t.register(u,!s.hasUI,i),a(s)}),u.on("session_tree",async(d,s)=>a(s)),t.register(u,!1,i),{todos:o(()=>t.todos(),"todos")}}F(P,"tt"),o(P,"registerTodo");export{I as DEFAULT_TODO_ENGINE,$ as TODO_MARK,b as classicState,m as formatTodo,T as normalizeTodo,P as registerTodo,x as todoEngine,S as todoResultDetails,_ as withUnattendedNote};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/deepailab",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
24
|
-
"@earendil-works/pi-ai": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.52",
|
|
24
|
+
"@earendil-works/pi-ai": "1.0.52"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -455,18 +455,20 @@ const agent = new Agent({
|
|
|
455
455
|
|
|
456
456
|
## Tools
|
|
457
457
|
|
|
458
|
-
Define tools using `AgentTool
|
|
458
|
+
Define tools using `AgentTool`. `parameters` is any JSON Schema object; built with `@earendil-works/pi-schema`'s builders, it also types `params` (other schemas give `unknown`, `AgentTool<any>` gives `any`):
|
|
459
459
|
|
|
460
460
|
```typescript
|
|
461
|
-
import {
|
|
461
|
+
import { obj, str } from "@earendil-works/pi-schema";
|
|
462
462
|
|
|
463
|
-
const
|
|
463
|
+
const readFileParameters = obj({
|
|
464
|
+
path: str({ description: "File path" }),
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
const readFileTool: AgentTool<typeof readFileParameters> = {
|
|
464
468
|
name: "read_file",
|
|
465
469
|
label: "Read File", // For UI display
|
|
466
470
|
description: "Read a file's contents",
|
|
467
|
-
parameters:
|
|
468
|
-
path: Type.String({ description: "File path" }),
|
|
469
|
-
}),
|
|
471
|
+
parameters: readFileParameters,
|
|
470
472
|
// Override execution mode for this tool (optional).
|
|
471
473
|
// "sequential" forces the entire batch to run one at a time.
|
|
472
474
|
// "parallel" allows concurrent execution with other tool calls.
|
|
@@ -48,7 +48,7 @@ export type ProxyAssistantMessageEvent = {
|
|
|
48
48
|
usage: AssistantMessage["usage"];
|
|
49
49
|
providerThinkingLevel?: string;
|
|
50
50
|
};
|
|
51
|
-
type ProxySerializableStreamOptions = Pick<SimpleStreamOptions, "temperature" | "samplingParams" | "maxTokens" | "reasoning" | "cacheRetention" | "sessionId" | "headers" | "metadata" | "transport" | "thinkingBudgets" | "maxRetryDelayMs">;
|
|
51
|
+
type ProxySerializableStreamOptions = Pick<SimpleStreamOptions, "temperature" | "samplingParams" | "maxTokens" | "reasoning" | "cacheRetention" | "sessionId" | "disableContinuation" | "headers" | "metadata" | "transport" | "thinkingBudgets" | "maxRetryDelayMs">;
|
|
52
52
|
export interface ProxyStreamOptions extends ProxySerializableStreamOptions {
|
|
53
53
|
signal?: AbortSignal;
|
|
54
54
|
authToken: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
`);
|
|
1
|
+
var w=Object.defineProperty;var l=(e,t)=>w(e,"name",{value:t,configurable:!0});import{createAssistantMessageEventStream as _,ToolCallArgumentsStream as b}from"@earendil-works/pi-ai";function R(e){return{temperature:e.temperature,samplingParams:e.samplingParams,maxTokens:e.maxTokens,reasoning:e.reasoning,cacheRetention:e.cacheRetention,sessionId:e.sessionId,disableContinuation:e.disableContinuation,headers:e.headers,metadata:e.metadata,transport:e.transport,thinkingBudgets:e.thinkingBudgets,maxRetryDelayMs:e.maxRetryDelayMs}}l(R,"buildProxyRequestOptions");function M(e,t,r){const n=_();return(async()=>{const o={role:"assistant",stopReason:"pending",content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},timestamp:Date.now()};let u;const f=l(()=>{u&&u.cancel("Request aborted by user").catch(()=>{})},"abortHandler");r.signal&&r.signal.addEventListener("abort",f);try{const s=await fetch(`${r.proxyUrl}/api/stream`,{method:"POST",headers:{Authorization:`Bearer ${r.authToken}`,"Content-Type":"application/json"},body:JSON.stringify({model:e,context:t,options:R(r)}),signal:r.signal});if(!s.ok){let c=`Proxy error: ${s.status} ${s.statusText}`;try{const d=await s.json();d.error&&(c=`Proxy error: ${d.error}`)}catch{}throw new Error(c)}u=s.body.getReader();const g=new TextDecoder;let a="",I=!1;const m=new Map,k=l(c=>{if(!c.startsWith("data: "))return;const d=c.slice(6).trim();if(!d)return;const h=JSON.parse(d),i=x(h,o,m);i&&((i.type==="done"||i.type==="error")&&(I=!0),n.push(i))},"processLine");for(;;){const{done:c,value:d}=await u.read();if(c)break;if(r.signal?.aborted)throw new Error("Request aborted by user");a+=g.decode(d,{stream:!0});const h=a.split(`
|
|
2
|
+
`);a=h.pop()||"";for(const i of h)k(i)}if(r.signal?.aborted)throw new Error("Request aborted by user");a+=g.decode(),a&&k(a),I||(o.stopReason="error",o.errorMessage="Connection closed by proxy server before the response completed",n.push({type:"error",reason:"error",error:o})),n.end()}catch(s){const g=s instanceof Error?s.message:String(s),a=r.signal?.aborted?"aborted":"error";o.stopReason=a,o.errorMessage=g,n.push({type:"error",reason:a,error:o}),n.end()}finally{r.signal&&r.signal.removeEventListener("abort",f)}})(),n}l(M,"streamProxy");function x(e,t,r){switch(e.type){case"start":return{type:"start",partial:t};case"text_start":return t.content[e.contentIndex]={type:"text",text:""},{type:"text_start",contentIndex:e.contentIndex,partial:t};case"text_delta":{const n=t.content[e.contentIndex];if(n?.type==="text")return n.text+=e.delta,{type:"text_delta",contentIndex:e.contentIndex,delta:e.delta,partial:t};throw new Error("Received text_delta for non-text content")}case"text_end":{const n=t.content[e.contentIndex];if(n?.type==="text")return n.textSignature=e.contentSignature,{type:"text_end",contentIndex:e.contentIndex,content:n.text,partial:t};throw new Error("Received text_end for non-text content")}case"thinking_start":return t.content[e.contentIndex]={type:"thinking",thinking:""},{type:"thinking_start",contentIndex:e.contentIndex,partial:t};case"thinking_delta":{const n=t.content[e.contentIndex];if(n?.type==="thinking")return n.thinking+=e.delta,{type:"thinking_delta",contentIndex:e.contentIndex,delta:e.delta,partial:t};throw new Error("Received thinking_delta for non-thinking content")}case"thinking_end":{const n=t.content[e.contentIndex];if(n?.type==="thinking")return n.thinkingSignature=e.contentSignature,{type:"thinking_end",contentIndex:e.contentIndex,content:n.thinking,partial:t};throw new Error("Received thinking_end for non-thinking content")}case"toolcall_start":return t.content[e.contentIndex]={type:"toolCall",id:e.id,name:e.toolName,arguments:{}},r.set(e.contentIndex,new b),{type:"toolcall_start",contentIndex:e.contentIndex,partial:t};case"toolcall_delta":{const n=t.content[e.contentIndex],o=r.get(e.contentIndex);if(n?.type==="toolCall"&&o!==void 0)return t.content[e.contentIndex]={...n,arguments:o.append(e.delta)},{type:"toolcall_delta",contentIndex:e.contentIndex,delta:e.delta,partial:t};throw new Error("Received toolcall_delta for non-toolCall content")}case"toolcall_end":{const n=t.content[e.contentIndex];return n?.type==="toolCall"?(Object.assign(n,e.toolCall),r.delete(e.contentIndex),{type:"toolcall_end",contentIndex:e.contentIndex,toolCall:n,partial:t}):void 0}case"done":return t.stopReason=e.reason,t.usage=e.usage,e.providerThinkingLevel!==void 0&&(t.providerThinkingLevel=e.providerThinkingLevel),{type:"done",reason:e.reason,message:t};case"error":return t.stopReason=e.reason,t.errorMessage=e.errorMessage,t.usage=e.usage,e.providerThinkingLevel!==void 0&&(t.providerThinkingLevel=e.providerThinkingLevel),{type:"error",reason:e.reason,error:t};default:{const n=e;console.warn(`Unhandled proxy event type: ${e.type}`);return}}}l(x,"processProxyEvent");export{M as streamProxy};
|