@deepseek-harness-tui/dsh-tui 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -5
- package/assets/claude-girl/claude-girl-happy.png +0 -0
- package/assets/claude-girl/claude-girl.png +0 -0
- package/assets/codex-girl/codex-girl-happy.png +0 -0
- package/assets/codex-girl/codex-girl.png +0 -0
- package/bin/dsh-tui.js +104 -18
- package/cordis.patch.yml +2 -0
- package/cordis.yml +2 -0
- package/guide/dsh-tui-guide/SKILL.md +4 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +203 -0
- package/guide/dsh-tui-guide/claude-backend.md +161 -0
- package/guide/dsh-tui-guide/codex-backend.en.md +297 -0
- package/guide/dsh-tui-guide/codex-backend.md +257 -0
- package/guide/dsh-tui-guide/configuration.en.md +9 -2
- package/guide/dsh-tui-guide/configuration.md +9 -2
- package/guide/dsh-tui-guide/interaction.en.md +169 -27
- package/guide/dsh-tui-guide/interaction.md +115 -17
- package/guide/dsh-tui-guide/themes.en.md +24 -2
- package/guide/dsh-tui-guide/themes.md +21 -2
- package/guide/dsh-tui-guide/user-guide.en.md +38 -23
- package/guide/dsh-tui-guide/user-guide.md +22 -11
- package/guide/dsh-tui-guide/vscode.en.md +1 -0
- package/guide/dsh-tui-guide/vscode.md +1 -0
- package/lib/settings.json +139 -6
- package/lib/types/adapter/channel/state.d.ts.map +1 -1
- package/lib/types/adapter/channel/state.js +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +17 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +29 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +45 -5
- package/lib/types/adapter/ports/channel-catalog.d.ts +7 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-display.d.ts +7 -1
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +5 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +183 -6
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +477 -13
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/agent/backend.d.ts +168 -0
- package/lib/types/agent/backend.d.ts.map +1 -0
- package/lib/types/agent/backend.js +1 -0
- package/lib/types/agent/capabilities.d.ts +461 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -0
- package/lib/types/agent/capabilities.js +1 -0
- package/lib/types/agent/events.d.ts +733 -0
- package/lib/types/agent/events.d.ts.map +1 -0
- package/lib/types/agent/events.js +2 -0
- package/lib/types/agent/index.d.ts +8 -0
- package/lib/types/agent/index.d.ts.map +1 -0
- package/lib/types/agent/index.js +7 -0
- package/lib/types/agent/messages.d.ts +52 -0
- package/lib/types/agent/messages.d.ts.map +1 -0
- package/lib/types/agent/messages.js +91 -0
- package/lib/types/agent/presentation.d.ts +29 -0
- package/lib/types/agent/presentation.d.ts.map +1 -0
- package/lib/types/agent/presentation.js +4 -0
- package/lib/types/agent/refs.d.ts +30 -0
- package/lib/types/agent/refs.d.ts.map +1 -0
- package/lib/types/agent/refs.js +39 -0
- package/lib/types/agent/session.d.ts +78 -0
- package/lib/types/agent/session.d.ts.map +1 -0
- package/lib/types/agent/session.js +1 -0
- package/lib/types/backends/claude/activity.d.ts +53 -0
- package/lib/types/backends/claude/activity.d.ts.map +1 -0
- package/lib/types/backends/claude/activity.js +103 -0
- package/lib/types/backends/claude/auth.d.ts +245 -0
- package/lib/types/backends/claude/auth.d.ts.map +1 -0
- package/lib/types/backends/claude/auth.js +503 -0
- package/lib/types/backends/claude/backend.d.ts +32 -0
- package/lib/types/backends/claude/backend.d.ts.map +1 -0
- package/lib/types/backends/claude/backend.js +296 -0
- package/lib/types/backends/claude/catalog.d.ts +17 -0
- package/lib/types/backends/claude/catalog.d.ts.map +1 -0
- package/lib/types/backends/claude/catalog.js +94 -0
- package/lib/types/backends/claude/channels.d.ts +63 -0
- package/lib/types/backends/claude/channels.d.ts.map +1 -0
- package/lib/types/backends/claude/channels.js +275 -0
- package/lib/types/backends/claude/contract.d.ts +37 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -0
- package/lib/types/backends/claude/contract.js +46 -0
- package/lib/types/backends/claude/controls.d.ts +134 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -0
- package/lib/types/backends/claude/controls.js +425 -0
- package/lib/types/backends/claude/dialogs.d.ts +62 -0
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -0
- package/lib/types/backends/claude/dialogs.js +253 -0
- package/lib/types/backends/claude/flag-settings.d.ts +12 -0
- package/lib/types/backends/claude/flag-settings.d.ts.map +1 -0
- package/lib/types/backends/claude/flag-settings.js +49 -0
- package/lib/types/backends/claude/images.d.ts +49 -0
- package/lib/types/backends/claude/images.d.ts.map +1 -0
- package/lib/types/backends/claude/images.js +94 -0
- package/lib/types/backends/claude/index.d.ts +5 -0
- package/lib/types/backends/claude/index.d.ts.map +1 -0
- package/lib/types/backends/claude/index.js +4 -0
- package/lib/types/backends/claude/install.d.ts +15 -0
- package/lib/types/backends/claude/install.d.ts.map +1 -0
- package/lib/types/backends/claude/install.js +91 -0
- package/lib/types/backends/claude/modelEnv.d.ts +64 -0
- package/lib/types/backends/claude/modelEnv.d.ts.map +1 -0
- package/lib/types/backends/claude/modelEnv.js +199 -0
- package/lib/types/backends/claude/narrow.d.ts +10 -0
- package/lib/types/backends/claude/narrow.d.ts.map +1 -0
- package/lib/types/backends/claude/narrow.js +8 -0
- package/lib/types/backends/claude/older-history.d.ts +16 -0
- package/lib/types/backends/claude/older-history.d.ts.map +1 -0
- package/lib/types/backends/claude/older-history.js +101 -0
- package/lib/types/backends/claude/options.d.ts +181 -0
- package/lib/types/backends/claude/options.d.ts.map +1 -0
- package/lib/types/backends/claude/options.js +208 -0
- package/lib/types/backends/claude/permissions.d.ts +83 -0
- package/lib/types/backends/claude/permissions.d.ts.map +1 -0
- package/lib/types/backends/claude/permissions.js +331 -0
- package/lib/types/backends/claude/prefs.d.ts +55 -0
- package/lib/types/backends/claude/prefs.d.ts.map +1 -0
- package/lib/types/backends/claude/prefs.js +150 -0
- package/lib/types/backends/claude/process.d.ts +19 -0
- package/lib/types/backends/claude/process.d.ts.map +1 -0
- package/lib/types/backends/claude/process.js +156 -0
- package/lib/types/backends/claude/replay.d.ts +129 -0
- package/lib/types/backends/claude/replay.d.ts.map +1 -0
- package/lib/types/backends/claude/replay.js +505 -0
- package/lib/types/backends/claude/sdk-warnings.d.ts +23 -0
- package/lib/types/backends/claude/sdk-warnings.d.ts.map +1 -0
- package/lib/types/backends/claude/sdk-warnings.js +55 -0
- package/lib/types/backends/claude/sdk.d.ts +12 -0
- package/lib/types/backends/claude/sdk.d.ts.map +1 -0
- package/lib/types/backends/claude/sdk.js +34 -0
- package/lib/types/backends/claude/send-message.d.ts +54 -0
- package/lib/types/backends/claude/send-message.d.ts.map +1 -0
- package/lib/types/backends/claude/send-message.js +65 -0
- package/lib/types/backends/claude/session/auth.d.ts +47 -0
- package/lib/types/backends/claude/session/auth.d.ts.map +1 -0
- package/lib/types/backends/claude/session/auth.js +226 -0
- package/lib/types/backends/claude/session/channels.d.ts +82 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -0
- package/lib/types/backends/claude/session/channels.js +45 -0
- package/lib/types/backends/claude/session/input.d.ts +16 -0
- package/lib/types/backends/claude/session/input.d.ts.map +1 -0
- package/lib/types/backends/claude/session/input.js +64 -0
- package/lib/types/backends/claude/session/lifecycle.d.ts +6 -0
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -0
- package/lib/types/backends/claude/session/lifecycle.js +852 -0
- package/lib/types/backends/claude/session/store.d.ts +17 -0
- package/lib/types/backends/claude/session/store.d.ts.map +1 -0
- package/lib/types/backends/claude/session/store.js +122 -0
- package/lib/types/backends/claude/session/subagents.d.ts +13 -0
- package/lib/types/backends/claude/session/subagents.d.ts.map +1 -0
- package/lib/types/backends/claude/session/subagents.js +77 -0
- package/lib/types/backends/claude/session/types.d.ts +89 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -0
- package/lib/types/backends/claude/session/types.js +1 -0
- package/lib/types/backends/claude/session.d.ts +4 -0
- package/lib/types/backends/claude/session.d.ts.map +1 -0
- package/lib/types/backends/claude/session.js +2 -0
- package/lib/types/backends/claude/side-query.d.ts +34 -0
- package/lib/types/backends/claude/side-query.d.ts.map +1 -0
- package/lib/types/backends/claude/side-query.js +116 -0
- package/lib/types/backends/claude/task-output.d.ts +13 -0
- package/lib/types/backends/claude/task-output.d.ts.map +1 -0
- package/lib/types/backends/claude/task-output.js +101 -0
- package/lib/types/backends/claude/tools.d.ts +45 -0
- package/lib/types/backends/claude/tools.d.ts.map +1 -0
- package/lib/types/backends/claude/tools.js +231 -0
- package/lib/types/backends/claude/transcript-file.d.ts +41 -0
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -0
- package/lib/types/backends/claude/transcript-file.js +195 -0
- package/lib/types/backends/claude/translate/attempts.d.ts +33 -0
- package/lib/types/backends/claude/translate/attempts.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/attempts.js +243 -0
- package/lib/types/backends/claude/translate/content.d.ts +33 -0
- package/lib/types/backends/claude/translate/content.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/content.js +91 -0
- package/lib/types/backends/claude/translate/core.d.ts +76 -0
- package/lib/types/backends/claude/translate/core.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/core.js +447 -0
- package/lib/types/backends/claude/translate/events.d.ts +9 -0
- package/lib/types/backends/claude/translate/events.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/events.js +77 -0
- package/lib/types/backends/claude/translate/lanes.d.ts +31 -0
- package/lib/types/backends/claude/translate/lanes.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/lanes.js +177 -0
- package/lib/types/backends/claude/translate/messages.d.ts +36 -0
- package/lib/types/backends/claude/translate/messages.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/messages.js +202 -0
- package/lib/types/backends/claude/translate/system.d.ts +40 -0
- package/lib/types/backends/claude/translate/system.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/system.js +399 -0
- package/lib/types/backends/claude/translate/tasks.d.ts +19 -0
- package/lib/types/backends/claude/translate/tasks.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/tasks.js +159 -0
- package/lib/types/backends/claude/translate/types.d.ts +114 -0
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/types.js +1 -0
- package/lib/types/backends/claude/translate.d.ts +9 -0
- package/lib/types/backends/claude/translate.d.ts.map +1 -0
- package/lib/types/backends/claude/translate.js +6 -0
- package/lib/types/backends/codex/auth/external-tokens.d.ts +66 -0
- package/lib/types/backends/codex/auth/external-tokens.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/external-tokens.js +325 -0
- package/lib/types/backends/codex/auth/route.d.ts +14 -0
- package/lib/types/backends/codex/auth/route.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/route.js +52 -0
- package/lib/types/backends/codex/auth/status.d.ts +16 -0
- package/lib/types/backends/codex/auth/status.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/status.js +115 -0
- package/lib/types/backends/codex/backend.d.ts +58 -0
- package/lib/types/backends/codex/backend.d.ts.map +1 -0
- package/lib/types/backends/codex/backend.js +201 -0
- package/lib/types/backends/codex/catalog.d.ts +17 -0
- package/lib/types/backends/codex/catalog.d.ts.map +1 -0
- package/lib/types/backends/codex/catalog.js +128 -0
- package/lib/types/backends/codex/channels.d.ts +59 -0
- package/lib/types/backends/codex/channels.d.ts.map +1 -0
- package/lib/types/backends/codex/channels.js +274 -0
- package/lib/types/backends/codex/contract.d.ts +46 -0
- package/lib/types/backends/codex/contract.d.ts.map +1 -0
- package/lib/types/backends/codex/contract.js +80 -0
- package/lib/types/backends/codex/detect.d.ts +14 -0
- package/lib/types/backends/codex/detect.d.ts.map +1 -0
- package/lib/types/backends/codex/detect.js +90 -0
- package/lib/types/backends/codex/index.d.ts +6 -0
- package/lib/types/backends/codex/index.d.ts.map +1 -0
- package/lib/types/backends/codex/index.js +5 -0
- package/lib/types/backends/codex/modes.d.ts +16 -0
- package/lib/types/backends/codex/modes.d.ts.map +1 -0
- package/lib/types/backends/codex/modes.js +49 -0
- package/lib/types/backends/codex/narrow.d.ts +20 -0
- package/lib/types/backends/codex/narrow.d.ts.map +1 -0
- package/lib/types/backends/codex/narrow.js +18 -0
- package/lib/types/backends/codex/prefs.d.ts +42 -0
- package/lib/types/backends/codex/prefs.d.ts.map +1 -0
- package/lib/types/backends/codex/prefs.js +124 -0
- package/lib/types/backends/codex/protocol/index.d.ts +149 -0
- package/lib/types/backends/codex/protocol/index.d.ts.map +1 -0
- package/lib/types/backends/codex/protocol/index.js +130 -0
- package/lib/types/backends/codex/rpc/binary.d.ts +35 -0
- package/lib/types/backends/codex/rpc/binary.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/binary.js +174 -0
- package/lib/types/backends/codex/rpc/client.d.ts +72 -0
- package/lib/types/backends/codex/rpc/client.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/client.js +214 -0
- package/lib/types/backends/codex/rpc/hub.d.ts +105 -0
- package/lib/types/backends/codex/rpc/hub.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/hub.js +532 -0
- package/lib/types/backends/codex/rpc/transport.d.ts +39 -0
- package/lib/types/backends/codex/rpc/transport.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/transport.js +212 -0
- package/lib/types/backends/codex/session/activity.d.ts +18 -0
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -0
- package/lib/types/backends/codex/session/activity.js +108 -0
- package/lib/types/backends/codex/session/approvals.d.ts +39 -0
- package/lib/types/backends/codex/session/approvals.d.ts.map +1 -0
- package/lib/types/backends/codex/session/approvals.js +477 -0
- package/lib/types/backends/codex/session/commands.d.ts +37 -0
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -0
- package/lib/types/backends/codex/session/commands.js +141 -0
- package/lib/types/backends/codex/session/controls.d.ts +37 -0
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -0
- package/lib/types/backends/codex/session/controls.js +303 -0
- package/lib/types/backends/codex/session/goals.d.ts +25 -0
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -0
- package/lib/types/backends/codex/session/goals.js +97 -0
- package/lib/types/backends/codex/session/history.d.ts +52 -0
- package/lib/types/backends/codex/session/history.d.ts.map +1 -0
- package/lib/types/backends/codex/session/history.js +196 -0
- package/lib/types/backends/codex/session/images.d.ts +17 -0
- package/lib/types/backends/codex/session/images.d.ts.map +1 -0
- package/lib/types/backends/codex/session/images.js +138 -0
- package/lib/types/backends/codex/session/input.d.ts +75 -0
- package/lib/types/backends/codex/session/input.d.ts.map +1 -0
- package/lib/types/backends/codex/session/input.js +294 -0
- package/lib/types/backends/codex/session/plan-review.d.ts +19 -0
- package/lib/types/backends/codex/session/plan-review.d.ts.map +1 -0
- package/lib/types/backends/codex/session/plan-review.js +48 -0
- package/lib/types/backends/codex/session/prompts.d.ts +7 -0
- package/lib/types/backends/codex/session/prompts.d.ts.map +1 -0
- package/lib/types/backends/codex/session/prompts.js +47 -0
- package/lib/types/backends/codex/session/session.d.ts +12 -0
- package/lib/types/backends/codex/session/session.d.ts.map +1 -0
- package/lib/types/backends/codex/session/session.js +871 -0
- package/lib/types/backends/codex/session/side-query.d.ts +25 -0
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -0
- package/lib/types/backends/codex/session/side-query.js +121 -0
- package/lib/types/backends/codex/session/state.d.ts +57 -0
- package/lib/types/backends/codex/session/state.d.ts.map +1 -0
- package/lib/types/backends/codex/session/state.js +1 -0
- package/lib/types/backends/codex/session/subagents.d.ts +28 -0
- package/lib/types/backends/codex/session/subagents.d.ts.map +1 -0
- package/lib/types/backends/codex/session/subagents.js +286 -0
- package/lib/types/backends/codex/session/tasks.d.ts +25 -0
- package/lib/types/backends/codex/session/tasks.d.ts.map +1 -0
- package/lib/types/backends/codex/session/tasks.js +207 -0
- package/lib/types/backends/codex/session/tool-output.d.ts +9 -0
- package/lib/types/backends/codex/session/tool-output.d.ts.map +1 -0
- package/lib/types/backends/codex/session/tool-output.js +29 -0
- package/lib/types/backends/codex/translate/commands.d.ts +30 -0
- package/lib/types/backends/codex/translate/commands.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/commands.js +103 -0
- package/lib/types/backends/codex/translate/events.d.ts +9 -0
- package/lib/types/backends/codex/translate/events.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/events.js +71 -0
- package/lib/types/backends/codex/translate/items.d.ts +112 -0
- package/lib/types/backends/codex/translate/items.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/items.js +375 -0
- package/lib/types/backends/codex/translate/live.d.ts +39 -0
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/live.js +315 -0
- package/lib/types/backends/codex/translate/notices.d.ts +27 -0
- package/lib/types/backends/codex/translate/notices.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/notices.js +99 -0
- package/lib/types/backends/codex/translate/presentation.d.ts +49 -0
- package/lib/types/backends/codex/translate/presentation.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/presentation.js +237 -0
- package/lib/types/backends/codex/translate/replay.d.ts +18 -0
- package/lib/types/backends/codex/translate/replay.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/replay.js +33 -0
- package/lib/types/backends/codex/translate/usage.d.ts +29 -0
- package/lib/types/backends/codex/translate/usage.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/usage.js +65 -0
- package/lib/types/backends/shared/atomic-file.d.ts +4 -0
- package/lib/types/backends/shared/atomic-file.d.ts.map +1 -0
- package/lib/types/backends/shared/atomic-file.js +52 -0
- package/lib/types/backends/shared/channel-tokens.d.ts +29 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-tokens.js +161 -0
- package/lib/types/backends/shared/display-path.d.ts +3 -0
- package/lib/types/backends/shared/display-path.d.ts.map +1 -0
- package/lib/types/backends/shared/display-path.js +12 -0
- package/lib/types/branding.d.ts +92 -0
- package/lib/types/branding.d.ts.map +1 -0
- package/lib/types/branding.js +117 -0
- package/lib/types/channel/activity.d.ts +53 -0
- package/lib/types/channel/activity.d.ts.map +1 -0
- package/lib/types/channel/activity.js +955 -0
- package/lib/types/channel/capabilities.d.ts +24 -0
- package/lib/types/channel/capabilities.d.ts.map +1 -0
- package/lib/types/channel/capabilities.js +57 -0
- package/lib/types/channel/channel-slug.d.ts +9 -0
- package/lib/types/channel/channel-slug.d.ts.map +1 -0
- package/lib/types/channel/channel-slug.js +15 -0
- package/lib/types/channel/channel-wizard.d.ts +30 -0
- package/lib/types/channel/channel-wizard.d.ts.map +1 -0
- package/lib/types/channel/channel-wizard.js +226 -0
- package/lib/types/channel/elicitation.d.ts +135 -0
- package/lib/types/channel/elicitation.d.ts.map +1 -0
- package/lib/types/channel/elicitation.js +360 -0
- package/lib/types/channel/goal-command.d.ts +49 -0
- package/lib/types/channel/goal-command.d.ts.map +1 -0
- package/lib/types/channel/goal-command.js +72 -0
- package/lib/types/channel/history-restore.d.ts +16 -0
- package/lib/types/channel/history-restore.d.ts.map +1 -0
- package/lib/types/channel/history-restore.js +214 -0
- package/lib/types/channel/interaction.d.ts +38 -0
- package/lib/types/channel/interaction.d.ts.map +1 -0
- package/lib/types/channel/interaction.js +110 -0
- package/lib/types/channel/job-format.d.ts +6 -0
- package/lib/types/channel/job-format.d.ts.map +1 -0
- package/lib/types/channel/job-format.js +12 -0
- package/lib/types/channel/live-output.d.ts +35 -0
- package/lib/types/channel/live-output.d.ts.map +1 -0
- package/lib/types/channel/live-output.js +74 -0
- package/lib/types/channel/model-capabilities.d.ts +10 -0
- package/lib/types/channel/model-capabilities.d.ts.map +1 -0
- package/lib/types/channel/model-capabilities.js +51 -0
- package/lib/types/channel/permissions.d.ts +155 -0
- package/lib/types/channel/permissions.d.ts.map +1 -0
- package/lib/types/channel/permissions.js +188 -0
- package/lib/types/channel/projection.d.ts +110 -0
- package/lib/types/channel/projection.d.ts.map +1 -0
- package/lib/types/channel/projection.js +1521 -0
- package/lib/types/channel/question-record.d.ts +76 -0
- package/lib/types/channel/question-record.d.ts.map +1 -0
- package/lib/types/channel/question-record.js +109 -0
- package/lib/types/channel/questions.d.ts +204 -0
- package/lib/types/channel/questions.d.ts.map +1 -0
- package/lib/types/channel/questions.js +286 -0
- package/lib/types/channel/sanitize.d.ts +49 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -0
- package/lib/types/channel/sanitize.js +88 -0
- package/lib/types/channel/selection-record.d.ts +18 -0
- package/lib/types/channel/selection-record.d.ts.map +1 -0
- package/lib/types/channel/selection-record.js +45 -0
- package/lib/types/channel/side-prompts.d.ts +59 -0
- package/lib/types/channel/side-prompts.d.ts.map +1 -0
- package/lib/types/channel/side-prompts.js +127 -0
- package/lib/types/channel/transcript.d.ts +17 -0
- package/lib/types/channel/transcript.d.ts.map +1 -0
- package/lib/types/channel/transcript.js +19 -0
- package/lib/types/channel/usage.d.ts +48 -0
- package/lib/types/channel/usage.d.ts.map +1 -0
- package/lib/types/channel/usage.js +143 -0
- package/lib/types/commands.d.ts +147 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +196 -2
- package/lib/types/components/AgentMessageComposer.d.ts +50 -0
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -0
- package/lib/types/components/AgentMessageComposer.js +159 -0
- package/lib/types/components/BtwPanel.d.ts +13 -12
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +35 -24
- package/lib/types/components/ChannelPicker.d.ts +40 -0
- package/lib/types/components/ChannelPicker.d.ts.map +1 -0
- package/lib/types/components/ChannelPicker.js +26 -0
- package/lib/types/components/Chat/JobCard.d.ts +29 -31
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +31 -112
- package/lib/types/components/Chat/SubagentMessage.d.ts +4 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -1
- package/lib/types/components/Chat/SubagentMessage.js +10 -3
- package/lib/types/components/ClaudeGirl.d.ts +27 -0
- package/lib/types/components/ClaudeGirl.d.ts.map +1 -0
- package/lib/types/components/ClaudeGirl.js +30 -0
- package/lib/types/components/CodeBlockFrame.d.ts +19 -0
- package/lib/types/components/CodeBlockFrame.d.ts.map +1 -0
- package/lib/types/components/CodeBlockFrame.js +138 -0
- package/lib/types/components/CommandSuggestions.d.ts +10 -1
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +20 -3
- package/lib/types/components/ContextBarView.d.ts +2 -2
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +18 -8
- package/lib/types/components/EffortChargeGlyph.d.ts +1 -1
- package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -1
- package/lib/types/components/EffortChargeGlyph.js +3 -4
- package/lib/types/components/EffortInputBorder.d.ts +1 -2
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -1
- package/lib/types/components/EffortInputBorder.js +7 -4
- package/lib/types/components/EffortSlider.d.ts +5 -1
- package/lib/types/components/EffortSlider.d.ts.map +1 -1
- package/lib/types/components/EffortSlider.js +2 -2
- package/lib/types/components/EffortTierBadge.d.ts +1 -2
- package/lib/types/components/EffortTierBadge.d.ts.map +1 -1
- package/lib/types/components/EffortTierBadge.js +8 -5
- package/lib/types/components/GoalTodoPanel.d.ts +2 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +11 -5
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/JobsPanel.d.ts +8 -9
- package/lib/types/components/JobsPanel.d.ts.map +1 -1
- package/lib/types/components/JobsPanel.js +72 -13
- package/lib/types/components/KernelPicker.d.ts +28 -0
- package/lib/types/components/KernelPicker.d.ts.map +1 -0
- package/lib/types/components/KernelPicker.js +37 -0
- package/lib/types/components/LogoV2.d.ts +7 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +120 -24
- package/lib/types/components/Markdown.d.ts +2 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +37 -8
- package/lib/types/components/MathBlock.d.ts.map +1 -1
- package/lib/types/components/MathBlock.js +3 -1
- package/lib/types/components/MermaidDiagram.d.ts.map +1 -1
- package/lib/types/components/MermaidDiagram.js +7 -5
- package/lib/types/components/MessageList.d.ts +21 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +62 -42
- package/lib/types/components/ModePicker.d.ts +20 -0
- package/lib/types/components/ModePicker.d.ts.map +1 -0
- package/lib/types/components/ModePicker.js +17 -0
- package/lib/types/components/PromptInput.d.ts +2 -2
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +308 -55
- package/lib/types/components/SdkInstallWizard.d.ts +44 -0
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -0
- package/lib/types/components/SdkInstallWizard.js +18 -0
- package/lib/types/components/SearchBox.d.ts +7 -8
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +18 -9
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +113 -6
- package/lib/types/components/StarPrompt.d.ts.map +1 -1
- package/lib/types/components/StarPrompt.js +5 -3
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +6 -4
- package/lib/types/components/SubagentCard.d.ts +2 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +25 -18
- package/lib/types/components/SubagentDashboard.d.ts +10 -6
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +32 -21
- package/lib/types/components/SubagentDetailScene.d.ts +16 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +196 -45
- package/lib/types/components/SyntaxText.d.ts.map +1 -1
- package/lib/types/components/SyntaxText.js +4 -1
- package/lib/types/components/TurnInterruptedRow.d.ts +3 -1
- package/lib/types/components/TurnInterruptedRow.d.ts.map +1 -1
- package/lib/types/components/TurnInterruptedRow.js +6 -3
- package/lib/types/components/TurnUsageRow.d.ts +24 -0
- package/lib/types/components/TurnUsageRow.d.ts.map +1 -0
- package/lib/types/components/TurnUsageRow.js +46 -0
- package/lib/types/components/WorkingSpinner.d.ts +2 -1
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
- package/lib/types/components/WorkingSpinner.js +21 -4
- package/lib/types/components/approvals/ApprovalPanel.d.ts +36 -13
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +173 -25
- package/lib/types/components/claudeGirlSprite.d.ts +18 -0
- package/lib/types/components/claudeGirlSprite.d.ts.map +1 -0
- package/lib/types/components/claudeGirlSprite.js +48 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +46 -13
- package/lib/types/components/design-system/ThemedText.d.ts +3 -1
- package/lib/types/components/design-system/ThemedText.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemedText.js +2 -2
- package/lib/types/components/diffPatch.d.ts +55 -0
- package/lib/types/components/diffPatch.d.ts.map +1 -0
- package/lib/types/components/diffPatch.js +142 -0
- package/lib/types/components/kernelCatalog.d.ts +48 -0
- package/lib/types/components/kernelCatalog.d.ts.map +1 -0
- package/lib/types/components/kernelCatalog.js +53 -0
- package/lib/types/components/launchpadActions.d.ts +13 -6
- package/lib/types/components/launchpadActions.d.ts.map +1 -1
- package/lib/types/components/launchpadActions.js +26 -4
- package/lib/types/components/launchpadParams.d.ts +101 -0
- package/lib/types/components/launchpadParams.d.ts.map +1 -0
- package/lib/types/components/launchpadParams.js +171 -0
- package/lib/types/components/maidPortrait.d.ts +37 -5
- package/lib/types/components/maidPortrait.d.ts.map +1 -1
- package/lib/types/components/maidPortrait.js +73 -54
- package/lib/types/components/messages/AgentMessageFlow.d.ts +20 -0
- package/lib/types/components/messages/AgentMessageFlow.d.ts.map +1 -0
- package/lib/types/components/messages/AgentMessageFlow.js +37 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +6 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +29 -5
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +11 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +289 -36
- package/lib/types/components/messages/TranscriptLeaves.d.ts +85 -0
- package/lib/types/components/messages/TranscriptLeaves.d.ts.map +1 -0
- package/lib/types/components/messages/TranscriptLeaves.js +74 -0
- package/lib/types/components/messages/agentTeam.d.ts +69 -0
- package/lib/types/components/messages/agentTeam.d.ts.map +1 -0
- package/lib/types/components/messages/agentTeam.js +53 -0
- package/lib/types/components/messages/liveOutputLines.d.ts +33 -0
- package/lib/types/components/messages/liveOutputLines.d.ts.map +1 -0
- package/lib/types/components/messages/liveOutputLines.js +100 -0
- package/lib/types/components/messages/subagentTranscript.d.ts +146 -0
- package/lib/types/components/messages/subagentTranscript.d.ts.map +1 -0
- package/lib/types/components/messages/subagentTranscript.js +304 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +16 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +76 -6
- package/lib/types/components/questions/PlanReviewPanel.d.ts +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +11 -6
- package/lib/types/components/questions/ProviderModelEditor.d.ts +12 -0
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -0
- package/lib/types/components/questions/ProviderModelEditor.js +266 -0
- package/lib/types/components/shimmer.d.ts +26 -0
- package/lib/types/components/shimmer.d.ts.map +1 -1
- package/lib/types/components/shimmer.js +26 -0
- package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/InfoPanel.js +13 -8
- package/lib/types/components/sidePanel/PanelBar.d.ts +0 -24
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelBar.js +55 -77
- package/lib/types/components/sidePanel/PanelStore.d.ts +3 -1
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelStore.js +8 -4
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +3 -10
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +9 -12
- package/lib/types/components/sidePanel/TrajectoryPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/TrajectoryPanel.js +78 -14
- package/lib/types/components/sidePanel/agentViewStore.d.ts +20 -0
- package/lib/types/components/sidePanel/agentViewStore.d.ts.map +1 -0
- package/lib/types/components/sidePanel/agentViewStore.js +26 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +50 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.js +45 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts +13 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +147 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +14 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +131 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +30 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +87 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts +111 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/threads.js +302 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +70 -30
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts +4 -46
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +19 -55
- package/lib/types/components/sidePanel/companion/mood.d.ts +32 -0
- package/lib/types/components/sidePanel/companion/mood.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/mood.js +44 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts +34 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/skins.js +203 -29
- package/lib/types/components/splashFonts.d.ts +17 -9
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +119 -15
- package/lib/types/components/splashLayout.d.ts.map +1 -1
- package/lib/types/components/splashLayout.js +3 -1
- package/lib/types/components/subagentDetailMemory.d.ts +17 -0
- package/lib/types/components/subagentDetailMemory.d.ts.map +1 -0
- package/lib/types/components/subagentDetailMemory.js +28 -0
- package/lib/types/components/trajectory/Inspector.d.ts.map +1 -1
- package/lib/types/components/trajectory/Inspector.js +9 -0
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -1
- package/lib/types/components/trajectory/Ledger.js +7 -1
- package/lib/types/components/trajectory/scope.d.ts +64 -0
- package/lib/types/components/trajectory/scope.d.ts.map +1 -0
- package/lib/types/components/trajectory/scope.js +88 -0
- package/lib/types/components/trajectory/useTrajectoryScope.d.ts +42 -0
- package/lib/types/components/trajectory/useTrajectoryScope.d.ts.map +1 -0
- package/lib/types/components/trajectory/useTrajectoryScope.js +86 -0
- package/lib/types/customTheme.d.ts +4 -6
- package/lib/types/customTheme.d.ts.map +1 -1
- package/lib/types/customTheme.js +6 -8
- package/lib/types/dsh-adapter/approvals.d.ts +18 -5
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +17 -4
- package/lib/types/dsh-adapter/backend/session.d.ts +64 -0
- package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend/session.js +291 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts +58 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend/translate.js +467 -0
- package/lib/types/dsh-adapter/backends.d.ts +49 -0
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.js +124 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +16 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +109 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +7 -5
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +19 -9
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +58 -135
- package/lib/types/dsh-adapter/channel/binding.d.ts +61 -14
- package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding.js +102 -35
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +33 -4
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +3 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +4 -3
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +39 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/actions.js +152 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +145 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +289 -0
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +217 -0
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/compose.js +938 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts +57 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/files.js +45 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +55 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/host.js +116 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.js +117 -0
- package/lib/types/dsh-adapter/channel/core/local-images.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/core/local-images.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/local-images.js +147 -0
- package/lib/types/dsh-adapter/channel/core/reports.d.ts +12 -0
- package/lib/types/dsh-adapter/channel/core/reports.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/reports.js +77 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.d.ts +39 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.js +219 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +174 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.js +390 -0
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/sessions.js +268 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/decisions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/decisions.js +4 -4
- package/lib/types/dsh-adapter/channel/emitter.d.ts +15 -2
- package/lib/types/dsh-adapter/channel/emitter.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/emitter.js +5 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts +36 -0
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/extensions.js +714 -0
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts +1 -10
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/ide-selection.js +4 -46
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +27 -4
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-actions.js +240 -21
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +21 -5
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +65 -27
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +10 -32
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +10 -78
- package/lib/types/dsh-adapter/channel/local-fs.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/local-fs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/local-fs.js +46 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +38 -5
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +9 -6
- package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/preferences.js +16 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts +16 -13
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +38 -1143
- package/lib/types/dsh-adapter/channel/question-record.d.ts +3 -75
- package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/question-record.js +3 -107
- package/lib/types/dsh-adapter/channel/session-activity.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/session-activity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-activity.js +42 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.js +3 -1
- package/lib/types/dsh-adapter/channel/session-fork.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +2 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +7 -3
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -9
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +4 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +5 -10
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +74 -113
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +7 -6
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +8 -7
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/skill-catalog.js +2 -2
- package/lib/types/dsh-adapter/channel/state.d.ts +72 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +7 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +58 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +153 -9
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts +114 -0
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/subagent-transcript.js +279 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +7 -15
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +17 -21
- package/lib/types/dsh-adapter/channel/types.d.ts +16 -7
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.d.ts +3 -23
- package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.js +5 -111
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +2 -1
- package/lib/types/dsh-adapter/channel.d.ts +17 -8
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +24 -1059
- package/lib/types/dsh-adapter/context-occupancy.d.ts +6 -1
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -1
- package/lib/types/dsh-adapter/context-occupancy.js +6 -1
- package/lib/types/dsh-adapter/decision-guard.d.ts +24 -0
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/decision-guard.js +44 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +4 -1
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extension-events.js +22 -10
- package/lib/types/dsh-adapter/index.d.ts +41 -3
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +28 -1
- package/lib/types/dsh-adapter/jobs.d.ts +5 -3
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +53 -14
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -16
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +3 -29
- package/lib/types/dsh-adapter/oauth-credential-source.d.ts +34 -0
- package/lib/types/dsh-adapter/oauth-credential-source.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth-credential-source.js +66 -0
- package/lib/types/dsh-adapter/plugin.d.ts +38 -2
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +546 -110
- package/lib/types/dsh-adapter/provider-model-capabilities.d.ts +10 -0
- package/lib/types/dsh-adapter/provider-model-capabilities.d.ts.map +1 -0
- package/lib/types/dsh-adapter/provider-model-capabilities.js +80 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +8 -2
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +118 -52
- package/lib/types/dsh-adapter/questions.d.ts +29 -124
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +33 -267
- package/lib/types/dsh-adapter/recap.d.ts +3 -15
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -1
- package/lib/types/dsh-adapter/recap.js +3 -46
- package/lib/types/dsh-adapter/sanitize.d.ts +4 -44
- package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sanitize.js +4 -84
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +3 -1
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -1
- package/lib/types/dsh-adapter/session-mount-heartbeat.js +4 -2
- package/lib/types/dsh-adapter/sessions/digest.d.ts +18 -3
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +60 -27
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +6 -4
- package/lib/types/dsh-adapter/sessions/recovery.d.ts +2 -2
- package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/recovery.js +23 -14
- package/lib/types/dsh-adapter/sessions/store.d.ts +2 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +1 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts +2 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +3 -13
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +7 -0
- package/lib/types/dsh-adapter/themes.d.ts +1 -1
- package/lib/types/dsh-adapter/themes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/agent-source.d.ts +84 -0
- package/lib/types/dsh-adapter/trajectory/agent-source.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/agent-source.js +601 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +31 -1
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.js +28 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts +3 -1
- package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/index.js +1 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +7 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/inspect.js +70 -2
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +4 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.js +36 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts +13 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
- package/lib/types/effortPrefs.d.ts +7 -0
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +11 -2
- package/lib/types/handoffAck.d.ts +57 -0
- package/lib/types/handoffAck.d.ts.map +1 -0
- package/lib/types/handoffAck.js +154 -0
- package/lib/types/handoffEvents.d.ts +52 -0
- package/lib/types/handoffEvents.d.ts.map +1 -0
- package/lib/types/handoffEvents.js +128 -0
- package/lib/types/i18n.d.ts +3189 -68
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +855 -9
- package/lib/types/ink/colorize.d.ts.map +1 -1
- package/lib/types/ink/colorize.js +8 -2
- package/lib/types/ink/components/AlternateScreen.d.ts +12 -1
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -1
- package/lib/types/ink/components/AlternateScreen.js +25 -4
- package/lib/types/ink/components/App.d.ts +5 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +52 -5
- package/lib/types/ink/components/Image.d.ts +8 -1
- package/lib/types/ink/components/Image.d.ts.map +1 -1
- package/lib/types/ink/components/Image.js +2 -2
- package/lib/types/ink/components/Text.d.ts +8 -1
- package/lib/types/ink/components/Text.d.ts.map +1 -1
- package/lib/types/ink/components/Text.js +11 -1
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +75 -3
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-input.js +9 -4
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +8 -2
- package/lib/types/ink/kitty-graphics.d.ts +7 -2
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +15 -7
- package/lib/types/ink/node-cache.d.ts +15 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/node-cache.js +4 -1
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +2 -0
- package/lib/types/ink/parse-keypress.d.ts +13 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +438 -19
- package/lib/types/ink/reconciler.d.ts.map +1 -1
- package/lib/types/ink/reconciler.js +9 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +200 -4
- package/lib/types/ink/render-stats.d.ts +35 -0
- package/lib/types/ink/render-stats.d.ts.map +1 -0
- package/lib/types/ink/render-stats.js +53 -0
- package/lib/types/ink/sixel-codec.d.ts +11 -1
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +10 -3
- package/lib/types/ink/sixel-graphics.js +2 -2
- package/lib/types/ink/styles.d.ts +46 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +7 -0
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.d.ts +1 -1
- package/lib/types/ink/terminal-querier.js +4 -4
- package/lib/types/ink/text-decoration.d.ts +49 -0
- package/lib/types/ink/text-decoration.d.ts.map +1 -0
- package/lib/types/ink/text-decoration.js +235 -0
- package/lib/types/ink/update-overflow-guard.d.ts +9 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +41 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +5 -1
- package/lib/types/kernelPrefs.d.ts +51 -0
- package/lib/types/kernelPrefs.d.ts.map +1 -0
- package/lib/types/kernelPrefs.js +126 -0
- package/lib/types/modelRecents.d.ts +10 -2
- package/lib/types/modelRecents.d.ts.map +1 -1
- package/lib/types/modelRecents.js +20 -7
- package/lib/types/screens/AgentTranscriptScene.d.ts +42 -0
- package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -0
- package/lib/types/screens/AgentTranscriptScene.js +269 -0
- package/lib/types/screens/Chat.d.ts +45 -7
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +625 -113
- package/lib/types/screens/Launchpad.d.ts +24 -7
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +147 -28
- package/lib/types/screens/SessionSupervisor.d.ts +3 -3
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +69 -5
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +211 -7
- package/lib/types/screens/StatusLine.d.ts +40 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +131 -19
- package/lib/types/screens/StatusMetrics.d.ts +53 -17
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +141 -30
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/screens/TrajectoryScene.js +74 -12
- package/lib/types/screens/chat/backendCommands.d.ts +37 -0
- package/lib/types/screens/chat/backendCommands.d.ts.map +1 -0
- package/lib/types/screens/chat/backendCommands.js +51 -0
- package/lib/types/screens/chat/useBackendChannels.d.ts +20 -0
- package/lib/types/screens/chat/useBackendChannels.d.ts.map +1 -0
- package/lib/types/screens/chat/useBackendChannels.js +117 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +23 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useKernelPicker.js +72 -0
- package/lib/types/screens/chatOverlay.d.ts +32 -2
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +9 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useForeignSessions.js +5 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +14 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +97 -22
- package/lib/types/sessionHistory.d.ts +18 -1
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +46 -4
- package/lib/types/sessionPins.d.ts +7 -0
- package/lib/types/sessionPins.d.ts.map +1 -1
- package/lib/types/sessionPins.js +9 -0
- package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
- package/lib/types/sessions/resumeFailure.js +2 -1
- package/lib/types/settings/definitions.d.ts +74 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +50 -4
- package/lib/types/terminal-utils/hyperlink.d.ts +2 -2
- package/lib/types/terminal-utils/hyperlink.d.ts.map +1 -1
- package/lib/types/terminal-utils/hyperlink.js +21 -4
- package/lib/types/terminal-utils/markdown.d.ts +34 -6
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +257 -66
- package/lib/types/theme.d.ts +49 -8
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +514 -18
- package/lib/types/tips.js +2 -2
- package/lib/types/trajectory/effortIgnition.d.ts +25 -7
- package/lib/types/trajectory/effortIgnition.d.ts.map +1 -1
- package/lib/types/trajectory/effortIgnition.js +106 -34
- package/lib/types/trajectory/window.d.ts +26 -0
- package/lib/types/trajectory/window.d.ts.map +1 -0
- package/lib/types/trajectory/window.js +27 -0
- package/lib/types/tuiDisplayPrefs.d.ts +38 -1
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +45 -1
- package/lib/types/update.d.ts +88 -3
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +285 -18
- package/lib/types/utils/crashDetail.d.ts +56 -0
- package/lib/types/utils/crashDetail.d.ts.map +1 -0
- package/lib/types/utils/crashDetail.js +175 -0
- package/lib/types/utils/imageResize.d.ts +9 -23
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +24 -20
- package/lib/types/utils/inputPaste.d.ts +9 -8
- package/lib/types/utils/inputPaste.d.ts.map +1 -1
- package/lib/types/utils/inputPaste.js +53 -16
- package/lib/types/utils/jsonl.d.ts +24 -0
- package/lib/types/utils/jsonl.d.ts.map +1 -0
- package/lib/types/utils/jsonl.js +36 -0
- package/package.json +18 -2
|
@@ -4,21 +4,26 @@ import { SessionId } from '@deepseek-ai/dsh-session';
|
|
|
4
4
|
import UserQuestionService from '@deepseek-ai/dsh-user-questions';
|
|
5
5
|
import * as toolAskUser from '@deepseek-ai/dsh-tool-ask-user';
|
|
6
6
|
import Schema from '@deepseek-ai/schemastery';
|
|
7
|
-
import { Config } from './index.js';
|
|
7
|
+
import { Config, normalizeBackendChoice } from './index.js';
|
|
8
8
|
import { configValues, createSettingsScope, resolveSettingsNamespace } from './compat/settings.js';
|
|
9
9
|
import { createChannel } from './channel.js';
|
|
10
|
+
import { createDshSession } from './backend/session.js';
|
|
11
|
+
import { BACKEND_LOADERS, closeBackendResources, openBackendStartup, probeKernels, sdkInstall } from './backends.js';
|
|
12
|
+
import { formatSessionRef } from '../agent/refs.js';
|
|
10
13
|
import { createChannelSceneOutlet } from './channel-scene-outlet.js';
|
|
11
14
|
import { mountChannelUi } from './channel-ui.js';
|
|
12
15
|
import { bindChannelCommands } from './channel/commands.js';
|
|
13
16
|
import { registerTuiChannel } from '../adapter/channel/host-registry.js';
|
|
14
17
|
import { createChildStderrReporter, installChildStderrGuard } from './childStderr.js';
|
|
15
18
|
import { removeClipboardImageDir } from '../utils/clipboard.js';
|
|
19
|
+
import { appendCrashLog, serializeCrashDetail, unserializableCrashDetail } from '../utils/crashDetail.js';
|
|
16
20
|
import { logForDebugging } from '../utils/debug.js';
|
|
17
21
|
import { isEnvTruthy } from '../utils/envUtils.js';
|
|
18
22
|
import { QuestionStore, bindQuestionStore } from './questions.js';
|
|
19
23
|
import { prepareQuestionAnswerer } from './questions-answerer.js';
|
|
20
24
|
import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
|
|
21
25
|
import { ApprovalStore, bindApprovalStore } from './approvals.js';
|
|
26
|
+
import { PermissionStore } from '../channel/permissions.js';
|
|
22
27
|
import { registerPromptDebug } from './promptDebug.js';
|
|
23
28
|
import { readActivityFrames } from '../activityPrefs.js';
|
|
24
29
|
import { commitFullscreenFactoryMigration, planFullscreenFactoryMigration, readAppliedMigrations } from '../migrationPrefs.js';
|
|
@@ -33,11 +38,14 @@ import { ensureLegacySessionEventTypes, snapshotLiveSessionEvents } from './comp
|
|
|
33
38
|
import { clearResumeTarget, resumeTargetFromArgv, writeResumeTarget } from '../sessionHistory.js';
|
|
34
39
|
import { initialPromptFromCmdlineArgs } from './startup-args.js';
|
|
35
40
|
import { readHomePrefs } from '../homePrefs.js';
|
|
41
|
+
import { handoffEventTag, formatHandoffNotice } from '../handoffEvents.js';
|
|
42
|
+
import { armFirstFrameAck, beginHandoffAck, handoffAttemptId, ownsAltScreenExit } from '../handoffAck.js';
|
|
43
|
+
import { KERNEL_IDS, KERNEL_SWITCH_HANDOFF_ENV, kernelDisplayName, readKernelPrefs, resolveRememberedBackend, writeKernelPrefs } from '../kernelPrefs.js';
|
|
36
44
|
import { shouldOfferOnboarding } from '../onboardingPrefs.js';
|
|
37
45
|
import { resolveSessionCwd } from '../utils/workspaceRoot.js';
|
|
38
|
-
import { beginRestartAttempt, checkForTuiUpdate, installedTuiVersion, isBootDeadlockTarget, isStandaloneRuntime, isVersionNewer, logRestartEvent, resolveDshProfileName, resolveTuiUpdateTarget, restartTui, updateTuiAndRestart, writeHandoffNotice } from '../update.js';
|
|
46
|
+
import { beginRestartAttempt, checkForTuiUpdate, installedTuiVersion, isBootDeadlockTarget, isStandaloneRuntime, isVersionNewer, logRestartEvent, resolveDshProfileName, resolveTuiUpdateTarget, restartTui, updateTuiAndRestart, writeHandoffNotice, writeLastRunRecord } from '../update.js';
|
|
39
47
|
import { getLang, isLang, resolveStartupLang, setLang, t, writeLangPref } from '../i18n.js';
|
|
40
|
-
import {
|
|
48
|
+
import { applyBtwContextBudget, applyBtwContextTurns, applyCodeFrameStyle, applyCompanionSkin, applyImageBacking, applyMathImageBacking, applyMathImageScale, applyMathRendering, applyMermaidDiagrams, applyPageMargin, applySidePanelOpen, applySidePanelPanels, applySidePanelRatio, applySidePanelSplitEnabled, BTW_CONTEXT_BUDGET_MAX, BTW_CONTEXT_BUDGET_MIN, BTW_CONTEXT_TURNS_MAX, BTW_CONTEXT_TURNS_MIN, DEFAULT_PAGE_MARGIN, DEFAULT_SIDE_PANEL_IDS, DEFAULT_STATUS_BAR, isPageMarginMode, normalizeJobGroupFold, normalizePageMargin, normalizeScrollGutter, normalizeSidePanelPanels, normalizeStatusBar, normalizeToolBackground, parsePageMarginSpec, resolveMathRendering, SIDE_PANEL_ID_PATTERN } from '../tuiDisplayPrefs.js';
|
|
41
49
|
import { draftComboConflicts, effectiveComboString, parseComboDraft, setKeymapOverrides, SHORTCUT_ACTIONS, } from '../utils/keymap.js';
|
|
42
50
|
import { attachHerdrIntegration } from '../herdr.js';
|
|
43
51
|
import { logMouseDebug } from '../utils/debug.js';
|
|
@@ -59,6 +67,7 @@ import { compositionRoot, withHostRootCapability } from './host-access.js';
|
|
|
59
67
|
import { render, ThemeProvider, AlternateScreen } from '../ui.js';
|
|
60
68
|
import { PageMargin } from '../components/PageMargin.js';
|
|
61
69
|
import { normalizeSplashFont } from '../components/splashFonts.js';
|
|
70
|
+
import { normalizeBrandSetting, resolveBrand, setActiveBrand } from '../branding.js';
|
|
62
71
|
import { SETTING_GROUPS, SHORTCUT_FIELD_META, settingField } from '../settings/definitions.js';
|
|
63
72
|
import instances from '../ink/instances.js';
|
|
64
73
|
import { cursorMove, DISABLE_KITTY_KEYBOARD, DISABLE_MODIFY_OTHER_KEYS, DISABLE_WIN32_INPUT_MODE } from '../ink/termio/csi.js';
|
|
@@ -419,43 +428,134 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
419
428
|
const cmdline = ctx.cmdlineArgs;
|
|
420
429
|
const cmdlineArgs = cmdline?.get?.() ?? cmdline?.args;
|
|
421
430
|
const launchSessionId = config.sessionId ?? resumeTargetFromArgv(cmdlineArgs ?? process.argv.slice(2));
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
431
|
+
// The session's backend (Config `backend`, `dsh-tui --backend`). A non-DSH
|
|
432
|
+
// backend opens its own session here and skips everything DSH-specific
|
|
433
|
+
// below (preset composition, route validation, workspace ownership, the
|
|
434
|
+
// approval answerer); the DSH path is unchanged.
|
|
435
|
+
// The `backend` row reads DSH_TUI_BACKEND (`dsh-tui --backend`), but a
|
|
436
|
+
// launcher whose bundle patch predates that row (the issue #183 copy skew)
|
|
437
|
+
// never passes it — so the variable is also read here, below the config.
|
|
438
|
+
// Priority: an explicit Config row or env var always wins; then the
|
|
439
|
+
// launchpad kernel selector's memory (kernel.json — written only by the
|
|
440
|
+
// selector, never by boot); else dsh. An INVALID env value still means dsh
|
|
441
|
+
// (the warning below says exactly that), never the memory.
|
|
442
|
+
const rawBackend = process.env.DSH_TUI_BACKEND;
|
|
443
|
+
// A kernel switch (restartTui's backend option) and the launcher's crash
|
|
444
|
+
// retry set this so the boot lands on the chosen kernel even when a Config
|
|
445
|
+
// row pins the other one. Deleted right away so no child inherits it; an
|
|
446
|
+
// invalid value is ignored.
|
|
447
|
+
const handoffBackendRaw = process.env[KERNEL_SWITCH_HANDOFF_ENV];
|
|
448
|
+
if (handoffBackendRaw !== undefined)
|
|
449
|
+
delete process.env[KERNEL_SWITCH_HANDOFF_ENV];
|
|
450
|
+
const handoffBackend = normalizeBackendChoice(handoffBackendRaw);
|
|
451
|
+
// Fullscreen kernel switch: the old process spawned this one with an ACK
|
|
452
|
+
// pipe on fd 3 and the alternate screen still open (see handoffAck.ts).
|
|
453
|
+
const handoffAck = beginHandoffAck();
|
|
454
|
+
if (handoffAck !== undefined) {
|
|
455
|
+
logRestartEvent('handoff/boot: ack armed', { attemptId: handoffAttemptId() ?? '' });
|
|
456
|
+
}
|
|
457
|
+
const backendChoice = resolveRememberedBackend({
|
|
458
|
+
...(handoffBackend === undefined ? {} : { handoff: handoffBackend }),
|
|
459
|
+
configured: config.backend,
|
|
460
|
+
envRaw: rawBackend,
|
|
461
|
+
memory: readKernelPrefs().backend,
|
|
462
|
+
});
|
|
463
|
+
if (rawBackend !== undefined && rawBackend.trim() !== '' && normalizeBackendChoice(rawBackend) === undefined) {
|
|
464
|
+
ctx.logger.warn(`dsh-tui: DSH_TUI_BACKEND="${rawBackend}" names no known backend (${KERNEL_IDS.join(', ')}); starting on dsh`);
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Whether a Config row or DSH_TUI_BACKEND overrides the selector's
|
|
468
|
+
* remembered kernel. The selector then says so: a switch still restarts
|
|
469
|
+
* onto the chosen kernel, but the next plain launch follows the override.
|
|
470
|
+
*/
|
|
471
|
+
const backendPinned = config.backend !== undefined
|
|
472
|
+
|| (rawBackend !== undefined && rawBackend.trim() !== '');
|
|
473
|
+
// A remembered kernel whose backend cannot open (its SDK uninstalled, its
|
|
474
|
+
// session store unreadable, …) must not kill the boot: without an explicit
|
|
475
|
+
// flag or resume target the TUI falls back to DSH and says so — the wizard
|
|
476
|
+
// in /kernel is then one Enter away from installing what is missing.
|
|
477
|
+
// Explicit choices (flag/Config/handoff) and explicit resume targets keep
|
|
478
|
+
// the hard failure: silently swapping what the user named would be worse.
|
|
479
|
+
let backendStart;
|
|
480
|
+
let backendFallbackNotice;
|
|
481
|
+
if (backendChoice !== 'dsh') {
|
|
482
|
+
try {
|
|
483
|
+
backendStart = await openBackendStartup(ctx, await BACKEND_LOADERS[backendChoice](), {
|
|
484
|
+
cwd: sessionCwd,
|
|
485
|
+
stderr: line => {
|
|
486
|
+
logForDebugging(`[${backendChoice}-stderr] ${line}`);
|
|
487
|
+
stderrReporter.push(line);
|
|
488
|
+
},
|
|
489
|
+
...(config.sessionId === undefined ? {} : { configuredSessionId: config.sessionId }),
|
|
490
|
+
argv: cmdlineArgs ?? process.argv.slice(2),
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
catch (error) {
|
|
494
|
+
if (backendPinned || handoffBackend !== undefined || launchSessionId !== undefined)
|
|
495
|
+
throw error;
|
|
496
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
497
|
+
logForDebugging(`dsh-tui: remembered backend "${backendChoice}" failed to open (${reason}); falling back to dsh`);
|
|
498
|
+
backendFallbackNotice = t('kernel-memory-fallback', { name: kernelDisplayName(backendChoice), reason });
|
|
451
499
|
}
|
|
452
500
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
501
|
+
// The backend session (and its child process) belongs to this fiber until the
|
|
502
|
+
// channel adopts it: a boot that throws before then disposes the fiber's
|
|
503
|
+
// effects, and this one stops the child instead of leaking it. Dispose is
|
|
504
|
+
// idempotent, so the channel's own release later is unaffected.
|
|
505
|
+
if (backendStart !== undefined) {
|
|
506
|
+
ctx.effect(() => () => {
|
|
507
|
+
void backendStart.session.dispose().catch((error) => {
|
|
508
|
+
logForDebugging(`dsh-tui: backend session dispose failed (${error instanceof Error ? error.message : String(error)})`);
|
|
509
|
+
});
|
|
510
|
+
}, 'dsh-tui backend startup session');
|
|
458
511
|
}
|
|
512
|
+
// A non-DSH session's permission prompts park in the shared store the
|
|
513
|
+
// approval panel renders; its questions share the DSH questionnaire store.
|
|
514
|
+
// Teardown withdraws whatever is still parked.
|
|
515
|
+
const backendPermissions = backendStart === undefined ? undefined : new PermissionStore();
|
|
516
|
+
if (backendPermissions !== undefined)
|
|
517
|
+
ctx.effect(() => () => backendPermissions.settleAll());
|
|
518
|
+
const { agent, handle, agentPreset, route: createdRoute } = backendStart !== undefined
|
|
519
|
+
? { agent: undefined, handle: undefined, agentPreset: undefined, route: undefined }
|
|
520
|
+
: await resolveAgent(ctx, launchSessionId, configuredRoute, startupRoute, meta, config.preset);
|
|
521
|
+
// Workspace ownership is a DSH session-store fact (skipped off DSH).
|
|
522
|
+
if (agent !== undefined)
|
|
523
|
+
try {
|
|
524
|
+
// Opening a persisted TUI session is an explicit ownership action too.
|
|
525
|
+
// Older TUI versions only wrote the Session log, so attaching on every
|
|
526
|
+
// startup repairs those durable-but-ungrouped sessions idempotently.
|
|
527
|
+
//
|
|
528
|
+
// This is ALSO how a workspace enters the rail: `resolveByPath(cwd) ??
|
|
529
|
+
// create(cwd)` mints the durable record for the directory this terminal
|
|
530
|
+
// was launched in, so the session screen lists every directory a TUI has
|
|
531
|
+
// ever started in. The ledger is DSH's own workspace store, so the Web UI
|
|
532
|
+
// reads the same records. There is deliberately no rail-side "add a
|
|
533
|
+
// workspace" control any more: a terminal's launch directory is the whole
|
|
534
|
+
// registration story.
|
|
535
|
+
//
|
|
536
|
+
// A RESUMED session is accounted where its OWN header cwd lives, never
|
|
537
|
+
// where this terminal was launched. The launch directory can be an
|
|
538
|
+
// ANCESTOR of the resumed session's: launching in `~/projects` and
|
|
539
|
+
// resuming a session recorded in `~/projects/app` accounts the same
|
|
540
|
+
// session in both workspaces, and the next boot dies inside
|
|
541
|
+
// `validateStoredState` ("session ... is accounted by both workspace
|
|
542
|
+
// ..."), which leaves `workspaceRegistry` unactivated and the whole TUI
|
|
543
|
+
// pending forever. Ownership must therefore agree with the `cwd:` handed
|
|
544
|
+
// to `createChannel` below, which already prefers the persisted header.
|
|
545
|
+
// Fresh sessions record `meta.cwd` at creation, so the launch directory
|
|
546
|
+
// still registers through them.
|
|
547
|
+
const ownershipCwd = agent.session.header.cwd ?? meta.cwd;
|
|
548
|
+
const attached = await attachSessionToWorkspace(ctx, ownershipCwd, agent.session.id);
|
|
549
|
+
if (!attached) {
|
|
550
|
+
ctx.logger.warn(`dsh-tui: session "${agent.session.id}" has no workspace ownership because workspaceRegistry is not mounted`);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
catch (error) {
|
|
554
|
+
// The Session is already published and durable, matching Web's partial
|
|
555
|
+
// failure contract. Keep the TUI usable but make the missing ownership
|
|
556
|
+
// loud instead of silently leaving the conversation Ungrouped.
|
|
557
|
+
ctx.logger.warn(`dsh-tui: session "${agent.session.id}" workspace attachment failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
558
|
+
}
|
|
459
559
|
// Status-line route: the exact route the agent runs with — on create the
|
|
460
560
|
// validated startup resolution, on resume the route the target session's
|
|
461
561
|
// own records carry (a complete cordis.yml pin wins over them).
|
|
@@ -476,18 +576,45 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
476
576
|
// context-low warning. Created unconditionally (unlike the activity store,
|
|
477
577
|
// there is no config gate: hiding the bar must not make the warning or the
|
|
478
578
|
// footer read a stale sample). A composition without the meter leaves it
|
|
479
|
-
// empty and the channel falls back to the last-request sample
|
|
579
|
+
// empty and the channel falls back to the last-request sample — as does a
|
|
580
|
+
// non-DSH session, whose id the DSH meter never projects.
|
|
480
581
|
const contextOccupancyStore = createContextOccupancyStore(ctx);
|
|
481
|
-
|
|
582
|
+
// The channel holds a backend session; this DSH one owns the resolved
|
|
583
|
+
// handle (disposed by the binding when a later adoption replaces it).
|
|
584
|
+
let startupSession;
|
|
585
|
+
if (backendStart !== undefined)
|
|
586
|
+
startupSession = backendStart.session;
|
|
587
|
+
else if (agent !== undefined)
|
|
588
|
+
startupSession = createDshSession(ctx, { agent, handle });
|
|
589
|
+
else
|
|
590
|
+
throw new Error('dsh-tui: no startup session was opened');
|
|
591
|
+
const rawChannel = createChannel(ctx, startupSession, {
|
|
482
592
|
// The namespace this boot actually registered the settings section under
|
|
483
593
|
// (the Config owner's Loader id; custom ids are supported). Chat and the
|
|
484
594
|
// channel's own settings reads look the section up by it.
|
|
485
595
|
settingsNs: tuiSettingsNs,
|
|
486
|
-
model
|
|
596
|
+
// The backend reports its model with its first turn (`system/init`);
|
|
597
|
+
// until then the status line names the backend.
|
|
598
|
+
model: backendStart !== undefined ? backendStart.label : displayRoute.model,
|
|
599
|
+
...(backendStart === undefined || backendPermissions === undefined ? {} : {
|
|
600
|
+
backendLabel: backendStart.label,
|
|
601
|
+
openSession: backendStart.open,
|
|
602
|
+
interaction: { permissions: backendPermissions, questions: questionStore },
|
|
603
|
+
// The session browser, /resume, /fork and rewind.
|
|
604
|
+
sessionCatalog: backendStart.catalog,
|
|
605
|
+
sessionPrefs: backendStart.sessionPrefs,
|
|
606
|
+
initialHistory: backendStart.initialHistory,
|
|
607
|
+
resumeCommand: backendStart.resumeCommand,
|
|
608
|
+
}),
|
|
487
609
|
// The activity projection only pushes on change; read the current value as
|
|
488
610
|
// soon as this session binds so a resumed or reattached session renders its
|
|
489
611
|
// line immediately instead of waiting for the next event.
|
|
490
612
|
seedActivity: session => activityStore.seed(session),
|
|
613
|
+
// A backend-provided working line lands
|
|
614
|
+
// in the SAME store the projection feed fills, so the Chat/StatusLine
|
|
615
|
+
// read side stays one seam for every backend.
|
|
616
|
+
publishActivity: (sessionId, view) => activityStore.update(sessionId, view),
|
|
617
|
+
clearActivity: sessionId => activityStore.clear(sessionId),
|
|
491
618
|
// Same reason as the activity line: the occupancy projection only pushes on
|
|
492
619
|
// change, so a resumed session reads one baseline at bind time.
|
|
493
620
|
contextPressure: contextOccupancyStore,
|
|
@@ -497,8 +624,9 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
497
624
|
// from the current launch directory would split @ expansion / file
|
|
498
625
|
// completion (state.cwd) from the agent's own workspace record. Fresh
|
|
499
626
|
// sessions record sessionCwd at creation, so both agree there.
|
|
500
|
-
|
|
501
|
-
|
|
627
|
+
// A resumed backend session runs where it was recorded.
|
|
628
|
+
cwd: backendStart?.session.cwd ?? agent?.session.header.cwd ?? sessionCwd,
|
|
629
|
+
provider: backendStart !== undefined ? backendStart.backendId : displayRoute.provider,
|
|
502
630
|
// Raw cordis.yml route (undefined when unset): the channel's
|
|
503
631
|
// new-session path re-resolves prefs against these, and resume passes
|
|
504
632
|
// only explicit values so the target session's own record wins.
|
|
@@ -531,6 +659,7 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
531
659
|
scrollGutter: config.scrollGutter,
|
|
532
660
|
pageMargin: config.pageMargin,
|
|
533
661
|
foldTerminalCommand: config.foldTerminalCommand,
|
|
662
|
+
turnUsageRow: config.turnUsageRow,
|
|
534
663
|
promptSessionLabel: config.promptSessionLabel,
|
|
535
664
|
expandEditor: config.expandEditor,
|
|
536
665
|
smoothStreaming: config.smoothStreaming,
|
|
@@ -541,7 +670,9 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
541
670
|
// 开屏大字字体:cordis.yml 这一层的值(未设置时 undefined → 通道归一化成
|
|
542
671
|
// `daily`);/settings 的改动由 applySplashFont 实时接上。
|
|
543
672
|
splashFont: config.splashFont,
|
|
544
|
-
|
|
673
|
+
// 品牌外观(`dsh-tui.brand`):`auto`(未设置)跟随后端自动切,/settings
|
|
674
|
+
// 的改动由 applyBrand 实时接上(branding.ts 负责解析)。
|
|
675
|
+
brand: config.brand,
|
|
545
676
|
});
|
|
546
677
|
// Register the live Channel for the adapter Kernel. The Channel driver
|
|
547
678
|
// resolves it lazily from the composition root, so this can be called after
|
|
@@ -556,6 +687,32 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
556
687
|
const uiMount = mountChannelUi(ctx, rawChannel, pluginHost, adapterRuntime.mode);
|
|
557
688
|
const channel = uiMount.channel;
|
|
558
689
|
bindChannelCommands(rawChannel, channel);
|
|
690
|
+
// last-run.json for the launcher's crash retry (see writeLastRunRecord):
|
|
691
|
+
// written once here, refreshed by the exit funnel with what is resumable
|
|
692
|
+
// at that point. The kernel-switch branch skips the refresh because the
|
|
693
|
+
// replacement writes its own record when it boots.
|
|
694
|
+
const bootAttemptId = `${process.pid.toString(36)}-${Date.now().toString(36)}`;
|
|
695
|
+
const refreshLastRunRecord = () => {
|
|
696
|
+
// An observational composition (replay/embedding) is not "the instance the
|
|
697
|
+
// user ran last" — it must not overwrite the interactive record.
|
|
698
|
+
if (adapterRuntime.mode === 'passive-shadow' || adapterRuntime.mode === 'replay-shadow')
|
|
699
|
+
return;
|
|
700
|
+
const resumable = backendStart !== undefined
|
|
701
|
+
? backendStart.persisted(channel.agentId, channel.rows)
|
|
702
|
+
: isExitResumable({
|
|
703
|
+
pendingCount: channel.pending.length,
|
|
704
|
+
liveAgent: ctx.agents.get(SessionId(channel.agentId)),
|
|
705
|
+
startupAgent: agent,
|
|
706
|
+
});
|
|
707
|
+
writeLastRunRecord({
|
|
708
|
+
backendId: backendChoice,
|
|
709
|
+
sessionId: resumable ? channel.agentId : '',
|
|
710
|
+
cwd: sessionCwd,
|
|
711
|
+
attemptId: bootAttemptId,
|
|
712
|
+
pid: process.pid,
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
refreshLastRunRecord();
|
|
559
716
|
const shadow = adapterRuntime.mode === 'passive-shadow' || adapterRuntime.mode === 'replay-shadow';
|
|
560
717
|
// Bootstrap notices/prompts are deliberately dropped in observational mode;
|
|
561
718
|
// interactive commands retain rejection semantics through the UI capability.
|
|
@@ -564,6 +721,10 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
564
721
|
return () => undefined;
|
|
565
722
|
return channel.notify(text, options);
|
|
566
723
|
};
|
|
724
|
+
// The remembered-kernel fallback notice (set during backend startup above)
|
|
725
|
+
// lands once the channel can actually show it.
|
|
726
|
+
if (backendFallbackNotice !== undefined)
|
|
727
|
+
notifyChannel(backendFallbackNotice, { color: 'warning' });
|
|
567
728
|
const submitChannel = text => {
|
|
568
729
|
if (!shadow)
|
|
569
730
|
channel.submit(text);
|
|
@@ -585,7 +746,10 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
585
746
|
applySidePanelRatio(config.sidePanel?.ratio);
|
|
586
747
|
applySidePanelPanels(config.sidePanel?.panels);
|
|
587
748
|
applyCompanionSkin(config.companion?.skin);
|
|
749
|
+
applyBtwContextTurns(config.btw?.contextTurns);
|
|
750
|
+
applyBtwContextBudget(config.btw?.contextBudget);
|
|
588
751
|
applyMermaidDiagrams(config.mermaidDiagrams);
|
|
752
|
+
applyCodeFrameStyle(config.codeFrameStyle);
|
|
589
753
|
applyMathRendering(resolveMathRendering({}, config));
|
|
590
754
|
applyMathImageScale(config.mathImageScale ?? 'auto');
|
|
591
755
|
applyMathImageBacking(config.mathImageBacking ?? 'transparent');
|
|
@@ -648,6 +812,9 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
648
812
|
// `?? config.foldTerminalCommand ?? false` already supplies the
|
|
649
813
|
// default and keeps cordis.yml decisive.
|
|
650
814
|
foldTerminalCommand: Schema.boolean(),
|
|
815
|
+
// Same no-default rule as foldTerminalCommand: applyDisplay resolves
|
|
816
|
+
// `?? config.turnUsageRow ?? false` so cordis.yml stays decisive.
|
|
817
|
+
turnUsageRow: Schema.boolean(),
|
|
651
818
|
promptSessionLabel: Schema.boolean().default(false),
|
|
652
819
|
// No schema default (same rule as foldTerminalCommand): applyDisplay
|
|
653
820
|
// resolves `?? config.expandEditor ?? true` so cordis.yml stays
|
|
@@ -657,6 +824,8 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
657
824
|
smoothStreaming: Schema.boolean(),
|
|
658
825
|
// Same no-default rule: applyDisplay resolves `?? config.mermaidDiagrams ?? true`.
|
|
659
826
|
mermaidDiagrams: Schema.boolean(),
|
|
827
|
+
// Code-frame shape; unset keeps the light rail frame.
|
|
828
|
+
codeFrameStyle: Schema.union(['light', 'full']),
|
|
660
829
|
// Same no-default rule: resolveMathRendering falls back to cordis.yml.
|
|
661
830
|
mathRendering: Schema.union(['auto', 'image', 'unicode', 'source']),
|
|
662
831
|
// Display-formula image size; unset keeps the base (text) scale.
|
|
@@ -707,6 +876,13 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
707
876
|
companion: Schema.object({
|
|
708
877
|
skin: Schema.string(),
|
|
709
878
|
}),
|
|
879
|
+
// btw thread-context budgets (settings `btw.*`): no schema defaults
|
|
880
|
+
// (same rule as sidePanel above) — the apply* stores normalize an
|
|
881
|
+
// unset value to 4 turns / 24k chars.
|
|
882
|
+
btw: Schema.object({
|
|
883
|
+
contextTurns: Schema.number(),
|
|
884
|
+
contextBudget: Schema.number(),
|
|
885
|
+
}),
|
|
710
886
|
// Header pixel whale art; on unless settings.yaml says otherwise.
|
|
711
887
|
whale: Schema.boolean().default(true),
|
|
712
888
|
// Idle whale behaviors after the intro settles; on by default —
|
|
@@ -723,6 +899,9 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
723
899
|
// (undefined → daily), so cordis.yml stays decisive and junk lands on
|
|
724
900
|
// daily.
|
|
725
901
|
splashFont: Schema.string(),
|
|
902
|
+
// 品牌外观:与 splashFont 同规则——用户层不设默认,cordis.yml 保持
|
|
903
|
+
// 决定权;applyBrand 归一化(undefined → auto)。
|
|
904
|
+
brand: Schema.string(),
|
|
726
905
|
// Minimal UI (极简界面, settings key `minimal` — never renamed): strips
|
|
727
906
|
// the header splash, emoji glyphs, and decorative colors; code highlight
|
|
728
907
|
// and tool colors stay. Unrelated to the kernel agent preset `minimal`.
|
|
@@ -768,6 +947,14 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
768
947
|
return;
|
|
769
948
|
channel.setSplashFont(normalizeSplashFont(value.splashFont ?? config.splashFont));
|
|
770
949
|
};
|
|
950
|
+
/** 品牌外观(`dsh-tui.brand`):`auto` 跟随后端(Claude 后端整套换橙、
|
|
951
|
+
* Codex 后端整套换薰衣草紫),其余固定一档;设置用户层优先于
|
|
952
|
+
* cordis.yml,非法值回落 `auto`。 */
|
|
953
|
+
const applyBrand = (value) => {
|
|
954
|
+
if (shadow)
|
|
955
|
+
return;
|
|
956
|
+
channel.setBrand(normalizeBrandSetting(value.brand ?? config.brand));
|
|
957
|
+
};
|
|
771
958
|
const applyMinimalUi = (value) => {
|
|
772
959
|
if (shadow)
|
|
773
960
|
return;
|
|
@@ -811,10 +998,12 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
811
998
|
channel.setPageMargin(pageMargin);
|
|
812
999
|
applyPageMargin(pageMargin);
|
|
813
1000
|
channel.setFoldTerminalCommand(value.foldTerminalCommand ?? config.foldTerminalCommand ?? false);
|
|
1001
|
+
channel.setTurnUsageRow(value.turnUsageRow ?? config.turnUsageRow ?? false);
|
|
814
1002
|
channel.setPromptSessionLabel(value.promptSessionLabel ?? config.promptSessionLabel ?? false);
|
|
815
1003
|
channel.setExpandEditor(value.expandEditor ?? config.expandEditor ?? true);
|
|
816
1004
|
channel.setSmoothStreaming(value.smoothStreaming ?? config.smoothStreaming ?? true);
|
|
817
1005
|
applyMermaidDiagrams(value.mermaidDiagrams ?? config.mermaidDiagrams);
|
|
1006
|
+
applyCodeFrameStyle(value.codeFrameStyle ?? config.codeFrameStyle);
|
|
818
1007
|
applyMathRendering(resolveMathRendering(value, config));
|
|
819
1008
|
applyMathImageScale(value.mathImageScale ?? config.mathImageScale ?? 'auto');
|
|
820
1009
|
applyMathImageBacking(value.mathImageBacking ?? config.mathImageBacking ?? 'transparent');
|
|
@@ -829,6 +1018,8 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
829
1018
|
applySidePanelRatio(value.sidePanel?.ratio ?? config.sidePanel?.ratio);
|
|
830
1019
|
applySidePanelPanels(value.sidePanel?.panels ?? config.sidePanel?.panels);
|
|
831
1020
|
applyCompanionSkin(value.companion?.skin ?? config.companion?.skin);
|
|
1021
|
+
applyBtwContextTurns(value.btw?.contextTurns ?? config.btw?.contextTurns);
|
|
1022
|
+
applyBtwContextBudget(value.btw?.contextBudget ?? config.btw?.contextBudget);
|
|
832
1023
|
};
|
|
833
1024
|
// Legacy user scopes layer over cordis.yml. Modern Config is already
|
|
834
1025
|
// resolved: an unset action must not revive its startup override.
|
|
@@ -868,6 +1059,7 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
868
1059
|
applyWhaleIdle(next);
|
|
869
1060
|
applyWhaleGirl(next);
|
|
870
1061
|
applySplashFont(next);
|
|
1062
|
+
applyBrand(next);
|
|
871
1063
|
applyMinimalUi(next);
|
|
872
1064
|
applyLang(next);
|
|
873
1065
|
applyDisplay(next);
|
|
@@ -1035,6 +1227,13 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1035
1227
|
return String(typeof value === 'boolean' ? value : config.foldTerminalCommand === true);
|
|
1036
1228
|
},
|
|
1037
1229
|
},
|
|
1230
|
+
{
|
|
1231
|
+
...settingField('turnUsageRow'),
|
|
1232
|
+
format(value) {
|
|
1233
|
+
// Same effective-resolution rule as foldTerminalCommand's field.
|
|
1234
|
+
return String(typeof value === 'boolean' ? value : config.turnUsageRow === true);
|
|
1235
|
+
},
|
|
1236
|
+
},
|
|
1038
1237
|
{
|
|
1039
1238
|
...settingField('promptSessionLabel'),
|
|
1040
1239
|
},
|
|
@@ -1059,6 +1258,9 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1059
1258
|
return String(typeof value === 'boolean' ? value : config.mermaidDiagrams !== false);
|
|
1060
1259
|
},
|
|
1061
1260
|
},
|
|
1261
|
+
{
|
|
1262
|
+
...settingField('codeFrameStyle'),
|
|
1263
|
+
},
|
|
1062
1264
|
{
|
|
1063
1265
|
...settingField('mathRendering'),
|
|
1064
1266
|
},
|
|
@@ -1202,6 +1404,42 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1202
1404
|
return { kind: 'set', value: normalizeSidePanelPanels(draft) };
|
|
1203
1405
|
},
|
|
1204
1406
|
},
|
|
1407
|
+
{
|
|
1408
|
+
// Like sidePanel.ratio: an out-of-range draft is rejected before
|
|
1409
|
+
// saving, and the store clamps to the same range anyway.
|
|
1410
|
+
...settingField('btw.contextTurns'),
|
|
1411
|
+
placeholder: '4',
|
|
1412
|
+
format(value) {
|
|
1413
|
+
const turns = typeof value === 'number' && Number.isFinite(value) ? value : config.btw?.contextTurns;
|
|
1414
|
+
return String(turns ?? 4);
|
|
1415
|
+
},
|
|
1416
|
+
parse(text) {
|
|
1417
|
+
const draft = text.trim();
|
|
1418
|
+
if (draft === '')
|
|
1419
|
+
return { kind: 'clear' };
|
|
1420
|
+
const turns = Number(draft);
|
|
1421
|
+
if (!Number.isInteger(turns) || turns < BTW_CONTEXT_TURNS_MIN || turns > BTW_CONTEXT_TURNS_MAX)
|
|
1422
|
+
return undefined;
|
|
1423
|
+
return { kind: 'set', value: turns };
|
|
1424
|
+
},
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
...settingField('btw.contextBudget'),
|
|
1428
|
+
placeholder: '24000',
|
|
1429
|
+
format(value) {
|
|
1430
|
+
const budget = typeof value === 'number' && Number.isFinite(value) ? value : config.btw?.contextBudget;
|
|
1431
|
+
return String(budget ?? 24000);
|
|
1432
|
+
},
|
|
1433
|
+
parse(text) {
|
|
1434
|
+
const draft = text.trim();
|
|
1435
|
+
if (draft === '')
|
|
1436
|
+
return { kind: 'clear' };
|
|
1437
|
+
const budget = Number(draft);
|
|
1438
|
+
if (!Number.isInteger(budget) || budget < BTW_CONTEXT_BUDGET_MIN || budget > BTW_CONTEXT_BUDGET_MAX)
|
|
1439
|
+
return undefined;
|
|
1440
|
+
return { kind: 'set', value: budget };
|
|
1441
|
+
},
|
|
1442
|
+
},
|
|
1205
1443
|
{
|
|
1206
1444
|
...settingField('companion.skin'),
|
|
1207
1445
|
},
|
|
@@ -1223,6 +1461,12 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1223
1461
|
return normalizeSplashFont(value ?? config.splashFont);
|
|
1224
1462
|
},
|
|
1225
1463
|
},
|
|
1464
|
+
{
|
|
1465
|
+
...settingField('brand'),
|
|
1466
|
+
format(value) {
|
|
1467
|
+
return normalizeBrandSetting(value ?? config.brand);
|
|
1468
|
+
},
|
|
1469
|
+
},
|
|
1226
1470
|
{
|
|
1227
1471
|
...settingField('minimal'),
|
|
1228
1472
|
},
|
|
@@ -1240,7 +1484,9 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1240
1484
|
// (/new, /resume, rewind), so ownership is re-evaluated per request.
|
|
1241
1485
|
const approvalStore = new ApprovalStore(adapterRuntimeFor(ctx));
|
|
1242
1486
|
bindApprovalStore(ctx, approvalStore);
|
|
1243
|
-
|
|
1487
|
+
// A non-DSH backend answers its own permission prompts: the DSH answerer
|
|
1488
|
+
// is not registered for it.
|
|
1489
|
+
if (ctx.get('approval') !== undefined && backendStart === undefined) {
|
|
1244
1490
|
ctx.on('approval/request', (req, next) => approvalStore.park(req).catch(() => next()));
|
|
1245
1491
|
// Badge-flip push (P-4): React does not know the session log appended —
|
|
1246
1492
|
// a source-badge verdict that only flips inside getSnapshot() surfaces
|
|
@@ -1255,10 +1501,12 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1255
1501
|
}
|
|
1256
1502
|
// The agent view reads parked ask ids for its "needs input" state.
|
|
1257
1503
|
rawChannel.bindApprovalStore(approvalStore);
|
|
1504
|
+
// The panel source Chat renders: the backend's own prompts off DSH.
|
|
1505
|
+
const panelApprovals = backendPermissions ?? approvalStore;
|
|
1258
1506
|
const herdr = attachHerdrIntegration({
|
|
1259
1507
|
channel,
|
|
1260
1508
|
questions: questionStore,
|
|
1261
|
-
approvals:
|
|
1509
|
+
approvals: panelApprovals,
|
|
1262
1510
|
});
|
|
1263
1511
|
if (herdr !== undefined) {
|
|
1264
1512
|
ctx.effect(() => () => herdr.dispose());
|
|
@@ -1302,6 +1550,10 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1302
1550
|
// write the resume target, restore the terminal, respawn the process with
|
|
1303
1551
|
// the original argv, and let the fresh boot attach the same session.
|
|
1304
1552
|
let restartRequested = false;
|
|
1553
|
+
// The launchpad kernel selector's switch target: set once a choice was
|
|
1554
|
+
// accepted; the exit funnel then respawns onto that kernel (a NEW session —
|
|
1555
|
+
// no resume markers at all).
|
|
1556
|
+
let backendSwitchRequested;
|
|
1305
1557
|
// The profile this process was booted with (`dsh --profile <name>`); dsh
|
|
1306
1558
|
// exposes it nowhere else, and /update must update the installation the
|
|
1307
1559
|
// user is actually running, not a hard-coded one.
|
|
@@ -1311,46 +1563,86 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1311
1563
|
// not share a fate (issue #12). Teardown only unmounts the UI; user exit
|
|
1312
1564
|
// runs the full leave sequence below (resume marker, terminal restore,
|
|
1313
1565
|
// update handoff or resume hint).
|
|
1566
|
+
/** The session id for a restart or update handoff, or empty when the backend
|
|
1567
|
+
* has not persisted it and the replacement must start fresh. */
|
|
1568
|
+
const handoffSessionId = () => backendStart === undefined || backendStart.persisted(channel.agentId, channel.rows) ? channel.agentId : '';
|
|
1569
|
+
const handoffHint = backendStart === undefined ? undefined : (sessionId) => backendStart.resumeCommand(sessionId);
|
|
1314
1570
|
const funnel = createExitFunnel({
|
|
1315
1571
|
onUserExit: error => {
|
|
1316
1572
|
// Mirror the funnel's internal exited flag for the /update and
|
|
1317
1573
|
// background-check guards that still read the outer one.
|
|
1318
1574
|
exited = true;
|
|
1319
1575
|
if (error !== undefined) {
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
//
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1576
|
+
// runCrashExit keeps the diagnostics apart from the resume markers
|
|
1577
|
+
// and the terminal cleanup, so a throw while describing the error
|
|
1578
|
+
// cannot skip finishExit.
|
|
1579
|
+
runCrashExit({
|
|
1580
|
+
error,
|
|
1581
|
+
logError: message => { ctx.logger.error(message); },
|
|
1582
|
+
appendLog: appendCrashLog,
|
|
1583
|
+
logRestart: logRestartEvent,
|
|
1584
|
+
logDebug: logForDebugging,
|
|
1585
|
+
// A crash must leave the resume marker a clean exit would leave: the
|
|
1586
|
+
// launcher's next start (and its safe-mode retry) then reopens the
|
|
1587
|
+
// session the user was actually in instead of a blank one. Only the
|
|
1588
|
+
// resumable case writes — unlike the clean-exit branch below, a crash
|
|
1589
|
+
// never CLEARS a marker, so a session the user still has cannot be
|
|
1590
|
+
// dropped by a failure that happened before the first message landed.
|
|
1591
|
+
writeResumeMarkers: () => {
|
|
1592
|
+
if (isExitResumable({
|
|
1593
|
+
pendingCount: channel.pending.length,
|
|
1594
|
+
liveAgent: ctx.agents.get(SessionId(channel.agentId)),
|
|
1595
|
+
startupAgent: agent,
|
|
1596
|
+
})) {
|
|
1597
|
+
writeResumeTarget(channel.agentId);
|
|
1598
|
+
}
|
|
1599
|
+
// Non-DSH sessions use their backend preference as the launcher marker.
|
|
1600
|
+
if (backendStart !== undefined && backendStart.persisted(channel.agentId, channel.rows))
|
|
1601
|
+
backendStart.sessionPrefs.setLastSession(channel.agentId);
|
|
1602
|
+
// So the launcher's retry reopens this session, not the boot-time one.
|
|
1603
|
+
refreshLastRunRecord();
|
|
1604
|
+
},
|
|
1605
|
+
finish: crashLine => {
|
|
1606
|
+
void finishExit(ctx, instance, bootedFullscreen, undefined, crashLine, () => disposeRootAndExit(ctx, 1));
|
|
1607
|
+
},
|
|
1608
|
+
});
|
|
1341
1609
|
return;
|
|
1342
1610
|
}
|
|
1343
1611
|
if (updateRequested) {
|
|
1344
1612
|
try {
|
|
1345
|
-
|
|
1613
|
+
// Non-DSH sessions keep their marker in backend prefs, not DSH's `resume.txt`.
|
|
1614
|
+
if (backendStart === undefined)
|
|
1615
|
+
writeResumeTarget(channel.agentId);
|
|
1616
|
+
else if (backendStart.persisted(channel.agentId, channel.rows))
|
|
1617
|
+
backendStart.sessionPrefs.setLastSession(channel.agentId);
|
|
1346
1618
|
}
|
|
1347
1619
|
catch {
|
|
1348
1620
|
// Resume persistence is best effort and must never block an update.
|
|
1349
1621
|
}
|
|
1622
|
+
refreshLastRunRecord();
|
|
1350
1623
|
const hintText = isStandaloneRuntime()
|
|
1351
1624
|
? t('update-standalone-starting')
|
|
1352
1625
|
: t('update-starting');
|
|
1353
|
-
void finishExit(ctx, instance, bootedFullscreen, hintText, undefined, () => runUpdate(ctx, profile,
|
|
1626
|
+
void finishExit(ctx, instance, bootedFullscreen, hintText, undefined, () => runUpdate(ctx, profile, handoffSessionId(), updateTargetVersion, backendChoice, handoffHint));
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
// The kernel selector's switch: the same respawn machinery, no resume.
|
|
1630
|
+
// The new kernel starts a NEW session — no resume target is written
|
|
1631
|
+
// (this kernel's sessions stay persisted; /resume finds them again
|
|
1632
|
+
// after switching back), and restartTui's backend option deletes the
|
|
1633
|
+
// inherited DSH_TUI_RESUME_SESSION marker from the replacement env.
|
|
1634
|
+
// kernel.json was already written when the choice was accepted.
|
|
1635
|
+
if (backendSwitchRequested !== undefined) {
|
|
1636
|
+
logRestartEvent('funnel: backend-switch branch entered', { backend: backendSwitchRequested });
|
|
1637
|
+
// Fullscreen keeps the alternate screen and writes the "switching"
|
|
1638
|
+
// notice into it until the replacement takes over (see handoffAck.ts);
|
|
1639
|
+
// inline restores the main screen and writes the notice there.
|
|
1640
|
+
logRestartEvent(handoffEventTag('starting'), { backend: backendSwitchRequested });
|
|
1641
|
+
const keepAlt = bootedFullscreen;
|
|
1642
|
+
void finishExit(ctx, instance, bootedFullscreen, formatHandoffNotice('starting', { name: kernelDisplayName(backendSwitchRequested), color: process.stdout.isTTY === true }), undefined, () => runRestart(ctx, profile, '', undefined, {
|
|
1643
|
+
backend: backendSwitchRequested,
|
|
1644
|
+
...(keepAlt ? { handoffScreen: 'alt' } : {}),
|
|
1645
|
+
}), { keepAltScreen: keepAlt });
|
|
1354
1646
|
return;
|
|
1355
1647
|
}
|
|
1356
1648
|
// `/restart`: same handoff as the update path, no installation step.
|
|
@@ -1360,7 +1652,10 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1360
1652
|
beginRestartAttempt(channel.agentId);
|
|
1361
1653
|
logRestartEvent('funnel: /restart branch entered');
|
|
1362
1654
|
try {
|
|
1363
|
-
|
|
1655
|
+
if (backendStart === undefined)
|
|
1656
|
+
writeResumeTarget(channel.agentId);
|
|
1657
|
+
else if (backendStart.persisted(channel.agentId, channel.rows))
|
|
1658
|
+
backendStart.sessionPrefs.setLastSession(channel.agentId);
|
|
1364
1659
|
logRestartEvent('funnel: resume target written');
|
|
1365
1660
|
}
|
|
1366
1661
|
catch (error) {
|
|
@@ -1369,34 +1664,84 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1369
1664
|
message: error instanceof Error ? error.message : String(error),
|
|
1370
1665
|
});
|
|
1371
1666
|
}
|
|
1372
|
-
|
|
1667
|
+
refreshLastRunRecord();
|
|
1668
|
+
void finishExit(ctx, instance, bootedFullscreen, t('restart-starting'), undefined, () => runRestart(ctx, profile, handoffSessionId(), handoffHint, { kernel: backendChoice }));
|
|
1373
1669
|
return;
|
|
1374
1670
|
}
|
|
1375
1671
|
// Judge against the live session behind the channel (channel.agentId),
|
|
1376
1672
|
// not the boot-time agent captured above: /resume, /new and /model swap
|
|
1377
1673
|
// the active agent, so the captured reference can go stale (see
|
|
1378
1674
|
// isExitResumable).
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1675
|
+
let hint;
|
|
1676
|
+
if (backendStart !== undefined) {
|
|
1677
|
+
// Each non-DSH backend provides its marker and resume command; DSH uses
|
|
1678
|
+
// `resume.txt`.
|
|
1679
|
+
const resumable = backendStart.persisted(channel.agentId, channel.rows);
|
|
1680
|
+
try {
|
|
1681
|
+
if (resumable)
|
|
1682
|
+
backendStart.sessionPrefs.setLastSession(channel.agentId);
|
|
1683
|
+
}
|
|
1684
|
+
catch {
|
|
1685
|
+
// Resume persistence is best effort and must never block shutdown.
|
|
1686
|
+
}
|
|
1687
|
+
hint = resumable ? `Resume with the command below:\n${backendStart.resumeCommand(channel.agentId)}` : undefined;
|
|
1389
1688
|
}
|
|
1390
|
-
|
|
1391
|
-
|
|
1689
|
+
else {
|
|
1690
|
+
const resumable = isExitResumable({
|
|
1691
|
+
pendingCount: channel.pending.length,
|
|
1692
|
+
liveAgent: ctx.agents.get(SessionId(channel.agentId)),
|
|
1693
|
+
startupAgent: agent,
|
|
1694
|
+
});
|
|
1695
|
+
try {
|
|
1696
|
+
if (resumable)
|
|
1697
|
+
writeResumeTarget(channel.agentId);
|
|
1698
|
+
else
|
|
1699
|
+
clearResumeTarget();
|
|
1700
|
+
}
|
|
1701
|
+
catch {
|
|
1702
|
+
// Resume persistence is best effort and must never block shutdown.
|
|
1703
|
+
}
|
|
1704
|
+
hint = resumable
|
|
1705
|
+
? `Resume with the command below:\n${resumeCommand(profile, channel.agentId)}`
|
|
1706
|
+
: undefined;
|
|
1392
1707
|
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
: undefined;
|
|
1708
|
+
// Same resumability as the markers above.
|
|
1709
|
+
refreshLastRunRecord();
|
|
1396
1710
|
void finishExit(ctx, instance, bootedFullscreen, hint, undefined, () => disposeRootAndExit(ctx, 0));
|
|
1397
1711
|
},
|
|
1398
1712
|
});
|
|
1399
1713
|
const handleExit = funnel.handleExit;
|
|
1714
|
+
/** The launchpad kernel selector's accept path (the Chat side passes the
|
|
1715
|
+
* chosen kernel through onSwitchBackend — the prop wiring lands together
|
|
1716
|
+
* with the selector's Chat rendering). Persists the choice BEFORE the
|
|
1717
|
+
* teardown, so a crash mid-handoff still leaves the pick remembered, then
|
|
1718
|
+
* exits into the funnel's backend-switch branch: a fresh session on the
|
|
1719
|
+
* new kernel; this kernel's sessions stay persisted (/resume finds them
|
|
1720
|
+
* again after switching back). */
|
|
1721
|
+
const switchBackend = (backend) => {
|
|
1722
|
+
if (exited || restartRequested || backendSwitchRequested !== undefined)
|
|
1723
|
+
return;
|
|
1724
|
+
backendSwitchRequested = backend;
|
|
1725
|
+
writeKernelPrefs({ backend });
|
|
1726
|
+
logRestartEvent('command: backend switch accepted', { backend });
|
|
1727
|
+
notifyChannel(t('kernel-switch-restarting', { name: kernelDisplayName(backend) }));
|
|
1728
|
+
handleExit();
|
|
1729
|
+
};
|
|
1730
|
+
/** /channel changed the active channel's connection. The running CLI child
|
|
1731
|
+
* cannot change its baseUrl or token, so restart through the same funnel
|
|
1732
|
+
* branch as a kernel switch: same kernel, new session, no resume target.
|
|
1733
|
+
* The caller supplies the notice. */
|
|
1734
|
+
const restartFreshSession = (notice) => {
|
|
1735
|
+
if (exited || restartRequested || backendSwitchRequested !== undefined)
|
|
1736
|
+
return;
|
|
1737
|
+
if (backendChoice === 'codex')
|
|
1738
|
+
restartRequested = true;
|
|
1739
|
+
else
|
|
1740
|
+
backendSwitchRequested = backendChoice;
|
|
1741
|
+
logRestartEvent('command: channel connection switch accepted', { backend: backendChoice });
|
|
1742
|
+
notifyChannel(notice);
|
|
1743
|
+
handleExit();
|
|
1744
|
+
};
|
|
1400
1745
|
// Process-level crash backstop (see installNestedUpdateOverflowProcessGuard):
|
|
1401
1746
|
// an uncaught exception or unhandled rejection that is NOT the React #185
|
|
1402
1747
|
// overflow would otherwise take Node's default path and kill the process
|
|
@@ -1413,7 +1758,21 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1413
1758
|
// the funnel as-is: `error !== undefined` is what selects the crash path, so
|
|
1414
1759
|
// a bare undefined would exit 0 while this sink claims the process.
|
|
1415
1760
|
const fatal = fatalReasonForExit(error, origin);
|
|
1416
|
-
|
|
1761
|
+
// Reading .message or String() can throw on a hostile value, and this
|
|
1762
|
+
// runs before the funnel latch: an escape here would reach Node's default
|
|
1763
|
+
// crash handler with no terminal cleanup. runCrashExit serializes the
|
|
1764
|
+
// value safely later.
|
|
1765
|
+
try {
|
|
1766
|
+
ctx.logger.error(`dsh-tui: fatal ${origin}: ${fatal instanceof Error ? fatal.message : String(fatal)}`);
|
|
1767
|
+
}
|
|
1768
|
+
catch {
|
|
1769
|
+
try {
|
|
1770
|
+
ctx.logger.error(`dsh-tui: fatal ${origin}: (unserializable reason)`);
|
|
1771
|
+
}
|
|
1772
|
+
catch {
|
|
1773
|
+
// Logging is gone; the funnel still must run.
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1417
1776
|
return handleExit(fatal);
|
|
1418
1777
|
});
|
|
1419
1778
|
// External injection controller: Chat fills it with `{ append, submit }`
|
|
@@ -1450,15 +1809,25 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1450
1809
|
* 目标喂进来(D:/node/dst.cmd 里 set DSH_TUI_WORKSPACE_TARGET=%CD%),一旦
|
|
1451
1810
|
* 算进去,落地页在本机最主流的启动方式下**永远不出**——用户实测「既没看到
|
|
1452
1811
|
* ob 也没看到 lp」的根因就是这一条。
|
|
1812
|
+
*
|
|
1813
|
+
* Two of the three boot screens are DSH screens: the workspace home lists
|
|
1814
|
+
* DSH sessions and workspaces, and the first-run guide configures a DeepSeek
|
|
1815
|
+
* key. The launchpad is not one of them: it is where the first sentence gets
|
|
1816
|
+
* typed, so a remembered claude kernel boots onto it too (the session the
|
|
1817
|
+
* plugin opened keeps warming underneath) — only a resume target skips it
|
|
1818
|
+
* and opens straight into its conversation.
|
|
1453
1819
|
*/
|
|
1820
|
+
const dshBoot = backendStart === undefined;
|
|
1454
1821
|
const noResume = isLandingLaunch({ launchSessionId, initialPrompt });
|
|
1455
|
-
const openHomeOnBoot = !homeSeen && noResume && requestedWorkspace === undefined;
|
|
1822
|
+
const openHomeOnBoot = dshBoot && !homeSeen && noResume && requestedWorkspace === undefined;
|
|
1456
1823
|
/**
|
|
1457
1824
|
* The launchpad is NOT one-shot the way the workspace home is: every
|
|
1458
1825
|
* ordinary launch starts on it, because it is where the first sentence gets
|
|
1459
|
-
* typed rather than a tutorial that retires itself
|
|
1460
|
-
*
|
|
1461
|
-
*
|
|
1826
|
+
* typed rather than a tutorial that retires itself — on every backend: a
|
|
1827
|
+
* remembered claude kernel lands here exactly like a dsh one (the `dshBoot`
|
|
1828
|
+
* gate below is deliberately absent). `DSH_TUI_NO_LAUNCHPAD=1` is the
|
|
1829
|
+
* escape hatch (an automation that wants the old blank conversation and no
|
|
1830
|
+
* dialog in front of it).
|
|
1462
1831
|
*/
|
|
1463
1832
|
const launchpadOnBoot = noResume && process.env.DSH_TUI_NO_LAUNCHPAD !== '1';
|
|
1464
1833
|
/**
|
|
@@ -1466,12 +1835,15 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1466
1835
|
* two answer different questions, and an install that already knows its
|
|
1467
1836
|
* workspace may still never have configured a key.
|
|
1468
1837
|
*/
|
|
1469
|
-
const onboardingOnBoot = noResume && shouldOfferOnboarding();
|
|
1838
|
+
const onboardingOnBoot = dshBoot && noResume && shouldOfferOnboarding();
|
|
1839
|
+
// 品牌镜像初值(branding.ts):首帧渲染前铺好,避免 Claude 后端先画一屏
|
|
1840
|
+
// 蓝再变橙。Chat 里的 effect 会在品牌解析变化时跟进更新这个镜像。
|
|
1841
|
+
setActiveBrand(resolveBrand(config.brand, backendChoice));
|
|
1470
1842
|
const chat = React.createElement(Chat, {
|
|
1471
1843
|
channel,
|
|
1472
1844
|
renderScene: createChannelSceneOutlet(() => rawChannel.pluginScene),
|
|
1473
1845
|
questionStore,
|
|
1474
|
-
approvalStore,
|
|
1846
|
+
approvalStore: panelApprovals,
|
|
1475
1847
|
injectControllerRef,
|
|
1476
1848
|
openHomeOnBoot,
|
|
1477
1849
|
launchpadOnBoot,
|
|
@@ -1502,6 +1874,19 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1502
1874
|
notifyChannel(t('restart-starting'));
|
|
1503
1875
|
handleExit();
|
|
1504
1876
|
},
|
|
1877
|
+
// Kernel selector (/kernel and the launchpad row): the choice goes to
|
|
1878
|
+
// kernel.json and the exit funnel restarts onto that kernel with a new
|
|
1879
|
+
// session. The old kernel's sessions stay listed for /resume.
|
|
1880
|
+
onSwitchBackend: switchBackend,
|
|
1881
|
+
// /channel: restart with a new session after the connection changed.
|
|
1882
|
+
onRestartFreshSession: restartFreshSession,
|
|
1883
|
+
onProbeKernels: () => probeKernels(ctx, sessionCwd),
|
|
1884
|
+
// The kernel picker's SDK install wizard (the dim Claude row, Enter).
|
|
1885
|
+
onResolveSdkInstallTarget: sdkInstall.resolveTarget,
|
|
1886
|
+
onStartSdkInstall: sdkInstall.start,
|
|
1887
|
+
onCheckPnpm: sdkInstall.checkPnpm,
|
|
1888
|
+
sdkInstallPinned: sdkInstall.pinned,
|
|
1889
|
+
kernelPinned: backendPinned,
|
|
1505
1890
|
// Only a `dsh --profile <name>` launch has a profile installation for
|
|
1506
1891
|
// `/update` to act on; source checkouts and `--config` overlays get the
|
|
1507
1892
|
// unavailable notice instead.
|
|
@@ -1579,6 +1964,9 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1579
1964
|
themeHost,
|
|
1580
1965
|
children: marginChildren,
|
|
1581
1966
|
});
|
|
1967
|
+
// Kernel-switch replacement: send the ready ACK once the first frame after
|
|
1968
|
+
// adoption is flushed. Does nothing on an ordinary boot.
|
|
1969
|
+
armFirstFrameAck(process.stdout);
|
|
1582
1970
|
instance = await render(tree, { exitOnCtrlC: false, terminalImages: bootedTerminalImages });
|
|
1583
1971
|
const isRecompose = lastBootedFullscreen !== undefined;
|
|
1584
1972
|
lastBootedFullscreen = bootedFullscreen;
|
|
@@ -1594,7 +1982,7 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1594
1982
|
// socket that appends text into the prompt input and submits it. Optional
|
|
1595
1983
|
// integration — a bind failure degrades to "no channel" and never fails the
|
|
1596
1984
|
// session. Closed on teardown so the socket and discovery record do not leak.
|
|
1597
|
-
const injectChannel = openInjectChannel(agent
|
|
1985
|
+
const injectChannel = openInjectChannel(agent?.session.id ?? channel.agentId, channel.cwd, {
|
|
1598
1986
|
append: (text) => injectControllerRef.current?.append(text),
|
|
1599
1987
|
submit: () => injectControllerRef.current?.submit(),
|
|
1600
1988
|
}, (message) => ctx.logger.warn(`dsh-tui: ${message}`));
|
|
@@ -1609,7 +1997,12 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1609
1997
|
// Registered on the same teardown funnel as everything else: the disposer
|
|
1610
1998
|
// stops the heartbeat and removes the claim, so a clean exit frees its
|
|
1611
1999
|
// sessions at once while a killed process is reclaimed by liveness.
|
|
1612
|
-
|
|
2000
|
+
// A non-DSH session is in no DSH registry: the bound one is published under
|
|
2001
|
+
// its backend-qualified key (`claude:<id>`), so a second TUI refuses it.
|
|
2002
|
+
ctx.effect(() => startSessionMountHeartbeat(ctx, () => {
|
|
2003
|
+
const ref = rawChannel.sessionRef;
|
|
2004
|
+
return ref.backendId === 'dsh' ? [] : [formatSessionRef(ref)];
|
|
2005
|
+
}));
|
|
1613
2006
|
// Check in the background so registry latency never delays the first frame.
|
|
1614
2007
|
// A failed/offline check is intentionally silent; the manual `/update`
|
|
1615
2008
|
// command remains available regardless of network access.
|
|
@@ -1853,6 +2246,36 @@ export function createExitFunnel(deps) {
|
|
|
1853
2246
|
},
|
|
1854
2247
|
};
|
|
1855
2248
|
}
|
|
2249
|
+
export function runCrashExit(deps) {
|
|
2250
|
+
let detail;
|
|
2251
|
+
try {
|
|
2252
|
+
detail = (deps.serialize ?? serializeCrashDetail)(deps.error);
|
|
2253
|
+
deps.logError(`dsh-tui: exit after error: ${detail.summary}`);
|
|
2254
|
+
deps.appendLog(detail);
|
|
2255
|
+
deps.logRestart('crash', { summary: detail.summary, ...(detail.digest === undefined ? {} : { digest: detail.digest }) });
|
|
2256
|
+
deps.logDebug('dsh-tui: crash detail', { crash: detail.text });
|
|
2257
|
+
}
|
|
2258
|
+
catch {
|
|
2259
|
+
// Ultimate degradation: fixed literals only — never re-read the throwable,
|
|
2260
|
+
// never re-run the sink chain beyond one best-effort attempt.
|
|
2261
|
+
detail = unserializableCrashDetail();
|
|
2262
|
+
try {
|
|
2263
|
+
deps.logError(`dsh-tui: exit after error: ${detail.summary}`);
|
|
2264
|
+
deps.appendLog(detail);
|
|
2265
|
+
deps.logRestart('crash', { summary: detail.summary });
|
|
2266
|
+
}
|
|
2267
|
+
catch {
|
|
2268
|
+
// Nothing left to try — the cleanup below still must run.
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
try {
|
|
2272
|
+
deps.writeResumeMarkers();
|
|
2273
|
+
}
|
|
2274
|
+
catch {
|
|
2275
|
+
// Resume persistence is best effort and must never block the exit.
|
|
2276
|
+
}
|
|
2277
|
+
deps.finish(`dsh-tui crashed: ${detail.message}`);
|
|
2278
|
+
}
|
|
1856
2279
|
/**
|
|
1857
2280
|
* Whether a user exit should leave the resume marker (and print the resume
|
|
1858
2281
|
* hint). Must be judged against the LIVE session behind the channel, not the
|
|
@@ -1866,6 +2289,8 @@ export function createExitFunnel(deps) {
|
|
|
1866
2289
|
*/
|
|
1867
2290
|
export function isExitResumable(deps) {
|
|
1868
2291
|
const agent = deps.liveAgent ?? deps.startupAgent;
|
|
2292
|
+
if (agent === undefined)
|
|
2293
|
+
return false;
|
|
1869
2294
|
return (deps.pendingCount > 0 ||
|
|
1870
2295
|
snapshotLiveSessionEvents(agent.session).some(event => event.type === 'user/message' && event.data.source.kind === 'user'));
|
|
1871
2296
|
}
|
|
@@ -1873,7 +2298,7 @@ export function isExitResumable(deps) {
|
|
|
1873
2298
|
* Finish terminal I/O before handing control to a process-level exit action.
|
|
1874
2299
|
* Exported for scripts/verify-shutdown-fallback.
|
|
1875
2300
|
*/
|
|
1876
|
-
export async function finishExit(ctx, instance, fullscreen, notice, stderrNotice, done) {
|
|
2301
|
+
export async function finishExit(ctx, instance, fullscreen, notice, stderrNotice, done, options = {}) {
|
|
1877
2302
|
try {
|
|
1878
2303
|
// Resolve the Ink runtime twice: the instances map is keyed by stdout
|
|
1879
2304
|
// identity, so a replaced/overridden stdout misses it; the render()
|
|
@@ -1921,8 +2346,14 @@ export async function finishExit(ctx, instance, fullscreen, notice, stderrNotice
|
|
|
1921
2346
|
catch {
|
|
1922
2347
|
ctx.logger.debug('dsh-tui: Ink shutdown detach failed; continuing with generic terminal cleanup');
|
|
1923
2348
|
}
|
|
2349
|
+
// Kernel-switch handoff (see handoffAck.ts):
|
|
2350
|
+
// - keepAltScreen: the old process stays in the alternate screen across
|
|
2351
|
+
// the spawn; it clears it and writes the switch notice there.
|
|
2352
|
+
// - ownsAltScreenExit() false: this is a replacement exiting before its
|
|
2353
|
+
// first frame, and the old process will close the alternate screen.
|
|
2354
|
+
const exitAlt = fullscreen && !(options.keepAltScreen === true) && ownsAltScreenExit() ? EXIT_ALT_SCREEN : '';
|
|
1924
2355
|
const cleanup = [
|
|
1925
|
-
|
|
2356
|
+
exitAlt,
|
|
1926
2357
|
cursor,
|
|
1927
2358
|
DISABLE_MOUSE_TRACKING,
|
|
1928
2359
|
DISABLE_MODIFY_OTHER_KEYS,
|
|
@@ -1935,7 +2366,8 @@ export async function finishExit(ctx, instance, fullscreen, notice, stderrNotice
|
|
|
1935
2366
|
supportsTabStatus() ? wrapForMultiplexer(CLEAR_TAB_STATUS) : '',
|
|
1936
2367
|
].join('');
|
|
1937
2368
|
const suffix = notice === undefined ? '' : `${notice}\n`;
|
|
1938
|
-
|
|
2369
|
+
const restoreFrame = options.keepAltScreen === true ? '\x1b[2J\x1b[H' : '';
|
|
2370
|
+
await writeStream(process.stdout, `${restoreFrame}${cleanup}\r\n${suffix}`);
|
|
1939
2371
|
// Re-drain AFTER the cleanup sequences have landed (#507): terminal
|
|
1940
2372
|
// replies and mouse packets already in flight when the exit started
|
|
1941
2373
|
// keep arriving while cleanup is being written — the detach-time drain
|
|
@@ -2026,42 +2458,46 @@ function writeStream(stream, data) {
|
|
|
2026
2458
|
* terminal handoff the /update path uses, minus the installation step.
|
|
2027
2459
|
* The resume contract is dual-written (env + resume.txt) before this runs.
|
|
2028
2460
|
*/
|
|
2029
|
-
|
|
2461
|
+
/**
|
|
2462
|
+
* The tail of a failed restart / update notice: how to resume the session —
|
|
2463
|
+
* or nothing, when there is none to resume (a backend session the CLI never
|
|
2464
|
+
* persisted hands over an empty id: a hint without an id would mislead).
|
|
2465
|
+
*/
|
|
2466
|
+
function preservedSessionTail(sessionId, hint) {
|
|
2467
|
+
return sessionId === '' ? '\n\n' : ` Your session is preserved — resume with:\n${hint(sessionId)}\n\n`;
|
|
2468
|
+
}
|
|
2469
|
+
function runRestart(ctx, profile, sessionId, hint = id => resumeCommand(profile, id), options = {}) {
|
|
2030
2470
|
logRestartEvent('runRestart: entered, disposing cordis root');
|
|
2031
2471
|
disposeRootAndThen(ctx, () => {
|
|
2032
2472
|
logRestartEvent('runRestart: root disposed, starting restartTui');
|
|
2033
|
-
void restartTui(sessionId).then(restartCode => {
|
|
2473
|
+
void restartTui(sessionId, options).then(restartCode => {
|
|
2034
2474
|
logRestartEvent('runRestart: restartTui resolved', { restartCode });
|
|
2035
2475
|
if (restartCode !== 0) {
|
|
2036
|
-
writeHandoffNotice(`\ndsh-tui restart failed to spawn (exit ${restartCode})
|
|
2037
|
-
`${resumeCommand(profile, sessionId)}\n\n`);
|
|
2476
|
+
writeHandoffNotice(`\ndsh-tui restart failed to spawn (exit ${restartCode}).${preservedSessionTail(sessionId, hint)}`);
|
|
2038
2477
|
}
|
|
2039
2478
|
process.exit(restartCode);
|
|
2040
2479
|
}, restartError => {
|
|
2041
2480
|
const message = restartError instanceof Error ? restartError.message : String(restartError);
|
|
2042
2481
|
logRestartEvent('runRestart: restartTui rejected', { message });
|
|
2043
|
-
writeHandoffNotice(`\ndsh-tui restart failed: ${message}
|
|
2044
|
-
`${resumeCommand(profile, sessionId)}\n\n`);
|
|
2482
|
+
writeHandoffNotice(`\ndsh-tui restart failed: ${message}.${preservedSessionTail(sessionId, hint)}`);
|
|
2045
2483
|
process.exit(1);
|
|
2046
2484
|
});
|
|
2047
2485
|
});
|
|
2048
2486
|
}
|
|
2049
|
-
function runUpdate(ctx, profile, sessionId, targetVersion) {
|
|
2487
|
+
function runUpdate(ctx, profile, sessionId, targetVersion, kernel, hint = id => resumeCommand(profile, id)) {
|
|
2050
2488
|
disposeRootAndThen(ctx, () => {
|
|
2051
2489
|
if (profile === undefined) {
|
|
2052
2490
|
process.stderr.write(`\n${t('update-aborted-no-profile')}\n`);
|
|
2053
2491
|
process.exit(1);
|
|
2054
2492
|
}
|
|
2055
|
-
void updateTuiAndRestart(sessionId, profile, targetVersion).then(({ updateCode, restartCode }) => {
|
|
2493
|
+
void updateTuiAndRestart(sessionId, profile, targetVersion, kernel).then(({ updateCode, restartCode }) => {
|
|
2056
2494
|
if (updateCode !== 0) {
|
|
2057
|
-
process.stderr.write(`\ndsh-tui update failed (exit ${updateCode})
|
|
2058
|
-
`${resumeCommand(profile, sessionId)}\n\n`);
|
|
2495
|
+
process.stderr.write(`\ndsh-tui update failed (exit ${updateCode}).${preservedSessionTail(sessionId, hint)}`);
|
|
2059
2496
|
}
|
|
2060
2497
|
process.exit(restartCode);
|
|
2061
2498
|
}, updateError => {
|
|
2062
2499
|
const message = updateError instanceof Error ? updateError.message : String(updateError);
|
|
2063
|
-
process.stderr.write(`\ndsh-tui update failed: ${message}
|
|
2064
|
-
`${resumeCommand(profile, sessionId)}\n\n`);
|
|
2500
|
+
process.stderr.write(`\ndsh-tui update failed: ${message}.${preservedSessionTail(sessionId, hint)}`);
|
|
2065
2501
|
process.exit(1);
|
|
2066
2502
|
});
|
|
2067
2503
|
});
|
|
@@ -2106,7 +2542,7 @@ function disposeRootAndThen(ctx, done, fallbackCode = 1) {
|
|
|
2106
2542
|
process.exit(fallbackCode);
|
|
2107
2543
|
}, 5000);
|
|
2108
2544
|
timer.unref();
|
|
2109
|
-
void withHostRootCapability(() => ctx.root.fiber.dispose()).then(() => {
|
|
2545
|
+
void withHostRootCapability(() => ctx.root.fiber.dispose()).finally(() => closeBackendResources()).then(() => {
|
|
2110
2546
|
clearTimeout(timer);
|
|
2111
2547
|
done();
|
|
2112
2548
|
}, () => {
|