@qqbrowser/qbot-dsh 0.0.15 → 0.1.1
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/cordis.patch.yml +50 -0
- package/lib/args-w1okyL78.js +9 -0
- package/lib/bin.js +2 -2
- package/lib/client.js +1 -0
- package/lib/content-review-CqDoh3wY.js +1 -0
- package/lib/content-review.js +1 -0
- package/lib/dump-config-CIL0Goqj.js +1 -0
- package/lib/gateway-port-CSFbDyoZ.js +1 -0
- package/lib/index.js +1 -0
- package/lib/llm-gateway-openai.js +17 -0
- package/lib/native-protocol-DdrIh89-.js +2 -0
- package/lib/{plugin-DNAeLZbb.js → plugin-viWCLnSr.js} +1 -1
- package/lib/profile-boot-CxJUSdnu.js +1 -0
- package/lib/profile-boot-DCgBQ4qO.js +8 -0
- package/lib/qb-auth-C2ofR1zn.js +4 -0
- package/lib/qb-auth.js +1 -0
- package/lib/web-search-dsh.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +7 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +1 -1
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +7 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +1 -1
- 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/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +12 -12
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment-local/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +6 -37
- 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/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +2 -2
- 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/lib/index.js +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-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/lib/index.js +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/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-headless/lib/startup.js +3 -3
- package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-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/lib/index.js +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-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-repeat-tool-reminder/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/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/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/lib/index.js +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/lib/index.js +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 +9 -30
- 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/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +0 -1
- package/node_modules/@deepseek-ai/dsh-web-app/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/lib/startup.js +4 -5
- 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-workflow/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/worker.cjs +9 -8
- 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/@deepseek-ai/node-addon-landlock-run/package.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +5 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@koromix/koffi-darwin-arm64/darwin_arm64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-darwin-arm64/package.json +1 -1
- package/node_modules/@koromix/koffi-darwin-x64/darwin_x64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-darwin-x64/package.json +1 -1
- package/node_modules/@koromix/koffi-win32-x64/package.json +1 -1
- package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.node +0 -0
- package/node_modules/@smithy/core/dist-cjs/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +126 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +14 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +16 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +7 -0
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +29 -13
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +12 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +44 -15
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +22 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +3 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +19 -7
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +10 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +4 -1
- package/node_modules/@smithy/signature-v4/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/koffi/package.json +1 -1
- package/node_modules/koffi/src/koffi/index.cjs +1 -1
- package/node_modules/koffi/src/koffi/index.js +1 -1
- package/node_modules/koffi/src/koffi/indirect.cjs +1 -1
- package/node_modules/koffi/src/koffi/indirect.js +1 -1
- package/node_modules/negotiator/lib/accept.js +54 -0
- package/node_modules/negotiator/lib/charset.js +10 -34
- package/node_modules/negotiator/lib/encoding.js +9 -30
- package/node_modules/negotiator/lib/language.js +15 -36
- package/node_modules/negotiator/lib/mediaType.js +16 -134
- package/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
- package/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/negotiator/node_modules/content-type/package.json +1 -0
- package/node_modules/negotiator/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/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/_idna.mjs +1 -1
- package/node_modules/typebox/build/format/_puny.mjs +1 -1
- package/node_modules/typebox/build/format/uuid.mjs +1 -1
- package/node_modules/typebox/build/guard/emit.mjs +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +1 -1
- package/node_modules/typebox/build/guard/string.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_guard.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/boolean.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/types/_guard.mjs +1 -0
- package/node_modules/typebox/build/schema/types/index.mjs +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +1 -1
- package/node_modules/typebox/build/system/locale/ar_001.mjs +1 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +1 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +1 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +1 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +1 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +1 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +1 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +1 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +1 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +1 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +1 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +1 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +1 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +1 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +1 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +1 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +1 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +1 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +1 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +1 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +1 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +1 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +1 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +1 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +1 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +1 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +1 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +1 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +1 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +1 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +1 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +1 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +1 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +1 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +1 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +1 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +1 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +1 -1
- package/node_modules/typebox/build/system/memory/clone.mjs +1 -1
- package/node_modules/typebox/build/system/settings/settings.mjs +1 -1
- package/node_modules/typebox/build/type/action/_optional.mjs +1 -0
- package/node_modules/typebox/build/type/action/_readonly.mjs +1 -0
- package/node_modules/typebox/build/type/action/awaited.mjs +1 -0
- package/node_modules/typebox/build/type/action/conditional.mjs +1 -1
- package/node_modules/typebox/build/type/action/index.mjs +1 -1
- package/node_modules/typebox/build/type/action/mapped.mjs +1 -1
- package/node_modules/typebox/build/type/action/module.mjs +1 -1
- package/node_modules/typebox/build/type/action/options.mjs +1 -0
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +1 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +1 -1
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +1 -1
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +1 -1
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +1 -1
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +1 -0
- package/node_modules/typebox/build/type/engine/enum/index.mjs +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +1 -1
- package/node_modules/typebox/build/type/engine/index.mjs +1 -1
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +1 -1
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +1 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +1 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/instantiate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +1 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +1 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +1 -1
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +1 -1
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +1 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/options/instantiate.mjs +1 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +1 -1
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +1 -1
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +1 -1
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +1 -1
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +1 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +1 -1
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +1 -0
- package/node_modules/typebox/build/type/extends/enum.mjs +1 -1
- package/node_modules/typebox/build/type/extends/extends_left.mjs +1 -1
- package/node_modules/typebox/build/type/extends/extends_right.mjs +1 -1
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/iterator.mjs +1 -0
- package/node_modules/typebox/build/type/extends/object.mjs +1 -1
- package/node_modules/typebox/build/type/extends/parameters.mjs +1 -1
- package/node_modules/typebox/build/type/extends/promise.mjs +1 -0
- package/node_modules/typebox/build/type/extends/template_literal.mjs +1 -1
- package/node_modules/typebox/build/type/extends/tuple.mjs +1 -1
- package/node_modules/typebox/build/type/extends/union.mjs +1 -1
- package/node_modules/typebox/build/type/script/mapping.mjs +1 -1
- package/node_modules/typebox/build/type/script/parser.mjs +6 -6
- package/node_modules/typebox/build/type/script/script.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +1 -1
- package/node_modules/typebox/build/type/types/_immutable.mjs +1 -1
- package/node_modules/typebox/build/type/types/_optional.mjs +1 -1
- package/node_modules/typebox/build/type/types/_readonly.mjs +1 -1
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -1
- package/node_modules/typebox/build/type/types/async_iterator.mjs +1 -0
- package/node_modules/typebox/build/type/types/base.mjs +1 -0
- package/node_modules/typebox/build/type/types/call.mjs +1 -1
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/enum.mjs +1 -1
- package/node_modules/typebox/build/type/types/index.mjs +1 -1
- package/node_modules/typebox/build/type/types/iterator.mjs +1 -0
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/promise.mjs +1 -0
- package/node_modules/typebox/build/type/types/record.mjs +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/build/value/clean/clean.mjs +1 -1
- package/node_modules/typebox/build/value/clean/from_base.mjs +1 -0
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +1 -1
- package/node_modules/typebox/build/value/clean/from_type.mjs +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -1
- package/node_modules/typebox/build/value/clone/clone.mjs +1 -1
- package/node_modules/typebox/build/value/codec/decode.mjs +1 -1
- package/node_modules/typebox/build/value/codec/encode.mjs +1 -1
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -1
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/codec/from_record.mjs +1 -1
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -1
- package/node_modules/typebox/build/value/codec/from_union.mjs +1 -1
- package/node_modules/typebox/build/value/convert/from_base.mjs +1 -0
- package/node_modules/typebox/build/value/convert/from_enum.mjs +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +1 -1
- package/node_modules/typebox/build/value/convert/from_type.mjs +1 -1
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +1 -0
- package/node_modules/typebox/build/value/create/from_base.mjs +1 -0
- package/node_modules/typebox/build/value/create/from_enum.mjs +1 -1
- package/node_modules/typebox/build/value/create/from_iterator.mjs +1 -0
- package/node_modules/typebox/build/value/create/from_promise.mjs +1 -0
- package/node_modules/typebox/build/value/create/from_type.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_base.mjs +1 -0
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +1 -1
- package/node_modules/typebox/build/value/index.mjs +1 -1
- package/node_modules/typebox/build/value/mutate/error.mjs +1 -0
- package/node_modules/typebox/build/value/mutate/from_array.mjs +1 -0
- package/node_modules/typebox/build/value/mutate/from_object.mjs +1 -0
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +1 -0
- package/node_modules/typebox/build/value/mutate/from_value.mjs +1 -0
- package/node_modules/typebox/build/value/mutate/index.mjs +1 -0
- package/node_modules/typebox/build/value/mutate/mutate.mjs +1 -0
- package/node_modules/typebox/build/value/repair/from_base.mjs +1 -0
- package/node_modules/typebox/build/value/repair/from_enum.mjs +1 -1
- package/node_modules/typebox/build/value/repair/from_type.mjs +1 -1
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +1 -1
- package/node_modules/typebox/build/value/value.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/package.json +1 -1
- package/lib/args-DcHS9iff.js +0 -9
- package/lib/dump-config-xQTUTTDD.js +0 -1
- package/lib/profile-boot-BkordgJK.js +0 -1
- package/lib/profile-boot-DDo03lXi.js +0 -8
- package/node_modules/@deepseek-ai/dsh-content-review/LICENSE +0 -21
- package/node_modules/@deepseek-ai/dsh-content-review/lib/index.js +0 -1
- package/node_modules/@deepseek-ai/dsh-content-review/lib/invariant.js +0 -1
- package/node_modules/@deepseek-ai/dsh-content-review/package.json +0 -1
- package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/LICENSE +0 -21
- package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/index.js +0 -1
- package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/invariant.js +0 -1
- package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +0 -1
- package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/LICENSE +0 -21
- package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/index.js +0 -17
- package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/invariant.js +0 -1
- package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +0 -1
- package/node_modules/@deepseek-ai/dsh-qb-auth/LICENSE +0 -21
- package/node_modules/@deepseek-ai/dsh-qb-auth/lib/index.js +0 -4
- package/node_modules/@deepseek-ai/dsh-qb-auth/lib/invariant.js +0 -1
- package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +0 -1
- package/node_modules/@deepseek-ai/dsh-web-search-dsh/LICENSE +0 -21
- package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/index.js +0 -1
- package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/invariant.js +0 -1
- package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +0 -1
- package/node_modules/@napi-rs/xattr/LICENSE +0 -21
- package/node_modules/@napi-rs/xattr/index.js +0 -567
- package/node_modules/@napi-rs/xattr/package.json +0 -1
- package/node_modules/@napi-rs/xattr-darwin-arm64/package.json +0 -1
- package/node_modules/@napi-rs/xattr-darwin-arm64/xattr.darwin-arm64.node +0 -0
- package/node_modules/@napi-rs/xattr-darwin-x64/package.json +0 -1
- package/node_modules/@napi-rs/xattr-darwin-x64/xattr.darwin-x64.node +0 -0
- package/node_modules/@parcel/watcher/LICENSE +0 -21
- package/node_modules/@parcel/watcher/index.js +0 -44
- package/node_modules/@parcel/watcher/index.js.flow +0 -45
- package/node_modules/@parcel/watcher/package.json +0 -1
- package/node_modules/@parcel/watcher/scripts/build-from-source.js +0 -16
- package/node_modules/@parcel/watcher/wrapper.js +0 -88
- package/node_modules/@parcel/watcher-darwin-arm64/LICENSE +0 -21
- package/node_modules/@parcel/watcher-darwin-arm64/package.json +0 -1
- package/node_modules/@parcel/watcher-darwin-arm64/watcher.node +0 -0
- package/node_modules/@parcel/watcher-darwin-x64/LICENSE +0 -21
- package/node_modules/@parcel/watcher-darwin-x64/package.json +0 -1
- package/node_modules/@parcel/watcher-darwin-x64/watcher.node +0 -0
- package/node_modules/@parcel/watcher-win32-x64/LICENSE +0 -21
- package/node_modules/@parcel/watcher-win32-x64/package.json +0 -1
- package/node_modules/@parcel/watcher-win32-x64/watcher.node +0 -0
- package/node_modules/is-extglob/LICENSE +0 -21
- package/node_modules/is-extglob/index.js +0 -20
- package/node_modules/is-extglob/package.json +0 -1
- package/node_modules/is-glob/LICENSE +0 -21
- package/node_modules/is-glob/index.js +0 -150
- package/node_modules/is-glob/package.json +0 -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
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +0 -1
- package/node_modules/typebox/build/type/action/_add_optional.mjs +0 -1
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +0 -1
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +0 -1
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +0 -1
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +0 -1
- package/node_modules/typebox/build/type/action/with.mjs +0 -1
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +0 -1
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +0 -1
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +0 -1
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +0 -1
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +0 -1
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +0 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +0 -1
- package/node_modules/typebox/build/type/engine/priority/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +0 -1
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +0 -1
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +0 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +0 -1
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +0 -1
- package/node_modules/typebox/build/type/engine/with/instantiate.mjs +0 -1
- package/node_modules/typebox/build/type/extends/dependent.mjs +0 -1
- package/node_modules/typebox/build/type/extends/record.mjs +0 -1
- package/node_modules/typebox/build/type/types/dependent.mjs +0 -1
- /package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/{types-D2_FQYSK.js → types-DE3U0cmQ.js} +0 -0
- /package/node_modules/typebox/build/type/engine/{with → awaited}/index.mjs +0 -0
|
@@ -16,7 +16,7 @@ Only valid while the agent has produced nothing: swapping tools mid conversation
|
|
|
16
16
|
|
|
17
17
|
The swap is a parent re-link, not an unmount: standing mounts are shared and permanent, so the old composition stays for its other agents and the new one is ensured BEFORE the link moves. An unknown or unusable preset therefore throws with the agent exactly as it was — there is no torn-down state to restore. The re-link runs through the binding this roster kept from the agent's mount — dsh-scope's only re-link authority. An agent that never composed one has nothing to re-link: the switch is then the agent's first bind, exactly a mount.`,parameters:[{name:"agentCtx",description:"the agent's scope context."},{name:"id",description:"the preset to compose the agent from instead."}],returns:"the preset now installed.",throws:["when the preset is unknown or its composition is unusable."]},{signature:"async standingKeyFor(id?: string): Promise<ScopeKey>",description:`The standing scope key of one preset, for a host reader with no agent.
|
|
18
18
|
|
|
19
|
-
A cold transcript read resolves tool presenters against the composition the session recorded, and the standing mount makes that possible without resuming anything: ensuring the mount composes plugins but starts no agent, no session, and no turn.`,parameters:[{name:"id",description:"the preset id, or `undefined` for {@link defaultId}."}],returns:"the standing scope key readers pass as a registry view scope.",throws:["when the preset is unknown or its composition is unusable."]}]},{key:"agents",summary:"Agent service (`ctx.agents`): tracks live agents and carries the initiating Agent through one process-local asynchronous driver chain.",description:"Agent service (`ctx.agents`): tracks live agents and carries the initiating Agent through one process-local asynchronous driver chain. Agent *creation* is provided by whichever plugin implements the AgentFactory (`@deepseek-ai/dsh-agent-loop`), registered via setFactory.\n\nInitiator methods provide same-process causal attribution only. Ambient presence is neither liveness proof nor authorization; subjects and owners remain explicit, as does identity at worker, process, persistence, and wire boundaries. Returned Promise boundaries drain during teardown, except a nested lineage that starts an owning-fiber unload is excluded from its own drain.",methods:[{signature:"currentInitiator(): Agent | undefined",description:"Read the Agent that initiated the inherited asynchronous driver chain. Use this optional form for logging, tracing, metrics, or host attribution that also supports agentless calls. When a parent creates a child, setup reports the causal parent while `agentCtx.agent` identifies the child.",parameters:[],returns:"the inherited Agent, or `undefined` outside an initiator boundary and inside an explicit clearing boundary.",throws:["when this service instance has been disposed."]},{signature:"requireInitiator(): Agent",description:"Read the initiating Agent and fail when no initiator boundary is active. Use this for private helpers contractually below a driver, or for a deployment-owned outbound request whose contract forbids agentless calls. Generic or direct-call paths use optional lookup or explicit request fields.",parameters:[],returns:"the inherited Agent.",throws:["when no initiator is active or this service instance has been disposed."]},{signature:"withInitiator<T>(agent: Agent, operation: () => T): T",description:"Run an operation with one exact Agent as its process-local initiator. The exact synchronous value or Promise returned by the operation is preserved. Custom drivers and test harnesses wrap their complete returned foreground lifetime. A queue or wire receiver may establish this boundary only after validating explicit identity and resolving the exact live Agent; this method does neither. Detached work remains owned by the subsystem that starts it.",parameters:[{name:"agent",description:"initiating Agent to inherit; presence is neither liveness proof nor authorization."},{name:"operation",description:"synchronous or asynchronous operation to invoke."}],returns:"the exact value returned by `operation`.",throws:["when the initiator scope is closing/disposed, or when `operation` throws."]},{signature:"withoutInitiator<T>(operation: () => T): T",description:"Run an operation inside a boundary that hides any inherited initiating Agent. The exact synchronous value or Promise is preserved. Use this while creating lazy shared timers, queue pumps, pool maintenance, watchers, or exporters so they do not inherit the first Agent that happens to initialize them. It clears only initiator attribution, not explicit fields, and does not own or drain detached resources.",parameters:[{name:"operation",description:"synchronous or asynchronous operation to invoke without an initiator."}],returns:"the exact value returned by `operation`.",throws:["when the initiator scope is closing/disposed, or when `operation` throws."]},{signature:"setFactory(factory: AgentFactory): () => void",description:"Register the agent-creation factory (the loop calls this on construction, effect-scoped). A traced Cordis service is canonicalized to its concrete target; each create/resume call is then traced through that caller's context so ownership follows the caller without stacking proxy layers. Throws if a factory is already registered. Returns the disposer; on dispose the factory slot is cleared.",parameters:[{name:"factory",description:"the loop-owned factory {@link create}/{@link resume} delegate to."}],returns:"the disposer that clears the factory slot. The exact Cordis effect disposer (single-shot): composite (generator) effects may yield it directly — exact identity nests the teardown in order."},{signature:"async create(options: CreateAgentOptions): Promise<AgentHandle>",description:"Create and publish a new agent through the registered factory. Distinct from register (which records an already-constructed agent): this constructs the agent and its session. Rejects if no factory is registered or creation/setup fails. The resolved AgentHandle lets the owner tear down exactly this agent.",parameters:[{name:"options",description:"shared identity, session seed/metadata, and agent options."}],returns:"the handle after setup, rollback-covered publication, and loop start complete."},{signature:"async resume(options: ResumeAgentOptions): Promise<AgentHandle>",description:"Load a persisted session and resume an agent on it through the registered factory. Rejects if no factory is registered; the factory rejects if session persistence is not configured or persistence/setup fails.",parameters:[{name:"options",description:"persisted identity, configuration, and optional setup."}],returns:"the handle after setup, rollback-covered publication, and loop start complete."},{signature:"register(agent: Agent): () => void",description:"Register a live agent. Throws if an agent with the same id is already registered. Emits `agent/created` on registration and `agent/disposed` when the calling fiber is disposed — both with the agent's scope carrier (`scopeTarget(agent, agent)`): the subject is the agent in hand, so the emits are scope-filtered regardless of which context invoked `register` (calling through `agent.ctx` scopes EFFECTS; dispatch scoping always requires passing the carrier). Returns the disposer.",parameters:[{name:"agent",description:"the already-constructed agent to record in the store."}],returns:"the EXACT Cordis effect disposer (single-shot; a repeat call returns undefined without awaiting an in-flight teardown). Exact identity is load-bearing: a composite (generator) effect that owns a teardown ORDER — the agent factory's lifecycle chain — must yield THIS function so Cordis nests the unregistration at that yield position; yielding a wrapper would leave it disposing as a concurrent sibling on owner unload, unregistering the agent (and emitting `agent/disposed`) while its final turn is still draining."},{signature:"enter(agent: Agent, owner: Agent | undefined): () => void",description:"Insert an already-constructed agent without announcing it. This is the advanced ordered-lifecycle primitive used by the async agent factory: it first completes setup while the agent is unpublished, then assigns the returned detach closure into its pre-installed composite teardown before calling announce. Ordinary callers use register.",parameters:[{name:"agent",description:"the prepared, unpublished agent."},{name:"owner",description:"live agent whose scoped context created this agent, or undefined for a top-level runtime root. This is runtime ownership, not the resumed session's durable parent lineage."}],returns:"an idempotent closure that removes this exact entry and emits `agent/disposed` with listener failures contained. When called from a synchronous `agent/created` listener, removal and disposal wait until that creation dispatch unwinds."},{signature:"announce(agent: Agent): void",description:"Announce an agent previously inserted with enter.",parameters:[{name:"agent",description:"the live inserted agent to announce."}],throws:["if `agent` is not the exact live registry entry for its id, or its creation announcement already began (including a reentrant call from a creation listener)."]},{signature:"get(id: SessionId): Agent | undefined",description:"Look up a live agent.",parameters:[{name:"id",description:"the shared agent/session id to look up."}],returns:"the agent, or undefined when no live agent has that id."},{signature:"isOwnedBy(id: SessionId, owner: Agent): boolean",description:"Test whether a live agent was created through one exact parent agent's scoped context. Runtime ownership is independent of durable session lineage and remains unambiguous when unrelated providers reuse an id.",parameters:[{name:"id",description:"the candidate child agent's shared agent/session id."},{name:"owner",description:"the expected runtime creator agent."}],returns:"true only while the exact child entry is live under that owner."},{signature:"list(): Agent[]",description:"All live agents, in registration order.",parameters:[],returns:"a fresh array; mutating it does not affect the registry."},{signature:"roots(): Agent[]",description:"All live top-level agents in registration order. A top-level agent was created without an owning agent context; durable session lineage does not affect this runtime relation, so a resumed fork may still be a root.",parameters:[],returns:"a fresh array; mutating it does not affect the registry."}]},{key:"apiProxy",summary:"Root interface of the unified API.",description:"Root interface of the unified API. New client-request domain = one new file pair + one field here + one map row.",methods:[{signature:"downloads: DownloadsApi",description:"Host-only download surfaces (GET, no wire envelope); absent from IApiClient.",parameters:[]},{signature:"respond(message: ClientResponse): Promise<RpcReceipt>",description:"Response entry for server requests; not a domain method.",parameters:[{name:"message",description:"Client response carrying the server request's rpcId."}],returns:"Transport receipt for the response delivery."}]},{key:"approval",summary:"Approval service that applies session policy before answerers and logs every ask/outcome pair to the requesting session.",description:"Approval service that applies session policy before answerers and logs every ask/outcome pair to the requesting session. It exposes deterministic policy changes to the model through the runtime-context snapshot and switch notices.",methods:[{signature:"setPolicy(agent: Agent, policy: ApprovalPolicy): void",description:"Switch one live agent's policy and queue the transition for its next model step. Session initialization uses setApprovalPolicy directly because there is no previously visible policy to change.",parameters:[{name:"agent",description:"the live agent whose policy is changing."},{name:"policy",description:"the new effective policy."}]},{signature:"async request(req: ApprovalRequest): Promise<ApprovalOutcome>",description:"Ask the composed answerers to decide one readonly same-process request. The service borrows the request, agent, session, and live signal directly. The request requires an open turn because the audit pair must be enclosed by the durable log's commit/replay boundary; an idle ask rejects before appending anything. The answerer phase always produces an outcome: an aborted signal yields `'cancelled'`, a missing or throwing answerer yields `'unavailable'` (fail closed), and a rogue non-vocabulary return value is normalized to `'unavailable'`. A failure that prevents either audit append from committing still rejects because returning an unlogged decision would violate the pair. Session contains post-commit observer failures, so an authoritative append cannot reject the request or suppress its matching audit event.",parameters:[{name:"req",description:"the pending decision (agent, tool identity, reason, signal)."}],returns:"the closed outcome; `'allowed-once'` is the only grant.",throws:["when no turn is open or either audit event fails before the session append commit point."]},{signature:"overrideOf(session: Session): ApprovalPolicy | undefined",description:"Read the session override without applying the configured default.",parameters:[{name:"session",description:"session whose log supplies the override."}],returns:"the last logged policy, or `undefined` without one."}]},{key:"attachments",summary:"Immutable binary attachment service.",description:"Immutable binary attachment service. Implementations validate bytes before publishing a reference.",methods:[{signature:"abstract readonly imageLimits: ImageAttachmentLimits",description:"Deployment-resolved image policy used by authoritative and fast-path validation.",parameters:[]},{signature:"abstract validateImage(input: SaveImageAttachment): Promise<void>",description:"Validate one image without persisting it. Batch callers validate every member before saving any member.",parameters:[{name:"input",description:"encoded bytes, declared media type, and optional display name."}],returns:"completion after the encoded raster has been fully decoded."},{signature:"abstract saveImage(input: SaveImageAttachment): Promise<ImageAttachmentRef>",description:"Validate and durably commit one image before its owning session event is appended.",parameters:[{name:"input",description:"encoded bytes, declared media type, and optional display name."}],returns:"a durable content-addressed reference."},{signature:"abstract readImage(ref: ImageAttachmentRef, signal?: AbortSignal): Promise<StoredImageAttachment>",description:"Read one image and verify that bytes still match the recorded reference.",parameters:[{name:"ref",description:"durable reference from the session log."},{name:"signal",description:"optional cancellation for backend read and verification work."}],returns:"the verified bytes and canonical reference.",throws:["the signal reason when aborted, or a storage error when verification fails."]}]},{key:"clientModules",summary:"The web plugin table service: incremental `dsh.client` scan + wire composition + bundle route + index tap.",description:"The web plugin table service: incremental `dsh.client` scan + wire composition + bundle route + index tap. Construction runs the activation scan synchronously — a malformed declaration or missing bundle among the already-loaded entries aggregates into one loud throw (FAILED fiber; the boot activation audit reports it).",methods:[{signature:"graph(): WebBootGraph",description:"Current composed entry graph (stable object between changes).",parameters:[],returns:"the graph served as `window.__DSH_BOOT__`."},{signature:"clientPath(id: string): string | undefined",description:"Absolute path of an entry's client bundle.",parameters:[{name:"id",description:"entry id (package name)."}],returns:"the path, or undefined for an unknown id."},{signature:"rebuilt(id: string): string | undefined",description:"Re-hash one bundle (the HMR watch's registration hook — the only entry point through which bundle content changes reach the graph).",parameters:[{name:"id",description:"entry id (package name)."}],returns:"the new rev, or undefined for an unknown id."},{signature:"onRebuilt(listener: (id: string, rev: string) => void): () => void",description:"Subscribe to bundle rebuilds; fires only when the re-hash changed the rev.",parameters:[{name:"listener",description:"receives the entry id and its new bundle rev."}],returns:"the unsubscriber."},{signature:"onGraphChanged(listener: () => void): () => void",description:"Fires after any flush that recomposed the graph (row added/removed, or a rebuilt rev change). Pull model: listeners re-read graph.",parameters:[{name:"listener",description:"notified with no payload."}],returns:"the unsubscriber."}]},{key:"codeRuntime",summary:"Registers one `ctx.codeRuntime` implementation.",description:"Registers one `ctx.codeRuntime` implementation. Program, budget, abort, and substrate failures resolve in CodeRunResult; only Service Definition contract misuse rejects. Implementations bridge structured-cloneable bindings, materialize each declared namespace rejection class, treat programs as hostile peers, isolate runs from one another, and terminate and await in-flight runs during disposal.",methods:[{signature:"abstract readonly language: string",description:"The source language run expects `program` to be written in, as a lowercase identifier. Informational, not gating — a consumer that generates language-specific presentation (typed SDK stubs, usage instructions) switches on it and fails loud on a language it cannot present. Well-known values: `'typescript'` and `'python'`, those `dsh-tools` presents; only `'typescript'` has a published backend.",parameters:[]},{signature:"abstract readonly isolation: string",description:"The execution substrate, as a lowercase identifier. Informational, not gating — a descriptor so deployments and diagnostics can tell backends apart, not a security claim. Well-known values: `'worker-thread'`, `'process'`, `'container'`.",parameters:[]},{signature:"abstract run(request: CodeRunRequest): Promise<CodeRunResult>",description:"Execute one program against the request's bindings and capture what it emitted. See the class doc for the resolution contract (error is a result field; rejection means Service Definition contract misuse only).",parameters:[{name:"request",description:"the program, its bindings, and the abort signal; the request carries everything the runtime acts on, with no hidden defaults."}],returns:"the run's outcome: completion value (when transferable), the ordered log capture, and the failure (if any)."}]},{key:"commands",summary:"Human-command registry.",description:"Human-command registry. Plain-context definitions are global; definitions registered through a command-injected child of an agent context shadow globals for that agent.",methods:[{signature:"register(definition: CommandDefinition): () => void",description:"Register a global or calling-agent-scoped command.",parameters:[{name:"definition",description:"discovery metadata and direct UI handler."}],returns:"the exact effect disposer that unregisters this definition."},{signature:"@Remote list(agent: Agent): readonly CommandDescriptor[]",description:"List the effective immutable command descriptors for one agent.",parameters:[{name:"agent",description:"exact receiving agent and scoped-layer key."}],returns:"name-sorted descriptors after scoped shadowing."},{signature:"find(agent: Agent, name: string): CommandDefinition | undefined",description:"Resolve one effective command definition.",parameters:[{name:"agent",description:"exact receiving agent and scoped-layer key."},{name:"name",description:"command name without a slash."}],returns:"the scoped shadow or global definition."},{signature:"@Remote async execute( agent: Agent, line: string, signal: AbortSignal, ): Promise<CommandExecution | undefined>",description:"Parse and execute a known command without sending it to the model.\n\nA resolved command's lifecycle is logged: `command/run` is appended before the handler is invoked and `command/done` after settlement (a thrown or aborted handler settles as `kind: 'error'`). Both are direct log-only appends — no turn wraps them, and persistence drains them at ordinary checkpoints. Admission misses (syntax or unknown name) log nothing — they never entered a handler. A `command/run` append failure fails the execution loud; a `command/done` append failure on the handler-failure path is contained so the handler's own error stays the reported failure.",parameters:[{name:"agent",description:"exact receiving agent."},{name:"line",description:"complete slash-command line."},{name:"signal",description:"cancellation signal owned by the UI request."}],returns:"the settled execution (result + lifecycle pairing id), or `undefined` when syntax or name does not resolve."}]},{key:"compaction",summary:"Abstract compaction service.",description:"Abstract compaction service. Implementations own trigger policy, retention, and summarization, and may consume a separate measurement service. A successful run replaces the selected surface span with one summary node and prevents concurrent compaction of the same session. The replacement user message uses compactCheckpointSource with the transaction identity so consumers recognize and correlate it independently of the backend. Load one implementation per context as `ctx.compaction`.",methods:[{signature:"abstract compactIfNeeded( agent: CompactionAgentContext, trigger: CompactionTrigger, signal: AbortSignal, ): Promise<CompactionResult | null>",description:"Consider automatic compaction for one explicit trigger. Pressure policy uses the latest durable routed request, while context-overflow policy may force a useful balanced reduction even below the normal threshold. Return `null` when no safe range can be compacted. A single oversized retained unit or request envelope cannot be repaired through surface compaction.",parameters:[{name:"agent",description:"agent context owning the session surface and routing options."},{name:"trigger",description:"normal pressure or provider-confirmed context overflow."},{name:"signal",description:"cancellation signal; model-backed implementations must forward it."}],returns:"the compaction result, or `null` if no compaction was needed."},{signature:"abstract compactNow( agent: ManualCompactAgentContext, signal: AbortSignal, sourceCommandId?: CommandId, ): Promise<CompactionResult | null>",description:"Explicitly compact useful history even below automatic pressure thresholds. Implementations synchronously start an idle task before any asynchronous work, select a useful range without writing on a no-op, then append a standalone `compaction/start` before summarization. That durable marker is the compaction lock until one `compaction/end` attempt. Later waking prompts remain accepted in FIFO order and start only after the optional durability checkpoint and idle-task settlement. Context injected while the summary runs may sit between the marker pair; only the selected span must remain stable.",parameters:[{name:"agent",description:"idle agent whose durable history should be compacted."},{name:"signal",description:"cancellation scoped to this compaction request."},{name:"sourceCommandId",description:"initiating command identity for a manual compaction."}],returns:"the compaction result, or `null` when no safe useful range exists.",throws:["{@link ManualCompactionError} for expected busy, agent-cancellation, changed-span, summarization/shrink, commit-stage, or persistence failures; an aborted request preserves its exact abort reason. Failed attempts remain visible in the log."]},{signature:"abstract compactRegion( start: number, end: number, agent: CompactionAgentContext, signal?: AbortSignal, ): Promise<CompactionResult>",description:"Forcibly compact a range of surface nodes into a single summary node. `start` and `end` name an inclusive span by surface position, not numeric seq order; replacements can make visible seqs non-monotonic. Both edges must be balanced so assistant tool calls remain paired with their results. A model- backed implementation forwards cancellation and rejects active, missing, reversed, or unbalanced ranges. The target session is `agent.session`. Its replacement user message must use compactCheckpointSource with the transaction's `CompactionId`. Use toolPairingBalancedBefore and toolPairingBalancedAfter for the edge checks.",parameters:[{name:"start",description:"first surface seq, inclusive."},{name:"end",description:"last surface seq, inclusive."},{name:"agent",description:"context whose session is mutated and whose routing options guide summarization."},{name:"signal",description:"optional cancellation; model-backed implementations must forward it."}],returns:"the appended event seqs, summary, replaced range, and token accounting.",throws:["when compaction is active or the range is missing, reversed, or unbalanced."]}]},{key:"contentReview",summary:"The content-review service.",description:"The content-review service. A denied text throws ContentReviewFailedError carrying the client-visible replacement text; every other failure propagates as the transport's own error, leaving the caller to decide whether an unavailable reviewer blocks the request.",methods:[{signature:"async review(request: ContentReviewRequest): Promise<ContentReviewResult>",description:"Submit one text for review.",parameters:[{name:"request",description:"the text, its conversation stage, and an optional correlation id."}],returns:"the backend correlation id when the text is allowed."}]},{key:"credentials",summary:"Abstract credential service.",description:"Abstract credential service. Providers implement the four operations over their source layers; one seam-wide rule binds them all: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.",methods:[{signature:"abstract resolve(ref: CredentialRef): Promise<ResolvedCredential | undefined>",description:"Resolve one reference to its current value. Resolution is per call: consumers re-resolve at each operation and must not cache across operations — that per-operation read is what makes a changed credential reach the next operation without a restart.",parameters:[{name:"ref",description:"the reference to resolve."}],returns:"the value and its source, or `undefined` while unconfigured."},{signature:"abstract describe(ref: CredentialRef): Promise<CredentialInfo>",description:"Describe one reference for configuration surfaces without exposing the value.",parameters:[{name:"ref",description:"the reference to describe."}],returns:"configured state, supplying source, and writability."},{signature:"abstract set(ref: CredentialRef, value: string): Promise<void>",description:"Durably store one value in the provider-managed writable source. Rejects while a read-only source shadows the reference — the write would appear to succeed while resolution keeps returning the shadowing value — and rejects an empty value (use unset).",parameters:[{name:"ref",description:"the reference to store."},{name:"value",description:"the non-empty secret value."}]},{signature:"abstract unset(ref: CredentialRef): Promise<void>",description:"Remove one reference from the provider-managed writable source; removing an absent reference is a no-op. Rejects while a read-only source shadows the reference, like set.",parameters:[{name:"ref",description:"the reference to remove."}]}]},{key:"directoryPicker",summary:"Abstract directory-picking service.",description:"Abstract directory-picking service. Subclass, implement `capability()`, and load the subclass as a plugin — it registers as `ctx.directoryPicker` (one implementation per context; loading a second throws, cordis' standard duplicate-service behavior). The capability object must be stable for the service lifetime: consumers may capture it across calls.",methods:[{signature:"abstract capability(): DirectoryPickerCapability",description:"The backend's interaction capability.",parameters:[],returns:"the discriminated capability consumers switch on."}]},{key:"e2b",summary:"Creates one lazily consumable E2B SDK handle and deletes the sandbox at timeout or disposal.",description:"Creates one lazily consumable E2B SDK handle and deletes the sandbox at timeout or disposal. Creation begins at plugin construction; adapters await getSandbox before their first operation.",methods:[{signature:"readonly cwd: string",description:"Validated remote working directory shared by provider adapters.",parameters:[]},{signature:"readonly runtimeRoot: string",description:"Remote directory reserved for adapter-owned process and terminal state.",parameters:[]},{signature:"async getSandbox(): Promise<Sandbox>",description:"Return the shared live SDK handle.",parameters:[],returns:"the created sandbox after the configured cwd exists.",throws:["when E2B rejects creation or the service is disposing."]}]},{key:"fs",summary:"Abstract filesystem provider.",description:"Abstract filesystem provider. Targets must preserve identity across aliases; reads expose regular UTF-8 text or typed errors, listings are stable and content-free, and mutations are atomic. Optional guards add stale protection without changing the unguarded provider contract.",methods:[{signature:"abstract resolve(path: string, opts?: { cwd?: string; signal?: AbortSignal }): Promise<FsTarget>",description:"Resolve a model/plugin-supplied path into a stable FsTarget. May perform I/O (a remote/sandboxed backend may need a round-trip to map a path to a stable identity), hence async even though the local backend only normalizes + realpaths.",parameters:[{name:"path",description:"the path to resolve; relative paths resolve against `opts.cwd`."},{name:"opts",description:"optional cwd override and cancellation signal."}],returns:"the stable target; the same file yields the same `targetKey`."},{signature:"abstract processPath(target: FsTarget): string",description:"Return the canonical absolute path a subprocess in this filesystem's execution world can open. The path is deliberately separate from FsTarget.targetKey: consumers may pass this value to another OS capability, but must continue treating the target key as opaque.",parameters:[{name:"target",description:"the resolved target whose process path is required."}],returns:"an absolute path in the backend's execution world."},{signature:"abstract fileUrl(target: FsTarget): string",description:"Return the canonical `file:` URI for a target in this filesystem's execution world. Backends own URI encoding because the host platform may differ from the execution platform.",parameters:[{name:"target",description:"the resolved target to encode."}],returns:"the target's canonical file URI."},{signature:"abstract contains(parent: FsTarget, child: FsTarget): boolean",description:"Test canonical containment without exposing or parsing backend target keys. Both targets must come from this provider.",parameters:[{name:"parent",description:"canonical directory target."},{name:"child",description:"canonical candidate target."}],returns:"true when `child` is `parent` or a descendant of it."},{signature:"abstract stat(target: FsTarget, signal?: AbortSignal): Promise<FsInfo | undefined>",description:"Return target metadata, or `undefined` when the target does not exist.",parameters:[{name:"target",description:"the resolved target to stat."},{name:"signal",description:"aborts the metadata round-trip."}],returns:"metadata only, never content; undefined for an absent target."},{signature:"abstract lstat(path: string, opts?: { cwd?: string }, signal?: AbortSignal): Promise<FsPathInfo | undefined>",description:"Return path metadata without following the final path component when it is a symbolic link. This is intentionally path-shaped, not target-shaped: resolve follows symlinks to produce the stable identity used by normal reads/writes, while `lstat` lets a consumer reject the path itself before that follow happens.\n\n`opts.cwd` follows resolve's cwd rules. `undefined` means the path is absent.",parameters:[{name:"path",description:"the path to inspect; relative paths resolve against `opts.cwd`."},{name:"opts",description:"`cwd` overrides the backend's default base for relative paths."},{name:"signal",description:"aborts the metadata round-trip."}],returns:"metadata only, never content; undefined for an absent path."},{signature:"abstract readText(target: FsTarget, signal?: AbortSignal): Promise<string>",description:"Read the whole regular text file as a single decoded string.",parameters:[{name:"target",description:"the resolved target to read."},{name:"signal",description:"aborts the read."}],returns:"the full decoded UTF-8 content."},{signature:"abstract streamText(target: FsTarget, signal?: AbortSignal): Promise<AsyncIterable<string>>",description:"Stream the whole regular text file as decoded text chunks (same text semantics as readText, for large files). The backend owns cross-chunk UTF-8 decoding and binary rejection so the policy layer never touches raw bytes.",parameters:[{name:"target",description:"the resolved target to read."},{name:"signal",description:"aborts the stream, including between chunks."}],returns:"the chunk iterable, decoded and validated like {@link readText}."},{signature:"abstract readBytes(target: FsTarget, signal: AbortSignal | undefined, maxBytes: number): Promise<Uint8Array>",description:"Read the whole regular file as raw bytes with no decoding or binary rejection. The bound lives at this seam so a backend can never buffer an unbounded file: a target known or discovered to exceed `maxBytes` fails with `FS_TOO_LARGE` instead of returning a truncated result.",parameters:[{name:"target",description:"the resolved target to read."},{name:"signal",description:"aborts the read."},{name:"maxBytes",description:"inclusive byte cap on the complete content."}],returns:"the full raw content, at most `maxBytes` long."},{signature:"abstract listDir(target: FsTarget, signal?: AbortSignal): Promise<FsDirEntry[]>",description:"List direct children of a directory in stable name order. Returns resolved child targets plus cheap metadata only; never reads file contents.",parameters:[{name:"target",description:"the resolved directory target."},{name:"signal",description:"aborts the listing."}],returns:"one entry per direct child, in stable name order."},{signature:"abstract writeText( target: FsTarget, content: string, expected?: FsWriteIntent, signal?: AbortSignal, sandboxPolicy?: SandboxExecutionPolicy, ): Promise<FsWriteOutcome>",description:"Atomically create or replace UTF-8 text. `expected` guards intent and staleness; omission allows unconditional overwrite.",parameters:[{name:"target",description:"the resolved target to write."},{name:"content",description:"the full new file content."},{name:"expected",description:"the write intent guarding the write; omit for unconditional."},{name:"signal",description:"aborts before atomic publication takes effect."},{name:"sandboxPolicy",description:"the per-call mode and workspace root this write runs under; a sandboxing backend fences the write by it, the bare backend ignores it. Omit to leave the backend its own default."}],returns:"the outcome, including the version the write produced."},{signature:"abstract editText( target: FsTarget, edit: FsEditRequest, expected?: { version: FsVersion }, signal?: AbortSignal, sandboxPolicy?: SandboxExecutionPolicy, ): Promise<FsEditOutcome>",description:"Atomically edit literal text. When supplied, the version guard is checked before matching so stale content reports `FS_STALE_VERSION`; omission edits the current content without a freshness precondition.",parameters:[{name:"target",description:"the resolved target to edit."},{name:"edit",description:"the literal search/replace request."},{name:"expected",description:"the version guard; omit for an unconditional edit."},{name:"signal",description:"aborts before atomic publication takes effect."},{name:"sandboxPolicy",description:"the per-call mode and workspace root this edit runs under; a sandboxing backend fences the edit by it, the bare backend ignores it. Omit to leave the backend its own default."}],returns:"the outcome, including the version the edit produced."}]},{key:"goals",summary:"Goal service (`ctx.goals`) backed exclusively by the owning session log.",description:"Goal service (`ctx.goals`) backed exclusively by the owning session log.",methods:[{signature:"get(agent: Agent): GoalView | undefined",description:"Read the current goal for one exact live agent.",parameters:[{name:"agent",description:"owning live agent."}],returns:"a fresh view or `undefined` when no goal is current.",throws:["{@link GoalError} when the agent is not the registry's live instance."]},{signature:"disarm(agent: Agent): GoalView | undefined",description:"Remove process-local continuation authority without changing durable goal phase or revision. Lifecycle owners use this before unloading a driver; a later human-authorized resume records the new activation edge.",parameters:[{name:"agent",description:"owning live agent."}],returns:"a fresh disarmed view, or `undefined` when no goal is current."},{signature:"create(agent: Agent, request: CreateGoalRequest): GoalView",description:"Create and arm a goal. A completed goal may be replaced; every other current phase must be cleared or resumed instead.",parameters:[{name:"agent",description:"owning live agent."},{name:"request",description:"objective and optional round cap."}],returns:"the created live view."},{signature:"@Remote('edit') edit(agent: Agent, ref: GoalRef, request: EditGoalRequest): GoalView",description:"Edit objective and/or round cap without changing phase.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."},{name:"request",description:"at least one replacement field."}],returns:"the edited view."},{signature:"@Remote('pause') pause(agent: Agent, ref: GoalRef): GoalView",description:"Pause an active goal and disarm automatic continuation.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."}],returns:"the paused view."},{signature:"@Remote('resume') resume(agent: Agent, ref: GoalRef): GoalView",description:"Resume and arm a stopped goal, or rearm an active goal after a session-start edge, while its round budget still has capacity.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."}],returns:"the active view."},{signature:"@Remote('complete') complete(agent: Agent, ref: GoalRef): GoalView",description:"Mark a current non-complete goal complete and disarm it.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."}],returns:"the completed view."},{signature:"block(agent: Agent, ref: GoalRef, reason: GoalBlockReason): GoalView",description:"Mark an active goal blocked and disarm it.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."},{name:"reason",description:"policy-owned stable code and human-readable explanation."}],returns:"the blocked view with its durable reason."},{signature:"@Remote('clear') clear(agent: Agent, ref: GoalRef): GoalRef",description:"Clear the current goal while retaining a durable tombstone and history.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."}],returns:"the tombstone ref whose revision is one past the cleared snapshot."},{signature:"@Remote('create') remoteExportCreate(agent: Agent, request: CreateGoalRequest): CreateGoalResult",description:"Create one Goal through the remote boundary.",parameters:[{name:"agent",description:"exact live Agent resolved from the wire identity."},{name:"request",description:"objective and optional round cap."}],returns:"the created Goal identity."}]},{key:"invariants",summary:"Package-owned invariant registry with global and regex-based selection.",description:"Package-owned invariant registry with global and regex-based selection.",methods:[{signature:"register(packageName: string, installer: InvariantInstaller): () => void",description:"Register one package's invariant installer. The package name is reserved even when filtering disables its checks. Enabled installers run in a child fiber; failure disposes that fiber and releases the reservation.",parameters:[{name:"packageName",description:"full npm package name that owns the contribution."},{name:"installer",description:"listener or startup-check installer for the child context."}],returns:"an effect-scoped disposer for the registration."}]},{key:"jobs",summary:"Abstract background job registry.",description:`Abstract background job registry. Subclass, implement the abstract methods, and load the subclass as a plugin — it registers as \`ctx.jobs\` (one implementation per context; loading a second throws, which is cordis' standard duplicate-service behavior).
|
|
19
|
+
A cold transcript read resolves tool presenters against the composition the session recorded, and the standing mount makes that possible without resuming anything: ensuring the mount composes plugins but starts no agent, no session, and no turn.`,parameters:[{name:"id",description:"the preset id, or `undefined` for {@link defaultId}."}],returns:"the standing scope key readers pass as a registry view scope.",throws:["when the preset is unknown or its composition is unusable."]}]},{key:"agents",summary:"Agent service (`ctx.agents`): tracks live agents and carries the initiating Agent through one process-local asynchronous driver chain.",description:"Agent service (`ctx.agents`): tracks live agents and carries the initiating Agent through one process-local asynchronous driver chain. Agent *creation* is provided by whichever plugin implements the AgentFactory (`@deepseek-ai/dsh-agent-loop`), registered via setFactory.\n\nInitiator methods provide same-process causal attribution only. Ambient presence is neither liveness proof nor authorization; subjects and owners remain explicit, as does identity at worker, process, persistence, and wire boundaries. Returned Promise boundaries drain during teardown, except a nested lineage that starts an owning-fiber unload is excluded from its own drain.",methods:[{signature:"currentInitiator(): Agent | undefined",description:"Read the Agent that initiated the inherited asynchronous driver chain. Use this optional form for logging, tracing, metrics, or host attribution that also supports agentless calls. When a parent creates a child, setup reports the causal parent while `agentCtx.agent` identifies the child.",parameters:[],returns:"the inherited Agent, or `undefined` outside an initiator boundary and inside an explicit clearing boundary.",throws:["when this service instance has been disposed."]},{signature:"requireInitiator(): Agent",description:"Read the initiating Agent and fail when no initiator boundary is active. Use this for private helpers contractually below a driver, or for a deployment-owned outbound request whose contract forbids agentless calls. Generic or direct-call paths use optional lookup or explicit request fields.",parameters:[],returns:"the inherited Agent.",throws:["when no initiator is active or this service instance has been disposed."]},{signature:"withInitiator<T>(agent: Agent, operation: () => T): T",description:"Run an operation with one exact Agent as its process-local initiator. The exact synchronous value or Promise returned by the operation is preserved. Custom drivers and test harnesses wrap their complete returned foreground lifetime. A queue or wire receiver may establish this boundary only after validating explicit identity and resolving the exact live Agent; this method does neither. Detached work remains owned by the subsystem that starts it.",parameters:[{name:"agent",description:"initiating Agent to inherit; presence is neither liveness proof nor authorization."},{name:"operation",description:"synchronous or asynchronous operation to invoke."}],returns:"the exact value returned by `operation`.",throws:["when the initiator scope is closing/disposed, or when `operation` throws."]},{signature:"withoutInitiator<T>(operation: () => T): T",description:"Run an operation inside a boundary that hides any inherited initiating Agent. The exact synchronous value or Promise is preserved. Use this while creating lazy shared timers, queue pumps, pool maintenance, watchers, or exporters so they do not inherit the first Agent that happens to initialize them. It clears only initiator attribution, not explicit fields, and does not own or drain detached resources.",parameters:[{name:"operation",description:"synchronous or asynchronous operation to invoke without an initiator."}],returns:"the exact value returned by `operation`.",throws:["when the initiator scope is closing/disposed, or when `operation` throws."]},{signature:"setFactory(factory: AgentFactory): () => void",description:"Register the agent-creation factory (the loop calls this on construction, effect-scoped). A traced Cordis service is canonicalized to its concrete target; each create/resume call is then traced through that caller's context so ownership follows the caller without stacking proxy layers. Throws if a factory is already registered. Returns the disposer; on dispose the factory slot is cleared.",parameters:[{name:"factory",description:"the loop-owned factory {@link create}/{@link resume} delegate to."}],returns:"the disposer that clears the factory slot. The exact Cordis effect disposer (single-shot): composite (generator) effects may yield it directly — exact identity nests the teardown in order."},{signature:"async create(options: CreateAgentOptions): Promise<AgentHandle>",description:"Create and publish a new agent through the registered factory. Distinct from register (which records an already-constructed agent): this constructs the agent and its session. Rejects if no factory is registered or creation/setup fails. The resolved AgentHandle lets the owner tear down exactly this agent.",parameters:[{name:"options",description:"shared identity, session seed/metadata, and agent options."}],returns:"the handle after setup, rollback-covered publication, and loop start complete."},{signature:"async resume(options: ResumeAgentOptions): Promise<AgentHandle>",description:"Load a persisted session and resume an agent on it through the registered factory. Rejects if no factory is registered; the factory rejects if session persistence is not configured or persistence/setup fails.",parameters:[{name:"options",description:"persisted identity, configuration, and optional setup."}],returns:"the handle after setup, rollback-covered publication, and loop start complete."},{signature:"register(agent: Agent): () => void",description:"Register a live agent. Throws if an agent with the same id is already registered. Emits `agent/created` on registration and `agent/disposed` when the calling fiber is disposed — both with the agent's scope carrier (`scopeTarget(agent, agent)`): the subject is the agent in hand, so the emits are scope-filtered regardless of which context invoked `register` (calling through `agent.ctx` scopes EFFECTS; dispatch scoping always requires passing the carrier). Returns the disposer.",parameters:[{name:"agent",description:"the already-constructed agent to record in the store."}],returns:"the EXACT Cordis effect disposer (single-shot; a repeat call returns undefined without awaiting an in-flight teardown). Exact identity is load-bearing: a composite (generator) effect that owns a teardown ORDER — the agent factory's lifecycle chain — must yield THIS function so Cordis nests the unregistration at that yield position; yielding a wrapper would leave it disposing as a concurrent sibling on owner unload, unregistering the agent (and emitting `agent/disposed`) while its final turn is still draining."},{signature:"enter(agent: Agent, owner: Agent | undefined): () => void",description:"Insert an already-constructed agent without announcing it. This is the advanced ordered-lifecycle primitive used by the async agent factory: it first completes setup while the agent is unpublished, then assigns the returned detach closure into its pre-installed composite teardown before calling announce. Ordinary callers use register.",parameters:[{name:"agent",description:"the prepared, unpublished agent."},{name:"owner",description:"live agent whose scoped context created this agent, or undefined for a top-level runtime root. This is runtime ownership, not the resumed session's durable parent lineage."}],returns:"an idempotent closure that removes this exact entry and emits `agent/disposed` with listener failures contained. When called from a synchronous `agent/created` listener, removal and disposal wait until that creation dispatch unwinds."},{signature:"announce(agent: Agent): void",description:"Announce an agent previously inserted with enter.",parameters:[{name:"agent",description:"the live inserted agent to announce."}],throws:["if `agent` is not the exact live registry entry for its id, or its creation announcement already began (including a reentrant call from a creation listener)."]},{signature:"get(id: SessionId): Agent | undefined",description:"Look up a live agent.",parameters:[{name:"id",description:"the shared agent/session id to look up."}],returns:"the agent, or undefined when no live agent has that id."},{signature:"isOwnedBy(id: SessionId, owner: Agent): boolean",description:"Test whether a live agent was created through one exact parent agent's scoped context. Runtime ownership is independent of durable session lineage and remains unambiguous when unrelated providers reuse an id.",parameters:[{name:"id",description:"the candidate child agent's shared agent/session id."},{name:"owner",description:"the expected runtime creator agent."}],returns:"true only while the exact child entry is live under that owner."},{signature:"list(): Agent[]",description:"All live agents, in registration order.",parameters:[],returns:"a fresh array; mutating it does not affect the registry."},{signature:"roots(): Agent[]",description:"All live top-level agents in registration order. A top-level agent was created without an owning agent context; durable session lineage does not affect this runtime relation, so a resumed fork may still be a root.",parameters:[],returns:"a fresh array; mutating it does not affect the registry."}]},{key:"apiProxy",summary:"Root interface of the unified API.",description:"Root interface of the unified API. New client-request domain = one new file pair + one field here + one map row.",methods:[{signature:"downloads: DownloadsApi",description:"Host-only download surfaces (GET, no wire envelope); absent from IApiClient.",parameters:[]},{signature:"respond(message: ClientResponse): Promise<RpcReceipt>",description:"Response entry for server requests; not a domain method.",parameters:[{name:"message",description:"Client response carrying the server request's rpcId."}],returns:"Transport receipt for the response delivery."}]},{key:"approval",summary:"Approval service that applies session policy before answerers and logs every ask/outcome pair to the requesting session.",description:"Approval service that applies session policy before answerers and logs every ask/outcome pair to the requesting session. It exposes deterministic policy changes to the model through the runtime-context snapshot and switch notices.",methods:[{signature:"setPolicy(agent: Agent, policy: ApprovalPolicy): void",description:"Switch one live agent's policy and queue the transition for its next model step. Session initialization uses setApprovalPolicy directly because there is no previously visible policy to change.",parameters:[{name:"agent",description:"the live agent whose policy is changing."},{name:"policy",description:"the new effective policy."}]},{signature:"async request(req: ApprovalRequest): Promise<ApprovalOutcome>",description:"Ask the composed answerers to decide one readonly same-process request. The service borrows the request, agent, session, and live signal directly. The request requires an open turn because the audit pair must be enclosed by the durable log's commit/replay boundary; an idle ask rejects before appending anything. The answerer phase always produces an outcome: an aborted signal yields `'cancelled'`, a missing or throwing answerer yields `'unavailable'` (fail closed), and a rogue non-vocabulary return value is normalized to `'unavailable'`. A failure that prevents either audit append from committing still rejects because returning an unlogged decision would violate the pair. Session contains post-commit observer failures, so an authoritative append cannot reject the request or suppress its matching audit event.",parameters:[{name:"req",description:"the pending decision (agent, tool identity, reason, signal)."}],returns:"the closed outcome; `'allowed-once'` is the only grant.",throws:["when no turn is open or either audit event fails before the session append commit point."]},{signature:"overrideOf(session: Session): ApprovalPolicy | undefined",description:"Read the session override without applying the configured default.",parameters:[{name:"session",description:"session whose log supplies the override."}],returns:"the last logged policy, or `undefined` without one."}]},{key:"attachments",summary:"Immutable binary attachment service.",description:"Immutable binary attachment service. Implementations validate bytes before publishing a reference.",methods:[{signature:"abstract readonly imageLimits: ImageAttachmentLimits",description:"Deployment-resolved image policy used by authoritative and fast-path validation.",parameters:[]},{signature:"abstract validateImage(input: SaveImageAttachment): Promise<void>",description:"Validate one image without persisting it. Batch callers validate every member before saving any member.",parameters:[{name:"input",description:"encoded bytes, declared media type, and optional display name."}],returns:"completion after the encoded raster has been fully decoded."},{signature:"async saveImages(inputs: readonly SaveImageAttachment[]): Promise<readonly ImageAttachmentRef[]>",description:"Validate one ordered image batch before committing any member. Validation failures start no writes; storage failures return no partial references, although already published content-addressed objects may stay unreachable until a future retention policy collects them.",parameters:[{name:"inputs",description:"encoded images in their owning message order."}],returns:"durable references in the exact input order."},{signature:"abstract saveImage(input: SaveImageAttachment): Promise<ImageAttachmentRef>",description:"Validate and durably commit one image before its owning session event is appended.",parameters:[{name:"input",description:"encoded bytes, declared media type, and optional display name."}],returns:"a durable content-addressed reference."},{signature:"abstract readImage(ref: ImageAttachmentRef, signal?: AbortSignal): Promise<StoredImageAttachment>",description:"Read one image and verify that bytes still match the recorded reference.",parameters:[{name:"ref",description:"durable reference from the session log."},{name:"signal",description:"optional cancellation for backend read and verification work."}],returns:"the verified bytes and canonical reference.",throws:["the signal reason when aborted, or a storage error when verification fails."]}]},{key:"clientModules",summary:"The web plugin table service: incremental `dsh.client` scan + wire composition + bundle route + index tap.",description:"The web plugin table service: incremental `dsh.client` scan + wire composition + bundle route + index tap. Construction runs the activation scan synchronously — a malformed declaration or missing bundle among the already-loaded entries aggregates into one loud throw (FAILED fiber; the boot activation audit reports it).",methods:[{signature:"graph(): WebBootGraph",description:"Current composed entry graph (stable object between changes).",parameters:[],returns:"the graph served as `window.__DSH_BOOT__`."},{signature:"clientPath(id: string): string | undefined",description:"Absolute path of an entry's client bundle.",parameters:[{name:"id",description:"entry id (package name)."}],returns:"the path, or undefined for an unknown id."},{signature:"rebuilt(id: string): string | undefined",description:"Re-hash one bundle (the HMR watch's registration hook — the only entry point through which bundle content changes reach the graph).",parameters:[{name:"id",description:"entry id (package name)."}],returns:"the new rev, or undefined for an unknown id."},{signature:"onRebuilt(listener: (id: string, rev: string) => void): () => void",description:"Subscribe to bundle rebuilds; fires only when the re-hash changed the rev.",parameters:[{name:"listener",description:"receives the entry id and its new bundle rev."}],returns:"the unsubscriber."},{signature:"onGraphChanged(listener: () => void): () => void",description:"Fires after any flush that recomposed the graph (row added/removed, or a rebuilt rev change). Pull model: listeners re-read graph.",parameters:[{name:"listener",description:"notified with no payload."}],returns:"the unsubscriber."}]},{key:"codeRuntime",summary:"Registers one `ctx.codeRuntime` implementation.",description:"Registers one `ctx.codeRuntime` implementation. Program, budget, abort, and substrate failures resolve in CodeRunResult; only Service Definition contract misuse rejects. Implementations bridge structured-cloneable bindings, materialize each declared namespace rejection class, treat programs as hostile peers, isolate runs from one another, and terminate and await in-flight runs during disposal.",methods:[{signature:"abstract readonly language: string",description:"The source language run expects `program` to be written in, as a lowercase identifier. Informational, not gating — a consumer that generates language-specific presentation (typed SDK stubs, usage instructions) switches on it and fails loud on a language it cannot present. Well-known values: `'typescript'` and `'python'`, those `dsh-tools` presents; only `'typescript'` has a published backend.",parameters:[]},{signature:"abstract readonly isolation: string",description:"The execution substrate, as a lowercase identifier. Informational, not gating — a descriptor so deployments and diagnostics can tell backends apart, not a security claim. Well-known values: `'worker-thread'`, `'process'`, `'container'`.",parameters:[]},{signature:"abstract run(request: CodeRunRequest): Promise<CodeRunResult>",description:"Execute one program against the request's bindings and capture what it emitted. See the class doc for the resolution contract (error is a result field; rejection means Service Definition contract misuse only).",parameters:[{name:"request",description:"the program, its bindings, and the abort signal; the request carries everything the runtime acts on, with no hidden defaults."}],returns:"the run's outcome: completion value (when transferable), the ordered log capture, and the failure (if any)."}]},{key:"commands",summary:"Human-command registry.",description:"Human-command registry. Plain-context definitions are global; definitions registered through a command-injected child of an agent context shadow globals for that agent.",methods:[{signature:"register(definition: CommandDefinition): () => void",description:"Register a global or calling-agent-scoped command.",parameters:[{name:"definition",description:"discovery metadata and direct UI handler."}],returns:"the exact effect disposer that unregisters this definition."},{signature:"@Remote list(agent: Agent): readonly CommandDescriptor[]",description:"List the effective immutable command descriptors for one agent.",parameters:[{name:"agent",description:"exact receiving agent and scoped-layer key."}],returns:"name-sorted descriptors after scoped shadowing."},{signature:"find(agent: Agent, name: string): CommandDefinition | undefined",description:"Resolve one effective command definition.",parameters:[{name:"agent",description:"exact receiving agent and scoped-layer key."},{name:"name",description:"command name without a slash."}],returns:"the scoped shadow or global definition."},{signature:"@Remote async execute( agent: Agent, line: string, signal: AbortSignal, ): Promise<CommandExecution | undefined>",description:"Parse and execute a known command without sending it to the model.\n\nA resolved command's lifecycle is logged: `command/run` is appended before the handler is invoked and `command/done` after settlement (a thrown or aborted handler settles as `kind: 'error'`). Both are direct log-only appends — no turn wraps them, and persistence drains them at ordinary checkpoints. Admission misses (syntax or unknown name) log nothing — they never entered a handler. A `command/run` append failure fails the execution loud; a `command/done` append failure on the handler-failure path is contained so the handler's own error stays the reported failure.",parameters:[{name:"agent",description:"exact receiving agent."},{name:"line",description:"complete slash-command line."},{name:"signal",description:"cancellation signal owned by the UI request."}],returns:"the settled execution (result + lifecycle pairing id), or `undefined` when syntax or name does not resolve."}]},{key:"compaction",summary:"Abstract compaction service.",description:"Abstract compaction service. Implementations own trigger policy, retention, and summarization, and may consume a separate measurement service. A successful run replaces the selected surface span with one summary node and prevents concurrent compaction of the same session. The replacement user message uses compactCheckpointSource with the transaction identity so consumers recognize and correlate it independently of the backend. Load one implementation per context as `ctx.compaction`.",methods:[{signature:"abstract compactIfNeeded( agent: CompactionAgentContext, trigger: CompactionTrigger, signal: AbortSignal, ): Promise<CompactionResult | null>",description:"Consider automatic compaction for one explicit trigger. Pressure policy uses the latest durable routed request, while context-overflow policy may force a useful balanced reduction even below the normal threshold. Return `null` when no safe range can be compacted. A single oversized retained unit or request envelope cannot be repaired through surface compaction.",parameters:[{name:"agent",description:"agent context owning the session surface and routing options."},{name:"trigger",description:"normal pressure or provider-confirmed context overflow."},{name:"signal",description:"cancellation signal; model-backed implementations must forward it."}],returns:"the compaction result, or `null` if no compaction was needed."},{signature:"abstract compactNow( agent: ManualCompactAgentContext, signal: AbortSignal, sourceCommandId?: CommandId, ): Promise<CompactionResult | null>",description:"Explicitly compact useful history even below automatic pressure thresholds. Implementations synchronously start an idle task before any asynchronous work, select a useful range without writing on a no-op, then append a standalone `compaction/start` before summarization. That durable marker is the compaction lock until one `compaction/end` attempt. Later waking prompts remain accepted in FIFO order and start only after the optional durability checkpoint and idle-task settlement. Context injected while the summary runs may sit between the marker pair; only the selected span must remain stable.",parameters:[{name:"agent",description:"idle agent whose durable history should be compacted."},{name:"signal",description:"cancellation scoped to this compaction request."},{name:"sourceCommandId",description:"initiating command identity for a manual compaction."}],returns:"the compaction result, or `null` when no safe useful range exists.",throws:["{@link ManualCompactionError} for expected busy, agent-cancellation, changed-span, summarization/shrink, commit-stage, or persistence failures; an aborted request preserves its exact abort reason. Failed attempts remain visible in the log."]},{signature:"abstract compactRegion( start: number, end: number, agent: CompactionAgentContext, signal?: AbortSignal, ): Promise<CompactionResult>",description:"Forcibly compact a range of surface nodes into a single summary node. `start` and `end` name an inclusive span by surface position, not numeric seq order; replacements can make visible seqs non-monotonic. Both edges must be balanced so assistant tool calls remain paired with their results. A model- backed implementation forwards cancellation and rejects active, missing, reversed, or unbalanced ranges. The target session is `agent.session`. Its replacement user message must use compactCheckpointSource with the transaction's `CompactionId`. Use toolPairingBalancedBefore and toolPairingBalancedAfter for the edge checks.",parameters:[{name:"start",description:"first surface seq, inclusive."},{name:"end",description:"last surface seq, inclusive."},{name:"agent",description:"context whose session is mutated and whose routing options guide summarization."},{name:"signal",description:"optional cancellation; model-backed implementations must forward it."}],returns:"the appended event seqs, summary, replaced range, and token accounting.",throws:["when compaction is active or the range is missing, reversed, or unbalanced."]}]},{key:"credentials",summary:"Abstract credential service.",description:"Abstract credential service. Providers implement the four operations over their source layers; one seam-wide rule binds them all: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.",methods:[{signature:"abstract resolve(ref: CredentialRef): Promise<ResolvedCredential | undefined>",description:"Resolve one reference to its current value. Resolution is per call: consumers re-resolve at each operation and must not cache across operations — that per-operation read is what makes a changed credential reach the next operation without a restart.",parameters:[{name:"ref",description:"the reference to resolve."}],returns:"the value and its source, or `undefined` while unconfigured."},{signature:"abstract describe(ref: CredentialRef): Promise<CredentialInfo>",description:"Describe one reference for configuration surfaces without exposing the value.",parameters:[{name:"ref",description:"the reference to describe."}],returns:"configured state, supplying source, and writability."},{signature:"abstract set(ref: CredentialRef, value: string): Promise<void>",description:"Durably store one value in the provider-managed writable source. Rejects while a read-only source shadows the reference — the write would appear to succeed while resolution keeps returning the shadowing value — and rejects an empty value (use unset).",parameters:[{name:"ref",description:"the reference to store."},{name:"value",description:"the non-empty secret value."}]},{signature:"abstract unset(ref: CredentialRef): Promise<void>",description:"Remove one reference from the provider-managed writable source; removing an absent reference is a no-op. Rejects while a read-only source shadows the reference, like set.",parameters:[{name:"ref",description:"the reference to remove."}]}]},{key:"directoryPicker",summary:"Abstract directory-picking service.",description:"Abstract directory-picking service. Subclass, implement `capability()`, and load the subclass as a plugin — it registers as `ctx.directoryPicker` (one implementation per context; loading a second throws, cordis' standard duplicate-service behavior). The capability object must be stable for the service lifetime: consumers may capture it across calls.",methods:[{signature:"abstract capability(): DirectoryPickerCapability",description:"The backend's interaction capability.",parameters:[],returns:"the discriminated capability consumers switch on."}]},{key:"e2b",summary:"Creates one lazily consumable E2B SDK handle and deletes the sandbox at timeout or disposal.",description:"Creates one lazily consumable E2B SDK handle and deletes the sandbox at timeout or disposal. Creation begins at plugin construction; adapters await getSandbox before their first operation.",methods:[{signature:"readonly cwd: string",description:"Validated remote working directory shared by provider adapters.",parameters:[]},{signature:"readonly runtimeRoot: string",description:"Remote directory reserved for adapter-owned process and terminal state.",parameters:[]},{signature:"async getSandbox(): Promise<Sandbox>",description:"Return the shared live SDK handle.",parameters:[],returns:"the created sandbox after the configured cwd exists.",throws:["when E2B rejects creation or the service is disposing."]}]},{key:"fs",summary:"Abstract filesystem provider.",description:"Abstract filesystem provider. Targets must preserve identity across aliases; reads expose regular UTF-8 text or typed errors, listings are stable and content-free, and mutations are atomic. Optional guards add stale protection without changing the unguarded provider contract.",methods:[{signature:"abstract resolve(path: string, opts?: { cwd?: string; signal?: AbortSignal }): Promise<FsTarget>",description:"Resolve a model/plugin-supplied path into a stable FsTarget. May perform I/O (a remote/sandboxed backend may need a round-trip to map a path to a stable identity), hence async even though the local backend only normalizes + realpaths.",parameters:[{name:"path",description:"the path to resolve; relative paths resolve against `opts.cwd`."},{name:"opts",description:"optional cwd override and cancellation signal."}],returns:"the stable target; the same file yields the same `targetKey`."},{signature:"abstract processPath(target: FsTarget): string",description:"Return the canonical absolute path a subprocess in this filesystem's execution world can open. The path is deliberately separate from FsTarget.targetKey: consumers may pass this value to another OS capability, but must continue treating the target key as opaque.",parameters:[{name:"target",description:"the resolved target whose process path is required."}],returns:"an absolute path in the backend's execution world."},{signature:"abstract fileUrl(target: FsTarget): string",description:"Return the canonical `file:` URI for a target in this filesystem's execution world. Backends own URI encoding because the host platform may differ from the execution platform.",parameters:[{name:"target",description:"the resolved target to encode."}],returns:"the target's canonical file URI."},{signature:"abstract contains(parent: FsTarget, child: FsTarget): boolean",description:"Test canonical containment without exposing or parsing backend target keys. Both targets must come from this provider.",parameters:[{name:"parent",description:"canonical directory target."},{name:"child",description:"canonical candidate target."}],returns:"true when `child` is `parent` or a descendant of it."},{signature:"abstract stat(target: FsTarget, signal?: AbortSignal): Promise<FsInfo | undefined>",description:"Return target metadata, or `undefined` when the target does not exist.",parameters:[{name:"target",description:"the resolved target to stat."},{name:"signal",description:"aborts the metadata round-trip."}],returns:"metadata only, never content; undefined for an absent target."},{signature:"abstract lstat(path: string, opts?: { cwd?: string }, signal?: AbortSignal): Promise<FsPathInfo | undefined>",description:"Return path metadata without following the final path component when it is a symbolic link. This is intentionally path-shaped, not target-shaped: resolve follows symlinks to produce the stable identity used by normal reads/writes, while `lstat` lets a consumer reject the path itself before that follow happens.\n\n`opts.cwd` follows resolve's cwd rules. `undefined` means the path is absent.",parameters:[{name:"path",description:"the path to inspect; relative paths resolve against `opts.cwd`."},{name:"opts",description:"`cwd` overrides the backend's default base for relative paths."},{name:"signal",description:"aborts the metadata round-trip."}],returns:"metadata only, never content; undefined for an absent path."},{signature:"abstract readText(target: FsTarget, signal?: AbortSignal): Promise<string>",description:"Read the whole regular text file as a single decoded string.",parameters:[{name:"target",description:"the resolved target to read."},{name:"signal",description:"aborts the read."}],returns:"the full decoded UTF-8 content."},{signature:"abstract streamText(target: FsTarget, signal?: AbortSignal): Promise<AsyncIterable<string>>",description:"Stream the whole regular text file as decoded text chunks (same text semantics as readText, for large files). The backend owns cross-chunk UTF-8 decoding and binary rejection so the policy layer never touches raw bytes.",parameters:[{name:"target",description:"the resolved target to read."},{name:"signal",description:"aborts the stream, including between chunks."}],returns:"the chunk iterable, decoded and validated like {@link readText}."},{signature:"abstract readBytes(target: FsTarget, signal: AbortSignal | undefined, maxBytes: number): Promise<Uint8Array>",description:"Read the whole regular file as raw bytes with no decoding or binary rejection. The bound lives at this seam so a backend can never buffer an unbounded file: a target known or discovered to exceed `maxBytes` fails with `FS_TOO_LARGE` instead of returning a truncated result.",parameters:[{name:"target",description:"the resolved target to read."},{name:"signal",description:"aborts the read."},{name:"maxBytes",description:"inclusive byte cap on the complete content."}],returns:"the full raw content, at most `maxBytes` long."},{signature:"abstract listDir(target: FsTarget, signal?: AbortSignal): Promise<FsDirEntry[]>",description:"List direct children of a directory in stable name order. Returns resolved child targets plus cheap metadata only; never reads file contents.",parameters:[{name:"target",description:"the resolved directory target."},{name:"signal",description:"aborts the listing."}],returns:"one entry per direct child, in stable name order."},{signature:"abstract writeText( target: FsTarget, content: string, expected?: FsWriteIntent, signal?: AbortSignal, sandboxPolicy?: SandboxExecutionPolicy, ): Promise<FsWriteOutcome>",description:"Atomically create or replace UTF-8 text. `expected` guards intent and staleness; omission allows unconditional overwrite.",parameters:[{name:"target",description:"the resolved target to write."},{name:"content",description:"the full new file content."},{name:"expected",description:"the write intent guarding the write; omit for unconditional."},{name:"signal",description:"aborts before atomic publication takes effect."},{name:"sandboxPolicy",description:"the per-call mode and workspace root this write runs under; a sandboxing backend fences the write by it, the bare backend ignores it. Omit to leave the backend its own default."}],returns:"the outcome, including the version the write produced."},{signature:"abstract editText( target: FsTarget, edit: FsEditRequest, expected?: { version: FsVersion }, signal?: AbortSignal, sandboxPolicy?: SandboxExecutionPolicy, ): Promise<FsEditOutcome>",description:"Atomically edit literal text. When supplied, the version guard is checked before matching so stale content reports `FS_STALE_VERSION`; omission edits the current content without a freshness precondition.",parameters:[{name:"target",description:"the resolved target to edit."},{name:"edit",description:"the literal search/replace request."},{name:"expected",description:"the version guard; omit for an unconditional edit."},{name:"signal",description:"aborts before atomic publication takes effect."},{name:"sandboxPolicy",description:"the per-call mode and workspace root this edit runs under; a sandboxing backend fences the edit by it, the bare backend ignores it. Omit to leave the backend its own default."}],returns:"the outcome, including the version the edit produced."}]},{key:"goals",summary:"Goal service (`ctx.goals`) backed exclusively by the owning session log.",description:"Goal service (`ctx.goals`) backed exclusively by the owning session log.",methods:[{signature:"get(agent: Agent): GoalView | undefined",description:"Read the current goal for one exact live agent.",parameters:[{name:"agent",description:"owning live agent."}],returns:"a fresh view or `undefined` when no goal is current.",throws:["{@link GoalError} when the agent is not the registry's live instance."]},{signature:"disarm(agent: Agent): GoalView | undefined",description:"Remove process-local continuation authority without changing durable goal phase or revision. Lifecycle owners use this before unloading a driver; a later human-authorized resume records the new activation edge.",parameters:[{name:"agent",description:"owning live agent."}],returns:"a fresh disarmed view, or `undefined` when no goal is current."},{signature:"create(agent: Agent, request: CreateGoalRequest): GoalView",description:"Create and arm a goal. A completed goal may be replaced; every other current phase must be cleared or resumed instead.",parameters:[{name:"agent",description:"owning live agent."},{name:"request",description:"objective and optional round cap."}],returns:"the created live view."},{signature:"@Remote('edit') edit(agent: Agent, ref: GoalRef, request: EditGoalRequest): GoalView",description:"Edit objective and/or round cap without changing phase.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."},{name:"request",description:"at least one replacement field."}],returns:"the edited view."},{signature:"@Remote('pause') pause(agent: Agent, ref: GoalRef): GoalView",description:"Pause an active goal and disarm automatic continuation.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."}],returns:"the paused view."},{signature:"@Remote('resume') resume(agent: Agent, ref: GoalRef): GoalView",description:"Resume and arm a stopped goal, or rearm an active goal after a session-start edge, while its round budget still has capacity.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."}],returns:"the active view."},{signature:"@Remote('complete') complete(agent: Agent, ref: GoalRef): GoalView",description:"Mark a current non-complete goal complete and disarm it.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."}],returns:"the completed view."},{signature:"block(agent: Agent, ref: GoalRef, reason: GoalBlockReason): GoalView",description:"Mark an active goal blocked and disarm it.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."},{name:"reason",description:"policy-owned stable code and human-readable explanation."}],returns:"the blocked view with its durable reason."},{signature:"@Remote('clear') clear(agent: Agent, ref: GoalRef): GoalRef",description:"Clear the current goal while retaining a durable tombstone and history.",parameters:[{name:"agent",description:"owning live agent."},{name:"ref",description:"expected current revision."}],returns:"the tombstone ref whose revision is one past the cleared snapshot."},{signature:"@Remote('create') remoteExportCreate(agent: Agent, request: CreateGoalRequest): CreateGoalResult",description:"Create one Goal through the remote boundary.",parameters:[{name:"agent",description:"exact live Agent resolved from the wire identity."},{name:"request",description:"objective and optional round cap."}],returns:"the created Goal identity."}]},{key:"invariants",summary:"Package-owned invariant registry with global and regex-based selection.",description:"Package-owned invariant registry with global and regex-based selection.",methods:[{signature:"register(packageName: string, installer: InvariantInstaller): () => void",description:"Register one package's invariant installer. The package name is reserved even when filtering disables its checks. Enabled installers run in a child fiber; failure disposes that fiber and releases the reservation.",parameters:[{name:"packageName",description:"full npm package name that owns the contribution."},{name:"installer",description:"listener or startup-check installer for the child context."}],returns:"an effect-scoped disposer for the registration."}]},{key:"jobs",summary:"Abstract background job registry.",description:`Abstract background job registry. Subclass, implement the abstract methods, and load the subclass as a plugin — it registers as \`ctx.jobs\` (one implementation per context; loading a second throws, which is cordis' standard duplicate-service behavior).
|
|
20
20
|
|
|
21
21
|
Implementations must honor these semantics:
|
|
22
22
|
|
|
@@ -27,7 +27,7 @@ Implementations must honor these semantics:
|
|
|
27
27
|
|
|
28
28
|
Delivery is owner-relative on the same terms as onJobDone: an observer registered from an unscoped context — a host composition's own carrier — sees every owner, while one registered under an agent composition's scope sees exactly the agents composed under it.
|
|
29
29
|
|
|
30
|
-
This is not a superset of onJobDone: that one delivers the terminal record under first-wins semantics a job controller couples to notice delivery, while this one carries no delivery meaning and marks nothing reported. Listeners are contained and never awaited.`,parameters:[{name:"listener",description:"receives the owner whose visible set changed, or `undefined` when an unowned job changed and every caller's set did."}],returns:"disposer that unregisters the listener."},{signature:"abstract attachController(name: string): () => void",description:"Attach an effect-scoped controller that can read and stop jobs. It serves the owners its registering context's scope covers, and start refuses an owner no attached controller serves.",parameters:[{name:"name",description:"diagnostic label; duplicate names remain independent."}],returns:"disposer that detaches this controller."}]},{key:"llm",summary:"The abstract `llm` service: an adapter registry plus a streaming model-call API, interceptable via the `llm/stream` waterfall.",description:"The abstract `llm` service: an adapter registry plus a streaming model-call API, interceptable via the `llm/stream` waterfall.",methods:[{signature:"registerAdapter(providers: string[], adapter: LlmAdapter): AdapterRegistrationHandle",description:"Register an adapter for the given provider routes. Throws `LlmError` with code `DUPLICATE_ADAPTER` if any provider already has an adapter (all-or-nothing). Disposed with the fiber.",parameters:[{name:"providers",description:"every provider route this adapter should serve."},{name:"adapter",description:"the adapter that streams calls for those providers."}],returns:"the disposer, carrying {@link AdapterRegistrationHandle.replace}."},{signature:"listProviders(): LlmProviderInfo[]",description:"Describe provider routes with a registered adapter.",parameters:[],returns:"detached provider metadata in registration order."},{signature:"registerConfigurableProviders(entries: readonly LlmConfigurableProvider[]): DirectoryRegistrationHandle",description:"Declare provider routes an adapter plugin can activate through configuration. Registration is all-or-nothing: an empty list, invalid entry, or a provider already declared by any registration throws `LlmError` without registering the rest. Disposed with the fiber.",parameters:[{name:"entries",description:"every configurable provider this plugin owns."}],returns:"a handle that withdraws all of them, and can atomically replace them."},{signature:"listConfigurableProviders(): LlmConfigurableProvider[]",description:"List every declared configurable provider, registered or dormant.",parameters:[],returns:"detached directory entries in declaration order."},{signature:"registerModelDiscovery( settingsNs: string, discover: (request: LlmModelDiscoveryRequest) => Promise<readonly LlmDiscoveredModel[]>, ): () => void",description:"Offer to interrogate provider endpoints on behalf of the settings namespace this plugin owns. The namespace is the key because that is what a configuration surface already holds from the configurable-provider directory, and because a provider being *added* has no route to name yet. Disposed with the fiber.",parameters:[{name:"settingsNs",description:"the namespace whose profiles this discovery serves."},{name:"discover",description:"interrogates one endpoint; must honor `request.signal`."}],returns:"the disposer that withdraws the offer."},{signature:"async discoverModels( settingsNs: string, request: LlmModelDiscoveryRequest, ): Promise<LlmDiscoveredModel[]>",description:"Interrogate one provider endpoint for the models it advertises. The request describes a draft, not a stored route, so nothing here reads or writes settings or credentials — the caller owns both, and the reply is candidate metadata a surface may offer for adoption.",parameters:[{name:"settingsNs",description:"namespace whose registered discovery serves this draft."},{name:"request",description:"the endpoint, protocol, and one-shot credential to use."}],returns:"the advertised models, deduplicated in endpoint order."},{signature:"providerRetryPolicy(provider: string): ResolvedRetryPolicy",description:"Resolve the retry policy captured when one provider route was registered.",parameters:[{name:"provider",description:"registered provider route to inspect."}],returns:"the provider-owned policy, with normal defaults already resolved."},{signature:"async listModels(provider: string): Promise<LlmModelInfo[]>",description:"Discover models advertised by one registered provider. Catalog membership is advisory and never changes routing or request validation.",parameters:[{name:"provider",description:"registered provider route to inspect."}],returns:"detached model metadata in adapter-preferred order."},{signature:"async resolveModelInfo( provider: string, model: string, signal?: AbortSignal, ): Promise<LlmResolvedModelInfo>",description:"Resolve and validate all metadata from the adapter that owns one exact route. The result is detached from adapter-owned objects; catalog membership remains advisory and does not control request routing.",parameters:[{name:"provider",description:"registered provider route to inspect."},{name:"model",description:"exact model id passed to the adapter."},{name:"signal",description:"optional cancellation for adapter-owned asynchronous lookup."}],returns:"exact model identity plus available context and reasoning metadata."},{signature:"async resolveCallConfig(config: LlmCallConfig, signal?: AbortSignal): Promise<LlmCallConfig>",description:"Validate a conversation call config against its exact model capability and materialize adapter-configured defaults. Unsupported explicit efforts reject before provider I/O; no clamping or aliasing is performed. This standalone query does not bind a later dispatch; use prepareCall when logging and streaming must share one adapter registration.",parameters:[{name:"config",description:"provider/model route and optional request controls."},{name:"signal",description:"optional cancellation for adapter-owned capability lookup."}],returns:"a detached config only when a default must be materialized."},{signature:"async prepareCall(config: LlmCallConfig, signal?: AbortSignal): Promise<PreparedLlmCall>",description:"Resolve one call under its current adapter registration. The returned one-shot handle keeps that registration across header logging and dispatch, so HMR cannot combine one adapter's capability result with another adapter.",parameters:[{name:"config",description:"provider/model route and optional request controls."},{name:"signal",description:"optional cancellation for adapter-owned capability lookup."}],returns:"a prepared config and its registration-bound stream entry point."},{signature:"stream(options: GenerateOptions): AsyncIterable<StreamChunk>",description:"Stream one model call as raw chunks (token-level deltas). Replay state is retained only when the same adapter instance owns its historical provider and the target provider. Final adapter selection remains fixed through asynchronous exact-model resolution and dispatch. Adapter selection, dispatch, and iteration failures become terminal `error` or `aborted` finish chunks; middleware, nested-call, cleanup, and consumer failures remain thrown.",parameters:[{name:"options",description:"the full request; `options.provider` selects the adapter."}],returns:"the chunk stream, possibly wrapped by `llm/stream` listeners."}]},{key:"llmGateway",summary:"The gateway service.",description:"The gateway service. Exposes the bound address so a composition can point a model route at it, and holds no per-request state beyond the set of upstream requests still in flight.",methods:[{signature:"inspect(): { inFlight: number; keyStored: boolean }",description:"Upstream requests still in flight, read by the invariant companion.",parameters:[],returns:"the in-flight upstream count and whether a generated key is stored."}]},{key:"lsp",summary:"The LSP capability seam (`ctx.lsp`).",description:"The LSP capability seam (`ctx.lsp`). Owns provider registration/selection and normalized query execution; exposes exactly the four operations and no protocol escape hatch.",methods:[{signature:"registerProvider(provider: LspProvider): () => void",description:"Register a provider, atomically reserving its id and every normalized extension. Any conflict or invalid input publishes nothing and throws `LspError`; the returned disposer releases all reservations. Disposed with the calling fiber.",parameters:[{name:"provider",description:"the backend to register."}],returns:"a synchronous disposer releasing the id and all extension reservations."},{signature:"query(request: LspQueryRequest, signal?: AbortSignal): Promise<LspQueryResult>",description:"Select a provider by the file's extension and run one query. Selection is per-query and order-independent; no match throws `LspError` `LSP_UNAVAILABLE`.",parameters:[{name:"request",description:"the normalized query."},{name:"signal",description:"optional cancellation forwarded to the selected provider."}],returns:"the normalized, closed-union result."}]},{key:"messageFeedback",summary:"Storage-domain sidecar service.",description:"Storage-domain sidecar service. It inspects persisted Session history and never creates or resumes an Agent or Session.",methods:[{signature:"@Remote('list') async list(request: MessageFeedbackListRequest): Promise<MessageFeedbackListResult>",description:"Read feedback belonging to the current persisted Session lifecycle. A stale row from a reused Session id is invisible.",parameters:[{name:"request",description:"Session identity to inspect and list."}],returns:"current immutable items or `session-not-found`."},{signature:"@Remote('put') put(request: MessageFeedbackPutRequest): Promise<MessageFeedbackPutResult>",description:"Create or replace feedback for one derived append-origin assistant message. Every request must match the addressed item's current version; a matching no-op returns the stored item without changing its revision.",parameters:[{name:"request",description:"target, desired value, and observed item version."}],returns:"the committed item or an explicit business failure."},{signature:"@Remote('delete') delete(request: MessageFeedbackDeleteRequest): Promise<MessageFeedbackDeleteResult>",description:"Delete one feedback item. Absence is successful regardless of the supplied version; an existing item requires an exact version match.",parameters:[{name:"request",description:"Session, message, and observed item version."}],returns:"the stable absent postcondition, or an explicit failure."}]},{key:"permissionPresets",summary:"Owns the deployment's permission presets and their write path.",description:"Owns the deployment's permission presets and their write path. Requires a confining `ctx.shell` executor and `ctx.approval`; unmatched knob values are reported as CUSTOM_PRESET, not an error.",methods:[{signature:"current(events: readonly SessionEvent[]): string",description:"Resolve the preset matching the effective knob values. A still-matching last selection wins shared-bundle ties; otherwise the first table match wins, or CUSTOM_PRESET when no entry matches.",parameters:[{name:"events",description:"the session's events in log order."}],returns:"the effective preset name, or `custom` when nothing matches."},{signature:"selectFor(state: KnobState): PermissionSelect",description:"Build the whole select value for one folded knob state: every table option in declaration order, `custom` appended exactly while derived.",parameters:[{name:"state",description:"the folded knob overrides."}],returns:"the `permissions` projection payload."},{signature:"resolve(name: string): PresetSpec",description:"Resolve a preset's knob bundle.",parameters:[{name:"name",description:"the preset name to resolve."}],returns:"the configured bundle.",throws:["when `name` is not in the table."]},{signature:"optionOf(name: string): PresetOption",description:"Build the client option for a table entry or CUSTOM_PRESET. A missing label falls back to the table key.",parameters:[{name:"name",description:"a table key, or `custom`."}],returns:"the option a client renders.",throws:["when `name` is neither a table key nor `custom`."]},{signature:"set(session: Session, name: string): void",description:"Record a changed preset, then update each changed knob through its own setter. Selecting the effective preset again appends nothing.",parameters:[{name:"session",description:"the session the switch belongs to."},{name:"name",description:"the preset to switch to; unknown names throw."}]}]},{key:"planMode",summary:"`ctx.planMode`: owns logged plan state, applies and narrates selected state at step start, the `plan:policy` section, the `/plan` command, and the stable exit tool.",description:"`ctx.planMode`: owns logged plan state, applies and narrates selected state at step start, the `plan:policy` section, the `/plan` command, and the stable exit tool. UIs observe committed flips through `session/event`; there is no live mirror.",methods:[{signature:"get(agent: Agent): { active: boolean; pending?: boolean }",description:"Read the logged plan state and any selected state awaiting the next accepted in-turn pre-step.",parameters:[{name:"agent",description:"The agent to read."}],returns:"Current logged state plus a pending selection, when present."},{signature:"set(agent: Agent, active: boolean): 'committed' | 'queued' | 'cancelled' | 'noop'",description:"Select whether plan mode should be active. Between turns the method appends the change immediately because no in-turn pre-step will run until another prompt starts a turn. The open-turn fold is the idle signal: agent status stays `running` through post-turn checkpointing, when no further in-turn pre-step runs. During an open turn the selection remains pending until the next accepted in-turn pre-step. Repeated selection of the current or already-pending state is a no-op.",parameters:[{name:"agent",description:"The agent to switch."},{name:"active",description:"Whether plan mode should be active."}],returns:"what happened: `committed` (logged now), `queued` (awaiting the next accepted in-turn pre-step), `cancelled` (an opposite pending selection was cleared; the logged state already matches), or `noop` (already in that state)."}]},{key:"qbAuth",summary:"The QB authentication service.",description:"The QB authentication service. Every backend call goes through QbAuth.rpc, which injects the current account fields and retries once through a ticket refresh when the upstream reports an expiry.",methods:[{signature:"async identity(): Promise<QbIdentity>",description:"Resolve the caller identity the QB backends want in request bodies, connecting to the browser first when IPC is enabled.",parameters:[],returns:"account GUID plus device identifiers, each empty when unresolvable."},{signature:"async rpc(request: QbRpcRequest): Promise<unknown>",description:"Perform an authenticated backend call, injecting account fields and the device headers the external scene does not fill in, and retrying once through a ticket refresh on an expiry rejection.",parameters:[{name:"request",description:"servant, method, and request body."}],returns:"the decoded reply; callers validate the fields they read."},{signature:"async llmToken(): Promise<string>",description:"Exchange the current account for an upstream model-access ticket.",parameters:[],returns:"the opaque ticket string the gateway forwards upstream."},{signature:"async callWithAuth<T>( apiFn: (loginInfo: QbLoginInfo | undefined, overRideInfo: Record<string, string> | undefined) => Promise<T>, ): Promise<T>",description:"Run `apiFn` with the current credentials, refreshing the ticket and retrying when the upstream reports an expiry.",parameters:[{name:"apiFn",description:"performs one authenticated call with the injected credentials."}],returns:"whatever `apiFn` resolves with."},{signature:"inspect(): { pipeConnected: boolean; accountResolved: boolean; hasLoginInfo: boolean }",description:"Internal state the invariant companion checks. Not for behavioral use: callers must not branch on it, because it exposes resolution progress that is only meaningful between operations.",parameters:[],returns:"whether a pipe is live, whether resolution completed, and whether that resolution produced account fields."}]},{key:"sandbox",summary:"Abstract process-sandbox service.",description:"Abstract process-sandbox service. confine must return enforcing argv or fail closed at wrap or runner-execution time; silent unconfined passthrough is forbidden. Functional probes arbitrate multi-runner chains and may be skipped for a sole candidate, whose own refusal remains the fail-closed end.",methods:[{signature:"abstract confine(argv: readonly string[], policy: SandboxPolicy): ConfinedArgv",description:"Wrap `argv` so it executes confined under `policy` on this host; the caller spawns the returned argv in place of its own.",parameters:[{name:"argv",description:"the exact argv the caller is about to spawn (program plus arguments), NOT a shell string — a shell-shaped consumer passes `['bash', '-c', command]`."},{name:"policy",description:"the file-effect policy this execution runs under, carried per call (see {@link SandboxPolicy})."}],returns:"the argv to spawn instead, plus the enforcement completeness the selected backend achieves for it."}]},{key:"sandboxPolicy",summary:"The sandbox-policy service (`ctx.sandboxPolicy`).",description:"The sandbox-policy service (`ctx.sandboxPolicy`). Owns the deployment default mode, fallback workspace root, and current request-time policy section. Tool layers call resolve for each execution so a session's mode log and immutable cwd travel together to every enforcing capability.",methods:[{signature:"readonly defaultMode: SandboxMode",description:"The deployment default mode — the fallback beneath a session override.",parameters:[]},{signature:"readonly workspaceRoot: string",description:"The absolute `workspace-write` fallback root for calls without a session cwd.",parameters:[]},{signature:"resolve(request: SandboxPolicyRequest = {}): SandboxExecutionPolicy",description:"Resolve the complete policy for one capability call. An approved explicit mode outranks the session's last `sandbox/mode` event, which outranks the deployment default. A session cwd is its workspace-write boundary; the configured root is the fallback for agentless calls and sessions without a cwd.",parameters:[{name:"request",description:"optional session and approved mode override."}],returns:"the fully resolved per-call mode and absolute workspace root."},{signature:"overrideOf(session: Session): SandboxMode | undefined",description:"Read the session override without applying the deployment default.",parameters:[{name:"session",description:"session whose log supplies the override."}],returns:"the last logged mode, or `undefined` without one."}]},{key:"sessionPersistence",summary:"Durable append-only session storage.",description:"Durable append-only session storage. Implementations preserve contiguous, losslessly JSON-serializable events; append resolves only after durability, and load balances a complete interrupted tail without rewriting committed events.",methods:[{signature:"abstract locate(meta: SessionHeader): SessionLocation | undefined",description:"Resolve this backend's independent local artifact for a session without reading, creating, flushing, or otherwise materializing it. Backends such as SQLite that do not own one artifact per session return `undefined`.",parameters:[{name:"meta",description:"the immutable session header whose artifact is requested."}],returns:"the backend-specific absolute location, when one exists."},{signature:"abstract readonly supportsRawArtifacts: boolean",description:"Whether this backend exposes one verbatim raw artifact per session. A backend that declares `true` must override readRaw.",parameters:[]},{signature:"readRaw(_id: SessionId, signal?: AbortSignal): Promise<SessionRawArtifact | undefined>",description:"Read a session's backend-owned artifact text verbatim — the exact durable bytes the backend wrote (decoded from its physical encoding, e.g. a decompressed JSONL). The returned `content` is the raw text, not a reconstruction from parsed events, so it preserves backend-specific serialization (chunk packing, key order, line breaks). Callers first test supportsRawArtifacts; `undefined` then means only that the requested session has no materialized artifact.",parameters:[{name:"_id",description:"the persisted session to read (unused by the default: no per-session artifact)."},{name:"signal",description:"optional cancellation for backend read work."}],returns:"the raw artifact plus its parsed header, or `undefined` when the session is absent.",throws:["when this backend does not expose per-session raw artifacts."]},{signature:"abstract create(meta: SessionHeader): Promise<void>",description:"Register a new session's metadata. A backend MAY defer the physical write until the first append (lazy materialization), in which case a created-but-never-appended session is absent from list — abandoned sessions leave nothing behind.",parameters:[{name:"meta",description:"the immutable header (id, version, cwd, lineage) to record."}]},{signature:"abstract append(id: SessionId, events: readonly SessionEvent[]): Promise<void>",description:"Durably persist a batch of events. Honors the append-only and contiguous- seq contracts: the first event's `seq` MUST equal the stored next-seq (after `load` has durably closed any interrupted turn). Rejects non-JSON- serializable `event.data` with an error naming the offending event type.",parameters:[{name:"id",description:"the session the batch belongs to."},{name:"events",description:"the contiguous batch to persist, in seq order."}]},{signature:"async prepare(id: SessionId, signal?: AbortSignal): Promise<SessionPreparation>",description:"Prepare the exact unpublished Session used by resume. Implementations may reuse object graphs retained by an earlier inspect after confirming their durable revision is still current; disposal releases an unpublished reservation. Revision retries require the durable log to remain unchanged for one read/check round trip; continuous external writers may delay completion.",parameters:[{name:"id",description:"persisted session to prepare."},{name:"signal",description:"optional cancellation for preparation work."}],returns:"one owned unpublished Session preparation."},{signature:"abstract load(id: SessionId): Promise<SessionInspection>",description:"Load an immutable balanced logical view and commit any required cold recovery. A complete interrupted final turn is preserved and durably closed with missing tool errors plus any open step and turn boundaries; only a torn final record is discarded. Unknown versions and corruption in the committed prefix reject. Implementations MUST NOT crash-repair an identity still bound to a live Session: a balanced live log may return as a durable snapshot, while an open live turn rejects. Returned values may be shared with immutable live or prepared state and must not be mutated. Revision-based implementations may wait for one stable read/check round trip.",parameters:[{name:"id",description:"the persisted session to reload."}],returns:"the header and a log ending on a balanced `turn/end`."},{signature:"abstract inspect(id: SessionId, signal?: AbortSignal): Promise<SessionInspection>",description:"Inspect an immutable logical session without committing recovery or publishing it. A cold complete interrupted turn receives synthetic closers in memory and a torn physical tail remains untouched. An already-live Session instead yields its current immutable snapshot, which may contain an open turn and its `session/end-seed` boundary. Coordinator-backed implementations retain the exact cold unpublished Session for bounded reuse by a later prepare. A stale ready source is reloaded; a source already committing or reserved for resume remains exclusive, and inspection may borrow its immutable view. Callers borrow only the immutable header and log. Continuous external writers may delay revision convergence.",parameters:[{name:"id",description:"the persisted session to inspect."},{name:"signal",description:"optional cancellation for queued and backend read work."}],returns:"the validated header and current logical event log."},{signature:"abstract readFrom(id: SessionId, fromSeq: number, signal?: AbortSignal): Promise<{ meta: SessionHeader; events: SessionEvent[] }>",description:"Read the stored events from `fromSeq` onward — the read-from-seq primitive for read models that resume from a watermark (e.g. a persisted projection cache folding only the tail past its checkpoint). Unlike inspect, it is a detached physical suffix read: no preparation cache, torn-tail truncation, synthetic closers, or coordinator-state publication. Only events from the valid contiguous stored prefix are returned, so a torn fragment never reaches the caller. `fromSeq` at or beyond the stored prefix returns an empty event list (never an error). Backends whose medium can seek by seq (SQLite) read only the suffix; sequential media (JSONL, both encodings) still parse the whole artifact and skip forward — the primitive bounds what is RETURNED and refolded, not every backend's physical read.",parameters:[{name:"id",description:"the persisted session to read."},{name:"fromSeq",description:"first event seq to include; a non-negative safe integer."},{name:"signal",description:"optional cancellation for queued and backend read work."}],returns:"the header and the stored events with `seq >= fromSeq`."},{signature:"abstract list(signal?: AbortSignal): Promise<SessionHeader[]>",description:"Lightweight listing from metadata, without a full-log parse.",parameters:[{name:"signal",description:"optional cancellation for backend listing work."}],returns:"one header per materialized session."},{signature:"abstract listSnapshots(signal?: AbortSignal): Promise<SessionPersistenceSnapshot[]>",description:`List materialized sessions with cheap per-log change tokens.
|
|
30
|
+
This is not a superset of onJobDone: that one delivers the terminal record under first-wins semantics a job controller couples to notice delivery, while this one carries no delivery meaning and marks nothing reported. Listeners are contained and never awaited.`,parameters:[{name:"listener",description:"receives the owner whose visible set changed, or `undefined` when an unowned job changed and every caller's set did."}],returns:"disposer that unregisters the listener."},{signature:"abstract attachController(name: string): () => void",description:"Attach an effect-scoped controller that can read and stop jobs. It serves the owners its registering context's scope covers, and start refuses an owner no attached controller serves.",parameters:[{name:"name",description:"diagnostic label; duplicate names remain independent."}],returns:"disposer that detaches this controller."}]},{key:"llm",summary:"The abstract `llm` service: an adapter registry plus a streaming model-call API, interceptable via the `llm/stream` waterfall.",description:"The abstract `llm` service: an adapter registry plus a streaming model-call API, interceptable via the `llm/stream` waterfall.",methods:[{signature:"registerAdapter(providers: string[], adapter: LlmAdapter): AdapterRegistrationHandle",description:"Register an adapter for the given provider routes. Throws `LlmError` with code `DUPLICATE_ADAPTER` if any provider already has an adapter (all-or-nothing). Disposed with the fiber.",parameters:[{name:"providers",description:"every provider route this adapter should serve."},{name:"adapter",description:"the adapter that streams calls for those providers."}],returns:"the disposer, carrying {@link AdapterRegistrationHandle.replace}."},{signature:"listProviders(): LlmProviderInfo[]",description:"Describe provider routes with a registered adapter.",parameters:[],returns:"detached provider metadata in registration order."},{signature:"registerConfigurableProviders(entries: readonly LlmConfigurableProvider[]): DirectoryRegistrationHandle",description:"Declare provider routes an adapter plugin can activate through configuration. Registration is all-or-nothing: an empty list, invalid entry, or a provider already declared by any registration throws `LlmError` without registering the rest. Disposed with the fiber.",parameters:[{name:"entries",description:"every configurable provider this plugin owns."}],returns:"a handle that withdraws all of them, and can atomically replace them."},{signature:"listConfigurableProviders(): LlmConfigurableProvider[]",description:"List every declared configurable provider, registered or dormant.",parameters:[],returns:"detached directory entries in declaration order."},{signature:"registerModelDiscovery( settingsNs: string, discover: (request: LlmModelDiscoveryRequest) => Promise<readonly LlmDiscoveredModel[]>, ): () => void",description:"Offer to interrogate provider endpoints on behalf of the settings namespace this plugin owns. The namespace is the key because that is what a configuration surface already holds from the configurable-provider directory, and because a provider being *added* has no route to name yet. Disposed with the fiber.",parameters:[{name:"settingsNs",description:"the namespace whose profiles this discovery serves."},{name:"discover",description:"interrogates one endpoint; must honor `request.signal`."}],returns:"the disposer that withdraws the offer."},{signature:"async discoverModels( settingsNs: string, request: LlmModelDiscoveryRequest, ): Promise<LlmDiscoveredModel[]>",description:"Interrogate one provider endpoint for the models it advertises. The request describes a draft, not a stored route, so nothing here reads or writes settings or credentials — the caller owns both, and the reply is candidate metadata a surface may offer for adoption.",parameters:[{name:"settingsNs",description:"namespace whose registered discovery serves this draft."},{name:"request",description:"the endpoint, protocol, and one-shot credential to use."}],returns:"the advertised models, deduplicated in endpoint order."},{signature:"providerRetryPolicy(provider: string): ResolvedRetryPolicy",description:"Resolve the retry policy captured when one provider route was registered.",parameters:[{name:"provider",description:"registered provider route to inspect."}],returns:"the provider-owned policy, with normal defaults already resolved."},{signature:"async listModels(provider: string): Promise<LlmModelInfo[]>",description:"Discover models advertised by one registered provider. Catalog membership is advisory and never changes routing or request validation.",parameters:[{name:"provider",description:"registered provider route to inspect."}],returns:"detached model metadata in adapter-preferred order."},{signature:"async resolveModelInfo( provider: string, model: string, signal?: AbortSignal, ): Promise<LlmResolvedModelInfo>",description:"Resolve and validate all metadata from the adapter that owns one exact route. The result is detached from adapter-owned objects; catalog membership remains advisory and does not control request routing.",parameters:[{name:"provider",description:"registered provider route to inspect."},{name:"model",description:"exact model id passed to the adapter."},{name:"signal",description:"optional cancellation for adapter-owned asynchronous lookup."}],returns:"exact model identity plus available context and reasoning metadata."},{signature:"async resolveCallConfig(config: LlmCallConfig, signal?: AbortSignal): Promise<LlmCallConfig>",description:"Validate a conversation call config against its exact model capability and materialize adapter-configured defaults. Unsupported explicit efforts reject before provider I/O; no clamping or aliasing is performed. This standalone query does not bind a later dispatch; use prepareCall when logging and streaming must share one adapter registration.",parameters:[{name:"config",description:"provider/model route and optional request controls."},{name:"signal",description:"optional cancellation for adapter-owned capability lookup."}],returns:"a detached config only when a default must be materialized."},{signature:"async prepareCall(config: LlmCallConfig, signal?: AbortSignal): Promise<PreparedLlmCall>",description:"Resolve one call under its current adapter registration. The returned one-shot handle keeps that registration across header logging and dispatch, so HMR cannot combine one adapter's capability result with another adapter.",parameters:[{name:"config",description:"provider/model route and optional request controls."},{name:"signal",description:"optional cancellation for adapter-owned capability lookup."}],returns:"a prepared config and its registration-bound stream entry point."},{signature:"stream(options: GenerateOptions): AsyncIterable<StreamChunk>",description:"Stream one model call as raw chunks (token-level deltas). Replay state is retained only when the same adapter instance owns its historical provider and the target provider. Final adapter selection remains fixed through asynchronous exact-model resolution and dispatch. Adapter selection, dispatch, and iteration failures become terminal `error` or `aborted` finish chunks; middleware, nested-call, cleanup, and consumer failures remain thrown.",parameters:[{name:"options",description:"the full request; `options.provider` selects the adapter."}],returns:"the chunk stream, possibly wrapped by `llm/stream` listeners."}]},{key:"lsp",summary:"The LSP capability seam (`ctx.lsp`).",description:"The LSP capability seam (`ctx.lsp`). Owns provider registration/selection and normalized query execution; exposes exactly the four operations and no protocol escape hatch.",methods:[{signature:"registerProvider(provider: LspProvider): () => void",description:"Register a provider, atomically reserving its id and every normalized extension. Any conflict or invalid input publishes nothing and throws `LspError`; the returned disposer releases all reservations. Disposed with the calling fiber.",parameters:[{name:"provider",description:"the backend to register."}],returns:"a synchronous disposer releasing the id and all extension reservations."},{signature:"query(request: LspQueryRequest, signal?: AbortSignal): Promise<LspQueryResult>",description:"Select a provider by the file's extension and run one query. Selection is per-query and order-independent; no match throws `LspError` `LSP_UNAVAILABLE`.",parameters:[{name:"request",description:"the normalized query."},{name:"signal",description:"optional cancellation forwarded to the selected provider."}],returns:"the normalized, closed-union result."}]},{key:"messageFeedback",summary:"Storage-domain sidecar service.",description:"Storage-domain sidecar service. It inspects persisted Session history and never creates or resumes an Agent or Session.",methods:[{signature:"@Remote('list') async list(request: MessageFeedbackListRequest): Promise<MessageFeedbackListResult>",description:"Read feedback belonging to the current persisted Session lifecycle. A stale row from a reused Session id is invisible.",parameters:[{name:"request",description:"Session identity to inspect and list."}],returns:"current immutable items or `session-not-found`."},{signature:"@Remote('put') put(request: MessageFeedbackPutRequest): Promise<MessageFeedbackPutResult>",description:"Create or replace feedback for one derived append-origin assistant message. Every request must match the addressed item's current version; a matching no-op returns the stored item without changing its revision.",parameters:[{name:"request",description:"target, desired value, and observed item version."}],returns:"the committed item or an explicit business failure."},{signature:"@Remote('delete') delete(request: MessageFeedbackDeleteRequest): Promise<MessageFeedbackDeleteResult>",description:"Delete one feedback item. Absence is successful regardless of the supplied version; an existing item requires an exact version match.",parameters:[{name:"request",description:"Session, message, and observed item version."}],returns:"the stable absent postcondition, or an explicit failure."}]},{key:"permissionPresets",summary:"Owns the deployment's permission presets and their write path.",description:"Owns the deployment's permission presets and their write path. Requires a confining `ctx.shell` executor and `ctx.approval`; unmatched knob values are reported as CUSTOM_PRESET, not an error.",methods:[{signature:"current(events: readonly SessionEvent[]): string",description:"Resolve the preset matching the effective knob values. A still-matching last selection wins shared-bundle ties; otherwise the first table match wins, or CUSTOM_PRESET when no entry matches.",parameters:[{name:"events",description:"the session's events in log order."}],returns:"the effective preset name, or `custom` when nothing matches."},{signature:"selectFor(state: KnobState): PermissionSelect",description:"Build the whole select value for one folded knob state: every table option in declaration order, `custom` appended exactly while derived.",parameters:[{name:"state",description:"the folded knob overrides."}],returns:"the `permissions` projection payload."},{signature:"resolve(name: string): PresetSpec",description:"Resolve a preset's knob bundle.",parameters:[{name:"name",description:"the preset name to resolve."}],returns:"the configured bundle.",throws:["when `name` is not in the table."]},{signature:"optionOf(name: string): PresetOption",description:"Build the client option for a table entry or CUSTOM_PRESET. A missing label falls back to the table key.",parameters:[{name:"name",description:"a table key, or `custom`."}],returns:"the option a client renders.",throws:["when `name` is neither a table key nor `custom`."]},{signature:"set(session: Session, name: string): void",description:"Record a changed preset, then update each changed knob through its own setter. Selecting the effective preset again appends nothing.",parameters:[{name:"session",description:"the session the switch belongs to."},{name:"name",description:"the preset to switch to; unknown names throw."}]}]},{key:"planMode",summary:"`ctx.planMode`: owns logged plan state, applies and narrates selected state at step start, the `plan:policy` section, the `/plan` command, and the stable exit tool.",description:"`ctx.planMode`: owns logged plan state, applies and narrates selected state at step start, the `plan:policy` section, the `/plan` command, and the stable exit tool. UIs observe committed flips through `session/event`; there is no live mirror.",methods:[{signature:"get(agent: Agent): { active: boolean; pending?: boolean }",description:"Read the logged plan state and any selected state awaiting the next accepted in-turn pre-step.",parameters:[{name:"agent",description:"The agent to read."}],returns:"Current logged state plus a pending selection, when present."},{signature:"set(agent: Agent, active: boolean): 'committed' | 'queued' | 'cancelled' | 'noop'",description:"Select whether plan mode should be active. Between turns the method appends the change immediately because no in-turn pre-step will run until another prompt starts a turn. The open-turn fold is the idle signal: agent status stays `running` through post-turn checkpointing, when no further in-turn pre-step runs. During an open turn the selection remains pending until the next accepted in-turn pre-step. Repeated selection of the current or already-pending state is a no-op.",parameters:[{name:"agent",description:"The agent to switch."},{name:"active",description:"Whether plan mode should be active."}],returns:"what happened: `committed` (logged now), `queued` (awaiting the next accepted in-turn pre-step), `cancelled` (an opposite pending selection was cleared; the logged state already matches), or `noop` (already in that state)."}]},{key:"sandbox",summary:"Abstract process-sandbox service.",description:"Abstract process-sandbox service. confine must return enforcing argv or fail closed at wrap or runner-execution time; silent unconfined passthrough is forbidden. Functional probes arbitrate multi-runner chains and may be skipped for a sole candidate, whose own refusal remains the fail-closed end.",methods:[{signature:"abstract confine(argv: readonly string[], policy: SandboxPolicy): ConfinedArgv",description:"Wrap `argv` so it executes confined under `policy` on this host; the caller spawns the returned argv in place of its own.",parameters:[{name:"argv",description:"the exact argv the caller is about to spawn (program plus arguments), NOT a shell string — a shell-shaped consumer passes `['bash', '-c', command]`."},{name:"policy",description:"the file-effect policy this execution runs under, carried per call (see {@link SandboxPolicy})."}],returns:"the argv to spawn instead, plus the enforcement completeness the selected backend achieves for it."}]},{key:"sandboxPolicy",summary:"The sandbox-policy service (`ctx.sandboxPolicy`).",description:"The sandbox-policy service (`ctx.sandboxPolicy`). Owns the deployment default mode, fallback workspace root, and current request-time policy section. Tool layers call resolve for each execution so a session's mode log and immutable cwd travel together to every enforcing capability.",methods:[{signature:"readonly defaultMode: SandboxMode",description:"The deployment default mode — the fallback beneath a session override.",parameters:[]},{signature:"readonly workspaceRoot: string",description:"The absolute `workspace-write` fallback root for calls without a session cwd.",parameters:[]},{signature:"resolve(request: SandboxPolicyRequest = {}): SandboxExecutionPolicy",description:"Resolve the complete policy for one capability call. An approved explicit mode outranks the session's last `sandbox/mode` event, which outranks the deployment default. A session cwd is its workspace-write boundary; the configured root is the fallback for agentless calls and sessions without a cwd.",parameters:[{name:"request",description:"optional session and approved mode override."}],returns:"the fully resolved per-call mode and absolute workspace root."},{signature:"overrideOf(session: Session): SandboxMode | undefined",description:"Read the session override without applying the deployment default.",parameters:[{name:"session",description:"session whose log supplies the override."}],returns:"the last logged mode, or `undefined` without one."}]},{key:"sessionPersistence",summary:"Durable append-only session storage.",description:"Durable append-only session storage. Implementations preserve contiguous, losslessly JSON-serializable events; append resolves only after durability, and load balances a complete interrupted tail without rewriting committed events.",methods:[{signature:"abstract locate(meta: SessionHeader): SessionLocation | undefined",description:"Resolve this backend's independent local artifact for a session without reading, creating, flushing, or otherwise materializing it. Backends such as SQLite that do not own one artifact per session return `undefined`.",parameters:[{name:"meta",description:"the immutable session header whose artifact is requested."}],returns:"the backend-specific absolute location, when one exists."},{signature:"abstract readonly supportsRawArtifacts: boolean",description:"Whether this backend exposes one verbatim raw artifact per session. A backend that declares `true` must override readRaw.",parameters:[]},{signature:"readRaw(_id: SessionId, signal?: AbortSignal): Promise<SessionRawArtifact | undefined>",description:"Read a session's backend-owned artifact text verbatim — the exact durable bytes the backend wrote (decoded from its physical encoding, e.g. a decompressed JSONL). The returned `content` is the raw text, not a reconstruction from parsed events, so it preserves backend-specific serialization (chunk packing, key order, line breaks). Callers first test supportsRawArtifacts; `undefined` then means only that the requested session has no materialized artifact.",parameters:[{name:"_id",description:"the persisted session to read (unused by the default: no per-session artifact)."},{name:"signal",description:"optional cancellation for backend read work."}],returns:"the raw artifact plus its parsed header, or `undefined` when the session is absent.",throws:["when this backend does not expose per-session raw artifacts."]},{signature:"abstract create(meta: SessionHeader): Promise<void>",description:"Register a new session's metadata. A backend MAY defer the physical write until the first append (lazy materialization), in which case a created-but-never-appended session is absent from list — abandoned sessions leave nothing behind.",parameters:[{name:"meta",description:"the immutable header (id, version, cwd, lineage) to record."}]},{signature:"abstract append(id: SessionId, events: readonly SessionEvent[]): Promise<void>",description:"Durably persist a batch of events. Honors the append-only and contiguous- seq contracts: the first event's `seq` MUST equal the stored next-seq (after `load` has durably closed any interrupted turn). Rejects non-JSON- serializable `event.data` with an error naming the offending event type.",parameters:[{name:"id",description:"the session the batch belongs to."},{name:"events",description:"the contiguous batch to persist, in seq order."}]},{signature:"async prepare(id: SessionId, signal?: AbortSignal): Promise<SessionPreparation>",description:"Prepare the exact unpublished Session used by resume. Implementations may reuse object graphs retained by an earlier inspect after confirming their durable revision is still current; disposal releases an unpublished reservation. Revision retries require the durable log to remain unchanged for one read/check round trip; continuous external writers may delay completion.",parameters:[{name:"id",description:"persisted session to prepare."},{name:"signal",description:"optional cancellation for preparation work."}],returns:"one owned unpublished Session preparation."},{signature:"abstract load(id: SessionId): Promise<SessionInspection>",description:"Load an immutable balanced logical view and commit any required cold recovery. A complete interrupted final turn is preserved and durably closed with missing tool errors plus any open step and turn boundaries; only a torn final record is discarded. Unknown versions and corruption in the committed prefix reject. Implementations MUST NOT crash-repair an identity still bound to a live Session: a balanced live log may return as a durable snapshot, while an open live turn rejects. Returned values may be shared with immutable live or prepared state and must not be mutated. Revision-based implementations may wait for one stable read/check round trip.",parameters:[{name:"id",description:"the persisted session to reload."}],returns:"the header and a log ending on a balanced `turn/end`."},{signature:"abstract inspect(id: SessionId, signal?: AbortSignal): Promise<SessionInspection>",description:"Inspect an immutable logical session without committing recovery or publishing it. A cold complete interrupted turn receives synthetic closers in memory and a torn physical tail remains untouched. An already-live Session instead yields its current immutable snapshot, which may contain an open turn and its `session/end-seed` boundary. Coordinator-backed implementations retain the exact cold unpublished Session for bounded reuse by a later prepare. A stale ready source is reloaded; a source already committing or reserved for resume remains exclusive, and inspection may borrow its immutable view. Callers borrow only the immutable header and log. Continuous external writers may delay revision convergence.",parameters:[{name:"id",description:"the persisted session to inspect."},{name:"signal",description:"optional cancellation for queued and backend read work."}],returns:"the validated header and current logical event log."},{signature:"abstract readFrom(id: SessionId, fromSeq: number, signal?: AbortSignal): Promise<{ meta: SessionHeader; events: SessionEvent[] }>",description:"Read the stored events from `fromSeq` onward — the read-from-seq primitive for read models that resume from a watermark (e.g. a persisted projection cache folding only the tail past its checkpoint). Unlike inspect, it is a detached physical suffix read: no preparation cache, torn-tail truncation, synthetic closers, or coordinator-state publication. Only events from the valid contiguous stored prefix are returned, so a torn fragment never reaches the caller. `fromSeq` at or beyond the stored prefix returns an empty event list (never an error). Backends whose medium can seek by seq (SQLite) read only the suffix; sequential media (JSONL, both encodings) still parse the whole artifact and skip forward — the primitive bounds what is RETURNED and refolded, not every backend's physical read.",parameters:[{name:"id",description:"the persisted session to read."},{name:"fromSeq",description:"first event seq to include; a non-negative safe integer."},{name:"signal",description:"optional cancellation for queued and backend read work."}],returns:"the header and the stored events with `seq >= fromSeq`."},{signature:"abstract list(signal?: AbortSignal): Promise<SessionHeader[]>",description:"Lightweight listing from metadata, without a full-log parse.",parameters:[{name:"signal",description:"optional cancellation for backend listing work."}],returns:"one header per materialized session."},{signature:"abstract listSnapshots(signal?: AbortSignal): Promise<SessionPersistenceSnapshot[]>",description:`List materialized sessions with cheap per-log change tokens.
|
|
31
31
|
|
|
32
32
|
Repeated observations of an unchanged log return the same revision. A successful mutating load repair changes the next listed revision. Revisions also distinguish independently backed stores so backend-local counters cannot compare equal across different persistence sources.`,parameters:[{name:"signal",description:"optional cancellation for backend snapshot-listing work."}],returns:"one header and opaque revision per materialized session without loading full logs."}]},{key:"sessionProjectionCache",summary:"The persisted projection cache service.",description:"The persisted projection cache service. Opens the `session_projcache` domain at init, checkpoints live sessions on a throttled write-behind (count/interval triggers from Config) plus two mandatory points — `turn/end` and session disposal (the live-to-cold moment) — and serves the cold-read ladder: cached row, persistence `readFrom` tail, registry `restore`, durable write-back. Every durable write is fail-soft: failures log a warning and the cache self-heals on the next write or cold read.",methods:[{signature:"cachedSnapshot(meta: SessionHeader): ProjectionSnapshot | undefined",description:"The zero-I/O listing read: whole values viewed straight from the stored rows (version-matching keys only), each cut carried with its watermark so a client value store can seed under its higher-seq-wins rule — as stale as the last durable checkpoint but never wrong, and never from an unrelated log (the caller's header is the identity witness). Fresher paths (the history tail baseline, coldSnapshot) supersede these values whenever a session is actually opened.",parameters:[{name:"meta",description:"the listed session's header (identity witness; no log read)."}],returns:"the cut (`asOfSeq` = lowest served-row watermark), or `undefined` when no usable row exists for this lifecycle."},{signature:"async write(session: Session): Promise<void>",description:"Durably checkpoint one live session NOW (both mandatory points call this; tests and carriers may too). The registry cut is snapshotted at this boundary (states are live references), then the whole record is replaced. NOT fail-soft — callers on the fail-soft paths contain it.",parameters:[{name:"session",description:"the live session to checkpoint."}],returns:"resolution after durability and event emission."},{signature:"async coldSnapshot(id: SessionId, signal?: AbortSignal): Promise<ProjectionSnapshot>",description:"Cold-read one persisted session's projections with zero full-log load: cached rows + a persistence `readFrom` tail from the registry's restore floor, refolded by the registry and written back (fail-soft) so the next cold read starts closer. A cache row invalidated by a shrunk log (crash-repair truncation) triggers one full re-read from seq 0 — the ladder's slow rung, still no crash. Rejects when the session has no persisted log (`not found` from the persistence seam).",parameters:[{name:"id",description:"the persisted session to read."},{name:"signal",description:"optional cancellation for the persistence reads."}],returns:"the snapshot cut at the stored log end."}]},{key:"sessionProjections",summary:"`ctx.sessionProjections`: the projection unit table and its drive.",description:"`ctx.sessionProjections`: the projection unit table and its drive. The service subscribes to `session/event` once; every committed event passes every registered unit's `apply` (eager drive), and a changed state reference notifies the change feed with the schema-validated view. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Registration is an effect (disposer rides the calling fiber): an unloaded domain plugin's key disappears from snapshots and clients read it as capability absence. Domain plugins register under `ctx.inject(['sessionProjections'], …)` so headless assemblies without the registry stay unaffected. Registrants sharing a key share one unit and are counted: the same tool package mounted in N agent presets registers N times, and the key survives until the last one unloads.",methods:[{signature:"register<K extends keyof SessionProjectionMap, S>(definition: ProjectionDefinition<K, S>): () => void",description:"Register one domain's unit. The registration is an effect on the calling context's fiber: disposing the fiber (or calling the returned disposer) removes the key — and the unit's cached cells — from subsequent drives and snapshots.",parameters:[{name:"definition",description:"key, state schema, pure unit functions, and stateVersion."}],returns:"the exact disposer that unregisters this unit."},{signature:"onChanged(listener: ProjectionChangeListener): () => void",description:"Subscribe to the change feed. The registration is an effect on the calling context's fiber.",parameters:[{name:"listener",description:"called once per unit whose state reference changed, per committed event."}],returns:"the exact disposer that unsubscribes."},{signature:"snapshot(session: Session): ProjectionSnapshot",description:"One consistent cut over every registered unit for one session, read from the watermark cache (missing cells fold lazily over the in-memory log). Fully synchronous — every value and `asOfSeq` reflect the same log position. Each value passes its unit's schema before leaving.",parameters:[{name:"session",description:"the session whose projection values are read."}],returns:"the snapshot; `values` is empty when no unit is registered."},{signature:"checkpoint(session: Session): ProjectionCheckpoint",description:"State-level checkpoint of every registered unit for one session, read from the watermark cache (missing cells fold lazily over the in-memory log). This is the write side of the persisted projection cache: the returned rows are the `(key → {ver, seq, val})` part of the durable `(sessionId, key, ver, seq, val)` rows. Every `val` is a DETACHED structured clone — never the live cell reference: the watermark cache is this registry's authoritative mutable state, and a caller reaching the live reference could corrupt every subsequent snapshot and frame through it (plain JSON by the unit contract, so the clone is total).",parameters:[{name:"session",description:"the session whose unit states are checkpointed."}],returns:"one row per registered key; empty when no unit is registered."},{signature:"restoreFloor(checkpoint: ProjectionCheckpoint): number | undefined",description:"The stored seq a restore tail read over `checkpoint` must start at: one event BELOW the lowest usable watermark (a row is usable when its `ver` matches the live unit's `stateVersion`; an absent or mismatched row pulls the floor to `0` — that key must refold the full log). The one-below anchor is load-bearing: the tail then proves how far the stored log still extends, so restore can detect a log that shrank below a row's watermark (crash-repair truncation) instead of serving the stale row as current — an empty tail read from the anchor yields an end below every watermark and the restore rejects for a full re-read.",parameters:[{name:"checkpoint",description:"persisted rows for one session (possibly stale or empty)."}],returns:"the seq to hand the persistence `readFrom`, or `undefined` when no unit is registered (no read needed — {@link restore} would serve empty values regardless)."},{signature:"viewCheckpoint(checkpoint: ProjectionCheckpoint): Partial<SessionProjectionMap>",description:"View a checkpoint's rows without any log read: for every registered unit whose row's `ver` matches, serve the schema-validated `view` of the stored state; mismatched or absent rows leave their key absent (a cold or listing consumer treats it as not-yet-available and a fuller read path refolds it). The zero-I/O rung of the read ladder — values are as stale as their rows, never wrong.",parameters:[{name:"checkpoint",description:"persisted rows for one session (possibly stale or empty)."}],returns:"whole values per key with a usable row; empty when none."},{signature:"restore(checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: number): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }",description:"Cold read: fold every registered unit over a stored log suffix, seeding each from its checkpoint row when usable — the one read recipe (cached state + forward tail replay + `view`) applied without a live `Session`. Call with the events returned by a persistence `readFrom(id, restoreFloor(checkpoint))` and that same floor as `baseSeq`; the floor's one-below anchor makes the supplied end honest, so a shrunk log is detected here. A row is usable iff its `ver` matches the live unit's `stateVersion`, it does not predate `baseSeq` (`seq >= baseSeq - 1`), and it does not claim events past the supplied end (`seq <= endSeq`); an unusable row is discarded and its key refolds from `init` — which is only sound over the full log, so a discarded row with `baseSeq > 0` throws (the caller re-reads from seq 0, e.g. after a crash-repair truncation shrank the log below a row's watermark).",parameters:[{name:"checkpoint",description:"persisted rows for one session (possibly stale or empty)."},{name:"events",description:"the stored events with `seq >= baseSeq`, in seq order."},{name:"baseSeq",description:"the seq `events` starts at (its first event's seq when non-empty)."}],returns:"the snapshot cut at the supplied log end (`asOfSeq` is the last supplied event's seq, `baseSeq - 1` for an empty tail) plus the refreshed checkpoint rows at that cut, ready for a durable write-back."}]},{key:"sessionQuery",summary:"Unified live-preferred session query service.",description:"Unified live-preferred session query service.\n\nExact reads, filters, and traces are backend-independent concrete behavior. A backend implements full-text observation, reconciliation, ranking, cursor generations, and query execution on the same `ctx.sessionQuery` service.",methods:[{signature:"abstract searchSessions( request: SessionSearchRequest, exec?: SessionSearchExecContext, ): Promise<SessionSearchPage<SessionSearchHit>>",description:"Search the live-preferred logical corpus and group by session.",parameters:[{name:"request",description:"query text, metadata filters, page size, and cursor."},{name:"exec",description:"optional cancellation control."}],returns:"session hits ranked by their strongest matching event."},{signature:"abstract searchEvents( request: SessionEventSearchRequest, exec?: SessionSearchExecContext, ): Promise<SessionEventSearchPage>",description:"Search events within one live-preferred logical session.",parameters:[{name:"request",description:"target session, query text, filters, page size, and cursor."},{name:"exec",description:"optional cancellation control."}],returns:"matching event hits and their target header from one indexed generation."},{signature:"listSessions(signal?: AbortSignal): Promise<SessionRecord[]>",description:"List the complete logical corpus using live-preferred records.",parameters:[{name:"signal",description:"optional cancellation for persistence listing."}],returns:"deterministic newest-first cloned session records."},{signature:"async readSession(sessionId: SessionId): Promise<SessionLogSnapshot>",description:"Read and replay-validate one complete logical session log without making it live.",parameters:[{name:"sessionId",description:"live or persisted session id to read."}],returns:"cloned header and complete raw event log from one observation.",throws:["when persistence, header compatibility, or replay validation fails."]},{signature:"async filterSessions( filters: readonly SessionResultFilter[], signal?: AbortSignal, ): Promise<SessionRecord[]>",description:"Filter the complete logical corpus with provider-independent predicates.",parameters:[{name:"filters",description:"ANDed session metadata and availability clauses."},{name:"signal",description:"optional cancellation for persistence listing."}],returns:"matching cloned records in deterministic newest-first order."},{signature:"async readTitle( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionTitleSnapshot | undefined>",description:"Fold the latest log-backed title from one live-preferred logical session.",parameters:[{name:"sessionId",description:"live or persisted session id to read."},{name:"signal",description:"optional cancellation for source resolution and title folding."}],returns:"latest title snapshot, or `undefined` when the log has no title event."},{signature:"async readTitleSnapshot( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionTitleObservation>",description:"Fold the latest title and return its source header from one corpus observation.",parameters:[{name:"sessionId",description:"live or persisted session id to read."},{name:"signal",description:"optional cancellation for source resolution and title folding."}],returns:"cloned source header and optional latest title snapshot."},{signature:"async readTitleSnapshots( sessionIds: readonly SessionId[], signal?: AbortSignal, ): Promise<SessionTitleObservationResult[]>",description:`Fold titles for unique sessions from one cancellable corpus observation.
|
|
33
33
|
|
|
@@ -140,7 +140,7 @@ When a caller supplies an agent, human interaction is valid only for the exact l
|
|
|
140
140
|
provider: string;
|
|
141
141
|
model: string;
|
|
142
142
|
replayState?: unknown;
|
|
143
|
-
}`},{name:"AttachmentId",declaration:"export type AttachmentId = Branded<'AttachmentId'>;"},{name:"
|
|
143
|
+
}`},{name:"AttachmentId",declaration:"export type AttachmentId = Branded<'AttachmentId'>;"},{name:"BackendRegistry",declaration:`export class BackendRegistry {
|
|
144
144
|
register(name: string, backend: StorageBackend): () => void;
|
|
145
145
|
get(name: string): StorageBackend;
|
|
146
146
|
names(): string[];
|
|
@@ -249,13 +249,7 @@ When a caller supplies an agent, human interaction is valid only for the exact l
|
|
|
249
249
|
'image': ImageBlock;
|
|
250
250
|
'tool-call': ToolCallBlock;
|
|
251
251
|
'tool-result': ToolResultBlock;
|
|
252
|
-
}`},{name:"ContentBlockType",declaration:"export type ContentBlockType = keyof ContentBlockMap;"},{name:"
|
|
253
|
-
text: string;
|
|
254
|
-
type: AuditContentType;
|
|
255
|
-
sessionId?: string | undefined;
|
|
256
|
-
}`},{name:"ContentReviewResult",declaration:`export interface ContentReviewResult {
|
|
257
|
-
sessionId: string;
|
|
258
|
-
}`},{name:"ContextFormed",declaration:`export type ContextFormed = {
|
|
252
|
+
}`},{name:"ContentBlockType",declaration:"export type ContentBlockType = keyof ContentBlockMap;"},{name:"ContextFormed",declaration:`export type ContextFormed = {
|
|
259
253
|
readonly form?: never;
|
|
260
254
|
} | {
|
|
261
255
|
readonly form: 'instructions';
|
|
@@ -401,9 +395,7 @@ When a caller supplies an agent, human interaction is valid only for the exact l
|
|
|
401
395
|
sessionId: SessionId;
|
|
402
396
|
includeDescendants?: boolean;
|
|
403
397
|
}, signal: AbortSignal): Promise<Response>;
|
|
404
|
-
}`},{name:"DshEnvironment",declaration
|
|
405
|
-
QBOT_DSH_HOME?: string;
|
|
406
|
-
}>;`},{name:"DshEnvironmentKey",declaration:"export type DshEnvironmentKey = `${typeof DSH_ENV_PREFIX}${string}`;"},{name:"DynamicCordisPackage",declaration:`export interface DynamicCordisPackage {
|
|
398
|
+
}`},{name:"DshEnvironment",declaration:"export type DshEnvironment = Readonly<Record<DshEnvironmentKey, string>>;"},{name:"DshEnvironmentKey",declaration:"export type DshEnvironmentKey = `${typeof DSH_ENV_PREFIX}${string}`;"},{name:"DynamicCordisPackage",declaration:`export interface DynamicCordisPackage {
|
|
407
399
|
pluginId: CordisDynamicPluginId;
|
|
408
400
|
packageId: CordisDynamicPackageId;
|
|
409
401
|
pluginRunId: CordisDynamicPluginRunId;
|
|
@@ -954,22 +946,6 @@ When a caller supplies an agent, human interaction is valid only for the exact l
|
|
|
954
946
|
}`},{name:"PruneResult",declaration:`export interface PruneResult {
|
|
955
947
|
readonly pruned: readonly PrunedEntry[];
|
|
956
948
|
readonly charsRemoved: number;
|
|
957
|
-
}`},{name:"QbIdentity",declaration:`export interface QbIdentity {
|
|
958
|
-
guid: string;
|
|
959
|
-
qimei36: string;
|
|
960
|
-
qua2: string;
|
|
961
|
-
}`},{name:"QbLoginInfo",declaration:`export interface QbLoginInfo {
|
|
962
|
-
guid?: string;
|
|
963
|
-
openid?: string;
|
|
964
|
-
access_token?: string;
|
|
965
|
-
qbaccess_token?: string;
|
|
966
|
-
qbid?: string;
|
|
967
|
-
appid?: string;
|
|
968
|
-
account_type?: string;
|
|
969
|
-
}`},{name:"QbRpcRequest",declaration:`export interface QbRpcRequest {
|
|
970
|
-
servantName: string;
|
|
971
|
-
funcName: string;
|
|
972
|
-
body: unknown;
|
|
973
949
|
}`},{name:"ReadFileLine",declaration:`export interface ReadFileLine {
|
|
974
950
|
number: number;
|
|
975
951
|
text: string;
|
|
@@ -988,6 +964,9 @@ When a caller supplies an agent, human interaction is valid only for the exact l
|
|
|
988
964
|
}`},{name:"ReasoningEffortId",declaration:"export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"},{name:"RedactedSecret",declaration:`export interface RedactedSecret {
|
|
989
965
|
path: string[];
|
|
990
966
|
set: boolean;
|
|
967
|
+
}`},{name:"ReplayEnvelope",declaration:`export interface ReplayEnvelope {
|
|
968
|
+
response: unknown;
|
|
969
|
+
blocks?: readonly unknown[];
|
|
991
970
|
}`},{name:"RequestContext",declaration:`export interface RequestContext {
|
|
992
971
|
provider: string;
|
|
993
972
|
model: string;
|
|
@@ -1593,7 +1572,7 @@ When a caller supplies an agent, human interaction is valid only for the exact l
|
|
|
1593
1572
|
} | {
|
|
1594
1573
|
type: 'finish';
|
|
1595
1574
|
reason: FinishReason;
|
|
1596
|
-
replayState?:
|
|
1575
|
+
replayState?: ReplayEnvelope;
|
|
1597
1576
|
};`},{name:"SubagentCapabilities",declaration:`export interface SubagentCapabilities {
|
|
1598
1577
|
readonly outputSchema: boolean;
|
|
1599
1578
|
readonly depthLimit: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@deepseek-ai/dsh-tool-cordis","version":"0.0.
|
|
1
|
+
{"name":"@deepseek-ai/dsh-tool-cordis","version":"0.1.0-rc.7","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-cordis-host-runner":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7"}}
|