@songtonyli/dsh-cli 0.1.51 → 0.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@deepseek-ai/dsh/package.json +112 -111
- package/node_modules/@deepseek-ai/dsh-acp/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-acp-app/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-agent/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.i18n.yaml +16 -4
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.md +17 -0
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.zh.md +17 -0
- package/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +22 -7
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-agent-preset/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-agent-preset/README.md +4 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset/README.zh.md +4 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +6 -5
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/agent-experience/SKILL.md +19 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +9 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/SKILL.md +9 -4
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/user-actions.md +15 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.i18n.yaml +64 -0
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.md +138 -0
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.zh.md +138 -0
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/index.js +501 -0
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/typert.host.js +350 -0
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/typert.remote-client.js +249 -0
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/types/index.js +424 -0
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/types/types.js +12 -0
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +66 -0
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-api-remotes/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-remotes/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +274 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +2 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +42 -40
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +3 -2
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +2 -2
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/service.js +1 -0
- package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +69 -69
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/default-directory.js +3 -3
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-app-boot/README.md +0 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/README.zh.md +0 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +2 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-authorization/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-base/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-base/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +11 -10
- package/node_modules/@deepseek-ai/dsh-base/package.json +94 -93
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-modules/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/README.i18n.yaml +34 -0
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/README.md +67 -0
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/README.zh.md +67 -0
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/lib/client.js +75 -0
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/lib/index.js +185 -0
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/lib/typert.host.js +284 -0
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/lib/typert.remote-client.js +220 -0
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +78 -0
- package/node_modules/@deepseek-ai/dsh-client-resources/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-store/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +204 -72
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +37 -36
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +89 -25
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +33 -32
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.md +4 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.zh.md +4 -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 +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +26 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +17 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +8 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +8 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +3546 -3243
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +16 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.md +6 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.zh.md +6 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Menu.module.css +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Modal.module.css +5 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Switch.module.css +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/TextShimmer.module.css +82 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Tooltip.module.css +1 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +135 -58
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DisclosureRow.d.ts +6 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/TextShimmer.d.ts +14 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Tooltip.d.ts +10 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/index.d.ts +1 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/overlay-top-margin.d.ts +2 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useAnchoredMaxHeight.d.ts +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useAnchoredPosition.d.ts +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +22 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +132 -24
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +17 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +20 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +11 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +11 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/README.md +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/README.zh.md +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +51 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/README.md +70 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/README.zh.md +70 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/lib/client.js +180 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/lib/index.js +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +62 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +2 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +12 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +21 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.zh.md +4 -2
- 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 +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +20 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +7 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +21 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +24 -23
- package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-command-compact/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-command-goal/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-commands/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-config-editor/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-config-editor/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-config-editor/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-config-editor/lib/index.js +8 -2
- package/node_modules/@deepseek-ai/dsh-config-editor/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +12 -6
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +2 -2
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-account/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-deepseek-account/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/index.js +14 -1
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/index.js +17 -1
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-deque/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/icon.svg +6 -4
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +35 -35
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/README.i18n.yaml +46 -0
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/README.md +95 -0
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/README.zh.md +95 -0
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/cordis.patch.yml +16 -0
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/icon.svg +18 -0
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/package.json +53 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/locale/zh.json +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-file-reference/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-fs/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-goal/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-headless/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-hmr/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-hook-protocol/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-hooks-claude-code/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-hooks-codex/package.json +18 -18
- 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 +13 -13
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/types/resolver.js +1 -1
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/README.md +109 -0
- package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/README.zh.md +109 -0
- package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/lib/index.js +88 -0
- package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +45 -0
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +18 -13
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +37 -37
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-native-command/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-native-command/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-native-command/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-native-command/lib/index.js +22 -20
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/file-applications-linux.js +2 -2
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/file-applications-windows.js +1 -1
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/file-applications.js +4 -4
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.js +11 -10
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/runner.js +5 -3
- package/node_modules/@deepseek-ai/dsh-native-command/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-otel/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-otel/README.md +70 -0
- package/node_modules/@deepseek-ai/dsh-otel/README.zh.md +70 -0
- package/node_modules/@deepseek-ai/dsh-otel/lib/index.js +399 -0
- package/node_modules/@deepseek-ai/dsh-otel/package.json +47 -0
- package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-persona/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-sandbox/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-sandbox-local/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-local/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-local/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-local/lib/index.js +5 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.i18n.yaml +9 -9
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.md +13 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.zh.md +15 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/assets/diagnose-windows-sandbox-acl/SKILL.md +46 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/assets/diagnose-windows-sandbox-acl/scripts/diagnose-windows-sandbox-acl.ps1 +721 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-Cl_DXjhk.js +1411 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +15 -9
- package/node_modules/@deepseek-ai/dsh-schedule/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-schedule/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-schedule/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +32 -30
- package/node_modules/@deepseek-ai/dsh-scope/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session/README.i18n.yaml +14 -11
- package/node_modules/@deepseek-ai/dsh-session/README.md +7 -3
- package/node_modules/@deepseek-ai/dsh-session/README.zh.md +8 -6
- package/node_modules/@deepseek-ai/dsh-session/lib/index.js +131 -91
- package/node_modules/@deepseek-ai/dsh-session/lib/types/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session/lib/types/repair.js +113 -80
- package/node_modules/@deepseek-ai/dsh-session/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-session-format/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/types/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +2 -2
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-session-projection/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-query/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +34 -34
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session-telemetry/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-session-telemetry/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry/lib/index.js +7 -2
- package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/README.i18n.yaml +16 -16
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/README.md +18 -13
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/README.zh.md +18 -13
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/lib/index.js +46 -49
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +23 -24
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-settings/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-shell/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-skill/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-skill-office/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-spill/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +30 -30
- package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +48 -48
- package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-subprocess/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-terminal-bash/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-terminal-bash/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-terminal-bash/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-terminal-bash/lib/index.js +12 -3
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-time-context/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-time-context/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-time-context/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-time-context/package.json +23 -21
- package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +29 -29
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +91 -5
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +29 -29
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-tool-present/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +26 -26
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-tools/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +30 -12
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +42 -7
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +42 -7
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +1273 -114
- package/node_modules/@deepseek-ai/dsh-tui-app/package.json +76 -72
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-time/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-values/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-util-values/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-util-values/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-util-values/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-util-values/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-web-app/README.md +6 -2
- package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +6 -2
- package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +25 -19
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +139 -137
- package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Cq6ljTv2.css +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dy0OhsZ5.js +127 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.i18n.yaml +15 -12
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.md +12 -7
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.zh.md +12 -7
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +61 -15
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +20 -13
- package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-webhook/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-webhook-github/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-win32-process/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +34 -34
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +11 -11
- package/node_modules/@keyv/serialize/LICENSE +22 -0
- package/node_modules/@keyv/serialize/README.md +15 -0
- package/node_modules/@keyv/serialize/dist/index.cjs +84 -0
- package/node_modules/@keyv/serialize/dist/index.js +58 -0
- package/node_modules/@keyv/serialize/package.json +49 -0
- package/node_modules/@sindresorhus/is/distribution/index.js +1354 -0
- package/node_modules/@sindresorhus/is/distribution/types.js +2 -0
- package/node_modules/@sindresorhus/is/distribution/utilities.js +3 -0
- package/node_modules/@sindresorhus/is/license +9 -0
- package/node_modules/@sindresorhus/is/package.json +76 -0
- package/node_modules/@sindresorhus/is/readme.md +844 -0
- package/node_modules/@types/http-cache-semantics/LICENSE +21 -0
- package/node_modules/@types/http-cache-semantics/README.md +15 -0
- package/node_modules/@types/http-cache-semantics/package.json +25 -0
- package/node_modules/byte-counter/index.js +27 -0
- package/node_modules/byte-counter/license +9 -0
- package/node_modules/byte-counter/node.js +15 -0
- package/node_modules/byte-counter/package.json +70 -0
- package/node_modules/byte-counter/readme.md +127 -0
- package/node_modules/byte-counter/utilities.js +13 -0
- package/node_modules/cacheable-lookup/LICENSE +21 -0
- package/node_modules/cacheable-lookup/README.md +245 -0
- package/node_modules/cacheable-lookup/package.json +57 -0
- package/node_modules/cacheable-lookup/source/index.js +452 -0
- package/node_modules/cacheable-request/LICENSE +19 -0
- package/node_modules/cacheable-request/README.md +341 -0
- package/node_modules/cacheable-request/dist/index.js +351 -0
- package/node_modules/cacheable-request/dist/types.js +19 -0
- package/node_modules/cacheable-request/package.json +58 -0
- package/node_modules/decompress-response/index.js +90 -0
- package/node_modules/decompress-response/license +9 -0
- package/node_modules/decompress-response/package.json +56 -0
- package/node_modules/decompress-response/readme.md +36 -0
- package/node_modules/form-data-encoder/lib/index.cjs +375 -0
- package/node_modules/form-data-encoder/lib/index.js +347 -0
- package/node_modules/form-data-encoder/license +21 -0
- package/node_modules/form-data-encoder/package.json +64 -0
- package/node_modules/form-data-encoder/readme.md +369 -0
- package/node_modules/got/dist/source/as-promise/index.js +204 -0
- package/node_modules/got/dist/source/as-promise/types.js +17 -0
- package/node_modules/got/dist/source/core/calculate-retry-delay.js +29 -0
- package/node_modules/got/dist/source/core/diagnostics-channel.js +49 -0
- package/node_modules/got/dist/source/core/errors.js +147 -0
- package/node_modules/got/dist/source/core/index.js +1339 -0
- package/node_modules/got/dist/source/core/options.js +1838 -0
- package/node_modules/got/dist/source/core/parse-link-header.js +33 -0
- package/node_modules/got/dist/source/core/response.js +41 -0
- package/node_modules/got/dist/source/core/timed-out.js +136 -0
- package/node_modules/got/dist/source/core/utils/defer-to-connect.js +44 -0
- package/node_modules/got/dist/source/core/utils/get-body-size.js +37 -0
- package/node_modules/got/dist/source/core/utils/is-client-request.js +4 -0
- package/node_modules/got/dist/source/core/utils/is-form-data.js +4 -0
- package/node_modules/got/dist/source/core/utils/is-unix-socket-url.js +25 -0
- package/node_modules/got/dist/source/core/utils/options-to-url.js +48 -0
- package/node_modules/got/dist/source/core/utils/proxy-events.js +15 -0
- package/node_modules/got/dist/source/core/utils/timer.js +162 -0
- package/node_modules/got/dist/source/core/utils/unhandle.js +20 -0
- package/node_modules/got/dist/source/core/utils/url-to-options.js +22 -0
- package/node_modules/got/dist/source/core/utils/weakable-map.js +24 -0
- package/node_modules/got/dist/source/create.js +188 -0
- package/node_modules/got/dist/source/index.js +22 -0
- package/node_modules/got/dist/source/types.js +1 -0
- package/node_modules/got/license +9 -0
- package/node_modules/got/package.json +151 -0
- package/node_modules/got/readme.md +478 -0
- package/node_modules/http-cache-semantics/LICENSE +9 -0
- package/node_modules/http-cache-semantics/README.md +268 -0
- package/node_modules/http-cache-semantics/index.js +928 -0
- package/node_modules/http-cache-semantics/package.json +19 -0
- package/node_modules/http2-wrapper/LICENSE +21 -0
- package/node_modules/http2-wrapper/README.md +459 -0
- package/node_modules/http2-wrapper/package.json +81 -0
- package/node_modules/http2-wrapper/source/agent.js +796 -0
- package/node_modules/http2-wrapper/source/auto.js +225 -0
- package/node_modules/http2-wrapper/source/client-request.js +563 -0
- package/node_modules/http2-wrapper/source/incoming-message.js +73 -0
- package/node_modules/http2-wrapper/source/index.js +50 -0
- package/node_modules/http2-wrapper/source/proxies/get-auth-headers.js +17 -0
- package/node_modules/http2-wrapper/source/proxies/h1-over-h2.js +90 -0
- package/node_modules/http2-wrapper/source/proxies/h2-over-h1.js +48 -0
- package/node_modules/http2-wrapper/source/proxies/h2-over-h2.js +32 -0
- package/node_modules/http2-wrapper/source/proxies/h2-over-hx.js +40 -0
- package/node_modules/http2-wrapper/source/proxies/initialize.js +21 -0
- package/node_modules/http2-wrapper/source/proxies/unexpected-status-code-error.js +11 -0
- package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +29 -0
- package/node_modules/http2-wrapper/source/utils/check-type.js +20 -0
- package/node_modules/http2-wrapper/source/utils/delay-async-destroy.js +33 -0
- package/node_modules/http2-wrapper/source/utils/errors.js +51 -0
- package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +13 -0
- package/node_modules/http2-wrapper/source/utils/js-stream-socket.js +8 -0
- package/node_modules/http2-wrapper/source/utils/proxy-events.js +7 -0
- package/node_modules/http2-wrapper/source/utils/proxy-socket-handler.js +102 -0
- package/node_modules/http2-wrapper/source/utils/validate-header-name.js +11 -0
- package/node_modules/http2-wrapper/source/utils/validate-header-value.js +17 -0
- package/node_modules/keyv/LICENSE +22 -0
- package/node_modules/keyv/README.md +828 -0
- package/node_modules/keyv/dist/index.cjs +990 -0
- package/node_modules/keyv/dist/index.js +964 -0
- package/node_modules/keyv/package.json +80 -0
- package/node_modules/koffi/CHANGELOG.md +1 -87
- package/node_modules/koffi/README.md +8 -12
- package/node_modules/koffi/cnoke.cjs +66 -117
- package/node_modules/koffi/doc/benchmarks.md +1 -35
- package/node_modules/koffi/doc/composites.md +20 -9
- package/node_modules/koffi/doc/index.md +10 -12
- package/node_modules/koffi/doc/migration.md +1 -1
- package/node_modules/koffi/lib/native/base/base.cc +187 -338
- package/node_modules/koffi/lib/native/base/base.hh +39 -150
- package/node_modules/koffi/package.json +1 -1
- package/node_modules/koffi/src/koffi/CMakeLists.txt +5 -12
- package/node_modules/koffi/src/koffi/index.cjs +69 -112
- package/node_modules/koffi/src/koffi/index.js +66 -109
- package/node_modules/koffi/src/koffi/indirect.cjs +69 -112
- package/node_modules/koffi/src/koffi/indirect.js +66 -109
- package/node_modules/koffi/src/koffi/src/abi/arm64.cc +1127 -87
- package/node_modules/koffi/src/koffi/src/abi/arm64_asm.S +15 -54
- package/node_modules/koffi/src/koffi/src/abi/arm64_asm.asm +20 -63
- package/node_modules/koffi/src/koffi/src/abi/loong64_asm.S +29 -55
- package/node_modules/koffi/src/koffi/src/abi/riscv64.cc +1134 -120
- package/node_modules/koffi/src/koffi/src/abi/riscv64_asm.S +29 -55
- package/node_modules/koffi/src/koffi/src/abi/x64sysv.cc +1124 -76
- package/node_modules/koffi/src/koffi/src/abi/x64sysv_asm.S +22 -52
- package/node_modules/koffi/src/koffi/src/abi/x64win.cc +1015 -46
- package/node_modules/koffi/src/koffi/src/abi/x64win_asm.S +32 -32
- package/node_modules/koffi/src/koffi/src/abi/x64win_asm.asm +39 -39
- package/node_modules/koffi/src/koffi/src/abi/x86.cc +1048 -99
- package/node_modules/koffi/src/koffi/src/abi/x86_asm.S +14 -15
- package/node_modules/koffi/src/koffi/src/abi/x86_asm.asm +20 -21
- package/node_modules/koffi/src/koffi/src/call.cc +280 -464
- package/node_modules/koffi/src/koffi/src/call.hh +46 -67
- package/node_modules/koffi/src/koffi/src/ffi.cc +224 -193
- package/node_modules/koffi/src/koffi/src/ffi.hh +145 -63
- package/node_modules/koffi/src/koffi/src/parser.cc +3 -3
- package/node_modules/koffi/src/koffi/src/static.cjs +0 -40
- package/node_modules/koffi/src/koffi/src/static.js +0 -40
- package/node_modules/koffi/src/koffi/src/type.cc +51 -148
- package/node_modules/koffi/src/koffi/src/type.hh +8 -19
- package/node_modules/koffi/src/koffi/src/util.cc +179 -108
- package/node_modules/koffi/src/koffi/src/util.hh +114 -36
- package/node_modules/koffi/src/koffi/src/win32.cc +0 -2
- package/node_modules/koffi/src/koffi/src/win32.hh +14 -17
- package/node_modules/koffi/vendor/node-addon-api/README.md +1 -1
- package/node_modules/koffi/vendor/node-addon-api/napi-inl.h +0 -39
- package/node_modules/koffi/vendor/node-addon-api/napi.h +0 -43
- package/node_modules/lowercase-keys/index.js +3 -0
- package/node_modules/lowercase-keys/license +9 -0
- package/node_modules/lowercase-keys/package.json +38 -0
- package/node_modules/lowercase-keys/readme.md +32 -0
- package/node_modules/micromark-util-types/package.json +2 -36
- package/node_modules/mimic-response/index.js +75 -0
- package/node_modules/mimic-response/license +9 -0
- package/node_modules/mimic-response/package.json +41 -0
- package/node_modules/mimic-response/readme.md +78 -0
- package/node_modules/normalize-url/index.js +305 -0
- package/node_modules/normalize-url/license +9 -0
- package/node_modules/normalize-url/package.json +53 -0
- package/node_modules/normalize-url/readme.md +347 -0
- package/node_modules/p-cancelable/index.js +119 -0
- package/node_modules/p-cancelable/license +9 -0
- package/node_modules/p-cancelable/package.json +47 -0
- package/node_modules/p-cancelable/readme.md +152 -0
- package/node_modules/quick-lru/index.js +123 -0
- package/node_modules/quick-lru/license +9 -0
- package/node_modules/quick-lru/package.json +40 -0
- package/node_modules/quick-lru/readme.md +111 -0
- package/node_modules/resolve-alpn/LICENSE +22 -0
- package/node_modules/resolve-alpn/README.md +60 -0
- package/node_modules/resolve-alpn/index.js +43 -0
- package/node_modules/resolve-alpn/package.json +31 -0
- package/node_modules/responselike/index.js +49 -0
- package/node_modules/responselike/license +10 -0
- package/node_modules/responselike/package.json +46 -0
- package/node_modules/responselike/readme.md +75 -0
- package/node_modules/sharp/dist/is.cjs +8 -2
- package/node_modules/sharp/dist/is.mjs +8 -2
- package/node_modules/sharp/dist/operation.cjs +2 -2
- package/node_modules/sharp/dist/operation.mjs +2 -2
- package/node_modules/sharp/dist/output.cjs +1 -0
- package/node_modules/sharp/dist/output.mjs +1 -0
- package/node_modules/sharp/dist/resize.cjs +14 -14
- package/node_modules/sharp/dist/resize.mjs +14 -14
- package/node_modules/sharp/dist/sharp.cjs +3 -3
- package/node_modules/sharp/dist/sharp.mjs +3 -3
- package/node_modules/sharp/package.json +10 -10
- package/node_modules/sharp/src/binding.gyp +1 -1
- package/node_modules/sharp/src/common.cc +4 -4
- package/node_modules/sharp/src/common.h +2 -2
- package/node_modules/sharp/src/pipeline.cc +31 -6
- package/node_modules/sharp/src/utilities.cc +1 -1
- package/node_modules/type-fest/license-cc0 +121 -0
- package/node_modules/type-fest/license-mit +9 -0
- package/node_modules/type-fest/package.json +84 -0
- package/node_modules/type-fest/readme.md +1060 -0
- package/package.json +376 -331
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-DUvMhLle.css +0 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Q6zc2uHV.js +0 -127
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/LICENSE +0 -201
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/README.md +0 -112
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/index.js +0 -6
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/platform/browser/OTLPLogExporter.js +0 -16
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/platform/browser/index.js +0 -6
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/platform/index.js +0 -6
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/platform/node/OTLPLogExporter.js +0 -18
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/platform/node/index.js +0 -6
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/version.js +0 -7
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/index.js +0 -6
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/platform/browser/OTLPLogExporter.js +0 -16
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/platform/browser/index.js +0 -6
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/platform/index.js +0 -6
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/platform/node/OTLPLogExporter.js +0 -18
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/platform/node/index.js +0 -6
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/version.js +0 -7
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/index.js +0 -10
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/platform/browser/OTLPLogExporter.js +0 -20
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/platform/browser/index.js +0 -10
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/platform/index.js +0 -10
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/platform/node/OTLPLogExporter.js +0 -22
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/platform/node/index.js +0 -10
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/version.js +0 -10
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/package.json +0 -91
- package/node_modules/koffi/src/koffi/src/abi/arm32.cc +0 -302
- package/node_modules/koffi/src/koffi/src/abi/arm32_asm.S +0 -199
- package/node_modules/koffi/src/koffi/src/abi/ppc64.cc +0 -222
- package/node_modules/koffi/src/koffi/src/abi/ppc64_asm.S +0 -266
- package/node_modules/koffi/src/koffi/src/interp.cc +0 -1594
- package/node_modules/koffi/src/koffi/src/interp.hh +0 -142
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/core → dsh-otel/node_modules/@opentelemetry/resources}/LICENSE +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/README.md +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/Resource.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/ResourceImpl.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/config.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/default-service-name.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detect-resources.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/EnvDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/NoopDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/browser/HostDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/browser/OSDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/browser/ProcessDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/browser/ServiceInstanceIdDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/browser/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/HostDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/OSDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/ProcessDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/ServiceInstanceIdDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/execAsync.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-linux.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-unsupported.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-win.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/utils.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/semconv.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/core/build/esm/common → dsh-otel/node_modules/@opentelemetry/resources/build/esm}/types.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esm/utils.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/core → dsh-otel/node_modules/@opentelemetry/resources}/build/esm/version.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/Resource.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/ResourceImpl.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/config.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/default-service-name.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detect-resources.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/EnvDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/NoopDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/browser/HostDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/browser/OSDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/browser/ProcessDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/browser/ServiceInstanceIdDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/browser/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/HostDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/OSDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/ProcessDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/ServiceInstanceIdDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/execAsync.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/getMachineId-bsd.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/getMachineId-darwin.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/getMachineId-linux.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/getMachineId-unsupported.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/getMachineId-win.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/getMachineId.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/utils.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/semconv.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/core/build/esnext/common → dsh-otel/node_modules/@opentelemetry/resources/build/esnext}/types.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/esnext/utils.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/core → dsh-otel/node_modules/@opentelemetry/resources}/build/esnext/version.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/Resource.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/ResourceImpl.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/config.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/default-service-name.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detect-resources.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/EnvDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/NoopDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/browser/HostDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/browser/OSDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/browser/ProcessDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/browser/ServiceInstanceIdDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/browser/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/HostDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/OSDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/ProcessDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/ServiceInstanceIdDetector.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/utils.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/semconv.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/core/build/src/common → dsh-otel/node_modules/@opentelemetry/resources/build/src}/types.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/build/src/utils.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/core → dsh-otel/node_modules/@opentelemetry/resources}/build/src/version.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/resources → dsh-otel/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core}/LICENSE +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/README.md +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/ExportResult.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/baggage/constants.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/baggage/utils.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/common/anchored-clock.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/common/attributes.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/common/global-error-handler.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/common/globalThis.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/common/time.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/common/timer-util.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/resources/build/esm → dsh-otel/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/esm/common}/types.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/internal/exporter.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/internal/validators.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/platform/browser/environment.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/platform/browser/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/platform/browser/sdk-info.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/platform/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/platform/node/environment.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/platform/node/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/platform/node/sdk-info.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/propagation/composite.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/semconv.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/utils/callback.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/utils/configuration.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/utils/lodash.merge.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/utils/merge.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/utils/promise.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/utils/timeout.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esm/utils/url.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/resources → dsh-otel/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core}/build/esm/version.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/ExportResult.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/baggage/constants.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/baggage/propagation/W3CBaggagePropagator.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/baggage/utils.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/common/anchored-clock.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/common/attributes.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/common/global-error-handler.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/common/globalThis.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/common/logging-error-handler.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/common/time.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/common/timer-util.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/resources/build/esnext → dsh-otel/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/esnext/common}/types.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/internal/exporter.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/internal/validators.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/platform/browser/environment.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/platform/browser/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/platform/browser/sdk-info.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/platform/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/platform/node/environment.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/platform/node/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/platform/node/sdk-info.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/propagation/composite.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/semconv.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/trace/TraceState.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/trace/W3CTraceContextPropagator.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/trace/rpc-metadata.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/trace/suppress-tracing.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/utils/callback.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/utils/configuration.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/utils/lodash.merge.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/utils/merge.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/utils/promise.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/utils/timeout.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/esnext/utils/url.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/resources → dsh-otel/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core}/build/esnext/version.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/ExportResult.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/baggage/constants.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/baggage/utils.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/common/anchored-clock.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/common/attributes.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/common/global-error-handler.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/common/globalThis.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/common/time.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/common/timer-util.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/resources/build/src → dsh-otel/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/src/common}/types.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/internal/exporter.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/internal/validators.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/platform/browser/environment.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/platform/browser/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/platform/browser/sdk-info.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/platform/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/platform/node/environment.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/platform/node/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/propagation/composite.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/semconv.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/trace/TraceState.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/utils/callback.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/utils/configuration.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/utils/merge.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/utils/promise.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/utils/timeout.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/build/src/utils/url.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel/node_modules/@opentelemetry/resources → dsh-otel/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core}/build/src/version.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel/node_modules/@opentelemetry/resources}/node_modules/@opentelemetry/core/package.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-session-telemetry-otel → dsh-otel}/node_modules/@opentelemetry/resources/package.json +0 -0
|
@@ -21,6 +21,8 @@ import { Readable } from "node:stream";
|
|
|
21
21
|
import { pipeline } from "node:stream/promises";
|
|
22
22
|
import { DEFAULT_SESSION_LOG_COMPRESSION_LEVEL, flushLiveSessionLog, readSessionLogText, sessionLogExportDeps, sessionLogZipFilename, streamSessionLogZip } from "@deepseek-ai/dsh-session-log-export";
|
|
23
23
|
import { planReviewOptions } from "@deepseek-ai/dsh-user-questions";
|
|
24
|
+
import { isCompactCheckpointSource } from "@deepseek-ai/dsh-compaction/checkpoint";
|
|
25
|
+
import { isSurfaceEvent } from "@deepseek-ai/dsh-session/surface";
|
|
24
26
|
//#region lib/types/resume-model.js
|
|
25
27
|
/**
|
|
26
28
|
* Resume-time model selection: the last logged route, else the launch default.
|
|
@@ -293,62 +295,6 @@ function cursorTo(row) {
|
|
|
293
295
|
return `\u001b[${String(row + 1)};1H`;
|
|
294
296
|
}
|
|
295
297
|
//#endregion
|
|
296
|
-
//#region lib/types/attach.js
|
|
297
|
-
/**
|
|
298
|
-
* `/attach`: read a local file and admit it into the attachment store as the
|
|
299
|
-
* image or file block the next prompt carries, the way the browser composer
|
|
300
|
-
* uploads a dropped file.
|
|
301
|
-
* @module @deepseek-ai/dsh-tui-app/attach
|
|
302
|
-
*/
|
|
303
|
-
/** Image media types by file extension; every other extension attaches as a file. */
|
|
304
|
-
const IMAGE_MEDIA_TYPES = {
|
|
305
|
-
".png": "image/png",
|
|
306
|
-
".jpg": "image/jpeg",
|
|
307
|
-
".jpeg": "image/jpeg",
|
|
308
|
-
".webp": "image/webp",
|
|
309
|
-
".gif": "image/gif"
|
|
310
|
-
};
|
|
311
|
-
/**
|
|
312
|
-
* Read `path` (relative to `cwd`) and store it.
|
|
313
|
-
* @param store - the composed attachment store.
|
|
314
|
-
* @param cwd - the directory relative paths resolve against.
|
|
315
|
-
* @param path - the file to attach.
|
|
316
|
-
* @returns the pending attachment.
|
|
317
|
-
* @throws when the file cannot be read or the store rejects it.
|
|
318
|
-
*/
|
|
319
|
-
async function attachLocalFile(store, cwd, path) {
|
|
320
|
-
const absolute = resolve(cwd, path);
|
|
321
|
-
const name = basename(absolute);
|
|
322
|
-
const data = new Uint8Array(await readFile(absolute));
|
|
323
|
-
const mediaType = IMAGE_MEDIA_TYPES[extname(absolute).toLowerCase()];
|
|
324
|
-
if (mediaType !== void 0) {
|
|
325
|
-
const [ref] = await store.saveImages([{
|
|
326
|
-
data,
|
|
327
|
-
mediaType,
|
|
328
|
-
name
|
|
329
|
-
}]);
|
|
330
|
-
/* v8 ignore next -- saveImages returns one ref per input */
|
|
331
|
-
if (ref === void 0) throw new Error(`the attachment store returned no reference for ${name}`);
|
|
332
|
-
return {
|
|
333
|
-
name,
|
|
334
|
-
block: {
|
|
335
|
-
type: "image",
|
|
336
|
-
attachment: ref
|
|
337
|
-
}
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
return {
|
|
341
|
-
name,
|
|
342
|
-
block: {
|
|
343
|
-
type: "file",
|
|
344
|
-
attachment: await store.saveFile({
|
|
345
|
-
data,
|
|
346
|
-
name
|
|
347
|
-
})
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
//#endregion
|
|
352
298
|
//#region lib/types/diff.js
|
|
353
299
|
/**
|
|
354
300
|
* Line diff for tool cards: a longest-common-subsequence alignment of old and
|
|
@@ -972,6 +918,474 @@ function foldMarker(hidden, opens) {
|
|
|
972
918
|
return `… ${String(hidden)} more row${hidden === 1 ? "" : "s"} · ${FOLD_KEYS[opens]}`;
|
|
973
919
|
}
|
|
974
920
|
//#endregion
|
|
921
|
+
//#region lib/types/background.js
|
|
922
|
+
/**
|
|
923
|
+
* `Ctrl+B`: move the bound Agent's running tool calls to the background.
|
|
924
|
+
*
|
|
925
|
+
* A `tools/execute` around-wrapper tracks every root call an Agent dispatches
|
|
926
|
+
* while a job registry is composed. Moving a call registers a `tool` job in
|
|
927
|
+
* `ctx.jobs` whose settlement is the tool body's own outcome, and answers the
|
|
928
|
+
* call at once with a result that names the job, so the turn continues while
|
|
929
|
+
* the body keeps running. The registry and `dsh-tool-jobs` then own the rest:
|
|
930
|
+
* the completion notice reaches the owning Agent, `job_output` reads the
|
|
931
|
+
* result, and `job_kill` stops the body through the wrapper's own signal.
|
|
932
|
+
*
|
|
933
|
+
* The registry fuses the caller's signal into every body, so stopping the
|
|
934
|
+
* turn that dispatched a moved call still stops that call. {@link
|
|
935
|
+
* ToolBackgrounder.holdStopped} keeps such a settlement from waking the Agent
|
|
936
|
+
* the user just stopped.
|
|
937
|
+
* @module @deepseek-ai/dsh-tui-app/background
|
|
938
|
+
*/
|
|
939
|
+
/** The text a moved call's result opens with; the job id follows it. */
|
|
940
|
+
const MOVED_PREFIX = "The user moved this call to the background. It keeps running as job ";
|
|
941
|
+
/** Matches a moved call's result text and captures the job id. */
|
|
942
|
+
const MOVED_PATTERN = /^The user moved this call to the background\. It keeps running as job (\S+?)\./u;
|
|
943
|
+
/** Detail of a moved call that stopped because the turn that dispatched it was stopped. */
|
|
944
|
+
const STOPPED_WITH_TURN = "stopped with the turn that called it";
|
|
945
|
+
/**
|
|
946
|
+
* Bound of the registry wait that holds a stopped call's job: the longest
|
|
947
|
+
* delay a Node timer takes (2^31 - 1 ms, about 24.8 days). The wait ends when
|
|
948
|
+
* the job settles, which the abort that stopped the turn brings about; the
|
|
949
|
+
* bound only has to outlast that.
|
|
950
|
+
*/
|
|
951
|
+
const HOLD_WAIT_MS = 2147483647;
|
|
952
|
+
/**
|
|
953
|
+
* The model-facing result of a call the user moved to the background.
|
|
954
|
+
* @param id - the job that took the call over.
|
|
955
|
+
* @returns the result text: the job id, how its outcome arrives, and how to stop it.
|
|
956
|
+
*/
|
|
957
|
+
function movedResultText(id) {
|
|
958
|
+
return `${MOVED_PREFIX}${id}. You are notified when it finishes; read its result with job_output, or stop it with job_kill. Continue with steps that do not depend on it.`;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* The job a moved call's logged result names, so a replayed log draws the
|
|
962
|
+
* card the live session drew.
|
|
963
|
+
* @param content - the logged result content.
|
|
964
|
+
* @returns the job id, or undefined for every other result.
|
|
965
|
+
*/
|
|
966
|
+
function movedJobId(content) {
|
|
967
|
+
const first = content[0];
|
|
968
|
+
if (content.length !== 1 || first?.type !== "text") return void 0;
|
|
969
|
+
return MOVED_PATTERN.exec(first.text)?.[1];
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* The text of a tool result as a job result: text blocks as they are, and a
|
|
973
|
+
* placeholder naming each other block, which a string result cannot carry.
|
|
974
|
+
* @param content - the result content.
|
|
975
|
+
* @returns the joined text.
|
|
976
|
+
*/
|
|
977
|
+
function resultText(content) {
|
|
978
|
+
return content.map((block) => block.type === "text" ? block.text : `[${block.type} omitted]`).join("\n");
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* Tracks root tool calls and moves them to the job registry on request.
|
|
982
|
+
* One instance serves one terminal application.
|
|
983
|
+
*/
|
|
984
|
+
var ToolBackgrounder = class {
|
|
985
|
+
options;
|
|
986
|
+
/** Tracked calls whose body has not settled, in dispatch order. */
|
|
987
|
+
calls = /* @__PURE__ */ new Map();
|
|
988
|
+
/** Jobs a body registered for itself while it ran, for as long as the body runs. */
|
|
989
|
+
innerJobs = /* @__PURE__ */ new Set();
|
|
990
|
+
/** The job a moved call's body registered for itself, by the moved call's job. */
|
|
991
|
+
outputs = /* @__PURE__ */ new Map();
|
|
992
|
+
constructor(options) {
|
|
993
|
+
this.options = options;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* The `tools/execute` listener body. A nested call, a call without an
|
|
997
|
+
* Agent, and every call while no registry is composed pass straight
|
|
998
|
+
* through. A tracked call returns the body's own outcome, or the moved
|
|
999
|
+
* result as soon as {@link moveAll} hands it to the registry.
|
|
1000
|
+
* @param exec - the call about to dispatch.
|
|
1001
|
+
* @param next - the rest of the around-dispatch chain and the body.
|
|
1002
|
+
* @returns the call's outcome.
|
|
1003
|
+
*/
|
|
1004
|
+
async around(exec, next) {
|
|
1005
|
+
const agent = exec.agent;
|
|
1006
|
+
if (agent === void 0 || exec.parent !== void 0 || this.options.jobs() === void 0) return next();
|
|
1007
|
+
keepSignalWritable(exec);
|
|
1008
|
+
const outer = exec.signal;
|
|
1009
|
+
const stop = new AbortController();
|
|
1010
|
+
exec.signal = AbortSignal.any([outer, stop.signal]);
|
|
1011
|
+
const moved = Promise.withResolvers();
|
|
1012
|
+
const settled = Promise.withResolvers();
|
|
1013
|
+
const body = settled.promise;
|
|
1014
|
+
const call = {
|
|
1015
|
+
callId: exec.callId,
|
|
1016
|
+
name: exec.name,
|
|
1017
|
+
agent,
|
|
1018
|
+
arguments: exec.arguments,
|
|
1019
|
+
outer,
|
|
1020
|
+
stop,
|
|
1021
|
+
body,
|
|
1022
|
+
answer: moved.resolve
|
|
1023
|
+
};
|
|
1024
|
+
this.calls.set(call.callId, call);
|
|
1025
|
+
this.options.changed();
|
|
1026
|
+
(async () => next())().then(settled.resolve, settled.reject);
|
|
1027
|
+
const restore = () => {
|
|
1028
|
+
exec.signal = outer;
|
|
1029
|
+
this.calls.delete(call.callId);
|
|
1030
|
+
if (call.inner !== void 0) this.innerJobs.delete(call.inner);
|
|
1031
|
+
this.options.changed();
|
|
1032
|
+
};
|
|
1033
|
+
body.then(restore, restore);
|
|
1034
|
+
return Promise.race([body, moved.promise]);
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* The calls of one Agent still running in the foreground.
|
|
1038
|
+
* @param agent - the Agent whose calls to list.
|
|
1039
|
+
* @returns the calls in dispatch order.
|
|
1040
|
+
*/
|
|
1041
|
+
running(agent) {
|
|
1042
|
+
return this.foreground(agent);
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* Move every foreground call of one Agent to the registry. A call the
|
|
1046
|
+
* registry refuses keeps running in the foreground.
|
|
1047
|
+
* @param jobs - the composed job registry.
|
|
1048
|
+
* @param agent - the Agent whose calls to move.
|
|
1049
|
+
* @param label - the one-line job label for a call.
|
|
1050
|
+
* @returns the moved calls and the refusals.
|
|
1051
|
+
*/
|
|
1052
|
+
moveAll(jobs, agent, label) {
|
|
1053
|
+
const report = {
|
|
1054
|
+
moved: [],
|
|
1055
|
+
refused: []
|
|
1056
|
+
};
|
|
1057
|
+
for (const call of this.foreground(agent)) {
|
|
1058
|
+
let id;
|
|
1059
|
+
try {
|
|
1060
|
+
id = jobs.start({
|
|
1061
|
+
kind: "tool",
|
|
1062
|
+
label: label(call),
|
|
1063
|
+
owner: agent.id,
|
|
1064
|
+
run: (handle) => ({
|
|
1065
|
+
cancel: (reason) => {
|
|
1066
|
+
call.stop.abort(reason);
|
|
1067
|
+
},
|
|
1068
|
+
done: call.body.then((result) => this.outcome(call, handle, result), (error) => ({
|
|
1069
|
+
status: "failed",
|
|
1070
|
+
detail: describeFailure(error)
|
|
1071
|
+
}))
|
|
1072
|
+
})
|
|
1073
|
+
});
|
|
1074
|
+
} catch (error) {
|
|
1075
|
+
report.refused.push(`${call.name}: ${describeFailure(error)}`);
|
|
1076
|
+
continue;
|
|
1077
|
+
}
|
|
1078
|
+
call.job = id;
|
|
1079
|
+
if (call.inner !== void 0) this.outputs.set(id, call.inner);
|
|
1080
|
+
const text = movedResultText(id);
|
|
1081
|
+
call.answer({
|
|
1082
|
+
isError: true,
|
|
1083
|
+
error: { message: text },
|
|
1084
|
+
content: [{
|
|
1085
|
+
type: "text",
|
|
1086
|
+
text
|
|
1087
|
+
}]
|
|
1088
|
+
});
|
|
1089
|
+
report.moved.push({
|
|
1090
|
+
callId: call.callId,
|
|
1091
|
+
name: call.name,
|
|
1092
|
+
id
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
if (report.moved.length > 0) this.options.changed();
|
|
1096
|
+
return report;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Keep the jobs of moved calls whose dispatching turn was just stopped from
|
|
1100
|
+
* waking their Agent: a live registry wait makes their settlement count as
|
|
1101
|
+
* delivered, so `dsh-tool-jobs` sends no completion notice. Call it right
|
|
1102
|
+
* after cancelling the Agent, before the bodies observe the abort.
|
|
1103
|
+
* @param jobs - the composed job registry.
|
|
1104
|
+
* @param agent - the Agent whose turn was stopped.
|
|
1105
|
+
* @returns how many moved calls stop with the turn.
|
|
1106
|
+
*/
|
|
1107
|
+
holdStopped(jobs, agent) {
|
|
1108
|
+
let held = 0;
|
|
1109
|
+
for (const call of this.calls.values()) {
|
|
1110
|
+
if (call.agent !== agent || call.job === void 0 || !call.outer.aborted) continue;
|
|
1111
|
+
held += 1;
|
|
1112
|
+
jobs.wait(call.job, HOLD_WAIT_MS, agent.id).catch(ignoreGone);
|
|
1113
|
+
}
|
|
1114
|
+
return held;
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Follow one registry event. A job registered while a tracked body of the
|
|
1118
|
+
* same owner runs, of the body's own tool kind and with its command as the
|
|
1119
|
+
* label when it has one, is that body's own job, which is not background
|
|
1120
|
+
* work of its own. A removed job is no longer anyone's output.
|
|
1121
|
+
* @param event - the registry event.
|
|
1122
|
+
*/
|
|
1123
|
+
observe(event) {
|
|
1124
|
+
if (event.type === "removed") {
|
|
1125
|
+
const removed = event.job.id;
|
|
1126
|
+
this.outputs = new Map([...this.outputs].filter(([, inner]) => inner !== removed));
|
|
1127
|
+
return;
|
|
1128
|
+
}
|
|
1129
|
+
if (event.type !== "registered") return;
|
|
1130
|
+
const { job } = event;
|
|
1131
|
+
const call = [...this.calls.values()].find((candidate) => candidate.inner === void 0 && candidate.agent.id === job.owner && candidate.name === job.kind && (commandOf(candidate.arguments) ?? job.label) === job.label);
|
|
1132
|
+
if (call === void 0) return;
|
|
1133
|
+
call.inner = job.id;
|
|
1134
|
+
this.innerJobs.add(job.id);
|
|
1135
|
+
if (call.job !== void 0) this.outputs.set(call.job, job.id);
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* Whether a job is a tracked body's own, which the terminal does not list
|
|
1139
|
+
* as background work while that body runs.
|
|
1140
|
+
* @param id - the job to test.
|
|
1141
|
+
* @returns true while the body that registered it runs.
|
|
1142
|
+
*/
|
|
1143
|
+
isInner(id) {
|
|
1144
|
+
return this.innerJobs.has(id);
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* The job whose output ring shows a job's live output: the job its moved
|
|
1148
|
+
* body registered for itself while that job is still registered, else the
|
|
1149
|
+
* job itself.
|
|
1150
|
+
* @param id - the job the user opened.
|
|
1151
|
+
* @returns the job to read output from.
|
|
1152
|
+
*/
|
|
1153
|
+
outputOf(id) {
|
|
1154
|
+
return this.outputs.get(id) ?? id;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* The tracked calls of one Agent not yet moved.
|
|
1158
|
+
* @param agent - the Agent whose calls to list.
|
|
1159
|
+
* @returns the calls in dispatch order.
|
|
1160
|
+
*/
|
|
1161
|
+
foreground(agent) {
|
|
1162
|
+
return [...this.calls.values()].filter((call) => call.agent === agent && call.job === void 0);
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* The terminal outcome of a moved call. The result text also goes on the
|
|
1166
|
+
* ring's `log` channel, which observers read and the model's own read skips.
|
|
1167
|
+
* @param call - the moved call.
|
|
1168
|
+
* @param handle - the job's producer face.
|
|
1169
|
+
* @param result - the body's normalized outcome.
|
|
1170
|
+
* @returns the job outcome.
|
|
1171
|
+
*/
|
|
1172
|
+
outcome(call, handle, result) {
|
|
1173
|
+
const text = resultText(result.content);
|
|
1174
|
+
if (text !== "") handle.append(text, { channel: "log" });
|
|
1175
|
+
if (!result.isError) return {
|
|
1176
|
+
status: "completed",
|
|
1177
|
+
...text === "" ? {} : { result: text }
|
|
1178
|
+
};
|
|
1179
|
+
if (call.stop.signal.aborted) return { status: "killed" };
|
|
1180
|
+
if (call.outer.aborted) return {
|
|
1181
|
+
status: "killed",
|
|
1182
|
+
detail: STOPPED_WITH_TURN
|
|
1183
|
+
};
|
|
1184
|
+
return {
|
|
1185
|
+
status: "failed",
|
|
1186
|
+
detail: result.error.message.replace(/\n[\s\S]*$/u, ""),
|
|
1187
|
+
result: text
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1190
|
+
};
|
|
1191
|
+
/**
|
|
1192
|
+
* Replace the execution's `signal` data property with an accessor pair over
|
|
1193
|
+
* the same value. The registry freezes the execution when the call's result
|
|
1194
|
+
* commits, which makes a data property read-only; a moved body is still
|
|
1195
|
+
* running then, and both this wrapper and the registry restore the signal
|
|
1196
|
+
* when it settles. An accessor keeps those writes legal after the freeze.
|
|
1197
|
+
* @param exec - the call about to dispatch.
|
|
1198
|
+
*/
|
|
1199
|
+
function keepSignalWritable(exec) {
|
|
1200
|
+
let current = exec.signal;
|
|
1201
|
+
Object.defineProperty(exec, "signal", {
|
|
1202
|
+
get: () => current,
|
|
1203
|
+
set: (signal) => {
|
|
1204
|
+
current = signal;
|
|
1205
|
+
},
|
|
1206
|
+
enumerable: true
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* The `command` argument of a shell-style call.
|
|
1211
|
+
* @param args - the call's parsed arguments.
|
|
1212
|
+
* @returns the command, or undefined when the arguments carry none.
|
|
1213
|
+
*/
|
|
1214
|
+
function commandOf(args) {
|
|
1215
|
+
if (typeof args !== "object" || args === null || !("command" in args)) return void 0;
|
|
1216
|
+
return typeof args.command === "string" ? args.command : void 0;
|
|
1217
|
+
}
|
|
1218
|
+
/**
|
|
1219
|
+
* Drop the rejection of a hold's registry wait. A wait on a live job its
|
|
1220
|
+
* owner holds rejects only once the job left the registry, and then nothing
|
|
1221
|
+
* is left to hold.
|
|
1222
|
+
* @param _gone - the rejection.
|
|
1223
|
+
*/
|
|
1224
|
+
/* v8 ignore next -- a live owned job settles before it can leave the registry */
|
|
1225
|
+
function ignoreGone(_gone) {}
|
|
1226
|
+
/** What separates two facts on one line. */
|
|
1227
|
+
const SEPARATOR$5 = " · ";
|
|
1228
|
+
/** The key the running spinner names while a foreground call can be moved. */
|
|
1229
|
+
const BACKGROUND_KEY_HINT = "Ctrl+B background";
|
|
1230
|
+
/** What the `/jobs` picker says between its heading and its rows. */
|
|
1231
|
+
const JOBS_PICKER_HINT = "Enter shows the output · Ctrl+K stops the highlighted job";
|
|
1232
|
+
/**
|
|
1233
|
+
* Whether a job is still running or stopping.
|
|
1234
|
+
* @param job - the job.
|
|
1235
|
+
* @returns true until the job settles.
|
|
1236
|
+
*/
|
|
1237
|
+
function isLive(job) {
|
|
1238
|
+
return job.status === "running" || job.status === "stopping";
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* How long a job has run: until now while live, until it settled otherwise.
|
|
1242
|
+
* @param job - the job.
|
|
1243
|
+
* @param now - the wall clock.
|
|
1244
|
+
* @returns the formatted elapsed time.
|
|
1245
|
+
*/
|
|
1246
|
+
function jobElapsed(job, now) {
|
|
1247
|
+
return formatElapsed((job.finishedAt ?? now) - job.startedAt);
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* The one line drawn above the editor while a background job runs: the live
|
|
1251
|
+
* count, each job's id, label, and elapsed time, and the command that lists
|
|
1252
|
+
* them, cut to the width.
|
|
1253
|
+
* @param jobs - the bound session's background jobs, in registration order.
|
|
1254
|
+
* @param render - the palette, the wall clock, and the columns the line fits.
|
|
1255
|
+
* @returns the dim line, or the empty string while no job runs.
|
|
1256
|
+
*/
|
|
1257
|
+
function renderJobsLine(jobs, render) {
|
|
1258
|
+
const live = jobs.filter(isLive);
|
|
1259
|
+
if (live.length === 0) return "";
|
|
1260
|
+
const { palette } = render;
|
|
1261
|
+
const text = [`${String(live.length)} in background`, ...live.map((job) => `${job.id} ${oneLine(job.label)} ${jobElapsed(job, render.now)}`)].join(SEPARATOR$5);
|
|
1262
|
+
const tail = `${SEPARATOR$5}/jobs`;
|
|
1263
|
+
const room = Math.max(1, render.width - 2 - tail.length);
|
|
1264
|
+
return `${palette.accent("◇")} ${palette.dim(`${truncateToWidth(text, room, "…")}${tail}`)}`;
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* One `/jobs` picker row.
|
|
1268
|
+
* @param job - the job.
|
|
1269
|
+
* @param now - the wall clock.
|
|
1270
|
+
* @returns the id as the label, and status, elapsed time, and job label as the description.
|
|
1271
|
+
*/
|
|
1272
|
+
function jobChoice(job, now) {
|
|
1273
|
+
return {
|
|
1274
|
+
value: job.id,
|
|
1275
|
+
label: job.id,
|
|
1276
|
+
description: [
|
|
1277
|
+
job.status,
|
|
1278
|
+
jobElapsed(job, now),
|
|
1279
|
+
oneLine(job.label)
|
|
1280
|
+
].join(SEPARATOR$5)
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* The detail page of one job: its status line, label, start, and the tail
|
|
1285
|
+
* of its retained output.
|
|
1286
|
+
* @param job - the job.
|
|
1287
|
+
* @param chunks - the retained output chunks, in offset order.
|
|
1288
|
+
* @param now - the wall clock.
|
|
1289
|
+
* @returns the page rows.
|
|
1290
|
+
*/
|
|
1291
|
+
function jobDetailRows(job, chunks, now) {
|
|
1292
|
+
const rows = [
|
|
1293
|
+
[
|
|
1294
|
+
job.status,
|
|
1295
|
+
...job.detail === void 0 ? [] : [job.detail],
|
|
1296
|
+
jobElapsed(job, now)
|
|
1297
|
+
].join(SEPARATOR$5),
|
|
1298
|
+
job.label,
|
|
1299
|
+
`started ${formatTimestamp(job.startedAt)} UTC`
|
|
1300
|
+
];
|
|
1301
|
+
if (job.progress !== void 0) rows.push(job.progress);
|
|
1302
|
+
const output = chunks.map((chunk) => chunk.text).join("").replace(/\n$/u, "");
|
|
1303
|
+
if (output === "") {
|
|
1304
|
+
rows.push("", isLive(job) ? "no output yet" : "no output");
|
|
1305
|
+
return rows;
|
|
1306
|
+
}
|
|
1307
|
+
const lines = output.split("\n");
|
|
1308
|
+
const kept = lines.slice(-200);
|
|
1309
|
+
rows.push("", kept.length < lines.length ? `output · last ${String(kept.length)} of ${String(lines.length)} lines` : "output");
|
|
1310
|
+
rows.push(...kept);
|
|
1311
|
+
return rows;
|
|
1312
|
+
}
|
|
1313
|
+
/**
|
|
1314
|
+
* The transient line one settlement shows.
|
|
1315
|
+
* @param job - the settled job.
|
|
1316
|
+
* @param notified - whether a completion notice goes to the Agent.
|
|
1317
|
+
* @returns the line.
|
|
1318
|
+
*/
|
|
1319
|
+
function settledToast(job, notified) {
|
|
1320
|
+
const parts = [`◇ ${job.id} ${job.status}`, oneLine(job.label)];
|
|
1321
|
+
if (notified) parts.push("agent notified");
|
|
1322
|
+
return parts.join(SEPARATOR$5);
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* A label on one line.
|
|
1326
|
+
* @param label - the job label, which a command can spread over lines.
|
|
1327
|
+
* @returns the label with each line break as one space.
|
|
1328
|
+
*/
|
|
1329
|
+
function oneLine(label) {
|
|
1330
|
+
return label.replace(/\s*\n\s*/gu, " ");
|
|
1331
|
+
}
|
|
1332
|
+
//#endregion
|
|
1333
|
+
//#region lib/types/attach.js
|
|
1334
|
+
/**
|
|
1335
|
+
* `/attach`: read a local file and admit it into the attachment store as the
|
|
1336
|
+
* image or file block the next prompt carries, the way the browser composer
|
|
1337
|
+
* uploads a dropped file.
|
|
1338
|
+
* @module @deepseek-ai/dsh-tui-app/attach
|
|
1339
|
+
*/
|
|
1340
|
+
/** Image media types by file extension; every other extension attaches as a file. */
|
|
1341
|
+
const IMAGE_MEDIA_TYPES = {
|
|
1342
|
+
".png": "image/png",
|
|
1343
|
+
".jpg": "image/jpeg",
|
|
1344
|
+
".jpeg": "image/jpeg",
|
|
1345
|
+
".webp": "image/webp",
|
|
1346
|
+
".gif": "image/gif"
|
|
1347
|
+
};
|
|
1348
|
+
/**
|
|
1349
|
+
* Read `path` (relative to `cwd`) and store it.
|
|
1350
|
+
* @param store - the composed attachment store.
|
|
1351
|
+
* @param cwd - the directory relative paths resolve against.
|
|
1352
|
+
* @param path - the file to attach.
|
|
1353
|
+
* @returns the pending attachment.
|
|
1354
|
+
* @throws when the file cannot be read or the store rejects it.
|
|
1355
|
+
*/
|
|
1356
|
+
async function attachLocalFile(store, cwd, path) {
|
|
1357
|
+
const absolute = resolve(cwd, path);
|
|
1358
|
+
const name = basename(absolute);
|
|
1359
|
+
const data = new Uint8Array(await readFile(absolute));
|
|
1360
|
+
const mediaType = IMAGE_MEDIA_TYPES[extname(absolute).toLowerCase()];
|
|
1361
|
+
if (mediaType !== void 0) {
|
|
1362
|
+
const [ref] = await store.saveImages([{
|
|
1363
|
+
data,
|
|
1364
|
+
mediaType,
|
|
1365
|
+
name
|
|
1366
|
+
}]);
|
|
1367
|
+
/* v8 ignore next -- saveImages returns one ref per input */
|
|
1368
|
+
if (ref === void 0) throw new Error(`the attachment store returned no reference for ${name}`);
|
|
1369
|
+
return {
|
|
1370
|
+
name,
|
|
1371
|
+
block: {
|
|
1372
|
+
type: "image",
|
|
1373
|
+
attachment: ref
|
|
1374
|
+
}
|
|
1375
|
+
};
|
|
1376
|
+
}
|
|
1377
|
+
return {
|
|
1378
|
+
name,
|
|
1379
|
+
block: {
|
|
1380
|
+
type: "file",
|
|
1381
|
+
attachment: await store.saveFile({
|
|
1382
|
+
data,
|
|
1383
|
+
name
|
|
1384
|
+
})
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
}
|
|
1388
|
+
//#endregion
|
|
975
1389
|
//#region lib/types/catalog.js
|
|
976
1390
|
/**
|
|
977
1391
|
* Terminal rows for the browser's settings, plugins, subagents, deliverables,
|
|
@@ -3224,12 +3638,15 @@ var NoticeBlock = class {
|
|
|
3224
3638
|
* complete, so the walk, the inspector, and any reader see every row whatever
|
|
3225
3639
|
* the transcript draws. Snapshot contributions keep their names above their
|
|
3226
3640
|
* own rows, and the Left/Right walk still addresses one contribution at a time.
|
|
3641
|
+
* A compaction checkpoint draws as one of these with an accent title and its
|
|
3642
|
+
* compressed and preserved account pinned above the folded summary.
|
|
3227
3643
|
*/
|
|
3228
3644
|
var ContextBlock = class {
|
|
3229
3645
|
theme;
|
|
3230
3646
|
title;
|
|
3231
3647
|
sectionParts;
|
|
3232
3648
|
turn;
|
|
3649
|
+
options;
|
|
3233
3650
|
navigable = true;
|
|
3234
3651
|
blockKind = "context";
|
|
3235
3652
|
foldable = true;
|
|
@@ -3245,12 +3662,14 @@ var ContextBlock = class {
|
|
|
3245
3662
|
* @param title - form and producer, a notice summary, or `system prompt`.
|
|
3246
3663
|
* @param sectionParts - the model-facing rows, one part per snapshot contribution.
|
|
3247
3664
|
* @param turn - the turn the message was appended in.
|
|
3665
|
+
* @param options - the accent title and the pinned leading parts; a routine injection passes none.
|
|
3248
3666
|
*/
|
|
3249
|
-
constructor(theme, title, sectionParts, turn) {
|
|
3667
|
+
constructor(theme, title, sectionParts, turn, options = {}) {
|
|
3250
3668
|
this.theme = theme;
|
|
3251
3669
|
this.title = title;
|
|
3252
3670
|
this.sectionParts = sectionParts;
|
|
3253
3671
|
this.turn = turn;
|
|
3672
|
+
this.options = options;
|
|
3254
3673
|
}
|
|
3255
3674
|
/**
|
|
3256
3675
|
* The injection as navigable sections.
|
|
@@ -3312,7 +3731,9 @@ var ContextBlock = class {
|
|
|
3312
3731
|
const textWidth = Math.max(1, inner - 2);
|
|
3313
3732
|
const indent = (line) => ` ${line}`;
|
|
3314
3733
|
const dimRows = (text) => wrapTextWithAnsi(text, textWidth).map((line) => indent(palette.dim(line)));
|
|
3315
|
-
const
|
|
3734
|
+
const title = wrapTextWithAnsi(this.title, textWidth);
|
|
3735
|
+
const tone = this.options.accent === true ? palette.accent : palette.dim;
|
|
3736
|
+
const head = ["", ...title.map((line, index) => `${tone(index === 0 ? CONTEXT_GLYPH : " ")} ${tone(line)}`)];
|
|
3316
3737
|
const body = [];
|
|
3317
3738
|
const ranges = [];
|
|
3318
3739
|
for (const part of this.sectionParts) {
|
|
@@ -3324,7 +3745,7 @@ var ContextBlock = class {
|
|
|
3324
3745
|
to: body.length
|
|
3325
3746
|
});
|
|
3326
3747
|
}
|
|
3327
|
-
const kept = this.theme.contextPreviewLines;
|
|
3748
|
+
const kept = (ranges[(this.options.pinnedParts ?? 0) - 1]?.to ?? 0) + this.theme.contextPreviewLines;
|
|
3328
3749
|
const cut = !this.expanded && body.length > kept;
|
|
3329
3750
|
const shown = cut ? [...body.slice(0, kept), ...dimRows(foldMarker(body.length - kept, marked ? "marked" : "transcript"))] : body;
|
|
3330
3751
|
return {
|
|
@@ -3871,6 +4292,19 @@ var ToolBlock = class {
|
|
|
3871
4292
|
this.measured = false;
|
|
3872
4293
|
}
|
|
3873
4294
|
/**
|
|
4295
|
+
* Settle the card as moved to the background: the glyph takes the accent
|
|
4296
|
+
* colour and the body ends on `lines` instead of a result.
|
|
4297
|
+
* @param lines - the rows naming the job that took the call over.
|
|
4298
|
+
*/
|
|
4299
|
+
setBackground(lines) {
|
|
4300
|
+
this.resultLines = lines;
|
|
4301
|
+
this.resultCode = void 0;
|
|
4302
|
+
this.resultDiff = void 0;
|
|
4303
|
+
this.status = "background";
|
|
4304
|
+
this.revision += 1;
|
|
4305
|
+
this.measured = false;
|
|
4306
|
+
}
|
|
4307
|
+
/**
|
|
3874
4308
|
* Unroll the card's rows on the application's frame tick instead of drawing
|
|
3875
4309
|
* them all in one frame: now, and again whenever a call or a result makes
|
|
3876
4310
|
* the card grow.
|
|
@@ -4022,11 +4456,18 @@ var ToolBlock = class {
|
|
|
4022
4456
|
}
|
|
4023
4457
|
/**
|
|
4024
4458
|
* The colour of this card's status glyph.
|
|
4025
|
-
* @returns warning while running, success once done, error once failed.
|
|
4459
|
+
* @returns warning while running, success once done, error once failed, accent once moved to the background.
|
|
4026
4460
|
*/
|
|
4027
4461
|
statusStyle() {
|
|
4028
4462
|
const palette = this.theme.palette;
|
|
4029
|
-
|
|
4463
|
+
switch (this.status) {
|
|
4464
|
+
case "running": return palette.warning;
|
|
4465
|
+
case "done": return palette.success;
|
|
4466
|
+
case "error": return palette.error;
|
|
4467
|
+
case "background": return palette.accent;
|
|
4468
|
+
/* v8 ignore next 2 -- closed-union exhaustiveness guard */
|
|
4469
|
+
default: return assertNever(this.status, "tool card status");
|
|
4470
|
+
}
|
|
4030
4471
|
}
|
|
4031
4472
|
/**
|
|
4032
4473
|
* The one row a folded subagent card draws, led by the status-coloured
|
|
@@ -4048,7 +4489,7 @@ var ToolBlock = class {
|
|
|
4048
4489
|
return truncateToWidth(`${palette.warning("◆")} ${name}${description}${meta}`, width, "…");
|
|
4049
4490
|
}
|
|
4050
4491
|
const started = this.status === "done" && this.resultLines[0]?.startsWith("started ") === true;
|
|
4051
|
-
const tag = this.status === "error" ? palette.error("[failed]") : started ? palette.dim("[started]") : palette.success("[done]");
|
|
4492
|
+
const tag = this.status === "error" ? palette.error("[failed]") : this.status === "background" ? palette.accent("[background]") : started ? palette.dim("[started]") : palette.success("[done]");
|
|
4052
4493
|
const cut = truncateToWidth(`${started ? palette.dim("◆") : this.statusStyle()("◆")} ${palette.dim(facts.description === "" ? this.toolName : facts.description)}${meta}`, Math.max(1, width - visibleWidth(tag) - 1), "…");
|
|
4053
4494
|
return truncateToWidth(`${cut}${" ".repeat(Math.max(1, width - visibleWidth(cut) - visibleWidth(tag)))}${tag}`, width, "…");
|
|
4054
4495
|
}
|
|
@@ -4182,6 +4623,15 @@ const SPINNER_FRAMES = {
|
|
|
4182
4623
|
"◶",
|
|
4183
4624
|
"◵",
|
|
4184
4625
|
"◴"
|
|
4626
|
+
],
|
|
4627
|
+
/** Condensing older history into a summary: a column of dots settling down and filling back up. */
|
|
4628
|
+
compacting: [
|
|
4629
|
+
"⣿",
|
|
4630
|
+
"⣶",
|
|
4631
|
+
"⣤",
|
|
4632
|
+
"⣀",
|
|
4633
|
+
"⣤",
|
|
4634
|
+
"⣶"
|
|
4185
4635
|
]
|
|
4186
4636
|
};
|
|
4187
4637
|
/** Blank steps between two shimmer passes, so the sweep pauses past the word's end. */
|
|
@@ -4247,6 +4697,8 @@ const TOOL_PREFIXES = [
|
|
|
4247
4697
|
const CALLING_WORD = "calling ";
|
|
4248
4698
|
/** The word that opens a scheduled model-request retry notice. */
|
|
4249
4699
|
const RETRYING_WORD = "retrying";
|
|
4700
|
+
/** The working spinner's label while a compaction condenses history. */
|
|
4701
|
+
const COMPACTING_ACTIVITY = "compacting";
|
|
4250
4702
|
/**
|
|
4251
4703
|
* The spinner frame drawn at one instant.
|
|
4252
4704
|
* @param now - the current time in milliseconds.
|
|
@@ -4275,7 +4727,7 @@ function spinnerKindForTool(name) {
|
|
|
4275
4727
|
}
|
|
4276
4728
|
/**
|
|
4277
4729
|
* The animation the working spinner draws for its activity word.
|
|
4278
|
-
* @param activity - `thinking`, `writing`, `calling` / `calling <name>`, or a retry notice.
|
|
4730
|
+
* @param activity - `thinking`, `writing`, `calling` / `calling <name>`, `compacting`, or a retry notice.
|
|
4279
4731
|
* @returns the activity's animation; a `calling <name>` label mirrors the
|
|
4280
4732
|
* named tool's card, and anything unrecognized draws `thinking` like the
|
|
4281
4733
|
* loader's initial word.
|
|
@@ -4286,6 +4738,7 @@ function spinnerKindForActivity(activity) {
|
|
|
4286
4738
|
if (activity === "calling") return "calling";
|
|
4287
4739
|
if (activity.startsWith(CALLING_WORD)) return spinnerKindForTool(activity.slice(8));
|
|
4288
4740
|
if (activity.startsWith(RETRYING_WORD)) return "waiting";
|
|
4741
|
+
if (activity === "compacting") return "compacting";
|
|
4289
4742
|
return "thinking";
|
|
4290
4743
|
}
|
|
4291
4744
|
/**
|
|
@@ -4401,9 +4854,10 @@ function editorCompletion(sources) {
|
|
|
4401
4854
|
* Project logged system prompts and injected user-role messages into the
|
|
4402
4855
|
* compact titles and navigable sections the terminal transcript walks.
|
|
4403
4856
|
*
|
|
4404
|
-
* Compaction
|
|
4405
|
-
* context: those have their own blocks
|
|
4406
|
-
*
|
|
4857
|
+
* Compaction checkpoints, tool results, and the user's own prompts are not
|
|
4858
|
+
* context: those have their own blocks, a checkpoint the compaction block
|
|
4859
|
+
* `./compaction.ts` accounts for. An empty system-prompt rendering logs that
|
|
4860
|
+
* no prompt is in force and is omitted here.
|
|
4407
4861
|
* @module @deepseek-ai/dsh-tui-app/context
|
|
4408
4862
|
*/
|
|
4409
4863
|
/** Producer-declared forms this surface presents structurally. */
|
|
@@ -4415,6 +4869,8 @@ const KNOWN_FORMS = [
|
|
|
4415
4869
|
"relay",
|
|
4416
4870
|
"recall"
|
|
4417
4871
|
];
|
|
4872
|
+
/** The source kind every compaction backend stamps on its replacement checkpoint. */
|
|
4873
|
+
const COMPACT_CHECKPOINT_KIND = "compact-checkpoint";
|
|
4418
4874
|
/**
|
|
4419
4875
|
* Project one nonempty system prompt into a transcript section.
|
|
4420
4876
|
* @param text - the rendered prompt; `''` means no prompt is in force.
|
|
@@ -4438,14 +4894,11 @@ function systemPromptView(text, update) {
|
|
|
4438
4894
|
* @returns the section, or undefined when this message is not injected context.
|
|
4439
4895
|
*/
|
|
4440
4896
|
function injectedContextView(source, content) {
|
|
4441
|
-
const
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
if (kind === "user" || kind === "tool" || kind === "model") return void 0;
|
|
4445
|
-
if (kind === "plugin" && stringField(record, "plugin") === "compact") return void 0;
|
|
4446
|
-
const form = knownForm(stringField(record, "form"));
|
|
4897
|
+
const context = contextSource(source);
|
|
4898
|
+
if (context === void 0) return void 0;
|
|
4899
|
+
const { record, form } = context;
|
|
4447
4900
|
return {
|
|
4448
|
-
title:
|
|
4901
|
+
title: contextTitle(context),
|
|
4449
4902
|
parts: form === "snapshot" ? snapshotParts(record, content) : [{
|
|
4450
4903
|
kind: partKind(form),
|
|
4451
4904
|
rows: rowsOf(content)
|
|
@@ -4453,6 +4906,40 @@ function injectedContextView(source, content) {
|
|
|
4453
4906
|
};
|
|
4454
4907
|
}
|
|
4455
4908
|
/**
|
|
4909
|
+
* The title {@link injectedContextView} gives one injected message, without
|
|
4910
|
+
* projecting its rows.
|
|
4911
|
+
* @param source - the message's durable source.
|
|
4912
|
+
* @returns the title, or undefined when this message is not injected context.
|
|
4913
|
+
*/
|
|
4914
|
+
function injectedContextTitle(source) {
|
|
4915
|
+
const context = contextSource(source);
|
|
4916
|
+
return context === void 0 ? void 0 : contextTitle(context);
|
|
4917
|
+
}
|
|
4918
|
+
/**
|
|
4919
|
+
* Narrow a message source to injected context.
|
|
4920
|
+
* @param source - the message's durable source.
|
|
4921
|
+
* @returns the record, kind, and known form, or undefined for a prompt, a tool result, a model source, a checkpoint, or no source.
|
|
4922
|
+
*/
|
|
4923
|
+
function contextSource(source) {
|
|
4924
|
+
const record = recordOf(source);
|
|
4925
|
+
const kind = stringField(record, "kind");
|
|
4926
|
+
if (record === void 0 || kind === void 0) return void 0;
|
|
4927
|
+
if (kind === "user" || kind === "tool" || kind === "model" || kind === COMPACT_CHECKPOINT_KIND) return void 0;
|
|
4928
|
+
return {
|
|
4929
|
+
record,
|
|
4930
|
+
kind,
|
|
4931
|
+
form: knownForm(stringField(record, "form"))
|
|
4932
|
+
};
|
|
4933
|
+
}
|
|
4934
|
+
/**
|
|
4935
|
+
* Title one injected context by form, producer, and notice summary.
|
|
4936
|
+
* @param context - the narrowed source.
|
|
4937
|
+
* @returns the title.
|
|
4938
|
+
*/
|
|
4939
|
+
function contextTitle({ record, kind, form }) {
|
|
4940
|
+
return titled(form, producerOf(record, kind), stringField(record, "summary"));
|
|
4941
|
+
}
|
|
4942
|
+
/**
|
|
4456
4943
|
* Narrow a value to a string-keyed record.
|
|
4457
4944
|
* @param value - a durable source or a snapshot entry.
|
|
4458
4945
|
* @returns the record, or undefined when the value is not one.
|
|
@@ -5712,7 +6199,8 @@ const KEY_LINES = {
|
|
|
5712
6199
|
"While follow-ups wait: ↑ on an empty input edits the newest · Shift+↑ selects one",
|
|
5713
6200
|
"Ctrl+O folds every tool card and context row",
|
|
5714
6201
|
"Ctrl+T todos · Ctrl+P parent session · Ctrl+L redraw · ? keys",
|
|
5715
|
-
"
|
|
6202
|
+
"Ctrl+B moves running tool calls to the background · /jobs lists them",
|
|
6203
|
+
"Esc arms the stop · Esc again stops the turn · Esc cancels a running /compact",
|
|
5716
6204
|
"Ctrl+C clears the input, twice quits · Ctrl+D quits an empty input"
|
|
5717
6205
|
],
|
|
5718
6206
|
transcript: [widestHint("transcript"), "Shift+↑↓ blocks · PgUp PgDn turns · Home End ends · Tab regions · Enter reads"],
|
|
@@ -5731,8 +6219,9 @@ const OPEN = { kind: "open" };
|
|
|
5731
6219
|
/**
|
|
5732
6220
|
* What one key press means where the keyboard is.
|
|
5733
6221
|
*
|
|
5734
|
-
* `Escape`, `Ctrl+O`, `Ctrl+G`, `Ctrl+T`, `Ctrl+P`, and `Ctrl+L`
|
|
5735
|
-
* same thing everywhere and are answered first. Everything else is
|
|
6222
|
+
* `Escape`, `Ctrl+O`, `Ctrl+G`, `Ctrl+B`, `Ctrl+T`, `Ctrl+P`, and `Ctrl+L`
|
|
6223
|
+
* mean the same thing everywhere and are answered first. Everything else is
|
|
6224
|
+
* the region's own.
|
|
5736
6225
|
* @param region - the region holding the keyboard.
|
|
5737
6226
|
* @param data - the raw key bytes.
|
|
5738
6227
|
* @returns the action to apply, or undefined when this region claims nothing
|
|
@@ -5743,6 +6232,7 @@ function resolveKey(region, data) {
|
|
|
5743
6232
|
if (matchesKey(data, "escape")) return ESCAPE;
|
|
5744
6233
|
if (matchesKey(data, "ctrl+o")) return FOLD_ALL;
|
|
5745
6234
|
if (matchesKey(data, "ctrl+g")) return READER;
|
|
6235
|
+
if (matchesKey(data, "ctrl+b")) return { kind: "background" };
|
|
5746
6236
|
if (matchesKey(data, "ctrl+t")) return { kind: "todos" };
|
|
5747
6237
|
if (matchesKey(data, "ctrl+p")) return { kind: "parent" };
|
|
5748
6238
|
if (matchesKey(data, "ctrl+l")) return { kind: "redraw" };
|
|
@@ -6810,8 +7300,8 @@ function countsRow(items) {
|
|
|
6810
7300
|
* Persistent session status for the terminal: one read of the session
|
|
6811
7301
|
* projections becomes plain facts, and pure formatters turn those facts into
|
|
6812
7302
|
* footer parts, the report sections `/status` and the status bar's segment
|
|
6813
|
-
* details share, and the one-line
|
|
6814
|
-
*
|
|
7303
|
+
* details share, and the one-line notice for model-request retries. Nothing
|
|
7304
|
+
* here touches the terminal, the palette, or the agent.
|
|
6815
7305
|
* @module @deepseek-ai/dsh-tui-app/status
|
|
6816
7306
|
*/
|
|
6817
7307
|
/** The client-visible keys one status read selects. */
|
|
@@ -6938,8 +7428,8 @@ function usageLines(facts) {
|
|
|
6938
7428
|
if (facts.stats !== void 0) {
|
|
6939
7429
|
const stats = facts.stats;
|
|
6940
7430
|
const parts = [
|
|
6941
|
-
`${String(stats.turns)} ${plural(stats.turns, "turn")}`,
|
|
6942
|
-
`${String(stats.steps)} ${plural(stats.steps, "step")}`,
|
|
7431
|
+
`${String(stats.turns)} ${plural$1(stats.turns, "turn")}`,
|
|
7432
|
+
`${String(stats.steps)} ${plural$1(stats.steps, "step")}`,
|
|
6943
7433
|
`model ${formatDuration(stats.llmMs)}`,
|
|
6944
7434
|
`tools ${formatDuration(stats.toolMs)}`
|
|
6945
7435
|
];
|
|
@@ -7049,15 +7539,6 @@ function formatDuration(ms) {
|
|
|
7049
7539
|
return `${String(Math.floor(whole / 60))}m${String(whole % 60)}s`;
|
|
7050
7540
|
}
|
|
7051
7541
|
/**
|
|
7052
|
-
* The notice a completed compaction earns.
|
|
7053
|
-
* @param data - the `compaction/summary` event data.
|
|
7054
|
-
* @returns e.g. `compacted 12 items (~3.4k tokens)`.
|
|
7055
|
-
*/
|
|
7056
|
-
function compactionNotice(data) {
|
|
7057
|
-
const count = data.shadowedSeqs.length;
|
|
7058
|
-
return `compacted ${String(count)} ${plural(count, "item")} (~${formatTokens(data.shadowedTokenCount)} tokens)`;
|
|
7059
|
-
}
|
|
7060
|
-
/**
|
|
7061
7542
|
* The notice a scheduled model-request retry earns.
|
|
7062
7543
|
* @param data - the `llm/retry` event data.
|
|
7063
7544
|
* @returns e.g. `retrying (2/5) in 4s · RATE_LIMIT: provider busy`; an
|
|
@@ -7066,7 +7547,7 @@ function compactionNotice(data) {
|
|
|
7066
7547
|
function retryMessage(data) {
|
|
7067
7548
|
return `retrying (${data.mode === "normal" ? `${String(data.retry)}/${String(data.maxRetries)}` : String(data.retry)}) in ${formatDuration(data.delayMs)} · ${data.failure.code}: ${data.failure.message}`;
|
|
7068
7549
|
}
|
|
7069
|
-
function plural(count, noun) {
|
|
7550
|
+
function plural$1(count, noun) {
|
|
7070
7551
|
return count === 1 ? noun : `${noun}s`;
|
|
7071
7552
|
}
|
|
7072
7553
|
//#endregion
|
|
@@ -7744,6 +8225,8 @@ var PickPrompt = class extends ListPrompt {
|
|
|
7744
8225
|
visible;
|
|
7745
8226
|
/** What `Ctrl+S` does with the highlighted row, when the caller gave it a meaning. */
|
|
7746
8227
|
onSave;
|
|
8228
|
+
/** What `Ctrl+K` does with the highlighted row, when the caller gave it a meaning. */
|
|
8229
|
+
onStop;
|
|
7747
8230
|
constructor(palette, title, items, options = {}) {
|
|
7748
8231
|
const rows = items.map((item) => ({ ...item }));
|
|
7749
8232
|
const inForce = items.findIndex((item) => item.value === options.current);
|
|
@@ -7758,6 +8241,7 @@ var PickPrompt = class extends ListPrompt {
|
|
|
7758
8241
|
this.inForce = inForce;
|
|
7759
8242
|
this.visible = markedRows;
|
|
7760
8243
|
this.onSave = options.onSave;
|
|
8244
|
+
this.onStop = options.onStop;
|
|
7761
8245
|
if (inForce > 0) this.highlight(inForce);
|
|
7762
8246
|
}
|
|
7763
8247
|
/**
|
|
@@ -7787,10 +8271,10 @@ var PickPrompt = class extends ListPrompt {
|
|
|
7787
8271
|
this.setQuery("");
|
|
7788
8272
|
return;
|
|
7789
8273
|
}
|
|
7790
|
-
if (matchesKey(data, "ctrl+s")) {
|
|
8274
|
+
if (matchesKey(data, "ctrl+s") || matchesKey(data, "ctrl+k")) {
|
|
7791
8275
|
const row = this.selected();
|
|
7792
8276
|
const item = row === null ? void 0 : this.items.find((candidate) => candidate.value === row.value);
|
|
7793
|
-
if (item !== void 0) this.onSave?.(item);
|
|
8277
|
+
if (item !== void 0) (matchesKey(data, "ctrl+s") ? this.onSave : this.onStop)?.(item);
|
|
7794
8278
|
return;
|
|
7795
8279
|
}
|
|
7796
8280
|
const typed = typedText(data);
|
|
@@ -8203,7 +8687,7 @@ function fadedLine(text, fade) {
|
|
|
8203
8687
|
* @param content - the message's full text.
|
|
8204
8688
|
* @returns the text before the first newline, or all of `content` when it is one line.
|
|
8205
8689
|
*/
|
|
8206
|
-
function firstLine(content) {
|
|
8690
|
+
function firstLine$1(content) {
|
|
8207
8691
|
const breakAt = content.indexOf("\n");
|
|
8208
8692
|
return breakAt === -1 ? content : content.slice(0, breakAt);
|
|
8209
8693
|
}
|
|
@@ -8225,7 +8709,7 @@ function queuePanelRows(nextStep, nextTurn) {
|
|
|
8225
8709
|
const row = (target, message) => ({
|
|
8226
8710
|
message,
|
|
8227
8711
|
target,
|
|
8228
|
-
text: firstLine(contentText(message.content))
|
|
8712
|
+
text: firstLine$1(contentText(message.content))
|
|
8229
8713
|
});
|
|
8230
8714
|
const pending = (target, messages) => messages.filter((message) => message.source.kind === "user").map((message) => row(target, message));
|
|
8231
8715
|
return [...pending("next-step", nextStep), ...pending("next-turn", nextTurn)];
|
|
@@ -10218,6 +10702,357 @@ function sessionListTitle(ctx, header) {
|
|
|
10218
10702
|
const title = (cache?.cachedSnapshot(header) ?? cache?.cachedPredecessorTitle(header))?.values.title;
|
|
10219
10703
|
return typeof title === "string" && title !== "" ? title : void 0;
|
|
10220
10704
|
}
|
|
10705
|
+
//#endregion
|
|
10706
|
+
//#region lib/types/compaction.js
|
|
10707
|
+
/**
|
|
10708
|
+
* What one compaction folded into its summary and what it left verbatim, read
|
|
10709
|
+
* from the session log the terminal already draws.
|
|
10710
|
+
*
|
|
10711
|
+
* {@link CompactionLedger} mirrors the model-visible surface from the logged
|
|
10712
|
+
* `surfaceOp` of every message event it observes (an append pushes the node, a
|
|
10713
|
+
* replacement splices the positional span), and keeps one short fact per
|
|
10714
|
+
* surface node. When a `compaction/*` transaction closes, the checkpoint
|
|
10715
|
+
* replacement it landed names the shadowed nodes (compressed) and every other
|
|
10716
|
+
* node still on the surface (preserved). Live events and a replayed history go
|
|
10717
|
+
* through the same path, so a resumed session draws the same account the live
|
|
10718
|
+
* one did. Nothing here touches the terminal, the palette, or the agent.
|
|
10719
|
+
* @module @deepseek-ai/dsh-tui-app/compaction
|
|
10720
|
+
*/
|
|
10721
|
+
/** Prompts listed one per row under `compressed` before the rest are counted. */
|
|
10722
|
+
const LISTED_PROMPTS = 5;
|
|
10723
|
+
/** Context titles named under `compressed` before the rest are counted. */
|
|
10724
|
+
const LISTED_CONTEXTS = 4;
|
|
10725
|
+
/**
|
|
10726
|
+
* Columns a listed prompt is cut to, so each takes one row of an 80-column
|
|
10727
|
+
* terminal beside its glyph and the block's indent. The account is pinned
|
|
10728
|
+
* above the fold, so a long prompt would otherwise push the summary down; the
|
|
10729
|
+
* reader and the transcript still hold the whole prompt. A presentation
|
|
10730
|
+
* bound, not a deployment setting.
|
|
10731
|
+
*/
|
|
10732
|
+
const PROMPT_COLUMNS = 72;
|
|
10733
|
+
/**
|
|
10734
|
+
* Mirrors one session's surface and reports each compaction that closes on it.
|
|
10735
|
+
* Feed it every event of the bound session in log order, live or replayed;
|
|
10736
|
+
* {@link CompactionLedger.clear} starts over for another session.
|
|
10737
|
+
*/
|
|
10738
|
+
var CompactionLedger = class {
|
|
10739
|
+
estimate;
|
|
10740
|
+
nodes = [];
|
|
10741
|
+
toolNames = /* @__PURE__ */ new Map();
|
|
10742
|
+
open = /* @__PURE__ */ new Map();
|
|
10743
|
+
/**
|
|
10744
|
+
* @param estimate - prices the checkpoint that replaced the compressed span.
|
|
10745
|
+
*/
|
|
10746
|
+
constructor(estimate) {
|
|
10747
|
+
this.estimate = estimate;
|
|
10748
|
+
}
|
|
10749
|
+
/** Forget the mirrored surface and every open transaction. */
|
|
10750
|
+
clear() {
|
|
10751
|
+
this.nodes.length = 0;
|
|
10752
|
+
this.toolNames.clear();
|
|
10753
|
+
this.open.clear();
|
|
10754
|
+
}
|
|
10755
|
+
/**
|
|
10756
|
+
* Fold one event of the observed session.
|
|
10757
|
+
* @param event - the next event in log order.
|
|
10758
|
+
* @param turn - the transcript's current turn, which facts appended now belong to.
|
|
10759
|
+
* @returns the outcome when this event closed a compaction transaction, else undefined.
|
|
10760
|
+
*/
|
|
10761
|
+
observe(event, turn) {
|
|
10762
|
+
switch (event.type) {
|
|
10763
|
+
case "compaction/start":
|
|
10764
|
+
this.open.set(event.data.compactionId, { manual: event.data.sourceCommandId !== void 0 });
|
|
10765
|
+
return;
|
|
10766
|
+
case "compaction/summary": {
|
|
10767
|
+
const open = this.open.get(event.data.compactionId);
|
|
10768
|
+
if (open !== void 0) open.summary = {
|
|
10769
|
+
seq: event.seq,
|
|
10770
|
+
text: contentText(event.data.summary).trim(),
|
|
10771
|
+
tokens: event.data.shadowedTokenCount,
|
|
10772
|
+
model: event.data.model
|
|
10773
|
+
};
|
|
10774
|
+
return;
|
|
10775
|
+
}
|
|
10776
|
+
case "compaction/end": return this.close(event);
|
|
10777
|
+
default: break;
|
|
10778
|
+
}
|
|
10779
|
+
if (!isSurfaceEvent(event)) return void 0;
|
|
10780
|
+
const node = {
|
|
10781
|
+
seq: event.seq,
|
|
10782
|
+
fact: this.factOf(event, turn)
|
|
10783
|
+
};
|
|
10784
|
+
if (event.surfaceOp === "append") {
|
|
10785
|
+
this.nodes.push(node);
|
|
10786
|
+
return;
|
|
10787
|
+
}
|
|
10788
|
+
const { startSeq, endSeq } = event.surfaceOp;
|
|
10789
|
+
const from = this.nodes.findIndex((entry) => entry.seq === startSeq);
|
|
10790
|
+
const to = this.nodes.findIndex((entry) => entry.seq === endSeq);
|
|
10791
|
+
const shadowed = from === -1 || to < from ? [] : this.nodes.splice(from, to - from + 1, node);
|
|
10792
|
+
if (event.type === "user/message" && isCompactCheckpointSource(event.data.source)) {
|
|
10793
|
+
const open = this.open.get(event.data.source.compactionId);
|
|
10794
|
+
if (open !== void 0) {
|
|
10795
|
+
const summaryTokens = this.estimate(event.data);
|
|
10796
|
+
open.landed = {
|
|
10797
|
+
turn,
|
|
10798
|
+
compressed: shadowed.map((entry) => entry.fact),
|
|
10799
|
+
preserved: this.nodes.flatMap((entry) => entry === node ? [] : [entry.fact]),
|
|
10800
|
+
...summaryTokens === void 0 ? {} : { summaryTokens }
|
|
10801
|
+
};
|
|
10802
|
+
}
|
|
10803
|
+
}
|
|
10804
|
+
}
|
|
10805
|
+
/**
|
|
10806
|
+
* Settle one transaction on its closing marker.
|
|
10807
|
+
* @param event - the `compaction/end` event.
|
|
10808
|
+
* @returns the outcome, or undefined for a transaction this ledger did not see open.
|
|
10809
|
+
*/
|
|
10810
|
+
close(event) {
|
|
10811
|
+
const open = this.open.get(event.data.compactionId);
|
|
10812
|
+
if (open === void 0) return void 0;
|
|
10813
|
+
this.open.delete(event.data.compactionId);
|
|
10814
|
+
if (event.data.error !== void 0) return {
|
|
10815
|
+
kind: "failed",
|
|
10816
|
+
compactionId: event.data.compactionId,
|
|
10817
|
+
manual: open.manual,
|
|
10818
|
+
error: event.data.error
|
|
10819
|
+
};
|
|
10820
|
+
const { summary, landed } = open;
|
|
10821
|
+
if (summary === void 0 || landed === void 0) return void 0;
|
|
10822
|
+
return {
|
|
10823
|
+
kind: "compacted",
|
|
10824
|
+
report: {
|
|
10825
|
+
manual: open.manual,
|
|
10826
|
+
turn: landed.turn,
|
|
10827
|
+
compressed: landed.compressed,
|
|
10828
|
+
preserved: landed.preserved,
|
|
10829
|
+
summary: summary.text,
|
|
10830
|
+
compressedTokens: summary.tokens,
|
|
10831
|
+
...landed.summaryTokens === void 0 ? {} : { summaryTokens: landed.summaryTokens },
|
|
10832
|
+
model: summary.model,
|
|
10833
|
+
summarySeq: summary.seq
|
|
10834
|
+
}
|
|
10835
|
+
};
|
|
10836
|
+
}
|
|
10837
|
+
/**
|
|
10838
|
+
* Name one surface event for the account.
|
|
10839
|
+
* @param event - a message event that joins the surface.
|
|
10840
|
+
* @param turn - the turn it belongs to.
|
|
10841
|
+
* @returns its fact.
|
|
10842
|
+
*/
|
|
10843
|
+
factOf(event, turn) {
|
|
10844
|
+
switch (event.type) {
|
|
10845
|
+
case "system/message": return { kind: "system" };
|
|
10846
|
+
case "developer/message": return {
|
|
10847
|
+
kind: "developer",
|
|
10848
|
+
turn
|
|
10849
|
+
};
|
|
10850
|
+
case "user/message": {
|
|
10851
|
+
const { source, content } = event.data;
|
|
10852
|
+
if (isCompactCheckpointSource(source)) return {
|
|
10853
|
+
kind: "summary",
|
|
10854
|
+
turn
|
|
10855
|
+
};
|
|
10856
|
+
if (source.kind === "user") return {
|
|
10857
|
+
kind: "prompt",
|
|
10858
|
+
turn,
|
|
10859
|
+
text: firstLine(contentText(content))
|
|
10860
|
+
};
|
|
10861
|
+
return {
|
|
10862
|
+
kind: "context",
|
|
10863
|
+
turn,
|
|
10864
|
+
title: injectedContextTitle(source) ?? source.kind
|
|
10865
|
+
};
|
|
10866
|
+
}
|
|
10867
|
+
case "assistant/message":
|
|
10868
|
+
for (const block of event.data.message.content) if (block.type === "tool-call") this.toolNames.set(block.id, block.name);
|
|
10869
|
+
return {
|
|
10870
|
+
kind: "reply",
|
|
10871
|
+
turn
|
|
10872
|
+
};
|
|
10873
|
+
case "tool/result": {
|
|
10874
|
+
const { toolCallId } = event.data.message;
|
|
10875
|
+
return {
|
|
10876
|
+
kind: "result",
|
|
10877
|
+
turn,
|
|
10878
|
+
tool: this.toolNames.get(toolCallId) ?? "tool"
|
|
10879
|
+
};
|
|
10880
|
+
}
|
|
10881
|
+
/* v8 ignore next 2 -- closed-union exhaustiveness guard */
|
|
10882
|
+
default: return assertNever(event, "surface event");
|
|
10883
|
+
}
|
|
10884
|
+
}
|
|
10885
|
+
};
|
|
10886
|
+
/**
|
|
10887
|
+
* The block title of one landed compaction.
|
|
10888
|
+
* @param report - the compaction.
|
|
10889
|
+
* @returns e.g. `context compacted by /compact · ~6.4k → ~0.9k tokens`, or
|
|
10890
|
+
* `… · ~6.4k tokens into one summary` when the summary is unpriced.
|
|
10891
|
+
*/
|
|
10892
|
+
function compactionTitle(report) {
|
|
10893
|
+
const origin = report.manual ? "by /compact" : `automatically in turn ${String(report.turn)}`;
|
|
10894
|
+
const before = `~${formatTokens(report.compressedTokens)}`;
|
|
10895
|
+
return `context compacted ${origin} · ${report.summaryTokens === void 0 ? `${before} tokens into one summary` : `${before} → ~${formatTokens(report.summaryTokens)} tokens`}`;
|
|
10896
|
+
}
|
|
10897
|
+
/**
|
|
10898
|
+
* The navigable sections of one landed compaction: what the summary replaced,
|
|
10899
|
+
* what the model still reads verbatim, and the summary itself.
|
|
10900
|
+
* @param report - the compaction.
|
|
10901
|
+
* @returns the `compressed`, `preserved`, and `summary` parts, in that order.
|
|
10902
|
+
*/
|
|
10903
|
+
function compactionParts(report) {
|
|
10904
|
+
return [
|
|
10905
|
+
{
|
|
10906
|
+
kind: "context",
|
|
10907
|
+
label: "compressed",
|
|
10908
|
+
rows: compressedRows(report.compressed)
|
|
10909
|
+
},
|
|
10910
|
+
{
|
|
10911
|
+
kind: "context",
|
|
10912
|
+
label: "preserved",
|
|
10913
|
+
rows: preservedRows(report.preserved)
|
|
10914
|
+
},
|
|
10915
|
+
{
|
|
10916
|
+
kind: "context",
|
|
10917
|
+
label: `summary · ${report.model}`,
|
|
10918
|
+
rows: report.summary === "" ? [""] : report.summary.split("\n")
|
|
10919
|
+
}
|
|
10920
|
+
];
|
|
10921
|
+
}
|
|
10922
|
+
/**
|
|
10923
|
+
* The notice a failed `/compact` attempt earns.
|
|
10924
|
+
* @param outcome - the failed outcome.
|
|
10925
|
+
* @returns e.g. `/compact failed · summary is not smaller than the shadowed content (…)`.
|
|
10926
|
+
*/
|
|
10927
|
+
function compactionFailure(outcome) {
|
|
10928
|
+
return `/compact failed · ${firstLine(outcome.error)}`;
|
|
10929
|
+
}
|
|
10930
|
+
/**
|
|
10931
|
+
* Rows naming the compressed span: its size and turns, each prompt it held,
|
|
10932
|
+
* and a count of everything else.
|
|
10933
|
+
* @param facts - the shadowed nodes.
|
|
10934
|
+
* @returns the rows.
|
|
10935
|
+
*/
|
|
10936
|
+
function compressedRows(facts) {
|
|
10937
|
+
const turns = turnSpan(facts);
|
|
10938
|
+
const rows = [`${plural(facts.length, "item")}${turns === "" ? "" : ` from ${turns}`}`];
|
|
10939
|
+
const prompts = facts.flatMap((fact) => fact.kind === "prompt" ? [fact.text] : []);
|
|
10940
|
+
for (const text of prompts.slice(0, LISTED_PROMPTS)) rows.push(`❯ ${clip(text)}`);
|
|
10941
|
+
if (prompts.length > LISTED_PROMPTS) rows.push(`+${plural(prompts.length - LISTED_PROMPTS, "more prompt")}`);
|
|
10942
|
+
const rest = tally(facts.filter((fact) => fact.kind !== "prompt"));
|
|
10943
|
+
if (rest !== "") rows.push(rest);
|
|
10944
|
+
return rows;
|
|
10945
|
+
}
|
|
10946
|
+
/**
|
|
10947
|
+
* Rows naming what stays verbatim: the system prompt, then one row per turn.
|
|
10948
|
+
* @param facts - the surface nodes other than the checkpoint.
|
|
10949
|
+
* @returns the rows.
|
|
10950
|
+
*/
|
|
10951
|
+
function preservedRows(facts) {
|
|
10952
|
+
const rows = [];
|
|
10953
|
+
if (facts.some((fact) => fact.kind === "system")) rows.push("system prompt");
|
|
10954
|
+
const byTurn = /* @__PURE__ */ new Map();
|
|
10955
|
+
for (const fact of facts) {
|
|
10956
|
+
if (fact.kind === "system") continue;
|
|
10957
|
+
const group = byTurn.get(fact.turn) ?? [];
|
|
10958
|
+
group.push(fact);
|
|
10959
|
+
byTurn.set(fact.turn, group);
|
|
10960
|
+
}
|
|
10961
|
+
for (const [turn, group] of byTurn) {
|
|
10962
|
+
const prompts = group.flatMap((fact) => fact.kind === "prompt" ? [`❯ ${clip(fact.text)}`] : []);
|
|
10963
|
+
const rest = tally(group.filter((fact) => fact.kind !== "prompt"));
|
|
10964
|
+
rows.push([
|
|
10965
|
+
`turn ${String(turn)}`,
|
|
10966
|
+
...prompts,
|
|
10967
|
+
...rest === "" ? [] : [rest]
|
|
10968
|
+
].join(" · "));
|
|
10969
|
+
}
|
|
10970
|
+
if (rows.length === 0) rows.push("nothing else: the summary is the whole history");
|
|
10971
|
+
return rows;
|
|
10972
|
+
}
|
|
10973
|
+
/**
|
|
10974
|
+
* Count facts other than prompts by kind, naming tools and context blocks.
|
|
10975
|
+
* @param facts - facts of any kind but `prompt`.
|
|
10976
|
+
* @returns e.g. `2 replies · 3 tool results (read ×2, bash) · 1 context block (instructions · AGENTS.md)`.
|
|
10977
|
+
*/
|
|
10978
|
+
function tally(facts) {
|
|
10979
|
+
const parts = [];
|
|
10980
|
+
const count = (kind) => facts.filter((fact) => fact.kind === kind).length;
|
|
10981
|
+
const replies = count("reply");
|
|
10982
|
+
if (replies > 0) parts.push(plural(replies, "reply", "replies"));
|
|
10983
|
+
const tools = facts.flatMap((fact) => fact.kind === "result" ? [fact.tool] : []);
|
|
10984
|
+
if (tools.length > 0) parts.push(`${plural(tools.length, "tool result")} (${named(tools)})`);
|
|
10985
|
+
const contexts = facts.flatMap((fact) => fact.kind === "context" ? [fact.title] : []);
|
|
10986
|
+
if (contexts.length > 0) {
|
|
10987
|
+
const shown = contexts.slice(0, LISTED_CONTEXTS).join(", ");
|
|
10988
|
+
const more = contexts.length > LISTED_CONTEXTS ? `, +${String(contexts.length - LISTED_CONTEXTS)} more` : "";
|
|
10989
|
+
parts.push(`${plural(contexts.length, "context block")} (${shown}${more})`);
|
|
10990
|
+
}
|
|
10991
|
+
const summaries = count("summary");
|
|
10992
|
+
if (summaries > 0) parts.push(plural(summaries, "earlier summary", "earlier summaries"));
|
|
10993
|
+
const developer = count("developer");
|
|
10994
|
+
if (developer > 0) parts.push(plural(developer, "developer message"));
|
|
10995
|
+
return parts.join(" · ");
|
|
10996
|
+
}
|
|
10997
|
+
/**
|
|
10998
|
+
* Tool names with repeat counts, in first-seen order.
|
|
10999
|
+
* @param tools - one name per result.
|
|
11000
|
+
* @returns e.g. `read ×2, bash`.
|
|
11001
|
+
*/
|
|
11002
|
+
function named(tools) {
|
|
11003
|
+
const counts = /* @__PURE__ */ new Map();
|
|
11004
|
+
for (const tool of tools) counts.set(tool, (counts.get(tool) ?? 0) + 1);
|
|
11005
|
+
return [...counts].map(([tool, times]) => times === 1 ? tool : `${tool} ×${String(times)}`).join(", ");
|
|
11006
|
+
}
|
|
11007
|
+
/**
|
|
11008
|
+
* The turns a set of facts spans.
|
|
11009
|
+
* @param facts - the facts; the system prompt has no turn.
|
|
11010
|
+
* @returns `turn 3`, `turns 1–3`, or `''` when none carries a turn.
|
|
11011
|
+
*/
|
|
11012
|
+
function turnSpan(facts) {
|
|
11013
|
+
const turns = facts.flatMap((fact) => fact.kind === "system" ? [] : [fact.turn]);
|
|
11014
|
+
if (turns.length === 0) return "";
|
|
11015
|
+
const first = Math.min(...turns);
|
|
11016
|
+
const last = Math.max(...turns);
|
|
11017
|
+
return first === last ? `turn ${String(first)}` : `turns ${String(first)}–${String(last)}`;
|
|
11018
|
+
}
|
|
11019
|
+
/**
|
|
11020
|
+
* Cut one plain row to {@link PROMPT_COLUMNS}, ending on `…` when it was cut.
|
|
11021
|
+
* Section rows stay unstyled, so this counts columns itself rather than
|
|
11022
|
+
* through the renderer's truncation, which closes its ellipsis with styling.
|
|
11023
|
+
* @param text - one line of plain text.
|
|
11024
|
+
* @returns the line, at most that many columns wide.
|
|
11025
|
+
*/
|
|
11026
|
+
function clip(text) {
|
|
11027
|
+
if (visibleWidth(text) <= PROMPT_COLUMNS) return text;
|
|
11028
|
+
let kept = "";
|
|
11029
|
+
let width = 0;
|
|
11030
|
+
for (const char of text) {
|
|
11031
|
+
const next = visibleWidth(char);
|
|
11032
|
+
if (width + next > PROMPT_COLUMNS - 1) break;
|
|
11033
|
+
kept += char;
|
|
11034
|
+
width += next;
|
|
11035
|
+
}
|
|
11036
|
+
return `${kept}…`;
|
|
11037
|
+
}
|
|
11038
|
+
/**
|
|
11039
|
+
* The first nonblank line of a text, read without splitting the rest of it.
|
|
11040
|
+
* @param text - any text.
|
|
11041
|
+
* @returns that line, trimmed; `''` for a blank text.
|
|
11042
|
+
*/
|
|
11043
|
+
function firstLine(text) {
|
|
11044
|
+
return /\S.*/u.exec(text)?.[0].trim() ?? "";
|
|
11045
|
+
}
|
|
11046
|
+
/**
|
|
11047
|
+
* A count and its noun.
|
|
11048
|
+
* @param count - how many.
|
|
11049
|
+
* @param noun - the singular.
|
|
11050
|
+
* @param nouns - the plural, when it is not `noun` + `s`.
|
|
11051
|
+
* @returns e.g. `1 item`, `3 items`.
|
|
11052
|
+
*/
|
|
11053
|
+
function plural(count, noun, nouns = `${noun}s`) {
|
|
11054
|
+
return `${String(count)} ${count === 1 ? noun : nouns}`;
|
|
11055
|
+
}
|
|
10221
11056
|
/** Two-space indentation per nesting level, as the `/subagents` rows indent. */
|
|
10222
11057
|
const DEPTH_INDENT = " ";
|
|
10223
11058
|
/** What separates two facts inside one row, and two parts of the heading. */
|
|
@@ -10519,10 +11354,12 @@ var ToastPane = class {
|
|
|
10519
11354
|
* turns keystrokes into agent input, answers the approval and user-questions
|
|
10520
11355
|
* seams for that Agent, and switches between sessions through its host. Above
|
|
10521
11356
|
* the editor it draws an activity board of the open turn's todos and the
|
|
10522
|
-
* latest descendant line
|
|
10523
|
-
*
|
|
10524
|
-
*
|
|
10525
|
-
* subagent
|
|
11357
|
+
* latest descendant line, and a live line while background jobs run; `Ctrl+B`
|
|
11358
|
+
* moves the running tool calls to those jobs (`./background.ts`). Under the
|
|
11359
|
+
* editor it keeps two docked regions the keyboard can take over — the
|
|
11360
|
+
* subagent panel and the status bar — and one repeating tick advances their
|
|
11361
|
+
* elapsed counters and the jobs line's, and re-reads a stale subagent
|
|
11362
|
+
* listing. A second tick, at its own period, brightens streamed
|
|
10526
11363
|
* reply text and floats out reasoning, tool cards, and activity-board rows
|
|
10527
11364
|
* that just landed, each only as far up the frame as the renderer repaints
|
|
10528
11365
|
* without discarding the terminal's scrollback (`./screen.ts`).
|
|
@@ -10532,6 +11369,12 @@ var ToastPane = class {
|
|
|
10532
11369
|
const QUIT_DOUBLE_PRESS_MS = 600;
|
|
10533
11370
|
/** What input reports while the host is opening another session. */
|
|
10534
11371
|
const SESSION_SWITCH_WAIT = "wait for the session switch to finish";
|
|
11372
|
+
/** What a session switch reports while a dispatched `/compact` runs. */
|
|
11373
|
+
const COMPACTION_SWITCH_WAIT = "wait for the compaction to finish (Esc cancels it) before switching sessions";
|
|
11374
|
+
/** The working spinner's message after its `compacting` word while a dispatched `/compact` runs. */
|
|
11375
|
+
const COMPACTION_LOADER_DETAIL = "context · Esc cancels";
|
|
11376
|
+
/** What a prompt submitted while a dispatched `/compact` runs reports. */
|
|
11377
|
+
const COMPACTION_QUEUE_NOTICE = "queued: the prompt starts once compaction finishes";
|
|
10535
11378
|
/** The one extra key the model picker answers, stated above its rows. */
|
|
10536
11379
|
const MODEL_PICKER_HINT = "Ctrl+S saves the highlighted model as the default for the next launch";
|
|
10537
11380
|
/**
|
|
@@ -10738,6 +11581,10 @@ const LOCAL_COMMANDS = [
|
|
|
10738
11581
|
name: "subagents",
|
|
10739
11582
|
description: "Browse the subagent sessions under this session (Enter opens one as a live session view)"
|
|
10740
11583
|
},
|
|
11584
|
+
{
|
|
11585
|
+
name: "jobs",
|
|
11586
|
+
description: "Browse this session's background jobs (Enter shows the output, Ctrl+K stops one; Ctrl+B moves running tool calls here)"
|
|
11587
|
+
},
|
|
10741
11588
|
{
|
|
10742
11589
|
name: "parent",
|
|
10743
11590
|
description: "Return from a subagent view or a /btw side agent to the session it was opened from"
|
|
@@ -10782,6 +11629,19 @@ const LOCAL_COMMAND_NAMES = new Set(LOCAL_COMMANDS.map((command) => command.name
|
|
|
10782
11629
|
function isSubscriptionMethod(method) {
|
|
10783
11630
|
return method.id !== "api-key";
|
|
10784
11631
|
}
|
|
11632
|
+
/** Shown when `Ctrl+B` or `/jobs` is used and this composition has no `ctx.jobs`. */
|
|
11633
|
+
const JOBS_MISSING = "background jobs need a job registry in this composition";
|
|
11634
|
+
/**
|
|
11635
|
+
* Columns of a moved call's card headline its job label keeps. The label
|
|
11636
|
+
* reaches the model in the completion notice, so it names the call without
|
|
11637
|
+
* carrying a whole command. A presentation choice of this terminal surface,
|
|
11638
|
+
* not a deployment setting.
|
|
11639
|
+
*/
|
|
11640
|
+
const JOB_LABEL_COLUMNS = 120;
|
|
11641
|
+
/** Why a job the user stopped from `/jobs` was killed, as the model reads it. */
|
|
11642
|
+
const USER_STOP_REASON = "stopped by the user";
|
|
11643
|
+
/** Shown when `Ctrl+B` is pressed while the turn runs no tool call. */
|
|
11644
|
+
const NOTHING_TO_BACKGROUND = "no tool call is running · Ctrl+B moves a running call to the background";
|
|
10785
11645
|
/** Shown when `!` is submitted and this composition has no `ctx.shell`. */
|
|
10786
11646
|
const SHELL_MISSING = "! needs a shell executor in this composition";
|
|
10787
11647
|
/** Shown when a second `!` is submitted while one is still running. */
|
|
@@ -10849,6 +11709,14 @@ var TuiApp = class {
|
|
|
10849
11709
|
queueDraft;
|
|
10850
11710
|
/** Suppresses the empty-queue focus handoff during a synchronous inbox transfer. */
|
|
10851
11711
|
transferringQueue = false;
|
|
11712
|
+
/** Holds {@link jobsLine} exactly while a background job of the bound session runs. */
|
|
11713
|
+
jobsSlot = new Container();
|
|
11714
|
+
/** The live background-jobs line above the editor. */
|
|
11715
|
+
jobsLine;
|
|
11716
|
+
/** The bound session's background jobs at the last read, in registration order. */
|
|
11717
|
+
backgroundJobs = [];
|
|
11718
|
+
/** Tracks root tool calls and moves them to background jobs on `Ctrl+B`. */
|
|
11719
|
+
backgrounder;
|
|
10852
11720
|
/** Holds {@link panel} exactly while the bound session has subagent rows. */
|
|
10853
11721
|
panelSlot = new Container();
|
|
10854
11722
|
/** The terminal's alternate screen, which the reader draws on; see {@link AlternateScreen}. */
|
|
@@ -10968,6 +11836,18 @@ var TuiApp = class {
|
|
|
10968
11836
|
stopArmedUntil = 0;
|
|
10969
11837
|
/** Abort of the in-flight user `!` command, when one is running. */
|
|
10970
11838
|
shellAbort;
|
|
11839
|
+
/** Abort of the `/compact` this terminal dispatched and still waits on; `Esc` cancels it. */
|
|
11840
|
+
compacting;
|
|
11841
|
+
/**
|
|
11842
|
+
* The transaction the last dispatched `/compact` opened. Its command result
|
|
11843
|
+
* reports a failure, so the log's closing marker for it prints nothing more,
|
|
11844
|
+
* including one that lands after a cancelled command stopped waiting.
|
|
11845
|
+
*/
|
|
11846
|
+
dispatchedCompaction;
|
|
11847
|
+
/** The `compaction/summary` seq of the last block drawn, which a `/compact` success result names. */
|
|
11848
|
+
drawnCompaction;
|
|
11849
|
+
/** Mirrors the bound session's surface to account for each compaction that lands on it. */
|
|
11850
|
+
compactions;
|
|
10971
11851
|
/**
|
|
10972
11852
|
* How many of the viewport's own first lines the renderer can no longer
|
|
10973
11853
|
* repaint, from the last frame the guard settled. The transient line
|
|
@@ -11051,6 +11931,7 @@ var TuiApp = class {
|
|
|
11051
11931
|
previewLines: deps.focusPreviewLines
|
|
11052
11932
|
});
|
|
11053
11933
|
this.loader = new Loader(this.tui, palette.accent, (message) => this.paintLoaderMessage(message), "thinking");
|
|
11934
|
+
this.compactions = new CompactionLedger((message) => deps.ctx.get("tokenMeter")?.estimateMessage(message));
|
|
11054
11935
|
this.loader.stop();
|
|
11055
11936
|
this.editor = new BarCursorEditor(this.tui, editorTheme(palette), { paddingX: 1 });
|
|
11056
11937
|
this.editor.shellPaint = {
|
|
@@ -11070,6 +11951,13 @@ var TuiApp = class {
|
|
|
11070
11951
|
};
|
|
11071
11952
|
this.queue = new Text("", 0, 0);
|
|
11072
11953
|
this.activity = new Text("", 0, 0);
|
|
11954
|
+
this.jobsLine = new Text("", 0, 0);
|
|
11955
|
+
this.backgrounder = new ToolBackgrounder({
|
|
11956
|
+
jobs: () => deps.ctx.get("jobs"),
|
|
11957
|
+
changed: () => {
|
|
11958
|
+
this.onForegroundCallsChanged();
|
|
11959
|
+
}
|
|
11960
|
+
});
|
|
11073
11961
|
this.panel = new Text("", 0, 0);
|
|
11074
11962
|
this.banner = new ViewBanner(palette);
|
|
11075
11963
|
this.footer = new FooterBar(() => ({
|
|
@@ -11096,6 +11984,7 @@ var TuiApp = class {
|
|
|
11096
11984
|
this.inspector,
|
|
11097
11985
|
this.queueSlot,
|
|
11098
11986
|
this.activitySlot,
|
|
11987
|
+
this.jobsSlot,
|
|
11099
11988
|
this.banner,
|
|
11100
11989
|
this.editor,
|
|
11101
11990
|
this.panelSlot,
|
|
@@ -11158,7 +12047,11 @@ var TuiApp = class {
|
|
|
11158
12047
|
}), ctx.on("user-questions/request", (request, next) => {
|
|
11159
12048
|
if (!this.claimPrompt(request.agent)) return next();
|
|
11160
12049
|
return this.askQuestions(request.questions, request.signal);
|
|
11161
|
-
}), this.tui.addInputListener((data) => this.onKey(data)));
|
|
12050
|
+
}), ctx.on("tools/execute", (exec, next) => this.backgrounder.around(exec, next)), this.tui.addInputListener((data) => this.onKey(data)));
|
|
12051
|
+
const jobs = ctx.get("jobs");
|
|
12052
|
+
if (jobs !== void 0) this.disposers.push(jobs.events.subscribe({ owners: "all" }, (event) => {
|
|
12053
|
+
this.onJobEvent(event);
|
|
12054
|
+
}));
|
|
11162
12055
|
const projections = ctx.get("sessionProjections");
|
|
11163
12056
|
if (projections !== void 0) this.disposers.push(projections.onChanged((session) => {
|
|
11164
12057
|
if (session === this.agent.session) this.refreshFooter();
|
|
@@ -11213,6 +12106,7 @@ var TuiApp = class {
|
|
|
11213
12106
|
stop() {
|
|
11214
12107
|
if (this.stopped) return;
|
|
11215
12108
|
this.dropUserShell();
|
|
12109
|
+
this.dropCompaction();
|
|
11216
12110
|
this.restoreQueueDraft();
|
|
11217
12111
|
this.stopped = true;
|
|
11218
12112
|
this.updateTicker();
|
|
@@ -11240,6 +12134,7 @@ var TuiApp = class {
|
|
|
11240
12134
|
/** Draw `next` as the terminal's session: clear the transcript and replay its history. */
|
|
11241
12135
|
bind(next) {
|
|
11242
12136
|
this.dropUserShell();
|
|
12137
|
+
this.dropCompaction();
|
|
11243
12138
|
if (this.queueDraft !== void 0) {
|
|
11244
12139
|
this.restoreQueueDraft();
|
|
11245
12140
|
this.editor.setText("");
|
|
@@ -11278,6 +12173,9 @@ var TuiApp = class {
|
|
|
11278
12173
|
this.panelSelection = void 0;
|
|
11279
12174
|
this.listingFailure = void 0;
|
|
11280
12175
|
this.subagentsStale = false;
|
|
12176
|
+
this.compactions.clear();
|
|
12177
|
+
this.dispatchedCompaction = void 0;
|
|
12178
|
+
this.drawnCompaction = void 0;
|
|
11281
12179
|
this.setWorking(next.agent.status === "running");
|
|
11282
12180
|
this.replaying = true;
|
|
11283
12181
|
for (const event of next.history) this.onSessionEvent(next.agent.session, event);
|
|
@@ -11288,6 +12186,7 @@ var TuiApp = class {
|
|
|
11288
12186
|
this.refreshQueue();
|
|
11289
12187
|
this.refreshFooter();
|
|
11290
12188
|
this.refreshSubagentPanel();
|
|
12189
|
+
this.refreshJobs();
|
|
11291
12190
|
this.reconcileSubagents();
|
|
11292
12191
|
}
|
|
11293
12192
|
/**
|
|
@@ -11300,6 +12199,10 @@ var TuiApp = class {
|
|
|
11300
12199
|
this.notice("stop the running turn (Esc twice) before switching sessions", "error");
|
|
11301
12200
|
return;
|
|
11302
12201
|
}
|
|
12202
|
+
if (this.compacting !== void 0) {
|
|
12203
|
+
this.notice(COMPACTION_SWITCH_WAIT, "error");
|
|
12204
|
+
return;
|
|
12205
|
+
}
|
|
11303
12206
|
this.cancelPickers();
|
|
11304
12207
|
this.switching = true;
|
|
11305
12208
|
let next;
|
|
@@ -11883,7 +12786,8 @@ var TuiApp = class {
|
|
|
11883
12786
|
* one runs at a time, and a stopped app runs none.
|
|
11884
12787
|
*/
|
|
11885
12788
|
updateTicker() {
|
|
11886
|
-
|
|
12789
|
+
const jobsTicking = this.backgroundJobs.some(isLive);
|
|
12790
|
+
if (!this.stopped && (this.turnStartedAt !== void 0 || this.subagentsStale || this.panelView.ticking || jobsTicking)) {
|
|
11887
12791
|
this.ticker ??= this.deps.tick(() => {
|
|
11888
12792
|
this.onTick();
|
|
11889
12793
|
}, this.deps.liveRefreshMs);
|
|
@@ -11898,6 +12802,7 @@ var TuiApp = class {
|
|
|
11898
12802
|
onTick() {
|
|
11899
12803
|
if (this.subagentsStale) this.reconcileSubagents();
|
|
11900
12804
|
this.refreshSubagentPanel();
|
|
12805
|
+
if (this.backgroundJobs.some(isLive)) this.refreshJobs();
|
|
11901
12806
|
if (this.turnStartedAt !== void 0) this.refreshFooter();
|
|
11902
12807
|
}
|
|
11903
12808
|
statusFacts() {
|
|
@@ -12010,6 +12915,137 @@ var TuiApp = class {
|
|
|
12010
12915
|
return [describeFailure(error)];
|
|
12011
12916
|
}
|
|
12012
12917
|
}
|
|
12918
|
+
/** Redraw what follows the foreground calls: the spinner's key hint and the jobs line. */
|
|
12919
|
+
onForegroundCallsChanged() {
|
|
12920
|
+
this.refreshLoader();
|
|
12921
|
+
this.refreshJobs();
|
|
12922
|
+
}
|
|
12923
|
+
/**
|
|
12924
|
+
* Follow one job-registry event: the backgrounder learns which jobs belong
|
|
12925
|
+
* to a running call, the jobs line follows the bound session's jobs, and a
|
|
12926
|
+
* settlement of one of them shows a transient line.
|
|
12927
|
+
* @param event - the registry event.
|
|
12928
|
+
*/
|
|
12929
|
+
onJobEvent(event) {
|
|
12930
|
+
this.backgrounder.observe(event);
|
|
12931
|
+
if (event.type === "output") return;
|
|
12932
|
+
const { job } = event;
|
|
12933
|
+
if (job.owner !== void 0 && job.owner !== this.agent.session.id) return;
|
|
12934
|
+
this.refreshJobs();
|
|
12935
|
+
if (event.type !== "settled" || event.cause === "teardown" || this.backgrounder.isInner(job.id)) return;
|
|
12936
|
+
this.showToast(settledToast(job, !event.awaited && event.cause === "producer"));
|
|
12937
|
+
}
|
|
12938
|
+
/**
|
|
12939
|
+
* Re-read the bound session's background jobs and redraw the live line
|
|
12940
|
+
* above the editor. A job a running call registered for itself is that
|
|
12941
|
+
* call's own work, not background work, and is left out while it runs.
|
|
12942
|
+
*/
|
|
12943
|
+
refreshJobs() {
|
|
12944
|
+
const jobs = this.deps.ctx.get("jobs");
|
|
12945
|
+
this.backgroundJobs = jobs === void 0 ? [] : jobs.list(this.agent.session.id).filter((job) => !this.backgrounder.isInner(job.id));
|
|
12946
|
+
const text = renderJobsLine(this.backgroundJobs, {
|
|
12947
|
+
palette: this.deps.palette,
|
|
12948
|
+
now: this.deps.now(),
|
|
12949
|
+
width: this.contentWidth()
|
|
12950
|
+
});
|
|
12951
|
+
const mounted = this.jobsSlot.children.length > 0;
|
|
12952
|
+
if (text === "") {
|
|
12953
|
+
if (mounted) this.jobsSlot.removeChild(this.jobsLine);
|
|
12954
|
+
} else {
|
|
12955
|
+
if (!mounted) this.jobsSlot.addChild(this.jobsLine);
|
|
12956
|
+
this.jobsLine.setText(text);
|
|
12957
|
+
}
|
|
12958
|
+
this.updateTicker();
|
|
12959
|
+
this.tui.requestRender();
|
|
12960
|
+
}
|
|
12961
|
+
/**
|
|
12962
|
+
* Answer `Ctrl+B` during a turn: move every foreground call of the bound
|
|
12963
|
+
* Agent to a background job and say what moved.
|
|
12964
|
+
*/
|
|
12965
|
+
moveToBackground() {
|
|
12966
|
+
const jobs = this.deps.ctx.get("jobs");
|
|
12967
|
+
if (jobs === void 0) {
|
|
12968
|
+
this.showToast(JOBS_MISSING);
|
|
12969
|
+
return;
|
|
12970
|
+
}
|
|
12971
|
+
const report = this.backgrounder.moveAll(jobs, this.agent, (call) => this.jobLabel(call));
|
|
12972
|
+
for (const refusal of report.refused) this.notice(`could not move ${refusal} to the background`, "error");
|
|
12973
|
+
const [first] = report.moved;
|
|
12974
|
+
if (first === void 0) {
|
|
12975
|
+
if (report.refused.length === 0) this.showToast(NOTHING_TO_BACKGROUND);
|
|
12976
|
+
return;
|
|
12977
|
+
}
|
|
12978
|
+
this.showToast(report.moved.length === 1 ? `◇ ${first.name} moved to the background as ${first.id} · /jobs lists it` : `◇ ${String(report.moved.length)} calls moved to the background · /jobs lists them`);
|
|
12979
|
+
}
|
|
12980
|
+
/**
|
|
12981
|
+
* The job label of a moved call: the tool name and its card headline on one line.
|
|
12982
|
+
* @param call - the call being moved.
|
|
12983
|
+
* @returns the label, cut to {@link JOB_LABEL_COLUMNS} columns.
|
|
12984
|
+
*/
|
|
12985
|
+
jobLabel(call) {
|
|
12986
|
+
const title = this.toolBlocks.get(call.callId)?.title.split("\n", 1)[0] ?? "";
|
|
12987
|
+
return truncateToWidth(title === "" ? call.name : `${call.name} ${title}`, JOB_LABEL_COLUMNS, "…");
|
|
12988
|
+
}
|
|
12989
|
+
/**
|
|
12990
|
+
* Walk the bound session's background jobs: one row per job, `Enter` shows
|
|
12991
|
+
* its status and output, and `Ctrl+K` stops the highlighted one. The rows
|
|
12992
|
+
* are read again each time the list opens, so a return from a detail page
|
|
12993
|
+
* shows the statuses as they are now.
|
|
12994
|
+
*/
|
|
12995
|
+
async browseJobs() {
|
|
12996
|
+
const jobs = this.deps.ctx.get("jobs");
|
|
12997
|
+
if (jobs === void 0) {
|
|
12998
|
+
this.notice(JOBS_MISSING, "error");
|
|
12999
|
+
return;
|
|
13000
|
+
}
|
|
13001
|
+
let visited;
|
|
13002
|
+
for (;;) {
|
|
13003
|
+
this.refreshJobs();
|
|
13004
|
+
const views = this.backgroundJobs;
|
|
13005
|
+
if (views.length === 0) {
|
|
13006
|
+
this.notice("no background jobs in this session · Ctrl+B moves a running tool call here");
|
|
13007
|
+
return;
|
|
13008
|
+
}
|
|
13009
|
+
const now = this.deps.now();
|
|
13010
|
+
const picked = await this.showModal(new PickPrompt(this.deps.palette, "Background jobs", views.map((view) => jobChoice(view, now)), {
|
|
13011
|
+
body: [JOBS_PICKER_HINT],
|
|
13012
|
+
...visited === void 0 ? {} : { current: visited },
|
|
13013
|
+
onStop: (item) => {
|
|
13014
|
+
const view = views.find((candidate) => candidate.id === item.value);
|
|
13015
|
+
/* v8 ignore next -- the picker answers with one of the rows it was handed */
|
|
13016
|
+
if (view !== void 0) this.stopJob(jobs, view);
|
|
13017
|
+
}
|
|
13018
|
+
}));
|
|
13019
|
+
if (picked === void 0) return;
|
|
13020
|
+
const view = views.find((candidate) => candidate.id === picked.value);
|
|
13021
|
+
/* v8 ignore next -- the picker settles with one of the rows it was handed */
|
|
13022
|
+
if (view === void 0) return;
|
|
13023
|
+
visited = view.id;
|
|
13024
|
+
await this.showModal(new DetailPrompt(this.deps.palette, `Job ${view.id}`, this.jobDetail(jobs, view)));
|
|
13025
|
+
}
|
|
13026
|
+
}
|
|
13027
|
+
/**
|
|
13028
|
+
* The detail page of one job, read fresh: its status and the tail of the
|
|
13029
|
+
* output its body writes, which for a moved shell call is the shell's own
|
|
13030
|
+
* process job.
|
|
13031
|
+
* @param jobs - the registry the list was read from.
|
|
13032
|
+
* @param listed - the job as the list showed it.
|
|
13033
|
+
* @returns the page rows.
|
|
13034
|
+
*/
|
|
13035
|
+
jobDetail(jobs, listed) {
|
|
13036
|
+
const owner = this.agent.session.id;
|
|
13037
|
+
const view = jobs.get(listed.id, owner);
|
|
13038
|
+
return jobDetailRows(view, jobs.readAt(this.backgrounder.outputOf(view.id), 0, owner).chunks, this.deps.now());
|
|
13039
|
+
}
|
|
13040
|
+
/**
|
|
13041
|
+
* Stop one job from `/jobs` and say whether anything was still running.
|
|
13042
|
+
* @param jobs - the registry the list was read from.
|
|
13043
|
+
* @param view - the highlighted job.
|
|
13044
|
+
*/
|
|
13045
|
+
stopJob(jobs, view) {
|
|
13046
|
+
const outcome = jobs.kill(view.id, this.agent.session.id, USER_STOP_REASON);
|
|
13047
|
+
this.showToast(outcome === "requested" ? `stopping ${view.id}` : `${view.id} already finished`);
|
|
13048
|
+
}
|
|
12013
13049
|
/**
|
|
12014
13050
|
* Walk the agent's todo list: one row per item, and entering a row shows
|
|
12015
13051
|
* that item in full with its position, the list's counts by status, and the
|
|
@@ -12306,6 +13342,10 @@ var TuiApp = class {
|
|
|
12306
13342
|
}
|
|
12307
13343
|
this.dispatchCommand("/effort");
|
|
12308
13344
|
return { consume: true };
|
|
13345
|
+
case "background":
|
|
13346
|
+
if (this.agent.status !== "running") return this.focus === "editor" ? void 0 : { consume: true };
|
|
13347
|
+
this.moveToBackground();
|
|
13348
|
+
return { consume: true };
|
|
12309
13349
|
case "todos":
|
|
12310
13350
|
this.focusEditor();
|
|
12311
13351
|
this.dispatchCommand("/todos");
|
|
@@ -12336,8 +13376,10 @@ var TuiApp = class {
|
|
|
12336
13376
|
* From a docked region it hands the keyboard back to the editor and starts
|
|
12337
13377
|
* the handoff window, so a second press landing in the editor does nothing
|
|
12338
13378
|
* at all: leaving a region, a page, or a picker can never stop a running
|
|
12339
|
-
* turn. In the editor it
|
|
12340
|
-
*
|
|
13379
|
+
* turn. In the editor it cancels a running `!` command or `/compact` at
|
|
13380
|
+
* once, which changes nothing in the conversation; otherwise it arms the
|
|
13381
|
+
* stop and says so, and only a second press while that line is still on
|
|
13382
|
+
* screen stops the turn.
|
|
12341
13383
|
* @returns the consume marker, or undefined while the editor's open
|
|
12342
13384
|
* autocomplete answers the key itself.
|
|
12343
13385
|
*/
|
|
@@ -12354,6 +13396,10 @@ var TuiApp = class {
|
|
|
12354
13396
|
this.shellAbort.abort();
|
|
12355
13397
|
return { consume: true };
|
|
12356
13398
|
}
|
|
13399
|
+
if (this.compacting !== void 0) {
|
|
13400
|
+
this.compacting.abort();
|
|
13401
|
+
return { consume: true };
|
|
13402
|
+
}
|
|
12357
13403
|
if (this.agent.status !== "running") {
|
|
12358
13404
|
if (this.editor.getText().trimStart().startsWith("!")) {
|
|
12359
13405
|
this.editor.setText("");
|
|
@@ -12367,8 +13413,13 @@ var TuiApp = class {
|
|
|
12367
13413
|
}
|
|
12368
13414
|
this.disarmStop();
|
|
12369
13415
|
this.agent.cancel({ kind: "user" }, { keepInbox: true });
|
|
13416
|
+
const jobs = this.deps.ctx.get("jobs");
|
|
13417
|
+
const moved = jobs === void 0 ? 0 : this.backgrounder.holdStopped(jobs, this.agent);
|
|
12370
13418
|
const queued = this.agent.inbox.nextTurn.length + this.agent.inbox.nextStep.length;
|
|
12371
|
-
|
|
13419
|
+
const facts = ["stopping the turn…"];
|
|
13420
|
+
if (queued > 0) facts.push(`${String(queued)} queued message(s) stay queued`);
|
|
13421
|
+
if (moved > 0) facts.push(`${String(moved)} background call(s) from this turn stop with it`);
|
|
13422
|
+
this.notice(facts.join(" "));
|
|
12372
13423
|
return { consume: true };
|
|
12373
13424
|
}
|
|
12374
13425
|
/** Start the window in which an `Escape` reaching the editor does nothing at all. */
|
|
@@ -13124,7 +14175,10 @@ var TuiApp = class {
|
|
|
13124
14175
|
],
|
|
13125
14176
|
source: terminalPromptSource(draft)
|
|
13126
14177
|
});
|
|
13127
|
-
if (
|
|
14178
|
+
if (this.compacting !== void 0) {
|
|
14179
|
+
agent.followup(message);
|
|
14180
|
+
this.notice(COMPACTION_QUEUE_NOTICE);
|
|
14181
|
+
} else if (agent.status !== "running") {
|
|
13128
14182
|
this.submittedIds.add(message.id);
|
|
13129
14183
|
const shown = attachments.length === 0 ? text : `${text}\n${attachments.map((attachment) => `[${attachment.block.type}: ${attachment.name}]`).join(" ")}`;
|
|
13130
14184
|
this.chat.addChild(new UserBlock(this.theme, shown, this.turn));
|
|
@@ -13241,12 +14295,18 @@ var TuiApp = class {
|
|
|
13241
14295
|
case "parent":
|
|
13242
14296
|
await this.leaveSubagent();
|
|
13243
14297
|
return;
|
|
14298
|
+
case "jobs":
|
|
14299
|
+
await this.browseJobs();
|
|
14300
|
+
return;
|
|
13244
14301
|
case "settings":
|
|
13245
14302
|
await this.settings(argument);
|
|
13246
14303
|
return;
|
|
13247
14304
|
case "plugins":
|
|
13248
14305
|
await this.plugins(argument);
|
|
13249
14306
|
return;
|
|
14307
|
+
case "compact":
|
|
14308
|
+
await this.compact(line);
|
|
14309
|
+
return;
|
|
13250
14310
|
default: await this.runSharedCommand(line, name);
|
|
13251
14311
|
}
|
|
13252
14312
|
}
|
|
@@ -13266,26 +14326,86 @@ var TuiApp = class {
|
|
|
13266
14326
|
].join("\n"), 0, 1));
|
|
13267
14327
|
this.tui.requestRender();
|
|
13268
14328
|
}
|
|
13269
|
-
|
|
14329
|
+
/**
|
|
14330
|
+
* Run one command of the shared registry and print its result into the
|
|
14331
|
+
* session it ran on. A success that names the `compaction/summary` this
|
|
14332
|
+
* terminal just drew as a block prints nothing more; a run whose signal
|
|
14333
|
+
* aborted reports the cancel; a result that settles after a session switch
|
|
14334
|
+
* or quit prints nothing.
|
|
14335
|
+
* @param line - the complete slash-command line.
|
|
14336
|
+
* @param name - the lowercase command name, for the notices.
|
|
14337
|
+
* @param signal - cancels the run; a run nothing cancels passes none.
|
|
14338
|
+
*/
|
|
14339
|
+
async runSharedCommand(line, name, signal = new AbortController().signal) {
|
|
13270
14340
|
const registry = this.deps.ctx.get("commands");
|
|
13271
14341
|
if (registry === void 0) {
|
|
13272
14342
|
this.notice(`unknown command /${name}`, "error");
|
|
13273
14343
|
return;
|
|
13274
14344
|
}
|
|
14345
|
+
const bound = this.bound;
|
|
13275
14346
|
try {
|
|
13276
|
-
const execution = await registry.execute(this.agent, line, [],
|
|
14347
|
+
const execution = await registry.execute(this.agent, line, [], signal);
|
|
14348
|
+
if (this.stopped || this.bound !== bound) return;
|
|
13277
14349
|
if (execution === void 0) {
|
|
13278
14350
|
this.notice(`unknown command /${name}`, "error");
|
|
13279
14351
|
return;
|
|
13280
14352
|
}
|
|
13281
14353
|
const result = execution.result;
|
|
13282
14354
|
if (result.kind === "error") this.notice(`/${name}: ${result.text}`, "error");
|
|
13283
|
-
else this.notice(result.text === void 0 ? `/${name} done` : `/${name}: ${result.text}`, "success");
|
|
14355
|
+
else if (result.sourceEventSeq === void 0 || result.sourceEventSeq !== this.drawnCompaction) this.notice(result.text === void 0 ? `/${name} done` : `/${name}: ${result.text}`, "success");
|
|
13284
14356
|
} catch (error) {
|
|
13285
|
-
this.
|
|
14357
|
+
if (this.stopped || this.bound !== bound) return;
|
|
14358
|
+
if (signal.aborted) this.notice(`/${name} cancelled`);
|
|
14359
|
+
else this.notice(`/${name} failed: ${describeFailure(error)}`, "error");
|
|
13286
14360
|
}
|
|
13287
14361
|
this.refreshFooter();
|
|
13288
14362
|
}
|
|
14363
|
+
/**
|
|
14364
|
+
* Run `/compact` through the shared registry under a `compacting` spinner
|
|
14365
|
+
* that `Esc` cancels. The summary it lands is drawn from the log as its own
|
|
14366
|
+
* block, which says what was compressed and what was preserved; a prompt
|
|
14367
|
+
* submitted meanwhile waits in the follow-ups list until it finishes.
|
|
14368
|
+
* @param line - the complete `/compact` line, arguments included.
|
|
14369
|
+
*/
|
|
14370
|
+
async compact(line) {
|
|
14371
|
+
if (this.compacting !== void 0) {
|
|
14372
|
+
this.notice("a compaction is already running · Esc cancels it", "error");
|
|
14373
|
+
return;
|
|
14374
|
+
}
|
|
14375
|
+
if (this.agent.status === "running") {
|
|
14376
|
+
this.notice("/compact runs between turns: let this turn finish, or stop it (Esc twice)", "error");
|
|
14377
|
+
return;
|
|
14378
|
+
}
|
|
14379
|
+
const controller = new AbortController();
|
|
14380
|
+
this.compacting = controller;
|
|
14381
|
+
this.setWorking(true);
|
|
14382
|
+
this.setLoaderActivity(COMPACTING_ACTIVITY);
|
|
14383
|
+
try {
|
|
14384
|
+
await this.runSharedCommand(line, "compact", controller.signal);
|
|
14385
|
+
} finally {
|
|
14386
|
+
this.settleCompaction(controller);
|
|
14387
|
+
}
|
|
14388
|
+
}
|
|
14389
|
+
/**
|
|
14390
|
+
* Take the `compacting` spinner down once the `/compact` that `controller`
|
|
14391
|
+
* belongs to settles, unless bind or quit already dropped it.
|
|
14392
|
+
* @param controller - the run's abort controller.
|
|
14393
|
+
*/
|
|
14394
|
+
settleCompaction(controller) {
|
|
14395
|
+
if (this.compacting !== controller) return;
|
|
14396
|
+
this.compacting = void 0;
|
|
14397
|
+
this.setWorking(this.agent.status === "running");
|
|
14398
|
+
this.setLoaderActivity("thinking");
|
|
14399
|
+
}
|
|
14400
|
+
/**
|
|
14401
|
+
* Detach and abort the dispatched `/compact`, if any: its late settle then
|
|
14402
|
+
* finds another run, or none, and prints nothing into the next session.
|
|
14403
|
+
*/
|
|
14404
|
+
dropCompaction() {
|
|
14405
|
+
const running = this.compacting;
|
|
14406
|
+
this.compacting = void 0;
|
|
14407
|
+
running?.abort();
|
|
14408
|
+
}
|
|
13289
14409
|
async chooseModel(argument) {
|
|
13290
14410
|
const { selection } = this.bound;
|
|
13291
14411
|
if (argument === "save") {
|
|
@@ -14253,6 +15373,8 @@ var TuiApp = class {
|
|
|
14253
15373
|
return;
|
|
14254
15374
|
}
|
|
14255
15375
|
this.pacer?.flush();
|
|
15376
|
+
const compaction = this.compactions.observe(event, this.turn);
|
|
15377
|
+
if (compaction !== void 0) this.showCompaction(compaction);
|
|
14256
15378
|
switch (event.type) {
|
|
14257
15379
|
case "turn/start":
|
|
14258
15380
|
this.turn = event.data.turn;
|
|
@@ -14298,8 +15420,11 @@ var TuiApp = class {
|
|
|
14298
15420
|
const block = this.toolBlocks.get(result.toolCallId);
|
|
14299
15421
|
if (block === void 0) break;
|
|
14300
15422
|
const isError = result.isError === true;
|
|
14301
|
-
const
|
|
14302
|
-
|
|
15423
|
+
const moved = isError ? movedJobId(result.content) : void 0;
|
|
15424
|
+
if (moved === void 0) {
|
|
15425
|
+
const body = toolResultBody(this.presentResult(block.name, this.toolArguments.get(result.toolCallId), result.content, isError, event.data.meta), result.content);
|
|
15426
|
+
block.setResult(body.lines, isError, body.code, body.diff);
|
|
15427
|
+
} else block.setBackground([`◇ moved to the background as ${moved} · /jobs lists it`]);
|
|
14303
15428
|
this.spinners.delete(block);
|
|
14304
15429
|
this.updateSpinTicker();
|
|
14305
15430
|
this.fadeBlock((fade) => {
|
|
@@ -14327,8 +15452,10 @@ var TuiApp = class {
|
|
|
14327
15452
|
case "permission/preset":
|
|
14328
15453
|
this.refreshFooter();
|
|
14329
15454
|
break;
|
|
14330
|
-
case "compaction/
|
|
14331
|
-
|
|
15455
|
+
case "compaction/start":
|
|
15456
|
+
if (event.data.turn === null) {
|
|
15457
|
+
if (this.compacting !== void 0) this.dispatchedCompaction = event.data.compactionId;
|
|
15458
|
+
} else if (!this.replaying) this.setLoaderActivity(COMPACTING_ACTIVITY);
|
|
14332
15459
|
break;
|
|
14333
15460
|
case "workspace/changes": {
|
|
14334
15461
|
const summary = this.deps.ctx.get("workspaceChanges")?.summary(session.id, event.seq);
|
|
@@ -14405,6 +15532,29 @@ var TuiApp = class {
|
|
|
14405
15532
|
this.chat.addChild(block);
|
|
14406
15533
|
}
|
|
14407
15534
|
/**
|
|
15535
|
+
* Draw one closed compaction: a landed summary as an accent context block
|
|
15536
|
+
* whose compressed and preserved account stays drawn above the folded
|
|
15537
|
+
* summary, and a failed `/compact` as a notice unless the command that
|
|
15538
|
+
* opened it reports the failure itself. A failed automatic attempt changes
|
|
15539
|
+
* nothing and the turn outlives it, so it draws nothing, as in the browser.
|
|
15540
|
+
* @param outcome - how the transaction closed.
|
|
15541
|
+
*/
|
|
15542
|
+
showCompaction(outcome) {
|
|
15543
|
+
if (outcome.kind === "failed") {
|
|
15544
|
+
if (outcome.manual && outcome.compactionId !== this.dispatchedCompaction) this.notice(compactionFailure(outcome), "error");
|
|
15545
|
+
return;
|
|
15546
|
+
}
|
|
15547
|
+
const { report } = outcome;
|
|
15548
|
+
const block = new ContextBlock(this.theme, compactionTitle(report), compactionParts(report), report.turn, {
|
|
15549
|
+
accent: true,
|
|
15550
|
+
pinnedParts: 2
|
|
15551
|
+
});
|
|
15552
|
+
block.setExpanded(this.toolsExpanded);
|
|
15553
|
+
this.chat.addChild(block);
|
|
15554
|
+
this.drawnCompaction = report.summarySeq;
|
|
15555
|
+
this.tui.requestRender();
|
|
15556
|
+
}
|
|
15557
|
+
/**
|
|
14408
15558
|
* Replace the spinner's activity word and redraw its live ↑↓ suffix.
|
|
14409
15559
|
* @param activity - `thinking`, `writing`, `calling` / `calling <name>`, or a retry notice.
|
|
14410
15560
|
*/
|
|
@@ -14519,10 +15669,19 @@ var TuiApp = class {
|
|
|
14519
15669
|
const rest = message.slice(activity.length);
|
|
14520
15670
|
return `${shimmer(palette, activity, this.deps.now())}${rest === "" ? "" : palette.dim(rest)}`;
|
|
14521
15671
|
}
|
|
14522
|
-
/**
|
|
15672
|
+
/**
|
|
15673
|
+
* Draw the spinner label plus the current call's ↑send ↓receive suffix,
|
|
15674
|
+
* and the key that moves a foreground call to the background while one runs.
|
|
15675
|
+
* While a dispatched `/compact` runs, the label reads `compacting context`
|
|
15676
|
+
* and names the key that cancels it.
|
|
15677
|
+
*/
|
|
14523
15678
|
refreshLoader() {
|
|
15679
|
+
const parts = [this.loaderActivity];
|
|
15680
|
+
if (this.compacting !== void 0) parts.push(COMPACTION_LOADER_DETAIL);
|
|
14524
15681
|
const suffix = formatLiveUsage(this.liveUsage);
|
|
14525
|
-
|
|
15682
|
+
if (suffix !== "") parts.push(suffix);
|
|
15683
|
+
if (this.backgrounder.running(this.agent).length > 0) parts.push(`· ${BACKGROUND_KEY_HINT}`);
|
|
15684
|
+
this.loader.setMessage(parts.join(" "));
|
|
14526
15685
|
}
|
|
14527
15686
|
/**
|
|
14528
15687
|
* Label the spinner for a tool-call delta before its card is paced.
|