@qqbrowser/qbot-dsh 0.0.15 → 0.1.0
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/config/agent-presets/code/agent.cordis.yml +2 -2
- package/config/agent-presets/standard/agent.cordis.yml +2 -2
- package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +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/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/package.json +1 -1
- 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/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-base/package.json +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 +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +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 +4 -4
- 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 +8 -8
- 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 +3 -3
- 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 +22 -22
- 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 +3 -3
- 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 +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +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 +4 -4
- 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 +14 -14
- 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/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/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/lib/typert.host.js +5 -2
- 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/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 +4 -4
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +10 -4
- 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/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/lib/typert.host.js +5 -2
- 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/package.json +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 +7 -7
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/types/api/rpc.schema.js +1 -1
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/types/api-proxy.js +1 -1
- 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/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/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/lib/types/assembler.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/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 +3 -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/package.json +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/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
- 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/package.json +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/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/package.json +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/lib/index.js +2 -2
- 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/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/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/package.json +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/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
- 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/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +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 +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +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/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/lib/index.js +7 -10
- 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/lib/index.js +5 -2
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +8 -8
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +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/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/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +2 -2
- 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/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +15 -15
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/code-mode.js +8 -8
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/py-types.js +3 -3
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/ts-types.js +4 -4
- 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/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-BQQQ5Qt-.js → index-fPGOmJjK.js} +25 -25
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +1 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +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/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
- package/node_modules/@tanstack/react-virtual/package.json +1 -1
- package/node_modules/@tanstack/virtual-core/dist/cjs/index.cjs +7 -1
- package/node_modules/@tanstack/virtual-core/dist/cjs/utils.cjs +14 -4
- package/node_modules/@tanstack/virtual-core/dist/esm/index.js +1 -1
- package/node_modules/@tanstack/virtual-core/dist/esm/utils.js +2 -2
- package/node_modules/@tanstack/virtual-core/package.json +1 -1
- package/node_modules/hono/dist/cjs/client/utils.js +1 -1
- package/node_modules/hono/dist/cjs/context.js +4 -0
- package/node_modules/hono/dist/cjs/middleware/cors/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/etag/digest.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/etag/index.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
- package/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
- package/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
- package/node_modules/hono/dist/cjs/router/trie-router/node.js +43 -67
- package/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
- package/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
- package/node_modules/hono/dist/client/utils.js +1 -1
- package/node_modules/hono/dist/middleware/cors/index.js +1 -1
- package/node_modules/hono/dist/middleware/csrf/index.js +1 -1
- package/node_modules/hono/dist/middleware/etag/digest.js +1 -1
- package/node_modules/hono/dist/middleware/etag/index.js +1 -1
- package/node_modules/hono/dist/middleware/pretty-json/index.js +1 -1
- package/node_modules/hono/dist/router/linear-router/router.js +1 -1
- package/node_modules/hono/dist/router/pattern-router/router.js +1 -1
- package/node_modules/hono/dist/router/trie-router/node.js +1 -1
- package/node_modules/hono/dist/router/trie-router/router.js +1 -1
- package/node_modules/hono/dist/utils/ipaddr.js +1 -1
- package/node_modules/hono/package.json +1 -1
- package/node_modules/node-pty/lib/conpty_console_list_agent.js +11 -2
- package/node_modules/node-pty/lib/index.js +6 -6
- package/node_modules/node-pty/lib/shared/conout.js +2 -3
- package/node_modules/node-pty/lib/terminal.js +2 -2
- package/node_modules/node-pty/lib/unixTerminal.js +11 -6
- package/node_modules/node-pty/lib/utils.js +6 -7
- package/node_modules/node-pty/lib/windowsConoutConnection.js +24 -18
- package/node_modules/node-pty/lib/windowsPtyAgent.js +125 -101
- package/node_modules/node-pty/lib/windowsTerminal.js +14 -4
- package/node_modules/node-pty/lib/worker/conoutSocketWorker.js +3 -3
- package/node_modules/node-pty/package.json +1 -1
- package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/node_modules/node-pty/scripts/post-install.js +1 -5
- package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-arm64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/{1.23.251008001 → 1.25.260303002}/win10-arm64/conpty.dll +0 -0
- package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-x64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-x64/conpty.dll +0 -0
- package/package.json +1 -1
- package/node_modules/node-pty/deps/winpty/.drone.yml +0 -15
- package/node_modules/node-pty/deps/winpty/LICENSE +0 -21
- package/node_modules/node-pty/deps/winpty/configure +0 -167
- package/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
- package/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
- package/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
- package/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
- package/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
- package/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
- package/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
- package/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
- package/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
- package/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
- package/node_modules/node-pty/lib/terminal.test.js +0 -139
- package/node_modules/node-pty/lib/testUtils.test.js +0 -28
- package/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
- package/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
- package/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
- package/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
- package/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
- package/node_modules/node-pty/scripts/increment-version.js +0 -54
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var G=Object.defineProperty;var n=(l,d)=>G(l,"name",{value:d,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-session-log-export",factory:n(l=>{var d={exports:{}},c=d.exports;Object.defineProperty(c,Symbol.toStringTag,{value:"Module"});let h=l("@deepseek-ai/dsh-client-runtime/client"),a=l("react/jsx-runtime"),u=l("@deepseek-ai/dsh-client-ui-primitives");const m={bySession:{}};function f(e){return`dsh-session-${String(e).replace(/[^A-Za-z0-9_-]/g,"_")}.zip`}n(f,"sessionLogZipFilename");function w(e,s){const o=document.createElement("a");o.href=e,o.download=s,o.click()}n(w,"downloadUrl");function S(){const e=globalThis.location?.origin;return e!==void 0&&e!=="null"?e:"http://dsh.internal"}n(S,"hostBase");function b(e){return e instanceof Error?e.message:String(e)}n(b,"messageOf");var v=class{static{n(this,"SessionLogDownloadController")}fetcher;save;store=(0,h.createSnapshotStore)(m);active=new Map;disposed=!1;constructor(e=(o,t)=>fetch(o,t),s=w){this.fetcher=e,this.save=s}download(e){const s=this.active.get(e);if(s!==void 0)return s.done;if(this.disposed)return Promise.resolve();const o=new AbortController,t=this.run(e,o.signal).finally(()=>{this.active.delete(e)});return this.active.set(e,{abort:o,done:t}),t}dismiss(e){const s=this.store.getSnapshot().bySession[String(e)];s===void 0||!s.open||this.publish(e,{...s,open:!1})}async dispose(){this.disposed=!0;const e=[...this.active.values()];for(const s of e)s.abort.abort();await Promise.allSettled(e.map(s=>s.done))}async run(e,s){this.publish(e,{open:!0,status:"downloading",error:null});try{const o=new URL("/api/session.export",S());o.searchParams.set("sessionId",e),o.searchParams.set("includeDescendants","true");const t=await this.fetcher(o,{method:"HEAD",signal:s});if(!t.ok){const r=await t.text().catch(()=>"");throw new Error(`Export failed: HTTP ${t.status}${r===""?"":` ${r}`}`)}this.save(o.toString(),f(e));const i=this.store.getSnapshot().bySession[String(e)]?.open??!0;this.publish(e,{open:i,status:"success",error:null})}catch(o){if(s.aborted)return;const t=this.store.getSnapshot().bySession[String(e)]?.open??!0;this.publish(e,{open:t,status:"error",error:b(o)})}}publish(e,s){this.store.update(o=>{o.bySession={...o.bySession,[String(e)]:s}})}};function y({sessionId:e,useSessionLogDownload:s,dismiss:o,t}){const i=s(E=>E.bySession[String(e)]),r=i?.status,T=i?.open===!0,B=r==="error"?i?.error||t("dialog.commandFailed"):null,C=t(r==="downloading"?"dialog.preparingTitle":r==="success"?"dialog.successTitle":"dialog.errorTitle"),A=r==="downloading"?t("dialog.preparingDescription"):r==="success"?t("dialog.successDescription"):B??t("dialog.commandFailed");return(0,a.jsx)(u.Modal,{open:T,onClose:n(()=>{o(e)},"onClose"),title:C,description:A,closeLabel:t("dialog.close"),footer:(0,a.jsx)(u.Button,{variant:"primary",onClick:n(()=>{o(e)},"onClick"),children:t("dialog.close")})})}n(y,"SessionLogDownloadDialog");const x=".V9GP8W_sessionLogButton{border:1px solid var(--dsw-alias-border-l2);min-width:111px;height:32px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);cursor:pointer;background:0 0;border-radius:18px;justify-content:center;align-items:center;gap:4px;padding:6px 12px;font-size:13px;font-weight:400;line-height:20px;display:inline-flex}.V9GP8W_sessionLogButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.V9GP8W_sessionLogButton:disabled{color:var(--dsw-alias-label-dimmed);cursor:wait}.V9GP8W_sessionLogButton span,.V9GP8W_sessionLogButton svg{flex:none}.V9GP8W_sessionLogButton span{white-space:nowrap}",p="@deepseek-ai/dsh-session-log-export/HeaderAction.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(p)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-session-log-export",e.dataset.pluginCss=p,e.textContent=x,document.head.appendChild(e)}var _={sessionLogButton:"V9GP8W_sessionLogButton"};function L(e){const{sessionId:s,useSessionLogDownload:o,request:t}=e,i=o(r=>r.bySession[String(s)])?.status==="downloading";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",className:_.sessionLogButton,disabled:i,"aria-busy":i,onClick:n(()=>{t(s)},"onClick"),children:[(0,a.jsx)("span",{children:"Session log"}),(0,a.jsx)(u.IconDownloadOutline16,{size:12})]}),(0,a.jsx)(y,{...e})]})}n(L,"SessionLogDownloadHeaderAction");const g="session-log-download",P={"dialog.preparingTitle":"正在导出 Session","dialog.preparingDescription":"正在准备包含当前 Session、子 Session 和附件的 ZIP 文件。","dialog.successTitle":"Session 导出已开始下载","dialog.successDescription":"浏览器正在下载 Session ZIP 文件。","dialog.errorTitle":"Session 导出失败","dialog.close":"关闭","dialog.commandFailed":"无法启动 Session 导出。"},D={"dialog.preparingTitle":"Exporting Session","dialog.preparingDescription":"Preparing a ZIP containing this Session, its sub-Sessions, and attachments.","dialog.successTitle":"Session download started","dialog.successDescription":"The browser is downloading the Session ZIP.","dialog.errorTitle":"Session export failed","dialog.close":"Close","dialog.commandFailed":"Could not start the Session export."},j=["slots","locale"];function k(e){const s=new v;e.provide("sessionLogDownload",s),e.effect(()=>async()=>{await s.dispose()},"session-log-download: browser download lifecycle"),e.effect(()=>e.locale.register(g,{zh:P,en:D}),"session-log-download: browser dictionaries"),e.on("command/executed",(o,t,i)=>{t==="export"&&i.kind==="success"&&s.download(o)}),e.slots.inject("conversation.session.header.utilities",()=>e.slots.register({name:"conversation.session.header.utilities",id:"session-log-download",locale:g,inject:n(()=>({hooks:{sessionLogDownload:s.store},request:n(o=>s.download(o),"request"),dismiss:n(o=>{s.dismiss(o)},"dismiss")}),"inject")},L))}return n(k,"apply"),c.apply=k,c.inject=j,d.exports},"factory")});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-log-export","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-log-export","version":"0.1.0","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"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-locale":"^0.1.0","@deepseek-ai/dsh-client-ui-commands":"^0.1.0","@deepseek-ai/dsh-client-ui-conversation":"^0.1.0","@deepseek-ai/dsh-client-ui-slots":"^0.1.0","@deepseek-ai/dsh-client-runtime":"^0.1.0","@deepseek-ai/dsh-client-ui-primitives":"^0.1.0","@deepseek-ai/dsh-commands":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-commands","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-persistence","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-persistence","version":"0.1.0","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-brand":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-timeout":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-persistence-jsonl","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-persistence-jsonl","version":"0.1.0","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.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"koffi":"^3.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-projection","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-projection","version":"0.1.0","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"zod":"^4.4.3"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-projection-cache","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-projection-cache","version":"0.1.0","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":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/dsh-storage-domain":"^0.1.0","@deepseek-ai/dsh-session-projection":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var re=Object.defineProperty;var o=(t,e)=>re(t,"name",{value:e,configurable:!0});import{Service as ne}from"@deepseek-ai/cordis";import{Session as oe,foldSurface as Q,isSurfaceEvent as ae,snapshotSessionEvent as y}from"@deepseek-ai/dsh-session";import{foldSessionTitle as ce}from"@deepseek-ai/dsh-session-title";import{HarnessError as ie}from"@deepseek-ai/dsh-llm";
|
|
2
|
-
`)}o(E,"joinText");function Se(t,e){const s=j(e);return e.map(r=>({sessionId:t,seq:r.seq,type:r.type,time:r.time,surface:s.get(r.seq)??"log-only"}))}o(Se,"buildSessionEventRecords");function V(t,e){const s=j(e),r=[];for(const n of e){const c=P(n);c.length!==0&&r.push({sessionId:t,seq:n.seq,type:n.type,time:n.time,surface:s.get(n.seq)??"log-only",text:c})}return r}o(V,"buildSessionEventSearchDocuments");function j(t){let e;try{e=Q(t)}catch(r){throw new h(`invalid session surface: ${r instanceof Error?r.message:"unknown error"}`,"SESSION_QUERY_INVALID_SURFACE",{cause:r})}const s=new Map;for(const r of e.nodes)s.set(r,"current");for(const r of e.replacements)for(const n of r.shadowedSeqs)s.set(n,"shadowed");return s}o(j,"classifySurface");function B(t,e=[]){const s=e.map(we);return t.filter(r=>s.every(n=>n(r)))}o(B,"filterSessionResults");function z(t,e=[]){const s=e.map(me);return t.filter(r=>s.every(n=>n(r)))}o(z,"filterSessionEventDocuments");function G(t){return J(t),t.map(e=>{switch(e.kind){case"id":return{kind:e.kind,values:R(e.kind,e.values)};case"cwd":return{kind:e.kind,values:K(e.kind,e.values)};case"created-at":return Z(e.kind,e);case"parent":return{kind:e.kind,values:K(e.kind,e.values)};case"availability":{const s=R(e.kind,e.values);return x(e.kind,s,["live","persisted"]),{kind:e.kind,values:s}}default:return k(e)}})}o(G,"materializeSessionResultFilters");function H(t){return J(t),t.map(e=>{switch(e.kind){case"seq":case"time":return Z(e.kind,e);case"type":return{kind:e.kind,values:R(e.kind,e.values)};case"surface":{const s=R(e.kind,e.values);return x(e.kind,s,["current","shadowed","log-only"]),{kind:e.kind,values:s}}case"text":if(typeof e.text!="string")throw _("text filter text must be a string");return{kind:e.kind,text:e.text};default:return k(e)}})}o(H,"materializeSessionEventResultFilters");function X(t){const e=t.trim();if(e.length===0)throw new h("session text filter must contain non-whitespace text","SESSION_QUERY_INVALID_FILTER");const s=e.split(/\s+/u).map(r=>r.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")).join("\\s+");return new RegExp(s,"iu")}o(X,"compileSessionTextFilter");function we(t){switch(t.kind){case"id":return e=>t.values.includes(e.header.id);case"cwd":return e=>t.values.includes(e.header.cwd??null);case"created-at":{const e=C(t.kind,t);return s=>T(s.header.createdAt,e)}case"parent":return e=>t.values.includes(e.header.parentSession??null);case"availability":return x(t.kind,t.values,["live","persisted"]),e=>t.values.some(s=>s==="live"?e.live:e.persisted);default:return k(t)}}o(we,"sessionPredicate");function me(t){switch(t.kind){case"seq":{const e=C(t.kind,t);return s=>T(s.seq,e)}case"time":{const e=C(t.kind,t);return s=>T(s.time,e)}case"type":return e=>t.values.includes(e.type);case"surface":return x(t.kind,t.values,["current","shadowed","log-only"]),e=>t.values.includes(e.surface);case"text":{const e=X(t.text);return s=>e.test(s.text)}default:return k(t)}}o(me,"eventPredicate");function R(t,e){if(!ee(e)||e.some(s=>typeof s!="string"))throw _(`${t} filter values must be an array of strings`);return[...e]}o(R,"copyStrings");function J(t){if(!Array.isArray(t))throw _("filters must be an array")}o(J,"assertArray");function K(t,e){if(!ee(e)||e.some(s=>s!==null&&typeof s!="string"))throw _(`${t} filter values must be an array of strings or null`);return[...e]}o(K,"copyNullableStrings");function Z(t,e){const s={kind:t,...e.from===void 0?{}:{from:e.from},...e.to===void 0?{}:{to:e.to}};return C(t,s),s}o(Z,"copyRange");function k(t){const e=t.kind;throw _(`unknown filter kind ${typeof e=="string"?`"${e}"`:"(missing)"}`)}o(k,"unknownFilter");function x(t,e,s){for(const r of e)if(!s.includes(r))throw new h(`session ${t} filter contains unknown value "${r}"`,"SESSION_QUERY_INVALID_FILTER")}o(x,"assertAllowedValues");function C(t,e){if(e.from!==void 0&&!Number.isFinite(e.from))throw $(t,"from must be finite");if(e.to!==void 0&&!Number.isFinite(e.to))throw $(t,"to must be finite");if(e.from!==void 0&&e.to!==void 0&&e.from>e.to)throw $(t,"from must be less than or equal to to");return e}o(C,"validateRange");function T(t,e){return(e.from===void 0||t>=e.from)&&(e.to===void 0||t<=e.to)}o(T,"matchesRange");function $(t,e){return _(`${t} filter ${e}`)}o($,"invalidRange");function _(t){return new h(`session ${t}`,"SESSION_QUERY_INVALID_FILTER")}o(_,"invalidFilter");function ee(t){return Array.isArray(t)}o(ee,"isRuntimeArray");function ve(t,e){return D(t,e).records}o(ve,"eventRecords");function _e(t,e){return D(t,e).currentSeqs.map(s=>{const r=e[s];if(r===void 0||r.seq!==s||!ae(r))throw new h(`invalid session surface: current node ${s} is not a surface event`,"SESSION_QUERY_INVALID_SURFACE");return y(r)})}o(_e,"currentSurfaceEvents");function Ee(t,e,s){const r=e[s];if(r===void 0||r.seq!==s)throw new h(`session "${t}" has no event at seq ${s}`,"SESSION_QUERY_EVENT_NOT_FOUND");const n=D(t,e),c=[];let a=n.replacedBy.get(s);for(;a!==void 0;)c.push(a),a=n.replacedBy.get(a);const d=[];for(const p of e)p.seq<=s||te(p).includes(s)&&d.push(p.seq);const u=n.records[s],l=n.replacedBy.get(s);return{target:u,...l===void 0?{}:{replacedBy:l},replacementChain:c,replacedEventSeqs:n.replacedEventSeqs.get(s)??[],sourceEventSeqs:[...te(r)],derivedEventSeqs:d}}o(Ee,"traceEvent");function ye(t,e){const s=new Map(t.map(f=>[f.header.id,f])),r=s.get(e);if(r===void 0)throw new h(`session "${e}" not found`,"SESSION_QUERY_SESSION_NOT_FOUND");const n=[],c=new Set([e]);let a,d=r.header.parentSession;for(;d!==void 0;){if(c.has(d))throw new h(`session lineage contains a cycle at "${d}"`,"SESSION_QUERY_INVALID_LINEAGE");c.add(d);const f=s.get(d);if(f===void 0){a=d;break}n.push(f),d=f.header.parentSession}const u=new Map;for(const f of t){const S=f.header.parentSession;if(S===void 0)continue;const v=u.get(S)??[];v.push(f),u.set(S,v)}for(const f of u.values())f.sort((S,v)=>S.header.createdAt-v.header.createdAt||S.header.id.localeCompare(v.header.id));const l=Ie(u,e),p={target:O(r),ancestors:n.map(O),descendants:l};return a!==void 0?{...p,complete:!1,unresolvedParentId:a}:{...p,complete:!0,root:O(n.at(-1)??r)}}o(ye,"traceSession");function D(t,e){let s;try{s=Q(e)}catch(a){throw new h(`invalid session surface: ${a instanceof Error?a.message:"unknown error"}`,"SESSION_QUERY_INVALID_SURFACE",{cause:a})}const r=new Set(s.nodes),n=new Map,c=new Map;for(const a of s.replacements){const d=a.shadowedSeqs;c.set(a.seq,d);for(const u of d)n.set(u,a.seq)}return{records:e.map(a=>({sessionId:t,seq:a.seq,type:a.type,time:a.time,surface:r.has(a.seq)?"current":n.has(a.seq)?"shadowed":"log-only"})),replacedBy:n,replacedEventSeqs:c,currentSeqs:[...s.nodes]}}o(D,"analyzeEventLog");function te(t){return t.sourceEventSeqs??[]}o(te,"eventSources");function Ie(t,e){const s=[],r=[{sessionId:e,descendants:s}];for(;r.length>0;){const n=r.pop(),c=[];for(const a of t.get(n.sessionId)??[]){const d={session:O(a),descendants:[]};c.push(d),n.descendants.push(d)}for(let a=c.length-1;a>=0;a-=1){const d=c[a];r.push({sessionId:d.session.header.id,descendants:d.descendants})}}return s}o(Ie,"buildDescendants");function O(t){return{...t,header:structuredClone(t.header)}}o(O,"cloneRecord");function Ne(t){return t}o(Ne,"SessionSearchCursor");var se=class extends ne{static{o(this,"SessionQueryEngine")}static inject=["sessions"];_readWindowMax;_corpus;constructor(t,e={}){if(super(t,"sessionQuery"),this._readWindowMax=e.readWindowMax??50,!Number.isInteger(this._readWindowMax)||this._readWindowMax<0)throw new h("session-query: readWindowMax must be a non-negative integer","SESSION_QUERY_INVALID_CONFIG");const s=e.persistedInspectConcurrency??4;if(!Number.isSafeInteger(s)||s<1)throw new h("session-query: persistedInspectConcurrency must be a positive safe integer","SESSION_QUERY_INVALID_CONFIG");this._corpus=new fe(t,s)}listSessions(t){return this._corpus.listSessions(t)}async readSession(t){const e=await this._corpus.load(t);return oe.create(t,e.events,e.header),{session:structuredClone(e.header),events:e.events.map(y)}}async filterSessions(t,e){const s=G(t);return this._filterSessions(s,e)}async readTitle(t,e){return(await this.readTitleSnapshot(t,e)).title}async readTitleSnapshot(t,e){const s=(await this.readTitleSnapshots([t],e))[0];if(s.status==="rejected")throw s.reason;return s.value}async readTitleSnapshots(t,e){return this._corpus.projectMany(t,s=>{const r=ce(s.events);return{session:structuredClone(s.header),...r===void 0?{}:{title:r}}},e)}async listEvents(t){return ve(t,(await this._corpus.load(t)).events)}async filterEvents(t,e){const s=H(e);return this._filterEvents(t,s)}async _filterSessions(t,e){return B(await this._corpus.listSessions(e),t)}async _filterEvents(t,e){return z(V(t,(await this._corpus.load(t)).events),e)}async readSurface(t){const e=await this._corpus.load(t);return{session:structuredClone(e.header),capturedThroughSeq:e.events.at(-1)?.seq??null,events:_e(t,e.events)}}async traceSession(t,e){const s=await this._corpus.listSessions(e);return e?.throwIfAborted(),ye(s,t)}async traceEvent(t,e){const s=await this._corpus.load(t.sessionId,e);return e?.throwIfAborted(),{session:s.header,...Ee(t.sessionId,s.events,t.seq)}}async readEvent(t,e){const s=this._readWindow("before",t.before),r=this._readWindow("after",t.after),n=t.sessionId,c=t.seq;return this._readEvent(n,c,s,r,e)}async _readEvent(t,e,s,r,n){const c=await this._corpus.load(t,n);n?.throwIfAborted();const a=c.events[e];if(a===void 0||a.seq!==e)throw new h(`session "${t}" has no event at seq ${e}`,"SESSION_QUERY_EVENT_NOT_FOUND");const d=Math.max(0,e-s),u=Math.min(c.events.length-1,e+r),l=y(a),p=c.events.slice(d,u+1).map(f=>f===a?l:y(f));return{session:structuredClone(c.header),target:l,events:p,startSeq:d,endSeq:u}}_readWindow(t,e){if(e===void 0)return 0;if(!Number.isInteger(e)||e<0||e>this._readWindowMax)throw new h(`${t} must be an integer between 0 and ${this._readWindowMax}`,"SESSION_QUERY_INVALID_WINDOW");return e}};export{he as SESSION_QUERY_DEFAULT_PERSISTED_INSPECT_CONCURRENCY,ue as SESSION_QUERY_READ_WINDOW_MAX,se as SessionQueryEngine,se as default,h as SessionQueryError,Ne as SessionSearchCursor,I as assertSessionHeadersCompatible,Se as buildSessionEventRecords,V as buildSessionEventSearchDocuments,X as compileSessionTextFilter,P as extractSessionEventText,z as filterSessionEventDocuments,B as filterSessionResults,H as materializeSessionEventResultFilters,G as materializeSessionResultFilters};
|
|
1
|
+
var re=Object.defineProperty;var o=(t,e)=>re(t,"name",{value:e,configurable:!0});import{Service as ne}from"@deepseek-ai/cordis";import{Session as oe,foldSurface as Q,isSurfaceEvent as ae,snapshotSessionEvent as y}from"@deepseek-ai/dsh-session";import{foldSessionTitle as ce}from"@deepseek-ai/dsh-session-title";import{HarnessError as ie}from"@deepseek-ai/dsh-llm";const de=50,ue=4;var h=class extends ie{static{o(this,"SessionQueryError")}constructor(t,e,s){super(t,e,s)}};function I(t,e){if(t.version!==e.version||t.id!==e.id||t.createdAt!==e.createdAt||t.cwd!==e.cwd||t.parentSession!==e.parentSession||t.seedLength!==e.seedLength||(t.delegationDepth??0)!==(e.delegationDepth??0))throw new h(`session source headers conflict for session "${t.id}"`,"SESSION_QUERY_SOURCE_CONFLICT")}o(I,"assertSessionHeadersCompatible");var he=class{static{o(this,"SessionCorpus")}_ctx;_persistedInspectConcurrency;_persistence;_optionalPersistenceFiber;constructor(t,e){this._ctx=t,this._persistedInspectConcurrency=e,this._optionalPersistenceFiber=t.inject(["sessionPersistence"],s=>{const r=s.sessionPersistence;this._persistence=r,s.effect(()=>()=>{this._persistence===r&&(this._persistence=void 0)},"sessionQuery.persistenceBinding")}),t.effect(()=>()=>this._optionalPersistenceFiber.dispose(),"sessionQuery.optionalPersistence")}async listSessions(t){t?.throwIfAborted();const e=this._persistence,s=e===void 0?[]:await U(e,t);t?.throwIfAborted();const r=new Map;for(const n of s)r.set(n.id,{header:structuredClone(n),live:!1,persisted:!0});for(const n of this._ctx.sessions.list()){const c=r.get(n.id);c!==void 0&&I(n.header,c.header),r.set(n.id,{header:structuredClone(n.header),live:!0,persisted:c!==void 0})}return[...r.values()].sort(fe)}async load(t,e){e?.throwIfAborted();const s=this._ctx.sessions.get(t);if(s!==void 0){const u=Y(s);return e?.throwIfAborted(),u}const r=this._persistence;if(r===void 0)throw b(t);const n=(await U(r,e)).find(u=>u.id===t);if(e?.throwIfAborted(),n===void 0)throw b(t);const c=await L(r,t,e);e?.throwIfAborted();const a=this._ctx.sessions.get(t);if(a!==void 0){const u=Y(a);return e?.throwIfAborted(),u}I(c.meta,n);const d={header:structuredClone(c.meta),events:c.events.map(u=>structuredClone(u))};return e?.throwIfAborted(),d}async projectMany(t,e,s){const r=[...new Set(t)];s?.throwIfAborted();const n=new Map,c=[];for(const i of r){const w=this._ctx.sessions.get(i);w===void 0?c.push(i):n.set(i,N(i,g(w),e,s))}if(c.length===0)return A(r,n);const a=this._persistence;if(a===void 0){for(const i of c)n.set(i,{sessionId:i,status:"rejected",reason:b(i)});return A(r,n)}let d;try{d=await U(a,s),s?.throwIfAborted()}catch(i){s?.aborted&&s.throwIfAborted();for(const w of c)n.set(w,{sessionId:w,status:"rejected",reason:i});return A(r,n)}const u=new Map(d.map(i=>[i.id,i])),l=o(async i=>{const w=u.get(i);if(w===void 0){const m=this._ctx.sessions.get(i);n.set(i,m===void 0?{sessionId:i,status:"rejected",reason:b(i)}:N(i,g(m),e,s));return}try{s?.throwIfAborted();const m=await L(a,i,s);s?.throwIfAborted();const M=this._ctx.sessions.get(i);if(M!==void 0){n.set(i,N(i,g(M),e,s));return}I(m.meta,w),n.set(i,N(i,{header:m.meta,events:m.events},e,s))}catch(m){s?.aborted&&s.throwIfAborted(),n.set(i,{sessionId:i,status:"rejected",reason:m})}},"resolvePersisted");let p=0;const f=o(async()=>{for(;;){s?.throwIfAborted();const i=p;if(i>=c.length)return;p+=1,await l(c[i])}},"worker"),S=Math.min(this._persistedInspectConcurrency,c.length),v=await Promise.allSettled(Array.from({length:S},()=>f()));s?.aborted&&s.throwIfAborted();for(const i of v)if(i.status==="rejected")throw i.reason;return s?.throwIfAborted(),A(r,n)}};function N(t,e,s,r){try{r?.throwIfAborted();const n=s(e);return r?.throwIfAborted(),{sessionId:t,status:"fulfilled",value:n}}catch(n){return r?.aborted&&r.throwIfAborted(),{sessionId:t,status:"rejected",reason:n}}}o(N,"projectSource");function g(t){return{header:t.header,events:t.events}}o(g,"sourceLive");function A(t,e){return t.map(s=>e.get(s))}o(A,"orderedResults");async function U(t,e){try{return await t.list(e)}catch(s){throw e?.aborted&&e.throwIfAborted(),new h(`session persistence listing failed: ${q(s)}`,"SESSION_QUERY_PERSISTENCE_FAILED",{cause:s})}}o(U,"listPersisted");async function L(t,e,s){try{return await t.inspect(e,s)}catch(r){throw s?.aborted&&s.throwIfAborted(),r instanceof Error&&r.name==="SessionPersistenceCorruptionError"?new h(`stored session "${e}" is corrupt: ${q(r)}`,"SESSION_QUERY_CORRUPT_SESSION",{cause:r}):new h(`failed to inspect session "${e}": ${q(r)}`,"SESSION_QUERY_PERSISTENCE_FAILED",{cause:r})}}o(L,"inspectPersisted");function Y(t){return{header:structuredClone(t.header),events:t.events.map(e=>structuredClone(e))}}o(Y,"snapshotLive");function fe(t,e){return e.header.createdAt-t.header.createdAt||t.header.id.localeCompare(e.header.id)}o(fe,"compareSessions");function b(t){return new h(`session "${t}" not found`,"SESSION_QUERY_SESSION_NOT_FOUND")}o(b,"notFound");function q(t){return t instanceof Error?t.message:"unknown error"}o(q,"errorMessage");function P(t){switch(t.type){case"user/message":return F(t.data.content);case"assistant/message":return F(t.data.message.content);case"tool/call":return E([t.data.name,t.data.arguments]);case"tool/result":return E([F(t.data.message.content),t.data.error?.name??"",t.data.error?.code??""]);case"todo/write":return E(t.data.todos.flatMap(e=>[e.status,e.content]));case"turn/end":return pe(t.data.reason);case"turn/start":case"step/start":case"step/end":case"assistant/chunk":case"request/header":return"";default:return""}}o(P,"extractSessionEventText");function pe(t){switch(t.kind){case"error":return E(["error",t.error.message]);case"aborted":return"aborted";case"max-tokens":case"interrupted":return t.kind;case"completed":return"";default:return""}}o(pe,"turnEndText");function F(t){return E(t.flatMap(W))}o(F,"contentText");function W(t){switch(t.type){case"text":return[t.text];case"reasoning":return[];case"tool-call":return[t.name,t.arguments];case"tool-result":return t.content.flatMap(W);default:return[]}}o(W,"blockText");function E(t){return t.map(e=>e.trim()).filter(Boolean).join(`
|
|
2
|
+
`)}o(E,"joinText");function le(t,e){const s=j(e);return e.map(r=>({sessionId:t,seq:r.seq,type:r.type,time:r.time,surface:s.get(r.seq)??"log-only"}))}o(le,"buildSessionEventRecords");function V(t,e){const s=j(e),r=[];for(const n of e){const c=P(n);c.length!==0&&r.push({sessionId:t,seq:n.seq,type:n.type,time:n.time,surface:s.get(n.seq)??"log-only",text:c})}return r}o(V,"buildSessionEventSearchDocuments");function j(t){let e;try{e=Q(t)}catch(r){throw new h(`invalid session surface: ${r instanceof Error?r.message:"unknown error"}`,"SESSION_QUERY_INVALID_SURFACE",{cause:r})}const s=new Map;for(const r of e.nodes)s.set(r,"current");for(const r of e.replacements)for(const n of r.shadowedSeqs)s.set(n,"shadowed");return s}o(j,"classifySurface");function B(t,e=[]){const s=e.map(Se);return t.filter(r=>s.every(n=>n(r)))}o(B,"filterSessionResults");function z(t,e=[]){const s=e.map(we);return t.filter(r=>s.every(n=>n(r)))}o(z,"filterSessionEventDocuments");function G(t){return J(t),t.map(e=>{switch(e.kind){case"id":return{kind:e.kind,values:R(e.kind,e.values)};case"cwd":return{kind:e.kind,values:K(e.kind,e.values)};case"created-at":return Z(e.kind,e);case"parent":return{kind:e.kind,values:K(e.kind,e.values)};case"availability":{const s=R(e.kind,e.values);return x(e.kind,s,["live","persisted"]),{kind:e.kind,values:s}}default:return k(e)}})}o(G,"materializeSessionResultFilters");function H(t){return J(t),t.map(e=>{switch(e.kind){case"seq":case"time":return Z(e.kind,e);case"type":return{kind:e.kind,values:R(e.kind,e.values)};case"surface":{const s=R(e.kind,e.values);return x(e.kind,s,["current","shadowed","log-only"]),{kind:e.kind,values:s}}case"text":if(typeof e.text!="string")throw _("text filter text must be a string");return{kind:e.kind,text:e.text};default:return k(e)}})}o(H,"materializeSessionEventResultFilters");function X(t){const e=t.trim();if(e.length===0)throw new h("session text filter must contain non-whitespace text","SESSION_QUERY_INVALID_FILTER");const s=e.split(/\s+/u).map(r=>r.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")).join("\\s+");return new RegExp(s,"iu")}o(X,"compileSessionTextFilter");function Se(t){switch(t.kind){case"id":return e=>t.values.includes(e.header.id);case"cwd":return e=>t.values.includes(e.header.cwd??null);case"created-at":{const e=C(t.kind,t);return s=>T(s.header.createdAt,e)}case"parent":return e=>t.values.includes(e.header.parentSession??null);case"availability":return x(t.kind,t.values,["live","persisted"]),e=>t.values.some(s=>s==="live"?e.live:e.persisted);default:return k(t)}}o(Se,"sessionPredicate");function we(t){switch(t.kind){case"seq":{const e=C(t.kind,t);return s=>T(s.seq,e)}case"time":{const e=C(t.kind,t);return s=>T(s.time,e)}case"type":return e=>t.values.includes(e.type);case"surface":return x(t.kind,t.values,["current","shadowed","log-only"]),e=>t.values.includes(e.surface);case"text":{const e=X(t.text);return s=>e.test(s.text)}default:return k(t)}}o(we,"eventPredicate");function R(t,e){if(!ee(e)||e.some(s=>typeof s!="string"))throw _(`${t} filter values must be an array of strings`);return[...e]}o(R,"copyStrings");function J(t){if(!Array.isArray(t))throw _("filters must be an array")}o(J,"assertArray");function K(t,e){if(!ee(e)||e.some(s=>s!==null&&typeof s!="string"))throw _(`${t} filter values must be an array of strings or null`);return[...e]}o(K,"copyNullableStrings");function Z(t,e){const s={kind:t,...e.from===void 0?{}:{from:e.from},...e.to===void 0?{}:{to:e.to}};return C(t,s),s}o(Z,"copyRange");function k(t){const e=t.kind;throw _(`unknown filter kind ${typeof e=="string"?`"${e}"`:"(missing)"}`)}o(k,"unknownFilter");function x(t,e,s){for(const r of e)if(!s.includes(r))throw new h(`session ${t} filter contains unknown value "${r}"`,"SESSION_QUERY_INVALID_FILTER")}o(x,"assertAllowedValues");function C(t,e){if(e.from!==void 0&&!Number.isFinite(e.from))throw $(t,"from must be finite");if(e.to!==void 0&&!Number.isFinite(e.to))throw $(t,"to must be finite");if(e.from!==void 0&&e.to!==void 0&&e.from>e.to)throw $(t,"from must be less than or equal to to");return e}o(C,"validateRange");function T(t,e){return(e.from===void 0||t>=e.from)&&(e.to===void 0||t<=e.to)}o(T,"matchesRange");function $(t,e){return _(`${t} filter ${e}`)}o($,"invalidRange");function _(t){return new h(`session ${t}`,"SESSION_QUERY_INVALID_FILTER")}o(_,"invalidFilter");function ee(t){return Array.isArray(t)}o(ee,"isRuntimeArray");function me(t,e){return D(t,e).records}o(me,"eventRecords");function ve(t,e){return D(t,e).currentSeqs.map(s=>{const r=e[s];if(r===void 0||r.seq!==s||!ae(r))throw new h(`invalid session surface: current node ${s} is not a surface event`,"SESSION_QUERY_INVALID_SURFACE");return y(r)})}o(ve,"currentSurfaceEvents");function _e(t,e,s){const r=e[s];if(r===void 0||r.seq!==s)throw new h(`session "${t}" has no event at seq ${s}`,"SESSION_QUERY_EVENT_NOT_FOUND");const n=D(t,e),c=[];let a=n.replacedBy.get(s);for(;a!==void 0;)c.push(a),a=n.replacedBy.get(a);const d=[];for(const p of e)p.seq<=s||te(p).includes(s)&&d.push(p.seq);const u=n.records[s],l=n.replacedBy.get(s);return{target:u,...l===void 0?{}:{replacedBy:l},replacementChain:c,replacedEventSeqs:n.replacedEventSeqs.get(s)??[],sourceEventSeqs:[...te(r)],derivedEventSeqs:d}}o(_e,"traceEvent");function Ee(t,e){const s=new Map(t.map(f=>[f.header.id,f])),r=s.get(e);if(r===void 0)throw new h(`session "${e}" not found`,"SESSION_QUERY_SESSION_NOT_FOUND");const n=[],c=new Set([e]);let a,d=r.header.parentSession;for(;d!==void 0;){if(c.has(d))throw new h(`session lineage contains a cycle at "${d}"`,"SESSION_QUERY_INVALID_LINEAGE");c.add(d);const f=s.get(d);if(f===void 0){a=d;break}n.push(f),d=f.header.parentSession}const u=new Map;for(const f of t){const S=f.header.parentSession;if(S===void 0)continue;const v=u.get(S)??[];v.push(f),u.set(S,v)}for(const f of u.values())f.sort((S,v)=>S.header.createdAt-v.header.createdAt||S.header.id.localeCompare(v.header.id));const l=ye(u,e),p={target:O(r),ancestors:n.map(O),descendants:l};return a!==void 0?{...p,complete:!1,unresolvedParentId:a}:{...p,complete:!0,root:O(n.at(-1)??r)}}o(Ee,"traceSession");function D(t,e){let s;try{s=Q(e)}catch(a){throw new h(`invalid session surface: ${a instanceof Error?a.message:"unknown error"}`,"SESSION_QUERY_INVALID_SURFACE",{cause:a})}const r=new Set(s.nodes),n=new Map,c=new Map;for(const a of s.replacements){const d=a.shadowedSeqs;c.set(a.seq,d);for(const u of d)n.set(u,a.seq)}return{records:e.map(a=>({sessionId:t,seq:a.seq,type:a.type,time:a.time,surface:r.has(a.seq)?"current":n.has(a.seq)?"shadowed":"log-only"})),replacedBy:n,replacedEventSeqs:c,currentSeqs:[...s.nodes]}}o(D,"analyzeEventLog");function te(t){return t.sourceEventSeqs??[]}o(te,"eventSources");function ye(t,e){const s=[],r=[{sessionId:e,descendants:s}];for(;r.length>0;){const n=r.pop(),c=[];for(const a of t.get(n.sessionId)??[]){const d={session:O(a),descendants:[]};c.push(d),n.descendants.push(d)}for(let a=c.length-1;a>=0;a-=1){const d=c[a];r.push({sessionId:d.session.header.id,descendants:d.descendants})}}return s}o(ye,"buildDescendants");function O(t){return{...t,header:structuredClone(t.header)}}o(O,"cloneRecord");function Ie(t){return t}o(Ie,"SessionSearchCursor");var se=class extends ne{static{o(this,"SessionQueryEngine")}static inject=["sessions"];_readWindowMax;_corpus;constructor(t,e={}){if(super(t,"sessionQuery"),this._readWindowMax=e.readWindowMax??50,!Number.isInteger(this._readWindowMax)||this._readWindowMax<0)throw new h("session-query: readWindowMax must be a non-negative integer","SESSION_QUERY_INVALID_CONFIG");const s=e.persistedInspectConcurrency??4;if(!Number.isSafeInteger(s)||s<1)throw new h("session-query: persistedInspectConcurrency must be a positive safe integer","SESSION_QUERY_INVALID_CONFIG");this._corpus=new he(t,s)}listSessions(t){return this._corpus.listSessions(t)}async readSession(t){const e=await this._corpus.load(t);return oe.create(t,e.events,e.header),{session:structuredClone(e.header),events:e.events.map(y)}}async filterSessions(t,e){const s=G(t);return this._filterSessions(s,e)}async readTitle(t,e){return(await this.readTitleSnapshot(t,e)).title}async readTitleSnapshot(t,e){const s=(await this.readTitleSnapshots([t],e))[0];if(s.status==="rejected")throw s.reason;return s.value}async readTitleSnapshots(t,e){return this._corpus.projectMany(t,s=>{const r=ce(s.events);return{session:structuredClone(s.header),...r===void 0?{}:{title:r}}},e)}async listEvents(t){return me(t,(await this._corpus.load(t)).events)}async filterEvents(t,e){const s=H(e);return this._filterEvents(t,s)}async _filterSessions(t,e){return B(await this._corpus.listSessions(e),t)}async _filterEvents(t,e){return z(V(t,(await this._corpus.load(t)).events),e)}async readSurface(t){const e=await this._corpus.load(t);return{session:structuredClone(e.header),capturedThroughSeq:e.events.at(-1)?.seq??null,events:ve(t,e.events)}}async traceSession(t,e){const s=await this._corpus.listSessions(e);return e?.throwIfAborted(),Ee(s,t)}async traceEvent(t,e){const s=await this._corpus.load(t.sessionId,e);return e?.throwIfAborted(),{session:s.header,..._e(t.sessionId,s.events,t.seq)}}async readEvent(t,e){const s=this._readWindow("before",t.before),r=this._readWindow("after",t.after),n=t.sessionId,c=t.seq;return this._readEvent(n,c,s,r,e)}async _readEvent(t,e,s,r,n){const c=await this._corpus.load(t,n);n?.throwIfAborted();const a=c.events[e];if(a===void 0||a.seq!==e)throw new h(`session "${t}" has no event at seq ${e}`,"SESSION_QUERY_EVENT_NOT_FOUND");const d=Math.max(0,e-s),u=Math.min(c.events.length-1,e+r),l=y(a),p=c.events.slice(d,u+1).map(f=>f===a?l:y(f));return{session:structuredClone(c.header),target:l,events:p,startSeq:d,endSeq:u}}_readWindow(t,e){if(e===void 0)return 0;if(!Number.isInteger(e)||e<0||e>this._readWindowMax)throw new h(`${t} must be an integer between 0 and ${this._readWindowMax}`,"SESSION_QUERY_INVALID_WINDOW");return e}};export{ue as SESSION_QUERY_DEFAULT_PERSISTED_INSPECT_CONCURRENCY,de as SESSION_QUERY_READ_WINDOW_MAX,se as SessionQueryEngine,se as default,h as SessionQueryError,Ie as SessionSearchCursor,I as assertSessionHeadersCompatible,le as buildSessionEventRecords,V as buildSessionEventSearchDocuments,X as compileSessionTextFilter,P as extractSessionEventText,z as filterSessionEventDocuments,B as filterSessionResults,H as materializeSessionEventResultFilters,G as materializeSessionResultFilters};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-query","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-query","version":"0.1.0","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-brand":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-title":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-session-persistence":{"optional":true}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-query-sqlite","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-query-sqlite","version":"0.1.0","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.1.0","@deepseek-ai/dsh-session-query":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-session-persistence":{"optional":true}},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-reference","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-reference","version":"0.1.0","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":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/dsh-compaction":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-query":"^0.1.0","@deepseek-ai/dsh-output-retention":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-stats","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-stats","version":"0.1.0","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"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-projection":"^0.1.0"},"dependencies":{"zod":"^4.4.3"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-telemetry","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-telemetry","version":"0.1.0","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.1.0","@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-telemetry-otel","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-telemetry-otel","version":"0.1.0","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":{"@opentelemetry/api":"^1.9.1","@opentelemetry/api-logs":"^0.220.0","@opentelemetry/exporter-logs-otlp-http":"^0.220.0","@opentelemetry/otlp-exporter-base":"^0.220.0","@opentelemetry/resources":"^2.9.0","@opentelemetry/sdk-logs":"^0.220.0","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-command-feedback":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-telemetry":"^0.1.0","@deepseek-ai/dsh-anonymous-user-id":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-title","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-title","version":"0.1.0","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"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-projection":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-title-first-prompt-llm","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-title-first-prompt-llm","version":"0.1.0","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"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-title":"^0.1.0","@deepseek-ai/dsh-session-title-llm":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-session-title-llm","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-session-title-llm","version":"0.1.0","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.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-timeout":"^0.1.0","@deepseek-ai/dsh-session-title":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-settings","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-settings","version":"0.1.0","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-settings-file","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-settings-file","version":"0.1.0","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-atomic-write":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-settings":"^0.1.0","@deepseek-ai/dsh-home-paths":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"chokidar":"^4.0.3","yaml":"^2.9.0","@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-shell","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-shell","version":"0.1.0","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.1.0","@deepseek-ai/dsh-subprocess":"^0.1.0","@deepseek-ai/dsh-sandbox":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.1.0"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-shell-env","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-shell-env","version":"0.1.0","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-shell":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-home-paths":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-skill","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-skill","version":"0.1.0","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.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-scope":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-skill-badge","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-skill-badge","version":"0.1.0","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"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-skill":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-skill-filesystem","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-skill-filesystem","version":"0.1.0","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-fs":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-home-paths":"^0.1.0","@deepseek-ai/dsh-skill":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"chokidar":"^5.0.0","yaml":"^2.4.2","@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-spill","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-spill","version":"0.1.0","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-brand":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-spill-local","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-spill-local","version":"0.1.0","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.1.0","@deepseek-ai/dsh-spill":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-spill-policy","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-spill-policy","version":"0.1.0","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.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-output-retention":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-spill":"^0.1.0","@deepseek-ai/dsh-tools":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-storage","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-storage","version":"0.1.0","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.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-storage-domain","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-storage-domain","version":"0.1.0","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.1.0","@deepseek-ai/dsh-storage":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-storage-json","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-storage-json","version":"0.1.0","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.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-storage":"^0.1.0"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-subagent","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-subagent","version":"0.1.0","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"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"zod":"^4.4.3"},"peerDependencies":{"@deepseek-ai/dsh-agent-presets":"^0.1.0","@deepseek-ai/dsh-brand":"^0.1.0","@deepseek-ai/dsh-sandbox-policy":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/dsh-scope":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session-projection":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-sandbox":"^0.1.0","@deepseek-ai/dsh-jobs":"^0.1.0","@deepseek-ai/dsh-session-projection-cache":"^0.1.0","@deepseek-ai/dsh-user-approval":"^0.1.0","@deepseek-ai/dsh-tools":"^0.1.0","@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-agent-presets":{"optional":true},"@deepseek-ai/dsh-sandbox":{"optional":true},"@deepseek-ai/dsh-sandbox-policy":{"optional":true},"@deepseek-ai/dsh-session-persistence":{"optional":true},"@deepseek-ai/dsh-session-projection":{"optional":true},"@deepseek-ai/dsh-session-projection-cache":{"optional":true},"@deepseek-ai/dsh-jobs":{"optional":true},"@deepseek-ai/dsh-user-approval":{"optional":true}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-subagent-fork-in-process","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-subagent-fork-in-process","version":"0.1.0","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.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-subagent":"^0.1.0","@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/dsh-subagent-in-process-driver":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-subagent-in-process-driver","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-subagent-in-process-driver","version":"0.1.0","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.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-system-prompt":"^0.1.0","@deepseek-ai/dsh-subagent":"^0.1.0","@deepseek-ai/dsh-tools":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-subagent-spawn-in-process","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-subagent-spawn-in-process","version":"0.1.0","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.1.0","@deepseek-ai/dsh-subagent":"^0.1.0","@deepseek-ai/dsh-subagent-in-process-driver":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-subprocess","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-subprocess","version":"0.1.0","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.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-subprocess-local","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-subprocess-local","version":"0.1.0","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.1.0","@deepseek-ai/dsh-subprocess":"^0.1.0","@deepseek-ai/dsh-timeout":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"node-pty":"1.2.0-beta.15"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-system-prompt","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-system-prompt","version":"0.1.0","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-llm":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-scope":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-terminal","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-terminal","version":"0.1.0","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.1.0","@deepseek-ai/dsh-brand":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0"}}
|
|
@@ -7,4 +7,4 @@ var T=Object.defineProperty;var o=(t,e)=>T(t,"name",{value:e,configurable:!0});i
|
|
|
7
7
|
`),this.dropped=!0)}const e=m(this.value,this.maxBytes);this.value=e.text,this.dropped||=e.truncated}consume(){const t=this.value,e=this.dropped;return this.value="",this.dropped=!1,{delta:t,truncated:e}}snapshot(){return{text:this.value,truncated:this.dropped}}},O=class{static{o(this,"LocalSendOperation")}startedAt;onCancel;output;promise;finished=!1;cancellationRequested=!1;initialForegroundLeftWait;initialForegroundPgid;constructor(t,e,i){this.startedAt=e,this.onCancel=i,this.output=new v(t),this.promise=Promise.withResolvers(),this.initialForegroundLeftWait=!0}get done(){return this.promise.promise}get settled(){return this.finished}get cancelRequested(){return this.cancellationRequested}append(t){this.finished||this.output.append(t)}settle(t,e,i){if(this.finished)return;this.finished=!0;const s=this.output.snapshot();this.promise.resolve({viewport:s.text,waitReason:t,sessionStatus:e,truncated:s.truncated||i})}fail(t){this.finished||(this.finished=!0,this.promise.reject(t))}readOutput(){return this.output.consume()}setInitialForeground(t){this.initialForegroundPgid=t?.processGroupId,this.initialForegroundLeftWait=t?.inputWaiting!==!0}acceptsStdinWait(t,e){return t!==this.initialForegroundPgid?e:(e||(this.initialForegroundLeftWait=!0),e&&this.initialForegroundLeftWait)}cancel(){return this.finished?!1:(this.cancellationRequested=!0,this.onCancel(),!0)}},B=class{static{o(this,"LocalPtySession")}terminal;config;motd="";pid;decoder=new TextDecoder;sanitizer;scrollback;outputEnded=Promise.withResolvers();completion;statusValue={kind:"running"};active;activeTimer;activeDeadlineTimer;activeAbort;interrupting;activeWrite;pollingReady;polling=!1;promptSeen=!1;promptTextSeen=!1;promptTail="";shellPgid;initializing=!1;lastOutputAt=Date.now();closing=!1;closePromise;transportFailure;constructor(t,e){this.terminal=t,this.config=e,this.pid=t.pid,this.sanitizer=new R(e.maxReadBytes),this.scrollback=new v(e.scrollbackMaxBytes,e.scrollbackLines),t.output.on("data",this.onTerminalData),t.output.once("end",this.onTerminalEnd),t.output.once("error",this.onTerminalError),this.completion=t.done.then(i=>this.onExit(i),i=>{this.onTransportFailure(i)})}async initialize(t){this.initializing=!0;try{const e=await this.startSend({text:"",submit:!1,...t!==void 0?{signal:t}:{}}).done;if(e.waitReason==="session_exit")throw new Error("PTY shell exited during startup");if(e.waitReason==="timeout")throw new Error("PTY shell did not reach readiness before startup timeout");this.motd=e.viewport}catch(e){throw t?.throwIfAborted(),e}finally{this.initializing=!1}}startSend(t){if(this.closing)throw new Error("PTY session is closing");if(this.statusValue.kind==="exited")throw new Error("PTY session has exited");if(this.active!==void 0){const i=this.activeWrite!==void 0?" or draining provider write":this.interrupting!==void 0?" or draining foreground interrupt":"";throw new P(`PTY session already has an active send${i}`,"SEND_ACTIVE")}if(t.signal?.aborted===!0)throw new Error("PTY send aborted before write");const e=new O(this.config.maxReadBytes,Date.now(),()=>{this.interrupt(e)});if(this.active=e,this.resetReadinessEvidence(),t.signal!==void 0){const i=o(()=>{e.cancel()},"onAbort");t.signal.addEventListener("abort",i,{once:!0}),this.activeAbort=()=>t.signal?.removeEventListener("abort",i)}return this.activeDeadlineTimer=setTimeout(()=>{this.active===e&&this.settleActive("timeout",this.activeWrite!==void 0||this.interrupting===e)},this.config.timeoutMs),this.beginSend(e,t),e}async beginSend(t,e){let i;try{i=await this.terminal.inspectForeground()}catch(s){this.active===t&&!this.closing&&this.interrupting!==t&&this.failActive(s);return}try{if(this.active!==t||this.closing||this.interrupting===t)return;t.setInitialForeground(i);const s=`${e.text}${e.submit?"\r":""}`;if(s.length>0&&!t.cancelRequested){this.resetReadinessEvidence();const n=this.terminal.write(s);this.activeWrite=n.then(()=>!0,()=>!1);try{await n}finally{this.activeWrite=void 0}}if(t.cancelRequested)return;if(this.active===t&&t.settled){this.clearActive();return}this.active===t&&!this.closing&&(this.pollingReady=t,this.schedulePoll(t))}catch(s){this.active===t&&!this.closing&&(t.settled?this.clearActive():this.failActive(s))}}resetReadinessEvidence(){this.lastOutputAt=Date.now(),this.promptSeen=!1,this.promptTextSeen=!1,this.promptTail=""}read(t){const e=this.scrollback.snapshot(),i=e.text.split(`
|
|
8
8
|
`),s=e.text.length===0?0:i.length,n=t.offset??0,r=t.count??500;if(!Number.isSafeInteger(n)||n<0)throw new Error("PTY read offset must be a non-negative safe integer");if(!Number.isSafeInteger(r)||r<=0)throw new Error("PTY read count must be a positive safe integer");if(n>=s)return{text:"",totalLines:s,lineBegin:n,lineEnd:n,truncated:e.truncated};const h=s-n,a=Math.max(0,h-r),d=m(i.slice(a,h).join(`
|
|
9
9
|
`),this.config.maxReadBytes),c=d.text.length===0?0:d.text.split(`
|
|
10
|
-
`).length;return{text:d.text,totalLines:s,lineBegin:n,lineEnd:n+c,truncated:e.truncated||d.truncated}}async signal(t){if(this.closing)throw new Error("PTY session is closing");return{delivered:!0,targetPgid:await this.terminal.signalForeground(t)}}status(){return this.statusValue}close(t){if(this.closing=!0,this.closePromise!==void 0)return this.closePromise;const e=this.closeOnce(t).catch(i=>{throw this.closePromise=void 0,this.failActive(i),i});return this.closePromise=e,e}onTerminalData=o(t=>{const e=typeof t=="string"?p.from(t,"utf8"):t;this.onData(this.decoder.decode(e,{stream:!0}))},"onTerminalData");onTerminalEnd=o(()=>{this.onData(this.decoder.decode()),this.appendOutput(this.sanitizer.flush()),this.outputEnded.resolve()},"onTerminalEnd");onTerminalError=o(t=>{this.onTransportFailure(t),this.outputEnded.resolve()},"onTerminalError");onData(t){const e=this.sanitizer.push(t);if(this.appendOutput(e.text),e.prompt&&(this.promptSeen=!0,this.promptTail="",this.lastOutputAt=Date.now()),this.promptSeen&&e.promptTail!==void 0){const i=Math.max(0,6-this.promptTail.length);this.promptTail+=e.promptTail.slice(0,i),e.promptTail.length>i&&(this.promptTail=`${g}\0`),this.promptTextSeen=this.promptTail===g}}async onExit(t){await this.outputEnded.promise,this.transportFailure===void 0&&(this.statusValue={kind:"exited",exitCode:t.exitCode,signal:t.signal},this.settleActive("session_exit"))}onTransportFailure(t){const e=t instanceof Error?t:new Error(String(t));this.transportFailure??=e,this.statusValue={kind:"exited",exitCode:null,signal:null},this.failActive(e),this.terminal.terminate().catch(()=>{})}appendOutput(t){t.length!==0&&(this.lastOutputAt=Date.now(),this.scrollback.append(t),this.active?.append(t))}schedulePoll(t,e=this.config.pollIntervalMs){this.active!==t||this.interrupting===t||this.polling||(this.activeTimer!==void 0&&clearTimeout(this.activeTimer),this.activeTimer=setTimeout(()=>{this.activeTimer=void 0,this.pollReadiness(t)},e))}async pollReadiness(t){if(!(this.active!==t||this.polling)){this.polling=!0;try{if(this.statusValue.kind==="exited"){this.settleActive("session_exit");return}const e=await this.terminal.inspectForeground();if(this.active!==t||this.closing||this.interrupting===t)return;const i=Date.now()-this.lastOutputAt;if(this.promptSeen&&e!==void 0&&this.shellPgid===void 0&&(this.shellPgid=e.processGroupId),this.promptSeen&&this.promptTextSeen&&i>=this.config.pollIntervalMs&&e?.processGroupId===this.shellPgid){this.settleActive("stdin_read");return}const s=Date.now()-t.startedAt,n=!this.initializing||this.scrollback.snapshot().text.length>0,r=n&&e!==void 0&&t.acceptsStdinWait(e.processGroupId,e.inputWaiting);if(s>=this.config.exactProbeAfterMs&&r){this.settleActive("stdin_read");return}const h=this.promptSeen?this.config.handoffGraceMs:0;n&&i>=this.config.idleSilenceMs+h&&this.settleActive("inferred_idle")}catch(e){this.active===t&&!this.closing&&this.interrupting!==t&&this.failActive(e)}finally{this.polling=!1;const e=this.active;e!==void 0&&this.pollingReady===e&&this.schedulePoll(e)}}}settleActive(t,e=!1){const i=this.active;if(i===void 0)return;const s=this.scrollback.snapshot().truncated;e?(this.stopPolling(),this.activeAbort?.(),this.activeAbort=void 0):this.clearActive(),i.settle(t,this.statusValue,s)}stopPolling(){this.stopReadinessPolling(),this.activeDeadlineTimer!==void 0&&clearTimeout(this.activeDeadlineTimer),this.activeDeadlineTimer=void 0}stopReadinessPolling(){this.activeTimer!==void 0&&clearTimeout(this.activeTimer),this.activeTimer=void 0,this.pollingReady=void 0}clearActive(){const t=this.active;this.stopPolling(),this.activeAbort?.(),this.activeAbort=void 0,this.interrupting===t&&(this.interrupting=void 0),this.pollingReady=void 0,this.active=void 0}failActive(t){const e=this.active;e!==void 0&&(this.clearActive(),e.fail(t))}interrupt(t){this.active===t&&(this.interrupting=t,this.stopReadinessPolling(),this.interruptOnce(t))}async interruptOnce(t){try{const e=this.activeWrite;if(e!==void 0&&!await e)return;await this.terminal.signalForeground("SIGINT")}catch(e){this.active===t&&!this.closing&&this.onTransportFailure(e);return}finally{this.interrupting===t&&(this.interrupting=void 0)}this.active===t&&t.settled?this.clearActive():this.active===t&&!this.closing&&(this.pollingReady=t,this.schedulePoll(t,0))}async closeOnce(t){this.stopPolling();try{await this.terminal.terminate()}catch(e){throw new Error(`PTY cleanup failed (${t})`,{cause:e})}if(this.settleActive("session_exit"),await this.completion,this.terminal.output.off("data",this.onTerminalData),this.terminal.output.off("end",this.onTerminalEnd),this.terminal.output.off("error",this.onTerminalError),this.transportFailure!==void 0)throw this.transportFailure}};const D="terminal-bash",I=["terminals","sandboxPolicy","subprocess"],b=new WeakMap;function L(t,e){const i=b.get(e);if(i!==void 0){i.pty=t.terminals,i.sandboxPolicy=t.sandboxPolicy;return}const s={pty:t.terminals,sandboxPolicy:t.sandboxPolicy};b.set(e,s),e.ctx.on("internal/dispatch",(n,r,h)=>{if(r!=="session/event")return;const[a,d]=h;if(a!==e.session||d.type!=="sandbox/mode")return;const c=E(a.events)??s.sandboxPolicy.defaultMode;if(!(d.data.mode===c||!s.pty.hasOwnerActivity(e)))throw new Error(`cannot change sandbox mode from "${c}" to "${d.data.mode}" while persistent terminal sessions are open or being created; wait for creation to settle and close them first`)},{global:!0})}o(L,"ensureSandboxModeFence");function F(t){return{TERM:"dumb",PAGER:"cat",GIT_PAGER:"cat",PS1:g,PROMPT_COMMAND
|
|
10
|
+
`).length;return{text:d.text,totalLines:s,lineBegin:n,lineEnd:n+c,truncated:e.truncated||d.truncated}}async signal(t){if(this.closing)throw new Error("PTY session is closing");return{delivered:!0,targetPgid:await this.terminal.signalForeground(t)}}status(){return this.statusValue}close(t){if(this.closing=!0,this.closePromise!==void 0)return this.closePromise;const e=this.closeOnce(t).catch(i=>{throw this.closePromise=void 0,this.failActive(i),i});return this.closePromise=e,e}onTerminalData=o(t=>{const e=typeof t=="string"?p.from(t,"utf8"):t;this.onData(this.decoder.decode(e,{stream:!0}))},"onTerminalData");onTerminalEnd=o(()=>{this.onData(this.decoder.decode()),this.appendOutput(this.sanitizer.flush()),this.outputEnded.resolve()},"onTerminalEnd");onTerminalError=o(t=>{this.onTransportFailure(t),this.outputEnded.resolve()},"onTerminalError");onData(t){const e=this.sanitizer.push(t);if(this.appendOutput(e.text),e.prompt&&(this.promptSeen=!0,this.promptTail="",this.lastOutputAt=Date.now()),this.promptSeen&&e.promptTail!==void 0){const i=Math.max(0,6-this.promptTail.length);this.promptTail+=e.promptTail.slice(0,i),e.promptTail.length>i&&(this.promptTail=`${g}\0`),this.promptTextSeen=this.promptTail===g}}async onExit(t){await this.outputEnded.promise,this.transportFailure===void 0&&(this.statusValue={kind:"exited",exitCode:t.exitCode,signal:t.signal},this.settleActive("session_exit"))}onTransportFailure(t){const e=t instanceof Error?t:new Error(String(t));this.transportFailure??=e,this.statusValue={kind:"exited",exitCode:null,signal:null},this.failActive(e),this.terminal.terminate().catch(()=>{})}appendOutput(t){t.length!==0&&(this.lastOutputAt=Date.now(),this.scrollback.append(t),this.active?.append(t))}schedulePoll(t,e=this.config.pollIntervalMs){this.active!==t||this.interrupting===t||this.polling||(this.activeTimer!==void 0&&clearTimeout(this.activeTimer),this.activeTimer=setTimeout(()=>{this.activeTimer=void 0,this.pollReadiness(t)},e))}async pollReadiness(t){if(!(this.active!==t||this.polling)){this.polling=!0;try{if(this.statusValue.kind==="exited"){this.settleActive("session_exit");return}const e=await this.terminal.inspectForeground();if(this.active!==t||this.closing||this.interrupting===t)return;const i=Date.now()-this.lastOutputAt;if(this.promptSeen&&e!==void 0&&this.shellPgid===void 0&&(this.shellPgid=e.processGroupId),this.promptSeen&&this.promptTextSeen&&i>=this.config.pollIntervalMs&&e?.processGroupId===this.shellPgid){this.settleActive("stdin_read");return}const s=Date.now()-t.startedAt,n=!this.initializing||this.scrollback.snapshot().text.length>0,r=n&&e!==void 0&&t.acceptsStdinWait(e.processGroupId,e.inputWaiting);if(s>=this.config.exactProbeAfterMs&&r){this.settleActive("stdin_read");return}const h=this.promptSeen?this.config.handoffGraceMs:0;n&&i>=this.config.idleSilenceMs+h&&this.settleActive("inferred_idle")}catch(e){this.active===t&&!this.closing&&this.interrupting!==t&&this.failActive(e)}finally{this.polling=!1;const e=this.active;e!==void 0&&this.pollingReady===e&&this.schedulePoll(e)}}}settleActive(t,e=!1){const i=this.active;if(i===void 0)return;const s=this.scrollback.snapshot().truncated;e?(this.stopPolling(),this.activeAbort?.(),this.activeAbort=void 0):this.clearActive(),i.settle(t,this.statusValue,s)}stopPolling(){this.stopReadinessPolling(),this.activeDeadlineTimer!==void 0&&clearTimeout(this.activeDeadlineTimer),this.activeDeadlineTimer=void 0}stopReadinessPolling(){this.activeTimer!==void 0&&clearTimeout(this.activeTimer),this.activeTimer=void 0,this.pollingReady=void 0}clearActive(){const t=this.active;this.stopPolling(),this.activeAbort?.(),this.activeAbort=void 0,this.interrupting===t&&(this.interrupting=void 0),this.pollingReady=void 0,this.active=void 0}failActive(t){const e=this.active;e!==void 0&&(this.clearActive(),e.fail(t))}interrupt(t){this.active===t&&(this.interrupting=t,this.stopReadinessPolling(),this.interruptOnce(t))}async interruptOnce(t){try{const e=this.activeWrite;if(e!==void 0&&!await e)return;await this.terminal.signalForeground("SIGINT")}catch(e){this.active===t&&!this.closing&&this.onTransportFailure(e);return}finally{this.interrupting===t&&(this.interrupting=void 0)}this.active===t&&t.settled?this.clearActive():this.active===t&&!this.closing&&(this.pollingReady=t,this.schedulePoll(t,0))}async closeOnce(t){this.stopPolling();try{await this.terminal.terminate()}catch(e){throw new Error(`PTY cleanup failed (${t})`,{cause:e})}if(this.settleActive("session_exit"),await this.completion,this.terminal.output.off("data",this.onTerminalData),this.terminal.output.off("end",this.onTerminalEnd),this.terminal.output.off("error",this.onTerminalError),this.transportFailure!==void 0)throw this.transportFailure}};const D="terminal-bash",I=["terminals","sandboxPolicy","subprocess"],b=new WeakMap;function L(t,e){const i=b.get(e);if(i!==void 0){i.pty=t.terminals,i.sandboxPolicy=t.sandboxPolicy;return}const s={pty:t.terminals,sandboxPolicy:t.sandboxPolicy};b.set(e,s),e.ctx.on("internal/dispatch",(n,r,h)=>{if(r!=="session/event")return;const[a,d]=h;if(a!==e.session||d.type!=="sandbox/mode")return;const c=E(a.events)??s.sandboxPolicy.defaultMode;if(!(d.data.mode===c||!s.pty.hasOwnerActivity(e)))throw new Error(`cannot change sandbox mode from "${c}" to "${d.data.mode}" while persistent terminal sessions are open or being created; wait for creation to settle and close them first`)},{global:!0})}o(L,"ensureSandboxModeFence");function F(t){return{TERM:"dumb",PAGER:"cat",GIT_PAGER:"cat",PS1:g,PROMPT_COMMAND:`printf "\\033]133;D;%s\\007" "$?"; PS1='${g}'`,BASH_SILENCE_DEPRECATION_WARNING:"1",DSH_SHELL:"1",DSH_SESSION_ID:t.owner.id,DSH_PTY_SESSION_ID:t.sessionId}}o(F,"childEnvironment");function k(t,e,i){const s=[e.shellPath,...e.shellArgs];if(i.mode==="danger-full-access")return s;const n=t.get("sandbox");if(n===void 0)throw new Error(`terminal-bash: sandbox mode "${i.mode}" requires a ctx.sandbox provider in the execution world`);return n.confine(s,{...i,mode:i.mode}).argv}o(k,"spawnArgv");async function W(t,e){if(e===void 0){await t.initialize(e);return}const i=Promise.withResolvers(),s=o(()=>{i.reject(e.reason)},"onAbort");e.addEventListener("abort",s,{once:!0});try{e.throwIfAborted(),await Promise.race([t.initialize(e),i.promise])}finally{e.removeEventListener("abort",s)}}o(W,"initializeSession");var w=class{static{o(this,"BashTerminalBackend")}ctx;config;spawnTerminal;createSession;type;constructor(t,e,i=n=>t.subprocess.spawnTerminal(n),s=(n,r)=>new B(n,r)){this.ctx=t,this.config=e,this.spawnTerminal=i,this.createSession=s,this.type=e.backendType}async spawn(t){t.signal?.throwIfAborted(),L(this.ctx,t.owner);const e=this.ctx.sandboxPolicy.resolve({session:t.owner.session}),i=k(this.ctx,this.config,e);if(i[0]===void 0)throw new Error("terminal-bash: sandbox returned empty argv");const s=await this.spawnTerminal({argv:i,cwd:t.cwd??e.workspaceRoot,env:F(t),rows:this.config.rows,cols:this.config.cols,graceMs:this.config.disposeGraceMs,signal:t.signal}),n=this.createSession(s,this.config);try{return await W(n,t.signal),n}catch(r){try{await n.close("PTY startup failed")}catch(h){throw new y(r,h)}throw r}}};function C(t,e){S(e),t.terminals.registerBackend(new w(t,e))}o(C,"apply");export{w as BashTerminalBackend,A as Config,C as apply,I as inject,D as name};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-terminal-bash","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-terminal-bash","version":"0.1.0","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.1.0","@deepseek-ai/dsh-terminal":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-sandbox-policy":"^0.1.0","@deepseek-ai/dsh-sandbox":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-subprocess":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-time-context","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-time-context","version":"0.1.0","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":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-timeout","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-timeout","version":"0.1.0","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.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-tmux-context","version":"0.0
|
|
1
|
+
{"name":"@deepseek-ai/dsh-tmux-context","version":"0.1.0","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":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/dsh-shell":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
|