@deepseek-harness-tui/dsh-tui 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reports every session gets: `/doctor` (the backend-neutral facts plus the
|
|
3
|
+
* backend's own diagnostics lines) and `/export` (the projected transcript as
|
|
4
|
+
* Markdown in the working directory). A composition with a richer source
|
|
5
|
+
* overrides them; the DSH extension exports the durable session log.
|
|
6
|
+
*/
|
|
7
|
+
import { writeFileSync } from 'node:fs';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import { t } from '../../../i18n.js';
|
|
10
|
+
/** One transcript row as an export section; undefined = not exported. */
|
|
11
|
+
function exportSection(row) {
|
|
12
|
+
switch (row.kind) {
|
|
13
|
+
case 'user':
|
|
14
|
+
return row.text === '' ? undefined : `${t('export-user-section')}\n\n${row.text}\n`;
|
|
15
|
+
case 'reasoning':
|
|
16
|
+
return row.text === '' ? undefined : `${t('export-thinking-section')}\n\n${row.text}\n`;
|
|
17
|
+
case 'assistant':
|
|
18
|
+
return row.text === '' ? undefined : `${t('export-assistant-section')}\n\n${row.text}\n`;
|
|
19
|
+
case 'tool': {
|
|
20
|
+
const tool = row.tool;
|
|
21
|
+
if (tool === undefined)
|
|
22
|
+
return undefined;
|
|
23
|
+
const parts = [`${t('export-tool-section', { name: tool.name })}\n\n\`\`\`json\n${tool.argsFull ?? tool.argsText}\n\`\`\`\n`];
|
|
24
|
+
const result = tool.resultFull ?? tool.resultText ?? tool.errorText;
|
|
25
|
+
if (result !== undefined && result !== '')
|
|
26
|
+
parts.push(`${t('export-result-section')}\n\n\`\`\`\n${result}\n\`\`\`\n`);
|
|
27
|
+
return parts.join('\n');
|
|
28
|
+
}
|
|
29
|
+
default:
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export function createCoreReports(deps) {
|
|
34
|
+
/** `/doctor`: the backend-neutral facts plus the backend's own lines. */
|
|
35
|
+
const doctorInfo = () => {
|
|
36
|
+
const session = deps.binding.session;
|
|
37
|
+
const state = deps.state();
|
|
38
|
+
const label = state.backendCapabilities.backendLabel;
|
|
39
|
+
return [
|
|
40
|
+
`Node ${process.version} · ${process.platform} ${process.arch}`,
|
|
41
|
+
t('doctor-backend', { label, id: session.ref.backendId }),
|
|
42
|
+
t('doctor-model', { model: state.model || t('doctor-unknown'), provider: label }),
|
|
43
|
+
t('doctor-cwd', { cwd: state.cwd }),
|
|
44
|
+
t('doctor-context-window', { window: state.contextWindow ?? t('doctor-unknown') }),
|
|
45
|
+
t('doctor-session', { id: session.ref.sessionId }),
|
|
46
|
+
...session.capabilities.diagnostics?.lines() ?? [],
|
|
47
|
+
];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* `/export`: the transcript as this channel projected it (user, thinking,
|
|
51
|
+
* assistant and tool rows), written next to the session's work. Returns
|
|
52
|
+
* the file path, or null when the binding moved on or the write failed.
|
|
53
|
+
*/
|
|
54
|
+
const exportSession = () => {
|
|
55
|
+
const capture = deps.binding.capture();
|
|
56
|
+
const current = () => deps.owner.current() && deps.binding.isCurrent(capture);
|
|
57
|
+
const state = deps.state();
|
|
58
|
+
const parts = [t('export-title'), '', t('export-time', { time: new Date().toLocaleString() }),
|
|
59
|
+
t('export-model', { model: state.model }), t('export-session', { id: state.agentId }), t('export-dir', { cwd: state.cwd }), ''];
|
|
60
|
+
for (const row of state.rows) {
|
|
61
|
+
const section = exportSection(row);
|
|
62
|
+
if (section !== undefined)
|
|
63
|
+
parts.push(section);
|
|
64
|
+
}
|
|
65
|
+
if (!current())
|
|
66
|
+
return null;
|
|
67
|
+
try {
|
|
68
|
+
const target = join(state.cwd, `dsh-tui-export-${Date.now()}.md`);
|
|
69
|
+
writeFileSync(target, parts.join('\n'), 'utf8');
|
|
70
|
+
return current() ? target : null;
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return { doctorInfo, exportSession };
|
|
77
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-level facts a backend reports through its typed capabilities: its
|
|
3
|
+
* native permission mode, reasoning effort, own slash commands, subscription
|
|
4
|
+
* usage, and the context / MCP reports the synchronous `/context` and `/mcp`
|
|
5
|
+
* read. The shared projector owns the transcript; these are the facts it
|
|
6
|
+
* leaves to the channel. A composition whose extension maintains these facts
|
|
7
|
+
* itself (DSH) never installs the observer (`ownsSessionFacts`).
|
|
8
|
+
*/
|
|
9
|
+
import type { LocalCommand } from '../../../adapter/ports/channel-catalog.js';
|
|
10
|
+
import type { AgentEvent } from '../../../agent/events.js';
|
|
11
|
+
import type { AgentSession } from '../../../agent/session.js';
|
|
12
|
+
import type { ChannelState } from '../types.js';
|
|
13
|
+
/** The built-in commands a capability snapshot serves, in catalog order. A
|
|
14
|
+
* snapshot serving every built-in keeps the catalog itself (identity).
|
|
15
|
+
* `permission` is not a LOCAL_COMMANDS name: it appears only when the
|
|
16
|
+
* snapshot appended it for the session's typed `modes` capability (see
|
|
17
|
+
* channel/capabilities.ts), and then rides as BACKEND_PERMISSION_COMMAND.
|
|
18
|
+
* `channel` follows the same ride-along for the typed `channels`
|
|
19
|
+
* capability (BACKEND_CHANNEL_COMMAND), `goal` for `goals`
|
|
20
|
+
* (BACKEND_GOAL_COMMAND). */
|
|
21
|
+
export declare function localCommandsFor(names: readonly string[]): readonly LocalCommand[];
|
|
22
|
+
export declare function createSessionControls(deps: {
|
|
23
|
+
state: () => ChannelState;
|
|
24
|
+
/** The user-facing backend name the backend's own commands are tagged with. */
|
|
25
|
+
backendLabel(): string;
|
|
26
|
+
}): {
|
|
27
|
+
seed: (session: AgentSession, current: () => boolean) => void;
|
|
28
|
+
observe: (batch: readonly AgentEvent[], session: AgentSession, current: () => boolean) => void;
|
|
29
|
+
reset: () => void;
|
|
30
|
+
refreshCommandList: () => void;
|
|
31
|
+
/** Re-resolve the channel model display now (the /channel switch path). */
|
|
32
|
+
refreshModelDisplay: (session: AgentSession) => void;
|
|
33
|
+
/** The last MCP report, refreshing it for next time (`/mcp` is synchronous). */
|
|
34
|
+
mcpReport(session: AgentSession, current: () => boolean): string[] | undefined;
|
|
35
|
+
/** The server names of the last report (undefined before one). */
|
|
36
|
+
mcpServers: () => readonly string[] | undefined;
|
|
37
|
+
};
|
|
38
|
+
export type SessionControls = ReturnType<typeof createSessionControls>;
|
|
39
|
+
//# sourceMappingURL=session-controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-controls.d.ts","sourceRoot":"","sources":["../../../../../src/dsh-adapter/channel/core/session-controls.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAA;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAI7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C;;;;;;;8BAO8B;AAC9B,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,YAAY,EAAE,CASlF;AAMD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,KAAK,EAAE,MAAM,YAAY,CAAA;IACzB,+EAA+E;IAC/E,YAAY,IAAI,MAAM,CAAA;CACvB;oBAoGwB,YAAY,WAAW,MAAM,OAAO,KAAG,IAAI;qBA+B1C,SAAS,UAAU,EAAE,WAAW,YAAY,WAAW,MAAM,OAAO,KAAG,IAAI;iBAyCjF,IAAI;8BApKS,IAAI;IAgLjC,2EAA2E;mCA5DvC,YAAY,KAAG,IAAI;IA8DvD,gFAAgF;uBAC7D,YAAY,WAAW,MAAM,OAAO,GAAG,MAAM,EAAE,GAAG,SAAS;IAI9E,kEAAkE;sBAClD,SAAS,MAAM,EAAE,GAAG,SAAS;EAEhD;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { BACKEND_CHANNEL_COMMAND, BACKEND_GOAL_COMMAND, BACKEND_PERMISSION_COMMAND, LOCAL_COMMANDS } from '../../../commands.js';
|
|
2
|
+
import { t } from '../../../i18n.js';
|
|
3
|
+
import { logForDebugging } from '../../../utils/debug.js';
|
|
4
|
+
/** The built-in commands a capability snapshot serves, in catalog order. A
|
|
5
|
+
* snapshot serving every built-in keeps the catalog itself (identity).
|
|
6
|
+
* `permission` is not a LOCAL_COMMANDS name: it appears only when the
|
|
7
|
+
* snapshot appended it for the session's typed `modes` capability (see
|
|
8
|
+
* channel/capabilities.ts), and then rides as BACKEND_PERMISSION_COMMAND.
|
|
9
|
+
* `channel` follows the same ride-along for the typed `channels`
|
|
10
|
+
* capability (BACKEND_CHANNEL_COMMAND), `goal` for `goals`
|
|
11
|
+
* (BACKEND_GOAL_COMMAND). */
|
|
12
|
+
export function localCommandsFor(names) {
|
|
13
|
+
if (names.length === LOCAL_COMMANDS.length && LOCAL_COMMANDS.every((command, index) => command.name === names[index]))
|
|
14
|
+
return LOCAL_COMMANDS;
|
|
15
|
+
const served = LOCAL_COMMANDS.filter(command => names.includes(command.name));
|
|
16
|
+
const appended = [
|
|
17
|
+
...(names.includes('permission') ? [BACKEND_PERMISSION_COMMAND] : []),
|
|
18
|
+
...(names.includes('channel') ? [BACKEND_CHANNEL_COMMAND] : []),
|
|
19
|
+
...(names.includes('goal') ? [BACKEND_GOAL_COMMAND] : []),
|
|
20
|
+
];
|
|
21
|
+
return appended.length === 0 ? served : [...served, ...appended];
|
|
22
|
+
}
|
|
23
|
+
const debugFailure = (what) => (error) => {
|
|
24
|
+
logForDebugging(`channel: ${what} failed (${error instanceof Error ? error.message : String(error)})`);
|
|
25
|
+
};
|
|
26
|
+
export function createSessionControls(deps) {
|
|
27
|
+
/** The backend's own commands, merged after the local ones. */
|
|
28
|
+
let backendCommands = [];
|
|
29
|
+
/** `/mcp` is synchronous: it reads the last report (refreshed per turn). */
|
|
30
|
+
let mcpLines;
|
|
31
|
+
/** The servers of that report (`/mcp reconnect|toggle` completion). */
|
|
32
|
+
let mcpNames;
|
|
33
|
+
const refreshCommandList = () => {
|
|
34
|
+
const state = deps.state();
|
|
35
|
+
// Local names win, served here or not: a typed `/init` is the local
|
|
36
|
+
// command (or its explicit unavailability), never the backend's. A
|
|
37
|
+
// served `/goal` (the typed capability) wins over a same-named backend
|
|
38
|
+
// command the same way.
|
|
39
|
+
const served = localCommandsFor(state.backendCapabilities.commands);
|
|
40
|
+
const local = new Set([...LOCAL_COMMANDS.map(command => command.name), ...(served.includes(BACKEND_GOAL_COMMAND) ? [BACKEND_GOAL_COMMAND.name] : [])]);
|
|
41
|
+
state.commandList = backendCommands.length === 0
|
|
42
|
+
? served
|
|
43
|
+
: [...served, ...backendCommands.filter(command => !local.has(command.name))];
|
|
44
|
+
};
|
|
45
|
+
const loadBackendCommands = (session, current) => {
|
|
46
|
+
const commands = session.capabilities.commands;
|
|
47
|
+
if (commands === undefined)
|
|
48
|
+
return;
|
|
49
|
+
void commands.list().then(list => {
|
|
50
|
+
if (!current())
|
|
51
|
+
return;
|
|
52
|
+
backendCommands = list.map(command => ({
|
|
53
|
+
name: command.name,
|
|
54
|
+
description: command.description ?? '',
|
|
55
|
+
tag: deps.backendLabel(),
|
|
56
|
+
skill: true,
|
|
57
|
+
origin: 'backend',
|
|
58
|
+
}));
|
|
59
|
+
refreshCommandList();
|
|
60
|
+
deps.state().emit();
|
|
61
|
+
}).catch(debugFailure('backend commands'));
|
|
62
|
+
};
|
|
63
|
+
/** The native mode as the status line shows it: the base mode unmarked,
|
|
64
|
+
* any other one labelled by the backend (plan mode in its own colour). */
|
|
65
|
+
const applyMode = (session, modeId) => {
|
|
66
|
+
const state = deps.state();
|
|
67
|
+
const list = session.capabilities.modes?.list() ?? [];
|
|
68
|
+
const index = list.findIndex(mode => mode.id === modeId);
|
|
69
|
+
state.mode = { id: `${session.ref.backendId}:${modeId}`, label: list[index]?.label ?? modeId, ...(modeId === 'plan' ? { plan: true } : {}) };
|
|
70
|
+
state.modeIndex = index === 0 ? 0 : Math.max(1, index);
|
|
71
|
+
};
|
|
72
|
+
const applyEffort = (session, effort) => {
|
|
73
|
+
const state = deps.state();
|
|
74
|
+
const levels = session.capabilities.effort?.levels() ?? [];
|
|
75
|
+
state.effortLevels = levels.length === 0 ? undefined : levels.map(level => level.id);
|
|
76
|
+
state.reasoningEffort = effort ?? undefined;
|
|
77
|
+
};
|
|
78
|
+
const refreshMcp = (session, current) => {
|
|
79
|
+
const mcp = session.capabilities.mcp;
|
|
80
|
+
if (mcp === undefined)
|
|
81
|
+
return;
|
|
82
|
+
void mcp.status().then(servers => {
|
|
83
|
+
if (!current())
|
|
84
|
+
return;
|
|
85
|
+
mcpNames = servers.map(server => server.name);
|
|
86
|
+
mcpLines = servers.length === 0
|
|
87
|
+
? [t('backend-mcp-none')]
|
|
88
|
+
: [
|
|
89
|
+
t('backend-mcp-heading', { n: servers.length }),
|
|
90
|
+
...servers.map(server => t('backend-mcp-row', {
|
|
91
|
+
name: server.name,
|
|
92
|
+
status: server.status,
|
|
93
|
+
tools: server.toolCount === undefined ? '' : t('backend-mcp-tools', { n: server.toolCount }),
|
|
94
|
+
})),
|
|
95
|
+
...(servers.some(server => server.status === 'needs-auth') ? [t('backend-mcp-needs-auth')] : []),
|
|
96
|
+
];
|
|
97
|
+
}).catch(debugFailure('mcp status'));
|
|
98
|
+
};
|
|
99
|
+
/** `/context` reads `loadedContext`: the backend's own measurement. */
|
|
100
|
+
const refreshContext = (session, current) => {
|
|
101
|
+
const context = session.capabilities.context;
|
|
102
|
+
if (context === undefined)
|
|
103
|
+
return;
|
|
104
|
+
void context.usage('summary').then(usage => {
|
|
105
|
+
if (!current())
|
|
106
|
+
return;
|
|
107
|
+
const state = deps.state();
|
|
108
|
+
const tokens = (n) => t('context-tokens', { n: n.toLocaleString() });
|
|
109
|
+
// The summary report may carry no per-section split (the CLI answers
|
|
110
|
+
// it from the last response's usage): the used categories stand in.
|
|
111
|
+
const sections = usage.sections ?? [];
|
|
112
|
+
const used = usage.categories.filter(category => category.kind === 'used');
|
|
113
|
+
state.loadedContext = {
|
|
114
|
+
sections: (sections.length > 0 ? sections : used).map(item => ({ name: item.name, text: tokens(item.tokens) })),
|
|
115
|
+
contexts: sections.length > 0 ? used.map(category => ({ name: category.name, text: tokens(category.tokens) })) : [],
|
|
116
|
+
files: (usage.files ?? []).map(file => ({ displayPath: file.path.startsWith(`${state.cwd}/`) ? `./${file.path.slice(state.cwd.length + 1)}` : file.path })),
|
|
117
|
+
skills: (usage.skills ?? []).map(skill => ({ name: skill.name, description: tokens(skill.tokens) })),
|
|
118
|
+
tools: (usage.tools ?? []).map(tool => ({ name: tool.server === undefined ? tool.name : `${tool.server} › ${tool.name}`, description: tokens(tool.tokens) })),
|
|
119
|
+
};
|
|
120
|
+
if (state.contextWindow === undefined && usage.max !== undefined && usage.max > 0)
|
|
121
|
+
state.contextWindow = usage.max;
|
|
122
|
+
state.emit();
|
|
123
|
+
}).catch(debugFailure('context usage'));
|
|
124
|
+
};
|
|
125
|
+
/** A freshly bound session: read what it already knows. */
|
|
126
|
+
const seed = (session, current) => {
|
|
127
|
+
backendCommands = [];
|
|
128
|
+
mcpLines = undefined;
|
|
129
|
+
mcpNames = undefined;
|
|
130
|
+
const modes = session.capabilities.modes;
|
|
131
|
+
if (modes !== undefined)
|
|
132
|
+
applyMode(session, modes.current());
|
|
133
|
+
if (session.capabilities.effort !== undefined)
|
|
134
|
+
applyEffort(session, session.capabilities.effort.current());
|
|
135
|
+
// Rebuild even when the backend exposes no commands capability of its
|
|
136
|
+
// own: the capability snapshot may still append /permission for the
|
|
137
|
+
// modes capability, and the first paint must offer it.
|
|
138
|
+
refreshCommandList();
|
|
139
|
+
loadBackendCommands(session, current);
|
|
140
|
+
refreshMcp(session, current);
|
|
141
|
+
refreshContext(session, current);
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Footer model name: when the backend maps the live model id to the model
|
|
145
|
+
* that actually serves the request (relay channels echo the requested id
|
|
146
|
+
* back, see backends/claude/modelEnv.ts), the footer shows the mapped
|
|
147
|
+
* name; data surfaces keep the raw id. A /channel switch also calls this:
|
|
148
|
+
* the backend reads the mapping lazily, so re-running it after the store
|
|
149
|
+
* changed repaints the footer immediately.
|
|
150
|
+
*/
|
|
151
|
+
const refreshModelDisplay = (session) => {
|
|
152
|
+
const state = deps.state();
|
|
153
|
+
const display = session.capabilities.models?.display?.();
|
|
154
|
+
state.modelDisplay = display !== undefined && display !== state.model ? display : undefined;
|
|
155
|
+
};
|
|
156
|
+
/** The session-level events of one admitted batch. */
|
|
157
|
+
const observe = (batch, session, current) => {
|
|
158
|
+
let changed = false;
|
|
159
|
+
for (const event of batch) {
|
|
160
|
+
switch (event.type) {
|
|
161
|
+
case 'mode.changed':
|
|
162
|
+
applyMode(session, event.modeId);
|
|
163
|
+
changed = true;
|
|
164
|
+
break;
|
|
165
|
+
case 'effort.changed':
|
|
166
|
+
applyEffort(session, event.effort);
|
|
167
|
+
changed = true;
|
|
168
|
+
break;
|
|
169
|
+
case 'model.changed':
|
|
170
|
+
case 'session.ready': {
|
|
171
|
+
// Effort levels follow the model.
|
|
172
|
+
if (event.type === 'model.changed' && session.capabilities.effort !== undefined) {
|
|
173
|
+
applyEffort(session, session.capabilities.effort.current());
|
|
174
|
+
}
|
|
175
|
+
refreshModelDisplay(session);
|
|
176
|
+
changed = true;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case 'commands.changed':
|
|
180
|
+
loadBackendCommands(session, current);
|
|
181
|
+
break;
|
|
182
|
+
case 'rate-limit':
|
|
183
|
+
deps.state().rateLimit = { windows: event.info.windows };
|
|
184
|
+
changed = true;
|
|
185
|
+
break;
|
|
186
|
+
case 'turn.end':
|
|
187
|
+
refreshContext(session, current);
|
|
188
|
+
refreshMcp(session, current);
|
|
189
|
+
break;
|
|
190
|
+
default:
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (changed)
|
|
195
|
+
deps.state().emit();
|
|
196
|
+
};
|
|
197
|
+
/** A session switch: forget the replaced session's commands and reports. */
|
|
198
|
+
const reset = () => {
|
|
199
|
+
backendCommands = [];
|
|
200
|
+
mcpLines = undefined;
|
|
201
|
+
mcpNames = undefined;
|
|
202
|
+
refreshCommandList();
|
|
203
|
+
};
|
|
204
|
+
return {
|
|
205
|
+
seed,
|
|
206
|
+
observe,
|
|
207
|
+
reset,
|
|
208
|
+
refreshCommandList,
|
|
209
|
+
/** Re-resolve the channel model display now (the /channel switch path). */
|
|
210
|
+
refreshModelDisplay,
|
|
211
|
+
/** The last MCP report, refreshing it for next time (`/mcp` is synchronous). */
|
|
212
|
+
mcpReport(session, current) {
|
|
213
|
+
refreshMcp(session, current);
|
|
214
|
+
return mcpLines;
|
|
215
|
+
},
|
|
216
|
+
/** The server names of the last report (undefined before one). */
|
|
217
|
+
mcpServers: () => mcpNames,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session switching every composition shares: the `tui/session-switch` veto,
|
|
3
|
+
* the fire-and-forget `tui/session-switched` notice, `/new` and the generic
|
|
4
|
+
* `/resume`. Each is one prepare-then-adopt transaction over the binding,
|
|
5
|
+
* with the backend's way of opening the session injected. The DSH extension
|
|
6
|
+
* injects its create path (preset, route, mount reservation, workspace
|
|
7
|
+
* attach) and keeps its own `/resume`, which parks sessions in this process;
|
|
8
|
+
* any other backend opens through `ChannelLaunchOptions.openSession`.
|
|
9
|
+
*
|
|
10
|
+
* `/new` and `/resume` refuse while a turn runs, and re-check after the open.
|
|
11
|
+
* A backend handshake can take long (the Claude CLI: up to a minute), and a
|
|
12
|
+
* prompt the user sent to the current session meanwhile must not be torn
|
|
13
|
+
* down by the adoption that disposes it, so the candidate is abandoned
|
|
14
|
+
* instead.
|
|
15
|
+
*
|
|
16
|
+
* `/resume` reads the target's durable history before the synchronous
|
|
17
|
+
* adoption and paints it inside the adoption, ahead of the subscription, so
|
|
18
|
+
* nothing the live session emits can land before its history. The
|
|
19
|
+
* cross-process mount ledger is claimed under the backend-qualified key
|
|
20
|
+
* (`claude:<id>`) for the whole attempt, like a DSH disk resume: a session
|
|
21
|
+
* another TUI process drives is refused.
|
|
22
|
+
*/
|
|
23
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
24
|
+
import type { AgentEvent } from '../../../agent/events.js';
|
|
25
|
+
import type { AgentSession } from '../../../agent/session.js';
|
|
26
|
+
import { reserveMount } from '../../../sessionMounts.js';
|
|
27
|
+
import type { ChannelCapabilities } from '../../../adapter/ports/channel-view.js';
|
|
28
|
+
import type { ChannelBinding } from '../binding.js';
|
|
29
|
+
import type { ChannelOwner } from '../owner.js';
|
|
30
|
+
import type { ChannelLaunchOptions } from '../state.js';
|
|
31
|
+
import type { ChannelState, ResumeResult } from '../types.js';
|
|
32
|
+
export type SessionSwitchKind = 'new' | 'resume' | 'agent-view';
|
|
33
|
+
export type SessionSwitchedKind = 'new' | 'resume' | 'rewind' | 'fork' | 'agent-view' | 'background';
|
|
34
|
+
/** A guarded workspace handoff (`/workspace`); never on `ChannelUi.newSession()`. */
|
|
35
|
+
export interface NewSessionTarget {
|
|
36
|
+
readonly cwd: string;
|
|
37
|
+
readonly displayCwd?: string;
|
|
38
|
+
}
|
|
39
|
+
/** One `/new` attempt as the backend opens it. */
|
|
40
|
+
export interface NewSessionPlan {
|
|
41
|
+
/** Claim whatever the attempt must hold before the session exists (DSH:
|
|
42
|
+
* the cross-process mount ledger). Runs once, after planning. */
|
|
43
|
+
reserve?(): Promise<void>;
|
|
44
|
+
/** Open the fresh session; runs inside the binding's `prepare`. */
|
|
45
|
+
open(cwd: string): Promise<AgentSession>;
|
|
46
|
+
/** Ownership work between preparation and adoption (DSH: workspace
|
|
47
|
+
* attachment); may notify, must not throw. */
|
|
48
|
+
attach?(candidate: AgentSession, current: () => boolean): Promise<void>;
|
|
49
|
+
/** The backend's half of the synchronous adoption tail: reset and bind
|
|
50
|
+
* the candidate. Returns the id the session-switched notice names. */
|
|
51
|
+
adopt(candidate: AgentSession): string;
|
|
52
|
+
/** Exactly once on every exit after `reserve`: keep (commit) or release
|
|
53
|
+
* what the plan holds. */
|
|
54
|
+
finish?(committed: boolean): void;
|
|
55
|
+
}
|
|
56
|
+
/** How a backend opens a fresh session for `/new`. */
|
|
57
|
+
export interface NewSessionOpener {
|
|
58
|
+
/**
|
|
59
|
+
* What happens to an input still in the channel's FIFO when `/new` adopts
|
|
60
|
+
* (a parked `tui/input` decision, an `@` or IDE read). `true`: it is
|
|
61
|
+
* stale-dropped with a notice and never delivered (DSH, pinned by
|
|
62
|
+
* verify-session-reset-hygiene scenario 8). Absent: the input belongs to
|
|
63
|
+
* the session it was typed in, so `/new` is abandoned instead (a backend
|
|
64
|
+
* handshake can take a minute).
|
|
65
|
+
*/
|
|
66
|
+
readonly dropsParkedInputs?: boolean;
|
|
67
|
+
/** Synchronous gate before anything else (throws to refuse). */
|
|
68
|
+
assertAllowed?(): void;
|
|
69
|
+
/** Whether a session can be opened at all; notifies when not. */
|
|
70
|
+
available(): boolean;
|
|
71
|
+
/** Everything between the veto and the open. `undefined` stops quietly
|
|
72
|
+
* (the binding moved on); a throw becomes the `new-session-failed` notice. */
|
|
73
|
+
plan(target: {
|
|
74
|
+
readonly cwd: string;
|
|
75
|
+
}, current: () => boolean): Promise<NewSessionPlan | undefined>;
|
|
76
|
+
}
|
|
77
|
+
/** One `/resume` attempt (or a rewind's adoption of its fork) as the
|
|
78
|
+
* backend opens it. */
|
|
79
|
+
export interface ResumeSessionPlan {
|
|
80
|
+
/** Claim the session before it opens (the cross-process mount ledger);
|
|
81
|
+
* a returned result refuses the resume. Runs once, after the veto. */
|
|
82
|
+
reserve?(): Promise<ResumeResult | undefined>;
|
|
83
|
+
/** Open the session and read its durable history; runs inside the
|
|
84
|
+
* binding's `prepare`. */
|
|
85
|
+
open(): Promise<AgentSession>;
|
|
86
|
+
/** The backend's half of the synchronous adoption tail (paints the history
|
|
87
|
+
* read by `open`, then binds). Returns the id the switched notice names. */
|
|
88
|
+
adopt(candidate: AgentSession): string;
|
|
89
|
+
/** Exactly once on every exit after `reserve`: keep or release. */
|
|
90
|
+
finish?(committed: boolean): void;
|
|
91
|
+
}
|
|
92
|
+
/** How a backend reopens a persisted session (`/resume`, a rewind's fork). */
|
|
93
|
+
export interface ResumeSessionOpener {
|
|
94
|
+
plan(target: {
|
|
95
|
+
readonly sessionId: string;
|
|
96
|
+
}): ResumeSessionPlan;
|
|
97
|
+
}
|
|
98
|
+
export declare function createSessionSwitch(ctx: Context, deps: {
|
|
99
|
+
owner: Pick<ChannelOwner, 'current'>;
|
|
100
|
+
binding: Pick<ChannelBinding, 'session' | 'capture' | 'isCurrent' | 'prepare' | 'abandon' | 'adopt'>;
|
|
101
|
+
state: () => Pick<ChannelState, 'agentId' | 'cwd' | 'displayCwd' | 'working' | 'pending'>;
|
|
102
|
+
notify: ChannelState['notify'];
|
|
103
|
+
withDecisionPending<T>(name: string, pending: Promise<T>): Promise<T>;
|
|
104
|
+
/** What a parked decision's staleness is judged by: the same conversation
|
|
105
|
+
* across rebinds (default: the session object itself). */
|
|
106
|
+
conversationKey(session: AgentSession): object;
|
|
107
|
+
describeWorkspace(cwd: string): {
|
|
108
|
+
description?: string;
|
|
109
|
+
};
|
|
110
|
+
resetIdeSelection(): void;
|
|
111
|
+
clearStagedImages(): void;
|
|
112
|
+
opener(): NewSessionOpener | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Monotonic activity of the bound session, compared across the open:
|
|
115
|
+
* inputs dispatched (the input FIFO and `!!`), whether one is still on its
|
|
116
|
+
* way, and live turns started.
|
|
117
|
+
*/
|
|
118
|
+
activity(): {
|
|
119
|
+
readonly inputs: number;
|
|
120
|
+
readonly unsettled: boolean;
|
|
121
|
+
readonly turnStarts: number;
|
|
122
|
+
readonly parked?: string;
|
|
123
|
+
};
|
|
124
|
+
/** How `/resume` reopens a persisted session (undefined = unavailable). */
|
|
125
|
+
resumeOpener?(): ResumeSessionOpener | undefined;
|
|
126
|
+
unavailable(name: string): void;
|
|
127
|
+
}): {
|
|
128
|
+
sessionSwitchVetoed: (kind: SessionSwitchKind, targetSessionId?: string) => Promise<boolean>;
|
|
129
|
+
notifySessionSwitched: (kind: SessionSwitchedKind, sessionId: string, previousSessionId: string) => void;
|
|
130
|
+
newSession: (target?: NewSessionTarget) => Promise<boolean>;
|
|
131
|
+
resumeSession: (sessionId: string, kind?: "resume" | "rewind") => Promise<ResumeResult>;
|
|
132
|
+
};
|
|
133
|
+
export type SessionSwitch = ReturnType<typeof createSessionSwitch>;
|
|
134
|
+
/** The mount ledger as the core uses it (injectable for regressions). */
|
|
135
|
+
export interface SessionMountLedger {
|
|
136
|
+
reserve(key: string): ReturnType<typeof reserveMount>;
|
|
137
|
+
/** Announce a freshly created session (a refusal costs announcement only). */
|
|
138
|
+
announce(key: string): void;
|
|
139
|
+
release(key: string): void;
|
|
140
|
+
}
|
|
141
|
+
/** The process-wide ledger (`~/.dsh-tui/session-mounts.json`). */
|
|
142
|
+
export declare const SESSION_MOUNT_LEDGER: SessionMountLedger;
|
|
143
|
+
/**
|
|
144
|
+
* `/new` and `/resume` for a session served by the core alone: the backend's
|
|
145
|
+
* own `open`, the session's history read ahead of the adoption, then the
|
|
146
|
+
* common projection reset, the new session's identity, capability snapshot
|
|
147
|
+
* and command list, the history painted and the bind. The mount ledger holds
|
|
148
|
+
* the backend-qualified key of the bound session (`claude:<id>`): a resume
|
|
149
|
+
* claims it for the whole attempt and refuses one another TUI process holds;
|
|
150
|
+
* a create announces its fresh id; the replaced session's claim is released.
|
|
151
|
+
*/
|
|
152
|
+
export declare function createBackendOpener(deps: {
|
|
153
|
+
open: NonNullable<ChannelLaunchOptions['openSession']>;
|
|
154
|
+
state: ChannelState;
|
|
155
|
+
rowIds: {
|
|
156
|
+
value: number;
|
|
157
|
+
};
|
|
158
|
+
resetProjection(): void;
|
|
159
|
+
/** Forget the replaced session's subagents and background jobs. */
|
|
160
|
+
resetActivity?(): void;
|
|
161
|
+
snapshotOf(session: AgentSession): ChannelCapabilities;
|
|
162
|
+
/** Forget the replaced session's backend commands and reports. */
|
|
163
|
+
resetControls(): void;
|
|
164
|
+
bind(seed: readonly AgentEvent[]): void;
|
|
165
|
+
/** The bound session (its backend-qualified reference is the ledger key). */
|
|
166
|
+
bound(): AgentSession;
|
|
167
|
+
mounts: SessionMountLedger;
|
|
168
|
+
touch?(sessionId: string): void;
|
|
169
|
+
notify: ChannelState['notify'];
|
|
170
|
+
}): {
|
|
171
|
+
create: NewSessionOpener;
|
|
172
|
+
resume: ResumeSessionOpener;
|
|
173
|
+
};
|
|
174
|
+
//# sourceMappingURL=session-switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-switch.d.ts","sourceRoot":"","sources":["../../../../../src/dsh-adapter/channel/core/session-switch.ts"],"names":[],"mappings":"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"}
|