@qqbrowser/qbot-dsh 0.0.10 → 0.0.12
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/lib/bin.js +1 -1
- package/lib/{dump-config-BD79jvHi.js → dump-config-xQTUTTDD.js} +1 -1
- package/lib/{plugin-B3Ecl7VN.js → plugin-DNAeLZbb.js} +1 -1
- package/lib/profile-boot-BkordgJK.js +1 -0
- package/node_modules/@deepseek-ai/cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/cordis-plugin-hmr/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +12 -12
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment-local/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +4 -4
- package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-local/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +6 -6
- package/node_modules/@deepseek-ai/dsh-client-connection/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-runtime/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-web-react/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/lib/worker.cjs +4 -2
- package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-content-review/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +7 -7
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-local/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/lib/worker.cjs +9 -7
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-output-retention/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-local/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-qb-auth/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-D2_FQYSK.js +1 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-llm/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-settings/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-local/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-policy/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal-bash/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-token-meter/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ralph/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/lib/index.js +6 -6
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +26 -26
- package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-Dqw48FrP.js → index-BQQQ5Qt-.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DddhVWhK.js +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{php-D-uCvoST.js → php-9bx0az3O.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{ruby-DEItuUFs.js → ruby-HDLHRjSL.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-C2oV4EkX.js +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{vendor-Cjbwl5VI.js → vendor-CeMKrCZm.js} +24 -24
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/LICENSE +21 -0
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/invariant.js +1 -0
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/worker.cjs +3 -4
- package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +1 -1
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
- package/node_modules/@deepseek-ai/node-addon-landlock-run/package.json +1 -1
- package/package.json +1 -1
- package/lib/profile-boot-_PCyp_wB.js +0 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-BjBvdldw.js +0 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DIPi6g--.js +0 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-D82vCrfD.js +0 -1
- /package/lib/{profile-boot-B71dQloK.js → profile-boot-DDo03lXi.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var ae=Object.defineProperty;var s=(o,e)=>ae(o,"name",{value:e,configurable:!0});import{useSyncExternalStoreWithSelector as de}from"use-sync-external-store/shim/with-selector.js";import{SlotOwnershipError as le,SlotOwnershipError as E,StaleAuthorizationError as ue,StaleAuthorizationError as _}from"@deepseek-ai/dsh-client-ui-slots";import{Fragment as k,jsx as l,jsxs as fe}from"react/jsx-runtime";import{Component as he,createContext as A,useContext as F,useMemo as pe,useRef as ve,useState as be,useSyncExternalStore as O}from"react";function T(o){const e=s(n=>o.subscribe(n),"subscribe"),t=s(()=>o.getSnapshot(),"getSnapshot");return s(function(i,r){return de(e,t,void 0,i,r)},"useSelector")}s(T,"bindSnapshotSelector");var b=class extends Error{static{s(this,"SlotAssemblyError")}};const L=A(null);function w(){const o=F(L);if(!o)throw new b("slot machinery rendered outside the installed renderer tree");return o}s(w,"useHost");const $=A(null);function j(){const o=F($);if(!o)throw new b("session-aware slot rendered outside the root binding provider");return o}s(j,"useSessionMaybeProvideInfo");function v(o){let e=z.get(o);return e===void 0&&(e=T(o),z.set(o,e)),e}s(v,"observableHook");const z=new WeakMap,U={getSnapshot:s(()=>{},"getSnapshot"),subscribe:s(()=>()=>{},"subscribe")};function ke(o){return o!==void 0?v(o):Se}s(ke,"maybeObservableHook");function Se(o,e){v(U)(()=>{})}s(Se,"useAbsentSnapshot");function ge(o){let e=B.get(o);return e===void 0&&(e=s((t,n,i)=>v(o.projections?.faceOf(t)??U)(n??(r=>r),i),"hook"),B.set(o,e)),e}s(ge,"projectionHook");const B=new WeakMap;function we({children:o}){const e=v(w().sessions.provideInfo)(t=>t);return l($.Provider,{value:e,children:o})}s(we,"SessionMaybeProvider");function D({empty:o,children:e}){const t=v(w().sessions.provideInfo)(i=>i),n=t.sessionId;return n===void 0?l(k,{children:o?.()??null}):l($.Provider,{value:t,children:e(n)},n)}s(D,"SessionProvider");const Y=new WeakMap;function me(o,e){let t=Y.get(e);return t||(t=s((n,i,r)=>{if(!o.isLive(e))throw new _(`renderSlot('${n}') from a disposed registration`);const c=e.children?.[n];if(c===void 0)throw new E(`slot '${n}' is not declared by this entry's children`);if(c.kind==="chain")throw new E(`slot '${n}' is declared 'chain' — use renderSlotChain`);return l(se,{slotKey:n,ownerProps:i,opts:r})},"binding"),Y.set(e,t)),t}s(me,"boundRenderSlot");const J=new WeakMap;function Ce(o,e){let t=J.get(e);return t||(t=s((n,i,r)=>{if(!o.isLive(e))throw new _(`renderSlotChain('${n}') from a disposed registration`);const c=e.children?.[n];if(c===void 0)throw new E(`slot '${n}' is not declared by this entry's children`);if(c.kind!=="chain")throw new E(`slot '${n}' is declared '${c.kind}', not 'chain' — use renderSlot`);return l(se,{slotKey:n,ownerProps:i,opts:r})},"binding"),J.set(e,t)),t}s(Ce,"boundRenderSlotChain");const V=new WeakMap,q=new WeakMap,G=new WeakMap,Q={};function y(o,e,t){const n=o.inject;if(!n)return Q;const i=[];return e!==void 0&&i.push(e.sessionId),t!==void 0&&i.push(t),Ie(n(...i))}s(y,"runInject");function Ie(o){const e=o.hooks;if(e===void 0)return o;const{hooks:t,...n}=o,i=n;for(const[r,c]of Object.entries(e)){const a=`use${r[0]?.toUpperCase()??""}${r.slice(1)}`;i[a]=v(c)}return i}s(Ie,"bindInjectHooks");const x=new WeakMap,X={props:Q};function Ee(o){if(o===void 0)return X;let e=x.get(o);if(e!==void 0)return e;const t=o.hooks;if(t===void 0)return e={props:o},x.set(o,e),e;const{hooks:n,...i}=o,r=i;let c;for(const[a,u]of Object.entries(t)){const f=`use${a[0]?.toUpperCase()??""}${a.slice(1)}`;typeof u=="function"?(c??={},c[a]=u):r[f]=v(u)}return e=c===void 0?{props:r}:{props:r,slotHookFactories:c},x.set(o,e),e}s(Ee,"cachedSlotInject");function Oe(o,e,t){const n={};for(const[i,r]of Object.entries(o)){const c=`use${i[0]?.toUpperCase()??""}${i.slice(1)}`;n[c]=r(e,t)}return n}s(Oe,"bindSlotHookFactories");function Me(o,e){let t=V.get(o);return t||(t=y(o,void 0,e),V.set(o,t)),t}s(Me,"cachedRootInject");function $e(o,e,t){let n=q.get(o);n||(n=new WeakMap,q.set(o,n));let i=n.get(e);return i||(i=y(o,e,t),n.set(e,i)),i}s($e,"cachedSessionInject");function je(o,e,t){let n=G.get(o);n||(n=new WeakMap,G.set(o,n));let i=n.get(e);return i||(i=y(o,e,t),n.set(e,i)),i}s(je,"cachedSessionMaybeInject");const Z=new WeakMap;function ye(o,e){let t=Z.get(o);t||(t=new Map,Z.set(o,t));const n=o.getSnapshot().revision,i=t.get(e);if(i&&i.revision===n)return i.t;const r=o.bind(e),c=s((a,u)=>r(a,u),"t");return t.set(e,{revision:n,t:c}),c}s(ye,"localeSeat");const xe=s(()=>()=>{},"noopSubscribe"),Pe=s(()=>0,"zeroRevision"),K=new WeakMap;function We(o){let e=K.get(o);return e||(e={subscribe:s(t=>o.subscribe(t),"subscribe"),getRevision:s(()=>o.getSnapshot().revision,"getRevision")},K.set(o,e)),e}s(We,"localeSubscription");function ee(o){const e=o!==void 0?We(o):void 0;return O(e?.subscribe??xe,e?.getRevision??Pe)}s(ee,"useLocaleRevision");let Re=0;const oe=new WeakMap;function C(o){let e=oe.get(o);return e===void 0&&(e=Re++,oe.set(o,e)),e}s(C,"entryKeyOf");var P=class extends he{static{s(this,"SlotErrorBoundary")}state={failed:!1};static getDerivedStateFromError(o){if(o instanceof b)throw o;return{failed:!0}}componentDidCatch(o){console.error(`slot entry crashed in '${this.props.slotKey}':`,o),this.props.onEntryError(o)}render(){return this.state.failed?l("div",{"data-slot-error":this.props.slotKey}):this.props.children}};const ne=new WeakMap;function He(o,e,t){let n=ne.get(o);if(n===void 0&&(n={root:{useSessions:v(o.sessions.list),useWorkspaces:v(o.workspaces.list)},session:new WeakMap,sessionMaybe:new WeakMap},ne.set(o,n)),e==="root")return n.root;if(t===void 0)throw new b(`scope '${e}' rendered without session provide info`);const i=e==="session"?n.session:n.sessionMaybe;let r=i.get(t);if(r!==void 0)return r;r={...n.root};for(const[c,a]of Object.entries(t.hooks)){const u=`use${c[0]?.toUpperCase()??""}${c.slice(1)}`;if(e==="session-maybe")r[u]=ke(a);else{if(a===void 0)throw new b(`strict session hook '${c}' has no source`);r[u]=v(a)}}return Object.assign(r,t.props),r.sessionId=t.sessionId,r.useProjection=ge(t),i.set(t,r),r}s(He,"standardProps");function W(o,e,t,n){const i=He(o,t,n),r={...i};if(e.locale!==void 0){const a=o.locale;if(a===void 0)throw new b(`entry declares locale namespace '${e.locale}' but no locale face is installed (locale plugin missing from the composition?)`);r.t=ye(a,e.locale)}const c=t==="session-maybe"&&n?.sessionId===void 0?void 0:o.storeOf(e,n?.sessionId);return c!==void 0&&(r.useStore=v(c),r.actions=c.actions),e.children!==void 0&&(r.renderSlot=me(o,e),Object.values(e.children).some(a=>a.kind==="chain")&&(r.renderSlotChain=Ce(o,e)),Object.values(e.children).some(a=>a.scope==="session")&&(r.SessionProvider=D)),{kit:r,standard:i,actions:c?.actions}}s(W,"standardKit");function Ne({slotKey:o,Comp:e,kit:t,standard:n,injected:i,slotInjected:r,ownerProps:c,hookContext:a,hasHookContext:u}){const f=pe(()=>{if(!u)throw new b(`slot '${o}' has contextual injected Hooks but no hookContext`);return Oe(r.slotHookFactories,n,a)},[u,a,r.slotHookFactories,o,n]);return l(e,{...t,...i,...r.props,...f,...c})}s(Ne,"ContextualEntry");function R(o,e,t,n,i,r,c,a,u){return r.slotHookFactories===void 0?l(e,{...t,...i,...r.props,...c}):l(Ne,{slotKey:o,Comp:e,kit:t,standard:n,injected:i,slotInjected:r,ownerProps:c,hookContext:a,hasHookContext:u})}s(R,"renderEntry");function _e({entry:o,ownerProps:e,info:t,slotKey:n,slotInjected:i,hookContext:r,hasHookContext:c}){const a=w(),u=o.component,{kit:f,standard:h,actions:S}=W(a,o,"session",t);return R(n,u,f,h,$e(o,t,S),i,e,r,c)}s(_e,"SessionEntry");function Ae({entry:o,ownerProps:e,info:t,slotKey:n,slotInjected:i,hookContext:r,hasHookContext:c}){const a=w(),u=o.component,{kit:f,standard:h,actions:S}=W(a,o,"session-maybe",t);return R(n,u,f,h,je(o,t,S),i,e,r,c)}s(Ae,"SessionMaybeEntryBody");function Fe({entry:o,ownerProps:e,slotKey:t,slotInjected:n,hookContext:i,hasHookContext:r}){const c=j(),[a,u]=be(Te);let{adopted:f,epoch:h}=a;return c.sessionId!==void 0&&f===void 0?(f=c.sessionId,u({adopted:f,epoch:h})):f!==void 0&&c.sessionId!==void 0&&c.sessionId!==f?(f=c.sessionId,h+=1,u({adopted:f,epoch:h})):f!==void 0&&c.sessionId===void 0&&(f=void 0,h+=1,u({adopted:f,epoch:h})),l(Ae,{entry:o,ownerProps:e,info:c,slotKey:t,slotInjected:n,hookContext:i,hasHookContext:r},h)}s(Fe,"SessionMaybeEntry");const Te={adopted:void 0,epoch:0};function te({entry:o,ownerProps:e,slotKey:t,slotInjected:n,hookContext:i,hasHookContext:r}){const c=w(),a=o.component,{kit:u,standard:f,actions:h}=W(c,o,"root",void 0);return R(t,a,u,f,Me(o,h),n,e,i,r)}s(te,"RootEntry");function Le({slotKey:o,entry:e,ownerProps:t,slotInjected:n,hookContext:i,hasHookContext:r,onEntryError:c}){const a=j();return a.sessionId===void 0?null:l(P,{slotKey:o,onEntryError:c,children:l(_e,{entry:e,ownerProps:t,info:a,slotKey:o,slotInjected:n,hookContext:i,hasHookContext:r})},a.sessionId)}s(Le,"StrictSessionEntry");const re={display:"contents"};function se({slotKey:o,ownerProps:e,opts:t}){const n=w();return O(i=>n.subscribe(o,i),()=>n.getVersion(o)),ee(n.locale),l("div",{"data-slot":o,style:re,children:ze(n,o,e,t,j())})}s(se,"SlotOutlet");function ze(o,e,t,n,i){const r=o.specOf(e);if(!r)return null;const c=r.scope==="session"&&i.sessionId===void 0;if(c&&(r.kind!=="chain"||!n?.overlay))return l(k,{children:n?.fallback??null});const a=c?[]:o.entriesOf(e),u=Ee(r.inject),f=s((d,p,g=t)=>{const m=n!==void 0&&Object.hasOwn(n,"hookContext"),M=n?.hookContext,N=s(ce=>{o.reportEntryError(e,d,ce,{abdicate:r.kind!=="chain"})},"onEntryError");return r.scope==="session"?l(Le,{slotKey:e,entry:d,ownerProps:g,slotInjected:u,hookContext:M,hasHookContext:m,onEntryError:N},p):l(P,{slotKey:e,onEntryError:N,children:r.scope==="session-maybe"?l(Fe,{entry:d,ownerProps:g,slotKey:e,slotInjected:u,hookContext:M,hasHookContext:m}):l(te,{entry:d,ownerProps:g,slotKey:e,slotInjected:u,hookContext:M,hasHookContext:m})},p)},"guarded"),h=s(()=>l("div",{"data-slot-error":e}),"deadCell");if(r.kind==="single"){const d=o.entriesOfSlot(e)[0];return d?f(d,C(d)):a.length>0?h():l(k,{children:n?.fallback??null})}if(r.kind==="keyed"){const d=o.entriesOfSlot(e).find(p=>p.options.key===n?.entryKey);return d?f(d,C(d)):a.some(p=>p.options.key===n?.entryKey)?h():l(k,{children:n?.fallback??null})}if(r.kind==="chain"){let d=null;for(const p of a){let g;try{g=p.select(t)}catch(m){console.error(`chain selector crashed in '${e}' (${p.registrant??"unknown registrant"}), treating as declined:`,m);continue}if(g!==null){d=f(p,C(p),{...t,matched:g});break}}return n?.overlay?fe(k,{children:[l("div",{"data-chain-overlay-fallback":e,style:{display:d===null?"contents":"none"},children:n.fallback??null}),d]}):d??l(k,{children:n?.fallback??null})}const S=o.entriesOfSlot(e).map(d=>({entry:d,id:d.options.id,order:d.options.order??0})),H=new Set(S.map(d=>d.id));for(const d of a)H.has(d.options.id)||(H.add(d.options.id),S.push({entry:void 0,id:d.options.id,order:d.options.order??0}));let I=[...S].sort((d,p)=>d.order-p.order);return n?.only!==void 0&&(I=I.filter(d=>d.id===n.only)),I.length===0?l(k,{children:n?.fallback??null}):l(k,{children:I.map((d,p)=>d.entry!==void 0?f(d.entry,`e${C(d.entry)}`):l("div",{"data-slot-error":e},`x${d.id??p}`))})}s(ze,"renderOutletContent");function Ue({ownerProps:o}){const e=w();O(n=>e.subscribe("root",n),()=>e.getVersion("root")),ee(e.locale);const t=e.entriesOfSlot("root")[0];if(!t){if(e.entriesOf("root").length>0)return l("div",{"data-slot-error":"root"});throw new b("renderSlot('root') before any 'root' registration (boot order)")}return l("div",{"data-slot":"root",style:re,children:l(P,{slotKey:"root",onEntryError:s(n=>{e.reportEntryError("root",t,n,{abdicate:!0})},"onEntryError"),children:l(te,{entry:t,ownerProps:o,slotKey:"root",slotInjected:X,hookContext:void 0,hasHookContext:!1})},C(t))})}s(Ue,"RootOutlet");function Be(){return{renderRoot(o,e){return l(L.Provider,{value:o,children:l(we,{children:l(Ue,{ownerProps:e})})})}}}s(Be,"createSlotRenderer");function De(o){const e={inflight:0,listeners:new Set,fn:o,invoke:s(()=>{ie(e,1),e.fn().catch(t=>{console.error("useInvoke action failed:",t)}).finally(()=>{ie(e,-1)})},"invoke"),subscribe:s(t=>(e.listeners.add(t),()=>{e.listeners.delete(t)}),"subscribe"),getPending:s(()=>e.inflight>0,"getPending")};return e}s(De,"createCell");function ie(o,e){const t=o.inflight>0;if(o.inflight+=e,t!==o.inflight>0)for(const n of[...o.listeners])n()}s(ie,"bump");function Ye(o){const e=ve(null);e.current??=De(o);const t=e.current;t.fn=o;const n=O(t.subscribe,t.getPending);return[t.invoke,n]}s(Ye,"useInvoke");export{D as SessionProvider,b as SlotAssemblyError,le as SlotOwnershipError,ue as StaleAuthorizationError,T as bindSnapshotSelector,Be as createSlotRenderer,Ye as useInvoke};
|
|
1
|
+
var ae=Object.defineProperty;var s=(o,e)=>ae(o,"name",{value:e,configurable:!0});import{useSyncExternalStoreWithSelector as de}from"use-sync-external-store/shim/with-selector.js";import{SlotOwnershipError as le,SlotOwnershipError as E,StaleAuthorizationError as ue,StaleAuthorizationError as _}from"@deepseek-ai/dsh-client-ui-slots";import{Fragment as k,jsx as l,jsxs as fe}from"react/jsx-runtime";import{Component as he,createContext as A,useContext as F,useMemo as pe,useRef as ve,useState as be,useSyncExternalStore as O}from"react";function T(o){const e=s(n=>o.subscribe(n),"subscribe"),t=s(()=>o.getSnapshot(),"getSnapshot");return s(function(i,r){return de(e,t,void 0,i,r)},"useSelector")}s(T,"bindSnapshotSelector");var b=class extends Error{static{s(this,"SlotAssemblyError")}};const L=A(null);function w(){const o=F(L);if(!o)throw new b("slot machinery rendered outside the installed renderer tree");return o}s(w,"useHost");const $=A(null);function j(){const o=F($);if(!o)throw new b("session-aware slot rendered outside the root binding provider");return o}s(j,"useSessionMaybeProvideInfo");function v(o){let e=z.get(o);return e===void 0&&(e=T(o),z.set(o,e)),e}s(v,"observableHook");const z=new WeakMap,U={getSnapshot:s(()=>{},"getSnapshot"),subscribe:s(()=>()=>{},"subscribe")};function ke(o){return o!==void 0?v(o):Se}s(ke,"maybeObservableHook");function Se(o,e){v(U)(()=>{})}s(Se,"useAbsentSnapshot");function ge(o){let e=B.get(o);return e===void 0&&(e=s((t,n,i)=>v(o.projections?.faceOf(t)??U)(n??(r=>r),i),"hook"),B.set(o,e)),e}s(ge,"projectionHook");const B=new WeakMap;function we({children:o}){const e=v(w().sessions.provideInfo)(t=>t);return l($.Provider,{value:e,children:o})}s(we,"SessionMaybeProvider");function D({empty:o,children:e}){const t=v(w().sessions.provideInfo)(i=>i),n=t.sessionId;return n===void 0?l(k,{children:o?.()??null}):l($.Provider,{value:t,children:e(n)},n)}s(D,"SessionProvider");const Y=new WeakMap;function me(o,e){let t=Y.get(e);return t||(t=s((n,i,r)=>{if(!o.isLive(e))throw new _(`renderSlot('${n}') from a disposed registration`);const c=e.children?.[n];if(c===void 0)throw new E(`slot '${n}' is not declared by this entry's children`);if(c.kind==="chain")throw new E(`slot '${n}' is declared 'chain' — use renderSlotChain`);return l(se,{slotKey:n,ownerProps:i,opts:r})},"binding"),Y.set(e,t)),t}s(me,"boundRenderSlot");const J=new WeakMap;function Ce(o,e){let t=J.get(e);return t||(t=s((n,i,r)=>{if(!o.isLive(e))throw new _(`renderSlotChain('${n}') from a disposed registration`);const c=e.children?.[n];if(c===void 0)throw new E(`slot '${n}' is not declared by this entry's children`);if(c.kind!=="chain")throw new E(`slot '${n}' is declared '${c.kind}', not 'chain' — use renderSlot`);return l(se,{slotKey:n,ownerProps:i,opts:r})},"binding"),J.set(e,t)),t}s(Ce,"boundRenderSlotChain");const V=new WeakMap,q=new WeakMap,G=new WeakMap,Q={};function y(o,e,t){const n=o.inject;if(!n)return Q;const i=[];return e!==void 0&&i.push(e.sessionId),t!==void 0&&i.push(t),Ie(n(...i))}s(y,"runInject");function Ie(o){const e=o.hooks;if(e===void 0)return o;const{hooks:t,...n}=o,i=n;for(const[r,c]of Object.entries(e)){const a=`use${r[0]?.toUpperCase()??""}${r.slice(1)}`;i[a]=v(c)}return i}s(Ie,"bindInjectHooks");const x=new WeakMap,X={props:Q};function Ee(o){if(o===void 0)return X;let e=x.get(o);if(e!==void 0)return e;const t=o.hooks;if(t===void 0)return e={props:o},x.set(o,e),e;const{hooks:n,...i}=o,r=i;let c;for(const[a,u]of Object.entries(t)){const f=`use${a[0]?.toUpperCase()??""}${a.slice(1)}`;typeof u=="function"?(c??={},c[a]=u):r[f]=v(u)}return e=c===void 0?{props:r}:{props:r,slotHookFactories:c},x.set(o,e),e}s(Ee,"cachedSlotInject");function Oe(o,e,t){const n={};for(const[i,r]of Object.entries(o)){const c=`use${i[0]?.toUpperCase()??""}${i.slice(1)}`;n[c]=r(e,t)}return n}s(Oe,"bindSlotHookFactories");function Me(o,e){let t=V.get(o);return t||(t=y(o,void 0,e),V.set(o,t)),t}s(Me,"cachedRootInject");function $e(o,e,t){let n=q.get(o);n||(n=new WeakMap,q.set(o,n));let i=n.get(e);return i||(i=y(o,e,t),n.set(e,i)),i}s($e,"cachedSessionInject");function je(o,e,t){let n=G.get(o);n||(n=new WeakMap,G.set(o,n));let i=n.get(e);return i||(i=y(o,e,t),n.set(e,i)),i}s(je,"cachedSessionMaybeInject");const Z=new WeakMap;function ye(o,e){let t=Z.get(o);t||(t=new Map,Z.set(o,t));const n=o.getSnapshot().revision,i=t.get(e);if(i&&i.revision===n)return i.t;const r=o.bind(e),c=s((a,u)=>r(a,u),"t");return t.set(e,{revision:n,t:c}),c}s(ye,"localeSeat");const xe=s(()=>()=>{},"noopSubscribe"),Pe=s(()=>0,"zeroRevision"),K=new WeakMap;function We(o){let e=K.get(o);return e||(e={subscribe:s(t=>o.subscribe(t),"subscribe"),getRevision:s(()=>o.getSnapshot().revision,"getRevision")},K.set(o,e)),e}s(We,"localeSubscription");function ee(o){const e=o!==void 0?We(o):void 0;return O(e?.subscribe??xe,e?.getRevision??Pe)}s(ee,"useLocaleRevision");let Re=0;const oe=new WeakMap;function C(o){let e=oe.get(o);return e===void 0&&(e=Re++,oe.set(o,e)),e}s(C,"entryKeyOf");var P=class extends he{static{s(this,"SlotErrorBoundary")}state={failed:!1};static getDerivedStateFromError(o){if(o instanceof b)throw o;return{failed:!0}}componentDidCatch(o){console.error(`slot entry crashed in '${this.props.slotKey}':`,o),this.props.onEntryError(o)}render(){return this.state.failed?l("div",{"data-slot-error":this.props.slotKey}):this.props.children}};const ne=new WeakMap;function He(o,e,t){let n=ne.get(o);if(n===void 0&&(n={root:{useSessions:v(o.sessions.list),useWorkspaces:v(o.workspaces.list)},session:new WeakMap,sessionMaybe:new WeakMap},ne.set(o,n)),e==="root")return n.root;if(t===void 0)throw new b(`scope '${e}' rendered without session provide info`);const i=e==="session"?n.session:n.sessionMaybe;let r=i.get(t);if(r!==void 0)return r;r={...n.root};for(const[c,a]of Object.entries(t.hooks)){const u=`use${c[0]?.toUpperCase()??""}${c.slice(1)}`;if(e==="session-maybe")r[u]=ke(a);else{if(a===void 0)throw new b(`strict session hook '${c}' has no source`);r[u]=v(a)}}return Object.assign(r,t.props),r.sessionId=t.sessionId,r.useProjection=ge(t),i.set(t,r),r}s(He,"standardProps");function W(o,e,t,n){const i=He(o,t,n),r={...i};if(e.locale!==void 0){const a=o.locale;if(a===void 0)throw new b(`entry declares locale namespace '${e.locale}' but no locale face is installed (locale plugin missing from the composition?)`);r.t=ye(a,e.locale)}const c=t==="session-maybe"&&n?.sessionId===void 0?void 0:o.storeOf(e,n?.sessionId);return c!==void 0&&(r.useStore=v(c),r.actions=c.actions),e.children!==void 0&&(r.renderSlot=me(o,e),Object.values(e.children).some(a=>a.kind==="chain")&&(r.renderSlotChain=Ce(o,e)),Object.values(e.children).some(a=>a.scope==="session")&&(r.SessionProvider=D)),{kit:r,standard:i,actions:c?.actions}}s(W,"standardKit");function Ne({slotKey:o,Comp:e,kit:t,standard:n,injected:i,slotInjected:r,ownerProps:c,hookContext:a,hasHookContext:u}){const f=pe(()=>{if(!u)throw new b(`slot '${o}' has contextual injected Hooks but no hookContext`);return Oe(r.slotHookFactories,n,a)},[u,a,r.slotHookFactories,o,n]);return l(e,{...t,...i,...r.props,...f,...c})}s(Ne,"ContextualEntry");function R(o,e,t,n,i,r,c,a,u){return r.slotHookFactories===void 0?l(e,{...t,...i,...r.props,...c}):l(Ne,{slotKey:o,Comp:e,kit:t,standard:n,injected:i,slotInjected:r,ownerProps:c,hookContext:a,hasHookContext:u})}s(R,"renderEntry");function _e({entry:o,ownerProps:e,info:t,slotKey:n,slotInjected:i,hookContext:r,hasHookContext:c}){const a=w(),u=o.component,{kit:f,standard:h,actions:S}=W(a,o,"session",t);return R(n,u,f,h,$e(o,t,S),i,e,r,c)}s(_e,"SessionEntry");function Ae({entry:o,ownerProps:e,info:t,slotKey:n,slotInjected:i,hookContext:r,hasHookContext:c}){const a=w(),u=o.component,{kit:f,standard:h,actions:S}=W(a,o,"session-maybe",t);return R(n,u,f,h,je(o,t,S),i,e,r,c)}s(Ae,"SessionMaybeEntryBody");function Fe({entry:o,ownerProps:e,slotKey:t,slotInjected:n,hookContext:i,hasHookContext:r}){const c=j(),[a,u]=be(Te);let{adopted:f,epoch:h}=a;return c.sessionId!==void 0&&f===void 0?(f=c.sessionId,u({adopted:f,epoch:h})):f!==void 0&&c.sessionId!==void 0&&c.sessionId!==f?(f=c.sessionId,h+=1,u({adopted:f,epoch:h})):f!==void 0&&c.sessionId===void 0&&(f=void 0,h+=1,u({adopted:f,epoch:h})),l(Ae,{entry:o,ownerProps:e,info:c,slotKey:t,slotInjected:n,hookContext:i,hasHookContext:r},h)}s(Fe,"SessionMaybeEntry");const Te={adopted:void 0,epoch:0};function te({entry:o,ownerProps:e,slotKey:t,slotInjected:n,hookContext:i,hasHookContext:r}){const c=w(),a=o.component,{kit:u,standard:f,actions:h}=W(c,o,"root",void 0);return R(t,a,u,f,Me(o,h),n,e,i,r)}s(te,"RootEntry");function Le({slotKey:o,entry:e,ownerProps:t,slotInjected:n,hookContext:i,hasHookContext:r,onEntryError:c}){const a=j();return a.sessionId===void 0?null:l(P,{slotKey:o,onEntryError:c,children:l(_e,{entry:e,ownerProps:t,info:a,slotKey:o,slotInjected:n,hookContext:i,hasHookContext:r})},a.sessionId)}s(Le,"StrictSessionEntry");const re={display:"contents"};function se({slotKey:o,ownerProps:e,opts:t}){const n=w();O(r=>n.subscribe(o,r),()=>n.getVersion(o)),ee(n.locale);const i=j();return l("div",{"data-slot":o,style:re,children:ze(n,o,e,t,i)})}s(se,"SlotOutlet");function ze(o,e,t,n,i){const r=o.specOf(e);if(!r)return null;const c=r.scope==="session"&&i.sessionId===void 0;if(c&&(r.kind!=="chain"||!n?.overlay))return l(k,{children:n?.fallback??null});const a=c?[]:o.entriesOf(e),u=Ee(r.inject),f=s((d,p,g=t)=>{const m=n!==void 0&&Object.hasOwn(n,"hookContext"),M=n?.hookContext,N=s(ce=>{o.reportEntryError(e,d,ce,{abdicate:r.kind!=="chain"})},"onEntryError");return r.scope==="session"?l(Le,{slotKey:e,entry:d,ownerProps:g,slotInjected:u,hookContext:M,hasHookContext:m,onEntryError:N},p):l(P,{slotKey:e,onEntryError:N,children:r.scope==="session-maybe"?l(Fe,{entry:d,ownerProps:g,slotKey:e,slotInjected:u,hookContext:M,hasHookContext:m}):l(te,{entry:d,ownerProps:g,slotKey:e,slotInjected:u,hookContext:M,hasHookContext:m})},p)},"guarded"),h=s(()=>l("div",{"data-slot-error":e}),"deadCell");if(r.kind==="single"){const d=o.entriesOfSlot(e)[0];return d?f(d,C(d)):a.length>0?h():l(k,{children:n?.fallback??null})}if(r.kind==="keyed"){const d=o.entriesOfSlot(e).find(p=>p.options.key===n?.entryKey);return d?f(d,C(d)):a.some(p=>p.options.key===n?.entryKey)?h():l(k,{children:n?.fallback??null})}if(r.kind==="chain"){let d=null;for(const p of a){let g;try{g=p.select(t)}catch(m){console.error(`chain selector crashed in '${e}' (${p.registrant??"unknown registrant"}), treating as declined:`,m);continue}if(g!==null){d=f(p,C(p),{...t,matched:g});break}}return n?.overlay?fe(k,{children:[l("div",{"data-chain-overlay-fallback":e,style:{display:d===null?"contents":"none"},children:n.fallback??null}),d]}):d??l(k,{children:n?.fallback??null})}const S=o.entriesOfSlot(e).map(d=>({entry:d,id:d.options.id,order:d.options.order??0})),H=new Set(S.map(d=>d.id));for(const d of a)H.has(d.options.id)||(H.add(d.options.id),S.push({entry:void 0,id:d.options.id,order:d.options.order??0}));let I=[...S].sort((d,p)=>d.order-p.order);return n?.only!==void 0&&(I=I.filter(d=>d.id===n.only)),I.length===0?l(k,{children:n?.fallback??null}):l(k,{children:I.map((d,p)=>d.entry!==void 0?f(d.entry,`e${C(d.entry)}`):l("div",{"data-slot-error":e},`x${d.id??p}`))})}s(ze,"renderOutletContent");function Ue({ownerProps:o}){const e=w();O(n=>e.subscribe("root",n),()=>e.getVersion("root")),ee(e.locale);const t=e.entriesOfSlot("root")[0];if(!t){if(e.entriesOf("root").length>0)return l("div",{"data-slot-error":"root"});throw new b("renderSlot('root') before any 'root' registration (boot order)")}return l("div",{"data-slot":"root",style:re,children:l(P,{slotKey:"root",onEntryError:s(n=>{e.reportEntryError("root",t,n,{abdicate:!0})},"onEntryError"),children:l(te,{entry:t,ownerProps:o,slotKey:"root",slotInjected:X,hookContext:void 0,hasHookContext:!1})},C(t))})}s(Ue,"RootOutlet");function Be(){return{renderRoot(o,e){return l(L.Provider,{value:o,children:l(we,{children:l(Ue,{ownerProps:e})})})}}}s(Be,"createSlotRenderer");function De(o){const e={inflight:0,listeners:new Set,fn:o,invoke:s(()=>{ie(e,1),e.fn().catch(t=>{console.error("useInvoke action failed:",t)}).finally(()=>{ie(e,-1)})},"invoke"),subscribe:s(t=>(e.listeners.add(t),()=>{e.listeners.delete(t)}),"subscribe"),getPending:s(()=>e.inflight>0,"getPending")};return e}s(De,"createCell");function ie(o,e){const t=o.inflight>0;if(o.inflight+=e,t!==o.inflight>0)for(const n of[...o.listeners])n()}s(ie,"bump");function Ye(o){const e=ve(null);e.current??=De(o);const t=e.current;t.fn=o;const n=O(t.subscribe,t.getPending);return[t.invoke,n]}s(Ye,"useInvoke");export{D as SessionProvider,b as SlotAssemblyError,le as SlotOwnershipError,ue as StaleAuthorizationError,T as bindSnapshotSelector,Be as createSlotRenderer,Ye as useInvoke};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-client-web-react","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-client-web-react","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"react":"^18.2.0","use-sync-external-store":"1.2.0","@deepseek-ai/dsh-client-ui-slots":"^0.0.12"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-cmdline","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-cmdline","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-code-runtime","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-code-runtime","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ye=Object.defineProperty;var s=(e,t)=>ye(e,"name",{value:t,configurable:!0});import{stripTypeScriptTypes as pe}from"node:module";import{Worker as he}from"node:worker_threads";import{fileURLToPath as me}from"node:url";import O from"@deepseek-ai/schemastery";import{MAX_TIMER_DELAY_MS as T}from"@deepseek-ai/dsh-timeout";import{CodeRuntime as be,DUNDER_MEMBER as ke,PORTABLE_RESERVED_WORDS as L,RESERVED_BINDING_GLOBALS as C,RESERVED_ERROR_MEMBERS as ve}from"@deepseek-ai/dsh-code-runtime";import{snapshotJsonValue as we}from"@deepseek-ai/dsh-session";const x=Reflect.apply,Oe=Array.isArray,xe=Buffer,Se=Reflect.get(Buffer,"byteLength"),je=Object.create,J=Object.defineProperty,Ee=Object.keys,Be=String,Re=Reflect.get(String.prototype,"charCodeAt"),Pe=Reflect.get(String.prototype,"codePointAt"),W=Reflect.get(String.prototype,"slice");function U(e){const t=je(null);return t.value=e,t}s(U,"dataDescriptor$1");function Ae(e,t,r){const n=U(r);n.enumerable=!0,n.configurable=!0,n.writable=!0,J(e,t,n)}s(Ae,"defineEnumerableDataProperty$1");function K(e){return x(Se,xe,[e,"utf8"])}s(K,"byteLength");function k(e,t){Ae(e,e.length,t)}s(k,"append$1");function z(e){if(e.length===0)return;const t=e.length-1,r=e[t];return J(e,"length",U(t)),r}s(z,"takeLast$1");function F(e,t){const r=x(Pe,e,[t])>65535?2:1;return x(W,e,[t,t+r])}s(F,"characterAt");function G(e){if(e.length===2)return 4;if(e==='"'||e==="\\")return 2;const t=x(Re,e,[0]);return t>=55296&&t<=57343?6:t<32?t===8||t===9||t===10||t===12||t===13?2:6:K(e)}s(G,"serializedCharacterBytes");function v(e,t){if(t<2)return;let r=2;for(let n=0;n<e.length;){const i=F(e,n);if(r+=G(i),r>t)return;n+=i.length}return r}s(v,"jsonStringBytesUpTo");function $e(e,t){let r=0;const n=s(o=>(r+=o,r<=t),"add"),i=[{kind:"value",value:e}];for(let o=z(i);o!==void 0;o=z(i)){if(o.kind==="value"){const u=o.value;if(u===null){if(!n(4))return}else if(typeof u=="string"){const c=v(u,t-r);if(c===void 0)return;r+=c}else if(typeof u=="number"){if(!n(K(Be(u))))return}else if(typeof u=="boolean"){if(!n(u?4:5))return}else if(Oe(u)){if(!n(2))return;u.length>0&&k(i,{kind:"array",value:u,index:0})}else{if(!n(2))return;const c=Ee(u);c.length>0&&k(i,{kind:"object",value:u,keys:c,index:0})}continue}if(o.index>0&&!n(1))return;if(o.kind==="array"){const u=o.value[o.index];if(u===void 0)return;o.index+1<o.value.length&&k(i,{...o,index:o.index+1}),k(i,{kind:"value",value:u});continue}const a=o.keys[o.index];if(a===void 0)return;const l=v(a,t-r);if(l===void 0||!n(l+1))return;const d=o.value[a];if(d===void 0)return;o.index+1<o.keys.length&&k(i,{...o,index:o.index+1}),k(i,{kind:"value",value:d})}return r}s($e,"jsonValueBytesUpTo");function V(e,t){if(t<2)return"";let r=2,n=0;for(let i=0;i<e.length;){const o=F(e,i),a=G(o);if(r+a>t)break;r+=a,n+=o.length,i+=o.length}return n===e.length?e:x(W,e,[0,n])}s(V,"truncateJsonStringBytes");const Ne=Reflect.get(Function.prototype,"toString"),B=Reflect.get(Reflect,"apply"),$=Error,Ie=Set,S=Array.isArray,Me=Array.prototype,De=Number.isFinite,_e=Number.isSafeInteger,Te=Object.create,H=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,R=Object.getPrototypeOf,Ce=Object.hasOwn,Je=Object.is,We=Object.keys,Y=Object.prototype,Ue=Reflect.get(Y,"propertyIsEnumerable"),Z=Reflect.ownKeys,Ke=Reflect.get(Set.prototype,"add");Reflect.get(Set.prototype,"delete");const ze=Reflect.get(Set.prototype,"has");function X(e){const t=Te(null);return t.value=e,t}s(X,"dataDescriptor");function Q(e,t,r){const n=X(r);n.enumerable=!0,n.configurable=!0,n.writable=!0,H(e,t,n)}s(Q,"defineEnumerableDataProperty");function b(e,t){Q(e,e.length,t)}s(b,"append");function N(e){if(e.length===0)return;const t=e.length-1,r=e[t];return H(e,"length",X(t)),r}s(N,"takeLast");function Fe(e,t){return B(ze,e,[t])}s(Fe,"setHas");function Ge(e,t){B(Ke,e,[t])}s(Ge,"setAdd");function q(e,t){const r=Le(e,"constructor")?.value;if(typeof r!="function")return!1;try{return r.name===t&&r.prototype===e&&B(Ne,r,[])===`function ${t}() { [native code] }`}catch{return!1}}s(q,"hasIntrinsicConstructor");function ee(e){return R(e)===null&&q(e,"Object")}s(ee,"isForeignIntrinsicObjectPrototype");function Ve(e){const t=R(e);if(t===Me)return!0;if(!S(t)||!q(t,"Array"))return!1;const r=R(t);return typeof r=="object"&&r!==null&&ee(r)}s(Ve,"hasPlainArrayPrototype");function He(e){const t=R(e);return t===null||t===Y||typeof t=="object"&&ee(t)}s(He,"hasPlainObjectPrototype");function Ye(e){const t=Z(e);for(let r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"||!B(Ue,e,[n]))return}return t}s(Ye,"enumerableStringKeys");function Ze(e){const t=[],r=[e];for(let n=N(r);n!==void 0;n=N(r)){if(n===null||typeof n=="boolean"||typeof n=="number"||typeof n=="string"){b(t,n);continue}if(S(n)){b(t,{kind:"array",length:n.length});for(let o=n.length-1;o>=0;o--){const a=n[o];if(a===void 0)throw new $("cannot encode a sparse JSON array");b(r,a)}continue}const i=We(n);b(t,{kind:"object",keys:i});for(let o=i.length-1;o>=0;o--){const a=i[o];if(a===void 0)throw new $("cannot encode a missing JSON object key");const l=n[a];if(l===void 0)throw new $("cannot encode an undefined JSON object property");b(r,l)}}return t}s(Ze,"encodeWorkerJson");function te(e){if(!Ve(e)||Z(e).length!==e.length+1)return!1;for(let t=0;t<e.length;t++)if(!Ce(e,t))return!1;return!0}s(te,"isDenseArray");function P(e,t){for(let r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}s(P,"keysContain");function Xe(e){if(S(e)||!He(e))return;const t=Ye(e);if(t===void 0)return;const r=e;if(r.kind==="array"){if(t.length!==2||!P(t,"kind")||!P(t,"length"))return;const n=r.length;return typeof n=="number"&&_e(n)&&n>=0?{kind:"array",length:n}:void 0}if(r.kind==="object"){if(t.length!==2||!P(t,"kind")||!P(t,"keys"))return;const n=r.keys;if(!S(n)||!te(n))return;const i=new Ie,o=[],a=n;for(let l=0;l<a.length;l++){const d=a[l];if(typeof d!="string"||Fe(i,d))return;Ge(i,d),b(o,d)}return{kind:"object",keys:o}}}s(Xe,"containerToken");function ne(e){try{if(!S(e)||!te(e)||e.length===0)return;const t=e,r=[];let n,i=!1;const o=s(a=>{const l=r[r.length-1];if(!l)return i?!1:(n=a,i=!0,!0);if(l.index>=(l.kind==="array"?l.length:l.keys.length))return!1;if(l.kind==="array")b(l.target,a);else{const d=l.keys[l.index];if(d===void 0)return!1;Q(l.target,d,a)}return l.index+=1,!0},"attach");for(let a=0;a<t.length;a++){const l=t[a];let d,u;if(l===null||typeof l=="boolean"||typeof l=="string")d=l;else if(typeof l=="number"){if(!De(l)||Je(l,-0))return;d=l}else{if(typeof l!="object")return;const c=Xe(l);if(!c)return;const h=t.length-a-1;if(c.kind==="array"){if(c.length>h)return;const m=[];d=m,c.length>0&&(u={kind:"array",target:m,length:c.length,index:0})}else{if(c.keys.length>h)return;const m={};d=m,c.keys.length>0&&(u={kind:"object",target:m,keys:c.keys,index:0})}}if(!o(d))return;for(u&&b(r,u);r.length>0;){const c=r[r.length-1];if(c===void 0||c.index<(c.kind==="array"?c.length:c.keys.length))break;N(r)}}return r.length===0?n:void 0}catch{return}}s(ne,"decodeWorkerJson");const Qe=25,re=4,ie=/^[A-Za-z_][A-Za-z0-9_]*$/,A={prefix:`async function __dsh_program__() {
|
|
2
2
|
`,suffix:`
|
|
3
|
-
}`},
|
|
3
|
+
}`},qe=me(new URL(new URL(import.meta.url).pathname.endsWith(".ts")?"./worker.ts":"./worker.cjs",import.meta.url));function oe(e){return e instanceof Error?e.message:String(e)}s(oe,"messageOf");function se(e){return e.readableEnded||e.destroyed?Promise.resolve():new Promise(t=>{const r=s(()=>{e.off("end",r),e.off("close",r),e.off("error",r),t()},"done");e.once("end",r),e.once("close",r),e.once("error",r),(e.readableEnded||e.destroyed)&&r()})}s(se,"waitForPipeDrain");function et(e){if(typeof e!="object"||e===null)return;const t=e;switch(t.type){case"call":return typeof t.id!="number"||typeof t.global!="string"||typeof t.name!="string"?void 0:{type:"call",id:t.id,global:t.global,name:t.name,args:t.args};case"log":return typeof t.text!="string"?void 0:{type:"log",text:t.text};case"output-limit":return{type:"output-limit"};case"done":{if(t.error===void 0)return{type:"done",...t.value!==void 0?{value:t.value}:{}};const r=t.error;if(typeof r!="object"||r===null)return;const{kind:n,message:i}=r;return n!=="exception"&&n!=="invalid-output"&&n!=="output-limit"||typeof i!="string"?void 0:{type:"done",error:{kind:n,message:i}}}default:return}}s(et,"parseWorkerMessage");var ce=class{static{s(this,"OutputLedger")}maxBytes;bytes=2;entries=0;constructor(e){this.maxBytes=e}admit(e,t){const r=this.entries>0?1:0,n=v(e,this.maxBytes-this.bytes-r);return n===void 0?!1:(this.bytes+=n+r,this.entries+=1,t.push(e),!0)}success(e,t){return t!==void 0&&$e(t,this.maxBytes-this.bytes)===void 0?this.limit(e):{logs:e,...t!==void 0?{value:t}:{}}}failure(e,t){return v(t.message,this.maxBytes-this.bytes)===void 0?this.limit(e):{logs:e,error:t}}limit(e){const t=`outer output exceeded ${this.maxBytes} bytes`,r=t.length+2,n=[];let i=2;const o=this.maxBytes-r;for(const a of e){const l=n.length>0?1:0,d=o-i-l,u=v(a,d);if(u!==void 0){n.push(a),i+=u+l;continue}const c=V(a,d);if(c.length>0){const h=v(c,d);if(h===void 0)throw new Error("output ledger produced an oversized log prefix");n.push(c),i+=h+l}break}return{logs:n,error:{kind:"output-limit",message:V(t,this.maxBytes-i)}}}},ae=class extends be{static{s(this,"WorkerThreadCodeRuntime")}static Config=O.object({computeMs:O.number().default(6e4),maxWallMs:O.number().default(6e5),maxOutputBytes:O.number().default(67108864),maxOldGenerationSizeMb:O.number().default(512)});language="typescript";isolation="worker-thread";config;live=new Set;disposed=!1;constructor(e,t){super(e),this.config=t;for(const[r,n]of Object.entries(this.config))if(!(Number.isFinite(n)&&n>0))throw new Error(`dsh-code-runtime-worker-thread: config.${r} must be a positive number, got ${String(n)}`);if(!Number.isSafeInteger(this.config.maxOutputBytes)||this.config.maxOutputBytes<re)throw new Error(`dsh-code-runtime-worker-thread: config.maxOutputBytes must be a safe integer of at least ${re}, got ${String(this.config.maxOutputBytes)}`);if(this.config.maxWallMs>T)throw new Error(`dsh-code-runtime-worker-thread: config.maxWallMs must be at most ${T} (Node clamps a longer setTimeout delay to 1ms), got ${String(this.config.maxWallMs)}`);e.effect(()=>()=>this.teardown(),"worker code-runtime teardown")}async teardown(){this.disposed=!0;const e=[...this.live];for(const t of e)t.settle({kind:"abort",message:"runtime disposed"});await Promise.all(e.map(t=>t.finished))}async run(e){if(this.disposed)throw new Error("dsh-code-runtime-worker-thread: run() after disposal");const t=this.validateBindings(e);if(e.signal?.aborted)return this.failureBeforeWorker({kind:"abort",message:String(e.signal.reason)});let r;try{const n=pe(A.prefix+e.program+A.suffix);r=n.slice(A.prefix.length,n.length-A.suffix.length)}catch(n){return this.failureBeforeWorker({kind:"exception",message:oe(n)})}return await this.execute(e,r,t)}failureBeforeWorker(e){return new ce(this.config.maxOutputBytes).failure([],e)}validateBindings(e){const t=new Map;for(const n of e.bindings){if(!ie.test(n.global)||L.has(n.global))throw new Error(`dsh-code-runtime-worker-thread: binding global ${JSON.stringify(n.global)} is not a usable identifier`);if(C.has(n.global))throw new Error(`dsh-code-runtime-worker-thread: reserved binding global ${JSON.stringify(n.global)}`);if(t.has(n.global))throw new Error(`dsh-code-runtime-worker-thread: duplicate binding global ${JSON.stringify(n.global)}`);t.set(n.global,n)}const r=new Set;for(const n of e.bindings){const i=n.errorClass;if(!i)continue;if(!ie.test(i.name)||L.has(i.name))throw new Error(`dsh-code-runtime-worker-thread: binding error class ${JSON.stringify(i.name)} is not a usable identifier`);if(C.has(i.name))throw new Error(`dsh-code-runtime-worker-thread: reserved binding global ${JSON.stringify(i.name)}`);if(t.has(i.name)||r.has(i.name))throw new Error(`dsh-code-runtime-worker-thread: duplicate injected global ${JSON.stringify(i.name)}`);const o=i.memberNameProperty;if(o.length===0||ve.has(o)||ke.test(o))throw new Error(`dsh-code-runtime-worker-thread: binding error member property ${JSON.stringify(i.memberNameProperty)} is not usable`);r.add(i.name)}return t}execute(e,t,r){const n={code:t,namespaces:[...r].map(([o,a])=>({global:o,names:Object.keys(a.functions),...a.errorClass?{errorClass:a.errorClass}:{}})),maxOutputBytes:this.config.maxOutputBytes},i=new he(qe,{workerData:n,env:{},execArgv:[],resourceLimits:{maxOldGenerationSizeMb:this.config.maxOldGenerationSizeMb},stdout:!0,stderr:!0});return new Promise(o=>{let a=!1;const l=new Set,d=[],u=[],c=new ce(this.config.maxOutputBytes);let h;const m=s(f=>{if(h!==void 0)return;const g=f.toString("utf8");if(!c.admit(g,u)){const y=c.limit([...d,...u,g]);h=y,p(y)}},"captureStray");i.stdout.on("data",m),i.stderr.on("data",m);let I;const le=new Promise(f=>{I=f}),p=s(f=>{a||(a=!0,clearInterval(de),clearTimeout(ge),e.signal?.removeEventListener("abort",M),this.live.delete(D),new Promise(g=>{setImmediate(g)}).then(async()=>{const g=se(i.stdout),y=se(i.stderr);await Promise.all([i.terminate(),g,y]);const j=h??(typeof f=="function"?f():f);I(),o(j)}))},"finish"),ue=s(f=>{if(f.type!=="done")return;if(f.error){const y=f.error;p(()=>c.failure([...d,...u],y));return}if(f.value===void 0){p(()=>c.success([...d,...u]));return}const g=ne(f.value);p(g===void 0?()=>c.failure([...d,...u],{kind:"invalid-output",message:"program completion must be lossless JSON"}):()=>c.success([...d,...u],g))},"onDone"),fe=s(f=>{if(f.type!=="call"||a||l.has(f.id))return;l.add(f.id);const g=s(w=>{a||i.postMessage(w)},"reply"),y=r.get(f.global)?.functions,j=y&&Object.hasOwn(y,f.name)?y[f.name]:void 0;if(typeof j!="function"){g({type:"reply",id:f.id,ok:!1,message:`unknown binding ${JSON.stringify(`${f.global}.${f.name}`)}`});return}const _=ne(f.args);if(_===void 0){g({type:"reply",id:f.id,ok:!1,message:"binding arguments must be lossless JSON"});return}(async()=>{try{const w=await j(_);let E;try{E=we(w)}catch{E=void 0}g(E===void 0?{type:"reply",id:f.id,ok:!1,message:"binding resolution must be lossless JSON"}:{type:"reply",id:f.id,ok:!0,value:Ze(E)})}catch(w){g({type:"reply",id:f.id,ok:!1,message:oe(w)})}})()},"onCall");i.on("message",f=>{const g=et(f);if(g){if(g.type==="log"&&!a&&!c.admit(g.text,d)){const y=c.limit([...d,...u,g.text]);p(y);return}if(g.type==="output-limit"&&!a){const y=c.limit([...d,...u]);p(y);return}fe(g),ue(g)}}),i.on("error",f=>{p(()=>c.failure([...d,...u],{kind:"worker-exit",message:`worker error: ${f.message}`}))}),i.on("exit",f=>{p(()=>c.failure([...d,...u],{kind:"worker-exit",message:`worker exited with code ${f} before completing`}))});const de=setInterval(()=>{i.performance.eventLoopUtilization().active>this.config.computeMs&&p(()=>c.failure([...d,...u],{kind:"timeout",message:`compute budget exhausted (${this.config.computeMs}ms busy)`}))},Qe),ge=setTimeout(()=>{p(()=>c.failure([...d,...u],{kind:"timeout",message:`wall-clock ceiling reached (${this.config.maxWallMs}ms)`}))},this.config.maxWallMs),M=s(()=>{p(()=>c.failure([...d,...u],{kind:"abort",message:String(e.signal?.reason)}))},"onAbort");e.signal?.addEventListener("abort",M,{once:!0});const D={worker:i,finished:le,settle:s(f=>{p(()=>c.failure([...d,...u],f))},"settle")};this.live.add(D)})}};export{ae as WorkerThreadCodeRuntime,ae as default};
|
|
@@ -45,7 +45,8 @@ function takeLast$1(target) {
|
|
|
45
45
|
}
|
|
46
46
|
/** One code-point-aligned character from a string. */
|
|
47
47
|
function characterAt(text, index) {
|
|
48
|
-
|
|
48
|
+
const width = intrinsicReflectApply$1(intrinsicStringCodePointAt, text, [index]) > 65535 ? 2 : 1;
|
|
49
|
+
return intrinsicReflectApply$1(intrinsicStringSlice, text, [index, index + width]);
|
|
49
50
|
}
|
|
50
51
|
/** Serialized bytes contributed by one complete Unicode code point inside JSON quotes. */
|
|
51
52
|
function serializedCharacterBytes(character) {
|
|
@@ -835,7 +836,8 @@ function makeNamespaces(data, port, pending, nextId, errorClasses = makeBindingE
|
|
|
835
836
|
});
|
|
836
837
|
} catch (error) {
|
|
837
838
|
pending.delete(id);
|
|
838
|
-
|
|
839
|
+
const message = `binding arguments must be structured-cloneable: ${error instanceof CapturedError ? error.message : String(error)}`;
|
|
840
|
+
reject(bindingFailure(errorClass, name, message));
|
|
839
841
|
}
|
|
840
842
|
});
|
|
841
843
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-code-runtime-worker-thread","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-code-runtime-worker-thread","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./worker":{"types":"./lib/types/worker.d.ts","default":"./lib/worker.cjs"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-code-runtime":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/dsh-timeout":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-command-compact","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-command-compact","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-commands":"^0.0.12","@deepseek-ai/dsh-compaction":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-command-feedback","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-command-feedback","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/dsh-anonymous-user-id":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-commands":"^0.0.12","@deepseek-ai/dsh-session-telemetry":"^0.0.12"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-command-goal","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-command-goal","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-commands":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-goal":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-commands","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-commands","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./brand":{"types":"./lib/types/brand.d.ts","default":"./lib/types/brand.js"},"./typert":{"types":"./lib/typert.host.d.ts","default":"./lib/typert.host.js"},"./remote":{"types":"./lib/typert.remote-client.d.ts","default":"./lib/typert.remote-client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.12","@deepseek-ai/dsh-scope":"^0.0.12","@deepseek-ai/dsh-typert-protocol":"^0.0.12","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-brand":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12"},"dependencies":{"zod":"^4.4.3"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-compaction","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-compaction","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./checkpoint":{"types":"./lib/types/checkpoint.d.ts","default":"./lib/types/checkpoint.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.12","@deepseek-ai/dsh-llm":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/dsh-commands":"^0.0.12"}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var re=Object.defineProperty;var a=(e,t)=>re(e,"name",{value:t,configurable:!0});import p from"@deepseek-ai/schemastery";import{CompactionEngine as ne,CompactionId as se,ManualCompactionError as v,compactCheckpointSource as ie,toolPairingBalancedAfter as ae,toolPairingBalancedBefore as M}from"@deepseek-ai/dsh-compaction";import{BlockAssembler as ce,CONTEXT_WINDOW_EXCEEDED_CODE as me,LlmError as de,assertNever as ue,contentHasImage as le,createUserMessage as A,deepFreeze as S,errorChain as he}from"@deepseek-ai/dsh-llm";import{randomUUID as pe}from"node:crypto";import{isDeepStrictEqual as E}from"node:util";const fe=.8,we=.16,N=["thresholdRatio","retainRatio","retainTokens","summarizationProvider","summarizationModel","maxTokens","compactionRetries","maxOverflowRetries"],ve=new Set([...N,"modelPolicies","auto"]),ge=new Set(["provider","model",...N]);var b=class extends Error{static{a(this,"TargetPressureConfigError")}targetKey;constructor(e,t){super(t),this.targetKey=e}};function ye(e={}){if(D(e,ve,"BasicCompactionConfig"),B(e,"BasicCompactionConfig"),e.auto!==void 0&&typeof e.auto!="boolean")throw new Error("BasicCompactionConfig: auto must be a boolean");const t=e.thresholdRatio??fe,o=I(e,{retainRatio:we});_(t,o,"BasicCompactionConfig");const r=Re(e.modelPolicies);for(const[s,n]of r.entries())_(n.thresholdRatio??t,I(n,o),`BasicCompactionConfig: modelPolicies[${s}]`);return S({thresholdRatio:t,...o,summarizationProvider:e.summarizationProvider??"",summarizationModel:e.summarizationModel??"",maxTokens:e.maxTokens??8192,compactionRetries:e.compactionRetries??1,maxOverflowRetries:e.maxOverflowRetries??1,modelPolicies:r,auto:e.auto??!0})}a(ye,"resolveConfig");function $(e,t){const o=e.modelPolicies.find(s=>s.provider===t.provider&&s.model===t.model),r=e.retainTokens===void 0?{retainRatio:e.retainRatio}:{retainTokens:e.retainTokens};return S({target:{provider:t.provider,model:t.model},thresholdRatio:o?.thresholdRatio??e.thresholdRatio,...I(o??{},r),summarizationProvider:o?.summarizationProvider??e.summarizationProvider,summarizationModel:o?.summarizationModel??e.summarizationModel,maxTokens:o?.maxTokens??e.maxTokens,compactionRetries:o?.compactionRetries??e.compactionRetries,maxOverflowRetries:o?.maxOverflowRetries??e.maxOverflowRetries})}a($,"resolveTargetPolicy");function ke(e,t){const o=`${e.target.provider}/${e.target.model}`;if(!Number.isInteger(t)||t<=0)throw new b(o,`BasicCompactionConfig: contextWindow (${t}) must be a positive integer`);const r=Math.floor(t*e.thresholdRatio),s=e.retainTokens===void 0?Math.floor(t*e.retainRatio):e.retainTokens;if(s>=r)throw new b(o,`BasicCompactionConfig: ${e.target.provider}/${e.target.model} retainTokens (${s}) must be less than threshold tokens ${r}`);return S({target:{...e.target},contextWindow:t,thresholdRatio:e.thresholdRatio,thresholdTokens:r,retainTokens:s,summarizationProvider:e.summarizationProvider,summarizationModel:e.summarizationModel,maxTokens:e.maxTokens,compactionRetries:e.compactionRetries,maxOverflowRetries:e.maxOverflowRetries})}a(ke,"resolveCompactSpec");function I(e,t){return e.retainTokens!==void 0?{retainTokens:e.retainTokens}:e.retainRatio!==void 0?{retainRatio:e.retainRatio}:t}a(I,"resolveRetention");function _(e,t,o){if(t.retainRatio!==void 0&&t.retainRatio>=e)throw new Error(`${o}: retainRatio (${t.retainRatio}) must be less than the resolved thresholdRatio (${e})`)}a(_,"validateRatioRetention");function Re(e){if(e===void 0)return[];if(!Array.isArray(e))throw new Error("BasicCompactionConfig: modelPolicies must be an array");const t=new Set;return e.map((o,r)=>{be(o,`BasicCompactionConfig: modelPolicies[${r}]`);const s=`${o.provider}\0${o.model}`;if(t.has(s))throw new Error(`BasicCompactionConfig: duplicate model policy for ${o.provider}/${o.model}`);return t.add(s),{...o}})}a(Re,"resolveModelPolicies");function be(e,t){if(!Te(e))throw new Error(`${t} must be an object`);D(e,ge,t),K(`${t}.provider`,e.provider),K(`${t}.model`,e.model),B(e,t)}a(be,"assertModelPolicy");function B(e,t){const o=e.thresholdRatio,r=e.retainRatio,s=e.retainTokens,n=e.maxTokens,i=e.compactionRetries,c=e.maxOverflowRetries;if(o!==void 0&&U(`${t}.thresholdRatio`,o),r!==void 0&&U(`${t}.retainRatio`,r),s!==void 0&&O(`${t}.retainTokens`,s),r!==void 0&&s!==void 0)throw new Error(`${t}: retainRatio and retainTokens are mutually exclusive`);n!==void 0&&xe(`${t}.maxTokens`,n),i!==void 0&&O(`${t}.compactionRetries`,i),c!==void 0&&O(`${t}.maxOverflowRetries`,c),Ce(e,t)}a(B,"validatePolicy");function Ce(e,t){const o=e.summarizationProvider,r=e.summarizationModel;if(o!==void 0&&typeof o!="string")throw new Error(`${t}.summarizationProvider must be a string`);if(r!==void 0&&typeof r!="string")throw new Error(`${t}.summarizationModel must be a string`);if(!(o===void 0&&r===void 0)&&(o===void 0||r===void 0||o.length===0!=(r.length===0)))throw new Error(`${t}: summarizationProvider and summarizationModel must be set together as an empty or non-empty pair`)}a(Ce,"validateSummarizationPair");function D(e,t,o){for(const r of Object.keys(e))if(!t.has(r))throw new Error(`${o}: unknown key "${r}"`)}a(D,"validateKeys");function Te(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Te,"isUnknownRecord");function K(e,t){if(typeof t!="string"||t.length===0)throw new Error(`${e} must be a non-empty string`)}a(K,"assertNonEmptyString");function xe(e,t){if(typeof t!="number"||!Number.isInteger(t)||t<=0)throw new Error(`${e} (${String(t)}) must be a positive integer`)}a(xe,"assertPositiveInteger");function O(e,t){if(typeof t!="number"||!Number.isInteger(t)||t<0)throw new Error(`${e} (${String(t)}) must be a non-negative integer`)}a(O,"assertNonNegativeInteger");function U(e,t){if(typeof t!="number"||!Number.isFinite(t)||t<=0||t>1)throw new Error(`${e} (${String(t)}) must be a number in (0, 1]`)}a(U,"assertRatio");const F="<compacted-summary>",Se="</compacted-summary>",Ee=["You are now acting as a compaction engine for this AI coding assistant. Condense the conversation ABOVE into a structured checkpoint that lets another model resume the work with no loss of essential context.","",'Output EXACTLY the Markdown structure below: keep every section, in order. Use terse bullets, not prose paragraphs. Write "(none)" for an empty section — never drop a section.',"","## Primary Request and Intent","- [the user's original and evolving goals; quote verbatim where the exact wording matters]","","## Key Technical Concepts","- [technologies, frameworks, patterns, and conventions in play]","","## Files and Code","- [exact path: why it matters, key changes or snippets]","","## Errors and Fixes","- [error: how it was resolved, plus any related user feedback]","","## Pending Jobs","- [explicitly requested work not yet completed]","","## Current Work","- [precisely what was in progress at this checkpoint]","","## Next Step",'- [the single next action, directly in line with the most recent request, or "(none)"]',"","## Critical Context","- [decisions and their rationale, constraints, user preferences, open questions, data needed to continue]","","Rules:","- Write concise English engineering prose. Preserve exact file paths, commands, error strings, identifiers, numeric values, function signatures, and syntax fragments.","- Capture user feedback and explicit instructions faithfully, especially corrections.","- Do NOT mention this summarization request or that the context was compacted.","- Output only the checkpoint text: do not call any tool or take any other action.",`- If the conversation already contains a ${F} block, it is a PRIOR checkpoint. Do not copy it forward verbatim: preserve still-true facts, drop stale ones, and merge newer information into a single consolidated summary under the same structure.`].join(`
|
|
2
2
|
`),$e="This is an automatically generated checkpoint condensing an earlier span of the conversation to free up context. Treat the captured context as established background and build on it without restating it. Continue the task directly from the messages that follow, without acknowledging this checkpoint.";async function Ie(e,t,o,r,s){const n=r.session.requestHeader()?.config,i=t.summarizationProvider.length===0?void 0:{provider:t.summarizationProvider,model:t.summarizationModel},c=r.options.provider!==void 0&&r.options.provider.length>0&&r.options.model!==void 0&&r.options.model.length>0?{provider:r.options.provider,model:r.options.model}:void 0,m=i??n??c;if(m===void 0)throw new Error("no provider/model available for summarization: set both BasicCompactionConfig summarization fields, route one request, or set both AgentOptions fields");const l=new ce,d=[...o.messages,A({content:[{type:"text",text:Ee}],source:{kind:"plugin",plugin:"dsh-compaction-basic"}})],u={provider:m.provider,model:m.model,messages:d,...o.system===void 0?{}:{system:o.system},...o.tools===void 0?{}:{tools:[...o.tools]},maxTokens:t.maxTokens,sessionId:r.session.id,purpose:"compaction",...s===void 0?{}:{signal:s}};for await(const g of e.llm.stream(u))l.push(g);const h=Pe(l.finish);if(h!==void 0)throw h;const w=l.blocks(),f=qe(w);if(!f.some(g=>g.text.trim().length>0))throw new Error("summarization produced no text summary content");return{summary:f,rawOutput:w,llmStreamCall:!0,provider:u.provider,model:u.model,maxTokens:t.maxTokens,...l.usage===void 0?{}:{usage:l.usage}}}a(Ie,"summarizeWithLlm");function Oe(e){return[{type:"text",text:`${$e}
|
|
3
3
|
|
|
4
|
-
${F}`},...e,{type:"text",text:Se}]}a(Oe,"frameSummary");function Pe(e){switch(e.kind){case"error":case"aborted":{const t=new Error(e.failure.message);return t.code=e.failure.code,t}case"max-tokens":{const t=new Error("summarization truncated at the token cap (incomplete checkpoint)");return t.code="MAX_TOKENS",t}default:return}}a(Pe,"finishError");function qe(e){if(le(e))throw new de("compaction summary cannot contain image output","UNSUPPORTED_CONTENT");return e.filter(t=>t.type==="text")}a(qe,"summaryText");var k=class extends Error{static{a(this,"SurfaceChangedError")}};function P(e,t,o){const r=t.nodes;if(r.length===0)return null;const s=e.surface.nodes;if(s.length!==r.length||s.some((c,m)=>c!==r[m]?.seq))throw new Error("compaction: token-meter surface does not match the current session surface");let n=0,i=r.length;for(let c=r.length-1;c>=0&&(n+=r[c].tokens,i=c,!(n>=o));c-=1);if(i===0)return null;for(;i>0&&!M(e,s[i]);)i-=1;return i===0?null:{start:s[0],end:s[i-1]}}a(P,"selectCompactableRange");async function L(e,t,o,r,s,n,i){n.owner===null&&i?.throwIfAborted();const c=j(t,o,r),m=G(t.events);Y(m.unmatchedCompactionStart,m.latestEndSeedSeq,"compaction");let l;if(n.owner===null){if(m.openTurn!==null)throw new v("busy","manual compaction: the session already has an open turn");l=null}else{if(m.openTurn===null)throw new Error("compactRegion: no open turn — automatic compaction events must be enclosed in a turn");l=m.openTurn}const d=se(pe()),u={compactionId:d,...n.sourceCommandId===void 0?{}:{sourceCommandId:n.sourceCommandId},turn:l},h=t.append("compaction/start",u),w=n.stability==="whole-surface"?_e:Be;let f,g,C,T=!1,R=!1,z="summary";try{const y=await Ne(e,Ae(e,t,c),s,d,n.sourceCommandId,i);n.owner===null&&i?.throwIfAborted(),w(e,t,y),z="commit";const x=De(t,h,y);R=!0;const oe=t.append("compaction/end",u);T=!0,C=Ke(x,oe)}catch(y){if(f={error:y,stage:R?"commit":z},!R){R=!0;try{t.append("compaction/end",{...u,error:he(y)}),T=!0}catch(x){f={error:x,stage:"commit"}}}}if(T&&n.flush!==void 0)try{await n.flush()}catch(y){g=y}if(n.owner===null&&i?.throwIfAborted(),f!==void 0)throw n.owner===null&&ze(f),f.error;if(g!==void 0)throw new v("persistence","manual compaction durability checkpoint failed",{cause:g});if(C===void 0)throw new Error("compaction committed without a result");return C}a(L,"compactSurfaceRegion");function ze(e){throw e.stage==="commit"?new v("commit","manual compaction did not commit cleanly",{cause:e.error}):e.error instanceof k?new v("changed","the compacted history changed during manual compaction",{cause:e.error}):new v("summary","manual compaction could not produce a smaller summary",{cause:e.error})}a(ze,"throwManualFailure");function Y(e,t,o){if(!(e===void 0||t!==void 0&&t>e.seq))throw new v("busy",`${o}: compaction already in progress; the session compaction lock is already active`)}a(Y,"assertCompactionInactive");function Me(e,t){const o=G(e.events);Y(o.unmatchedCompactionStart,o.latestEndSeedSeq,t)}a(Me,"assertNoActiveCompaction");function j(e,t,o){const r=e.surface.nodes,s=r.indexOf(t),n=r.indexOf(o);if(s===-1)throw new Error(`compactRegion: start seq ${t} not found in surface`);if(n===-1)throw new Error(`compactRegion: end seq ${o} not found in surface`);if(s>n)throw new Error(`compactRegion: start seq ${t} (position ${s}) is after end seq ${o} (position ${n}) on the surface`);if(!M(e,r[s]))throw new Error(`compactRegion: start seq ${t} is not a balanced boundary (would split a step's tool-call/result pair)`);if(!ae(e,r[n]))throw new Error(`compactRegion: end seq ${o} is not a balanced boundary (would split a step, or the step is still open)`);return{start:t,end:o,startIdx:s,endIdx:n,shadowedSeqs:r.slice(s,n+1)}}a(j,"validateSurfaceRegion");function Ae(e,t,o){const r=e.meter.measure(t),s=r.nodes.slice(o.startIdx,o.endIdx+1);if(s.length!==o.shadowedSeqs.length||s.some((n,i)=>n.seq!==o.shadowedSeqs[i]))throw new k("compaction: selected surface changed before summarization began");return{...o,measurement:r,selectedNodes:s,shadowedTokenCount:s.reduce((n,i)=>n+i.tokens,0),input:Ue(t,o.shadowedSeqs)}}a(Ae,"prepareCompaction");async function Ne(e,t,o,r,s,n){const i=await e.summarize(t.input,o,n),c=A({content:Oe(i.summary),source:ie(r,s)}),m=e.meter.estimateMessage(c);if(m>=t.shadowedTokenCount)throw new Error(`summary is not smaller than the shadowed content (${m} estimated framed tokens >= ${t.shadowedTokenCount})`);return{...t,...i,checkpointMessage:c}}a(Ne,"summarizeCompaction");function _e(e,t,o){if(!E(e.meter.measure(t).nodes,o.measurement.nodes))throw new k("compaction: session surface changed during summarization")}a(_e,"assertWholeSurfaceUnchanged");function Be(e,t,o){let r;try{r=j(t,o.start,o.end)}catch(s){throw new k("compaction: the selected span is no longer a valid replacement target",{cause:s})}if(!E([...r.shadowedSeqs],[...o.shadowedSeqs]))throw new k("compaction: the selected span changed during summarization");if(!E(e.meter.measure(t).nodes.slice(r.startIdx,r.endIdx+1),o.selectedNodes))throw new k("compaction: the selected span was rewritten during summarization")}a(Be,"assertSelectedSpanStable");function De(e,t,o){const{start:r,end:s,shadowedSeqs:n,shadowedTokenCount:i,summary:c,provider:m,model:l,maxTokens:d,usage:u,checkpointMessage:h}=o,w=o.llmStreamCall===!0?{rawOutput:o.rawOutput,llmStreamCall:!0}:o.rawOutput===void 0?{}:{rawOutput:o.rawOutput},f=e.append("compaction/summary",{compactionId:t.data.compactionId,...t.data.sourceCommandId===void 0?{}:{sourceCommandId:t.data.sourceCommandId},summary:c,...w,shadowedRange:{start:r,end:s},shadowedSeqs:[...n],shadowedTokenCount:i,provider:m,model:l,...d===void 0?{}:{maxTokens:d},...u===void 0?{}:{usage:u}});return e.append("user/message",h,{surfaceOp:{op:"replace",start:r,end:s},sourceEventSeqs:[t.seq,f.seq,...n]}),{compactionId:t.data.compactionId,...t.data.sourceCommandId===void 0?{}:{sourceCommandId:t.data.sourceCommandId},startSeq:t.seq,summarySeq:f.seq,summary:c,shadowedRange:{start:r,end:s},shadowedSeqs:[...n],shadowedTokenCount:i}}a(De,"commitCompactionBody");function Ke(e,t){return{...e,endSeq:t.seq}}a(Ke,"completeCompaction");function Ue(e,t){const o=e.requestHeader(),r=e.events,s=t.map(n=>e.deriveEventMessage(r[n])).filter(n=>n!==null);return{...o?.system===void 0?{}:{system:o.system},...o?.tools===void 0?{}:{tools:o.tools},messages:s}}a(Ue,"buildSummarizationInput");function G(e){let t=null,o=!1,r,s=!1,n;for(let i=e.length-1;i>=0;i-=1){const c=e[i];if(n===void 0&&c.type==="session/end-seed"&&(n=c.seq),s||(c.type==="compaction/start"?(r=c,s=!0):c.type==="compaction/end"&&(s=!0)),o||(c.type==="turn/start"?(t=c.data.turn,o=!0):c.type==="turn/end"&&(o=!0)),o&&s&&n!==void 0)break}return{openTurn:t,unmatchedCompactionStart:r,latestEndSeedSeq:n}}a(G,"inspectCompactionEntryState");function q(e){const t=e.requestHeader()?.config;if(!(t===void 0||t.provider.length===0||t.model.length===0))return{provider:t.provider,model:t.model}}a(q,"routedTarget");function Fe(e){const t=q(e.session);if(t!==void 0)return t;if(!(e.options.provider===void 0||e.options.provider.length===0||e.options.model===void 0||e.options.model.length===0))return{provider:e.options.provider,model:e.options.model}}a(Fe,"conversationTarget");const H=p.number(),W=p.number(),X=p.number().step(1).min(0),J=p.string(),V=p.string(),Q=p.number().step(1).min(1),Z=p.number().step(1).min(0),ee=p.number().step(1).min(0),Le=p.object({provider:p.string().required(),model:p.string().required(),thresholdRatio:H,retainRatio:W,retainTokens:X,summarizationProvider:J,summarizationModel:V,maxTokens:Q,compactionRetries:Z,maxOverflowRetries:ee});var te=class extends ne{static{a(this,"BasicCompactionEngine")}static inject=["llm","tokenMeter","sessions"];static Config=p.object({thresholdRatio:H,retainRatio:W,retainTokens:X,summarizationProvider:J,summarizationModel:V,maxTokens:Q,compactionRetries:Z,maxOverflowRetries:ee,modelPolicies:p.array(Le),auto:p.boolean()});config;warnedPressureConfigTargets=new Set;overflowRetries=new WeakMap;overflowAgents=new WeakMap;constructor(e,t={}){super(e),this.config=ye(t),this.config.auto&&this._registerAutomaticCompaction()}_registerAutomaticCompaction(){const{ctx:e}=this,t=a((o,r)=>{e.logger.info(`compaction (${r}): shadowed ${o.shadowedSeqs.length} surface nodes (seqs ${o.shadowedRange.start}-${o.shadowedRange.end}, ~${o.shadowedTokenCount} tokens)`)},"logResult");e.on("agent/pre-step",async({agent:o,signal:r},s)=>{if(!r.aborted)try{const n=await this.compactIfNeeded(o,"pressure",r);n!==null&&t(n,"step pressure")}catch(n){if(n instanceof b){if(this.warnedPressureConfigTargets.has(n.targetKey))return s();this.warnedPressureConfigTargets.add(n.targetKey)}const i=n instanceof Error?n.message:String(n);e.logger.warn(`step compaction failed: ${i}; continuing the turn`)}return s()}),e.on("agent/status",({agent:o,status:r})=>{r==="idle"&&this.overflowRetries.delete(o)}),e.on("session/event",(o,r)=>{if(r.type!=="assistant/message")return;const s=this.overflowAgents.get(o);s!==void 0&&this.overflowRetries.delete(s)}),e.on("agent/request-error",async({agent:o,failure:r,signal:s},n)=>{if(r.code!==me||s.aborted)return n();this.overflowAgents.set(o.session,o);const i=q(o.session);if(i===void 0)return n();const c=$(this.config,i),m=this.overflowRetries.get(o)??0;if(m>=c.maxOverflowRetries)return n();const l=o.session.surface.replaceGeneration;let d;try{d=await this.compactIfNeeded(o,"context-overflow",s)}catch(u){const h=u instanceof Error?u.message:String(u);return!s.aborted&&o.session.surface.replaceGeneration>l?(e.logger.warn(`context-overflow compaction failed after durable surface progress: ${h}; retrying from the replacement surface`),this.overflowRetries.set(o,m+1),{kind:"retry"}):(e.logger.warn(`context-overflow compaction failed: ${h}; ${s.aborted?"cancellation prevents retry":"preserving the original request error"}`),n())}return s.aborted||o.session.surface.replaceGeneration<=l?n():(d!==null&&t(d,"context overflow recovery"),this.overflowRetries.set(o,m+1),{kind:"retry"})})}async summarize(e,t,o){const r=Fe(t),s=r===void 0?this.config:$(this.config,r);return Ie(this.ctx,s,e,t,o)}async compactIfNeeded(e,t,o){const r=q(e.session);if(r===void 0)return null;const s=$(this.config,r),n=this.ctx.tokenMeter;let i=n.measure(e.session);switch(t){case"context-overflow":break;case"pressure":break;default:ue(t,"compaction trigger")}const c=this.ctx.get("toolResultPruner");if(t==="context-overflow"){c!==void 0&&(c.pruneSession(e.session),i=n.measure(e.session));const h=P(e.session,i,0);return h===null?null:this.compactRegion(h.start,h.end,e,o)}const m=(await this.ctx.llm.resolveModelInfo(r.provider,r.model,o)).context;Me(e.session,"automatic pressure compaction");const l=`${r.provider}/${r.model}`;if(m===void 0)throw new b(l,`compaction-basic: no context capacity for ${l}; configure contextWindow on that adapter model`);const d=ke(s,m.contextWindow);if(i.totalTokens<d.thresholdTokens||(c!==void 0&&(c.pruneSession(e.session),i=n.measure(e.session)),i.totalTokens<d.thresholdTokens))return null;let u=null;for(let h=0;h<=d.compactionRetries;h+=1){const w=P(e.session,i,d.retainTokens);if(w===null){if(u===null)return null;break}if(u=await this.compactRegion(w.start,w.end,e,o),i=n.measure(e.session),i.totalTokens<d.thresholdTokens)return u}throw new Error(`compaction still above threshold after ${d.compactionRetries+1} compaction attempts (${i.totalTokens} estimated tokens >= threshold ${d.thresholdTokens})`)}async compactRegion(e,t,o,r){return L(this.regionDependencies(),o.session,e,t,o,{owner:"current-turn",stability:"whole-surface"},r)}compactNow(e,t,o){t.throwIfAborted();try{return e.runMaintenance(async r=>{const s=AbortSignal.any([r,t]);try{s.throwIfAborted();const n=P(e.session,this.ctx.tokenMeter.measure(e.session),0);return n===null?null:await L(this.regionDependencies(),e.session,n.start,n.end,e,{owner:null,stability:"selected-span",...o===void 0?{}:{sourceCommandId:o},flush:a(async()=>{await this.ctx.sessions.flush(e.session)},"flush")},s)}catch(n){throw r.aborted&&s.reason===r.reason?new v("cancelled","manual compaction was cancelled",{cause:n}):(s.throwIfAborted(),n)}})}catch(r){throw new v("busy","manual compaction requires an idle agent with no waking queued work",{cause:r})}}regionDependencies(){return{meter:this.ctx.tokenMeter,summarize:a((e,t,o)=>this.summarize(e,t,o),"summarize")}}};export{te as BasicCompactionEngine,te as default};
|
|
4
|
+
${F}`},...e,{type:"text",text:Se}]}a(Oe,"frameSummary");function Pe(e){switch(e.kind){case"error":case"aborted":{const t=new Error(e.failure.message);return t.code=e.failure.code,t}case"max-tokens":{const t=new Error("summarization truncated at the token cap (incomplete checkpoint)");return t.code="MAX_TOKENS",t}default:return}}a(Pe,"finishError");function qe(e){if(le(e))throw new de("compaction summary cannot contain image output","UNSUPPORTED_CONTENT");return e.filter(t=>t.type==="text")}a(qe,"summaryText");var k=class extends Error{static{a(this,"SurfaceChangedError")}};function P(e,t,o){const r=t.nodes;if(r.length===0)return null;const s=e.surface.nodes;if(s.length!==r.length||s.some((c,m)=>c!==r[m]?.seq))throw new Error("compaction: token-meter surface does not match the current session surface");let n=0,i=r.length;for(let c=r.length-1;c>=0&&(n+=r[c].tokens,i=c,!(n>=o));c-=1);if(i===0)return null;for(;i>0&&!M(e,s[i]);)i-=1;return i===0?null:{start:s[0],end:s[i-1]}}a(P,"selectCompactableRange");async function L(e,t,o,r,s,n,i){n.owner===null&&i?.throwIfAborted();const c=j(t,o,r),m=G(t.events);Y(m.unmatchedCompactionStart,m.latestEndSeedSeq,"compaction");let l;if(n.owner===null){if(m.openTurn!==null)throw new v("busy","manual compaction: the session already has an open turn");l=null}else{if(m.openTurn===null)throw new Error("compactRegion: no open turn — automatic compaction events must be enclosed in a turn");l=m.openTurn}const d=se(pe()),u={compactionId:d,...n.sourceCommandId===void 0?{}:{sourceCommandId:n.sourceCommandId},turn:l},h=t.append("compaction/start",u),w=n.stability==="whole-surface"?_e:Be;let f,g,C,T=!1,R=!1,z="summary";try{const y=await Ne(e,Ae(e,t,c),s,d,n.sourceCommandId,i);n.owner===null&&i?.throwIfAborted(),w(e,t,y),z="commit";const x=De(t,h,y);R=!0;const oe=t.append("compaction/end",u);T=!0,C=Ke(x,oe)}catch(y){if(f={error:y,stage:R?"commit":z},!R){R=!0;try{t.append("compaction/end",{...u,error:he(y)}),T=!0}catch(x){f={error:x,stage:"commit"}}}}if(T&&n.flush!==void 0)try{await n.flush()}catch(y){g=y}if(n.owner===null&&i?.throwIfAborted(),f!==void 0)throw n.owner===null&&ze(f),f.error;if(g!==void 0)throw new v("persistence","manual compaction durability checkpoint failed",{cause:g});if(C===void 0)throw new Error("compaction committed without a result");return C}a(L,"compactSurfaceRegion");function ze(e){throw e.stage==="commit"?new v("commit","manual compaction did not commit cleanly",{cause:e.error}):e.error instanceof k?new v("changed","the compacted history changed during manual compaction",{cause:e.error}):new v("summary","manual compaction could not produce a smaller summary",{cause:e.error})}a(ze,"throwManualFailure");function Y(e,t,o){if(!(e===void 0||t!==void 0&&t>e.seq))throw new v("busy",`${o}: compaction already in progress; the session compaction lock is already active`)}a(Y,"assertCompactionInactive");function Me(e,t){const o=G(e.events);Y(o.unmatchedCompactionStart,o.latestEndSeedSeq,t)}a(Me,"assertNoActiveCompaction");function j(e,t,o){const r=e.surface.nodes,s=r.indexOf(t),n=r.indexOf(o);if(s===-1)throw new Error(`compactRegion: start seq ${t} not found in surface`);if(n===-1)throw new Error(`compactRegion: end seq ${o} not found in surface`);if(s>n)throw new Error(`compactRegion: start seq ${t} (position ${s}) is after end seq ${o} (position ${n}) on the surface`);if(!M(e,r[s]))throw new Error(`compactRegion: start seq ${t} is not a balanced boundary (would split a step's tool-call/result pair)`);if(!ae(e,r[n]))throw new Error(`compactRegion: end seq ${o} is not a balanced boundary (would split a step, or the step is still open)`);return{start:t,end:o,startIdx:s,endIdx:n,shadowedSeqs:r.slice(s,n+1)}}a(j,"validateSurfaceRegion");function Ae(e,t,o){const r=e.meter.measure(t),s=r.nodes.slice(o.startIdx,o.endIdx+1);if(s.length!==o.shadowedSeqs.length||s.some((n,i)=>n.seq!==o.shadowedSeqs[i]))throw new k("compaction: selected surface changed before summarization began");return{...o,measurement:r,selectedNodes:s,shadowedTokenCount:s.reduce((n,i)=>n+i.tokens,0),input:Ue(t,o.shadowedSeqs)}}a(Ae,"prepareCompaction");async function Ne(e,t,o,r,s,n){const i=await e.summarize(t.input,o,n),c=A({content:Oe(i.summary),source:ie(r,s)}),m=e.meter.estimateMessage(c);if(m>=t.shadowedTokenCount)throw new Error(`summary is not smaller than the shadowed content (${m} estimated framed tokens >= ${t.shadowedTokenCount})`);return{...t,...i,checkpointMessage:c}}a(Ne,"summarizeCompaction");function _e(e,t,o){const r=e.meter.measure(t);if(!E(r.nodes,o.measurement.nodes))throw new k("compaction: session surface changed during summarization")}a(_e,"assertWholeSurfaceUnchanged");function Be(e,t,o){let r;try{r=j(t,o.start,o.end)}catch(n){throw new k("compaction: the selected span is no longer a valid replacement target",{cause:n})}if(!E([...r.shadowedSeqs],[...o.shadowedSeqs]))throw new k("compaction: the selected span changed during summarization");const s=e.meter.measure(t).nodes.slice(r.startIdx,r.endIdx+1);if(!E(s,o.selectedNodes))throw new k("compaction: the selected span was rewritten during summarization")}a(Be,"assertSelectedSpanStable");function De(e,t,o){const{start:r,end:s,shadowedSeqs:n,shadowedTokenCount:i,summary:c,provider:m,model:l,maxTokens:d,usage:u,checkpointMessage:h}=o,w=o.llmStreamCall===!0?{rawOutput:o.rawOutput,llmStreamCall:!0}:o.rawOutput===void 0?{}:{rawOutput:o.rawOutput},f=e.append("compaction/summary",{compactionId:t.data.compactionId,...t.data.sourceCommandId===void 0?{}:{sourceCommandId:t.data.sourceCommandId},summary:c,...w,shadowedRange:{start:r,end:s},shadowedSeqs:[...n],shadowedTokenCount:i,provider:m,model:l,...d===void 0?{}:{maxTokens:d},...u===void 0?{}:{usage:u}});return e.append("user/message",h,{surfaceOp:{op:"replace",start:r,end:s},sourceEventSeqs:[t.seq,f.seq,...n]}),{compactionId:t.data.compactionId,...t.data.sourceCommandId===void 0?{}:{sourceCommandId:t.data.sourceCommandId},startSeq:t.seq,summarySeq:f.seq,summary:c,shadowedRange:{start:r,end:s},shadowedSeqs:[...n],shadowedTokenCount:i}}a(De,"commitCompactionBody");function Ke(e,t){return{...e,endSeq:t.seq}}a(Ke,"completeCompaction");function Ue(e,t){const o=e.requestHeader(),r=e.events,s=t.map(n=>e.deriveEventMessage(r[n])).filter(n=>n!==null);return{...o?.system===void 0?{}:{system:o.system},...o?.tools===void 0?{}:{tools:o.tools},messages:s}}a(Ue,"buildSummarizationInput");function G(e){let t=null,o=!1,r,s=!1,n;for(let i=e.length-1;i>=0;i-=1){const c=e[i];if(n===void 0&&c.type==="session/end-seed"&&(n=c.seq),s||(c.type==="compaction/start"?(r=c,s=!0):c.type==="compaction/end"&&(s=!0)),o||(c.type==="turn/start"?(t=c.data.turn,o=!0):c.type==="turn/end"&&(o=!0)),o&&s&&n!==void 0)break}return{openTurn:t,unmatchedCompactionStart:r,latestEndSeedSeq:n}}a(G,"inspectCompactionEntryState");function q(e){const t=e.requestHeader()?.config;if(!(t===void 0||t.provider.length===0||t.model.length===0))return{provider:t.provider,model:t.model}}a(q,"routedTarget");function Fe(e){const t=q(e.session);if(t!==void 0)return t;if(!(e.options.provider===void 0||e.options.provider.length===0||e.options.model===void 0||e.options.model.length===0))return{provider:e.options.provider,model:e.options.model}}a(Fe,"conversationTarget");const H=p.number(),W=p.number(),X=p.number().step(1).min(0),J=p.string(),V=p.string(),Q=p.number().step(1).min(1),Z=p.number().step(1).min(0),ee=p.number().step(1).min(0),Le=p.object({provider:p.string().required(),model:p.string().required(),thresholdRatio:H,retainRatio:W,retainTokens:X,summarizationProvider:J,summarizationModel:V,maxTokens:Q,compactionRetries:Z,maxOverflowRetries:ee});var te=class extends ne{static{a(this,"BasicCompactionEngine")}static inject=["llm","tokenMeter","sessions"];static Config=p.object({thresholdRatio:H,retainRatio:W,retainTokens:X,summarizationProvider:J,summarizationModel:V,maxTokens:Q,compactionRetries:Z,maxOverflowRetries:ee,modelPolicies:p.array(Le),auto:p.boolean()});config;warnedPressureConfigTargets=new Set;overflowRetries=new WeakMap;overflowAgents=new WeakMap;constructor(e,t={}){super(e),this.config=ye(t),this.config.auto&&this._registerAutomaticCompaction()}_registerAutomaticCompaction(){const{ctx:e}=this,t=a((o,r)=>{e.logger.info(`compaction (${r}): shadowed ${o.shadowedSeqs.length} surface nodes (seqs ${o.shadowedRange.start}-${o.shadowedRange.end}, ~${o.shadowedTokenCount} tokens)`)},"logResult");e.on("agent/pre-step",async({agent:o,signal:r},s)=>{if(!r.aborted)try{const n=await this.compactIfNeeded(o,"pressure",r);n!==null&&t(n,"step pressure")}catch(n){if(n instanceof b){if(this.warnedPressureConfigTargets.has(n.targetKey))return s();this.warnedPressureConfigTargets.add(n.targetKey)}const i=n instanceof Error?n.message:String(n);e.logger.warn(`step compaction failed: ${i}; continuing the turn`)}return s()}),e.on("agent/status",({agent:o,status:r})=>{r==="idle"&&this.overflowRetries.delete(o)}),e.on("session/event",(o,r)=>{if(r.type!=="assistant/message")return;const s=this.overflowAgents.get(o);s!==void 0&&this.overflowRetries.delete(s)}),e.on("agent/request-error",async({agent:o,failure:r,signal:s},n)=>{if(r.code!==me||s.aborted)return n();this.overflowAgents.set(o.session,o);const i=q(o.session);if(i===void 0)return n();const c=$(this.config,i),m=this.overflowRetries.get(o)??0;if(m>=c.maxOverflowRetries)return n();const l=o.session.surface.replaceGeneration;let d;try{d=await this.compactIfNeeded(o,"context-overflow",s)}catch(u){const h=u instanceof Error?u.message:String(u);return!s.aborted&&o.session.surface.replaceGeneration>l?(e.logger.warn(`context-overflow compaction failed after durable surface progress: ${h}; retrying from the replacement surface`),this.overflowRetries.set(o,m+1),{kind:"retry"}):(e.logger.warn(`context-overflow compaction failed: ${h}; ${s.aborted?"cancellation prevents retry":"preserving the original request error"}`),n())}return s.aborted||o.session.surface.replaceGeneration<=l?n():(d!==null&&t(d,"context overflow recovery"),this.overflowRetries.set(o,m+1),{kind:"retry"})})}async summarize(e,t,o){const r=Fe(t),s=r===void 0?this.config:$(this.config,r);return Ie(this.ctx,s,e,t,o)}async compactIfNeeded(e,t,o){const r=q(e.session);if(r===void 0)return null;const s=$(this.config,r),n=this.ctx.tokenMeter;let i=n.measure(e.session);switch(t){case"context-overflow":break;case"pressure":break;default:ue(t,"compaction trigger")}const c=this.ctx.get("toolResultPruner");if(t==="context-overflow"){c!==void 0&&(c.pruneSession(e.session),i=n.measure(e.session));const h=P(e.session,i,0);return h===null?null:this.compactRegion(h.start,h.end,e,o)}const m=(await this.ctx.llm.resolveModelInfo(r.provider,r.model,o)).context;Me(e.session,"automatic pressure compaction");const l=`${r.provider}/${r.model}`;if(m===void 0)throw new b(l,`compaction-basic: no context capacity for ${l}; configure contextWindow on that adapter model`);const d=ke(s,m.contextWindow);if(i.totalTokens<d.thresholdTokens||(c!==void 0&&(c.pruneSession(e.session),i=n.measure(e.session)),i.totalTokens<d.thresholdTokens))return null;let u=null;for(let h=0;h<=d.compactionRetries;h+=1){const w=P(e.session,i,d.retainTokens);if(w===null){if(u===null)return null;break}if(u=await this.compactRegion(w.start,w.end,e,o),i=n.measure(e.session),i.totalTokens<d.thresholdTokens)return u}throw new Error(`compaction still above threshold after ${d.compactionRetries+1} compaction attempts (${i.totalTokens} estimated tokens >= threshold ${d.thresholdTokens})`)}async compactRegion(e,t,o,r){return L(this.regionDependencies(),o.session,e,t,o,{owner:"current-turn",stability:"whole-surface"},r)}compactNow(e,t,o){t.throwIfAborted();try{return e.runMaintenance(async r=>{const s=AbortSignal.any([r,t]);try{s.throwIfAborted();const n=P(e.session,this.ctx.tokenMeter.measure(e.session),0);return n===null?null:await L(this.regionDependencies(),e.session,n.start,n.end,e,{owner:null,stability:"selected-span",...o===void 0?{}:{sourceCommandId:o},flush:a(async()=>{await this.ctx.sessions.flush(e.session)},"flush")},s)}catch(n){throw r.aborted&&s.reason===r.reason?new v("cancelled","manual compaction was cancelled",{cause:n}):(s.throwIfAborted(),n)}})}catch(r){throw new v("busy","manual compaction requires an idle agent with no waking queued work",{cause:r})}}regionDependencies(){return{meter:this.ctx.tokenMeter,summarize:a((e,t,o)=>this.summarize(e,t,o),"summarize")}}};export{te as BasicCompactionEngine,te as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-compaction-basic","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-compaction-basic","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.12","@deepseek-ai/dsh-llm":"^0.0.12","@deepseek-ai/dsh-compaction":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/dsh-commands":"^0.0.12","@deepseek-ai/dsh-token-meter":"^0.0.12","@deepseek-ai/dsh-compaction-tool-result-pruner":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-compaction-tool-result-pruner":{"optional":true}},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-compaction-tool-result-pruner","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-compaction-tool-result-pruner","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-compaction":"^0.0.12","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/dsh-llm":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-token-meter":"^0.0.12"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-content-review","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-content-review","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-qb-auth":"^0.0.12"}}
|