@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
|
@@ -1,102 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { createDetachedHandleFactory } from './channel/lifetime-resources.js';
|
|
7
|
-
import { createContextBookkeeping } from './channel/context-bookkeeping.js';
|
|
8
|
-
import { resolveContextOccupancy } from './context-occupancy.js';
|
|
9
|
-
import { createChannelActionMethods, createChannelActionReadiness } from './channel/action-readiness.js';
|
|
10
|
-
import { createBindingEvents } from './channel/binding-events.js';
|
|
11
|
-
import { createInitialChannelView } from './channel/state.js';
|
|
12
|
-
import { createChannelProjection } from './channel/projection.js';
|
|
13
|
-
import { createManualCompaction } from './channel/compaction.js';
|
|
14
|
-
import { agentCapabilityEvidence, annotateCommandCapabilities, resolveAgentCapabilities } from './channel/capabilities.js';
|
|
15
|
-
import { createSessionAdoption } from './channel/session-adoption.js';
|
|
16
|
-
import { createRewindPromptAction } from './channel/session-actions.js';
|
|
17
|
-
import { createForkSessionAction } from './channel/session-fork.js';
|
|
18
|
-
import { createRewindToAction } from './channel/session-rewind.js';
|
|
19
|
-
import { createLiveAgentAdoption } from './channel/session-live-adoption.js';
|
|
20
|
-
import { createSessionResumeActions } from './channel/session-resume.js';
|
|
21
|
-
import { createTreeRewindAction } from './channel/session-tree-actions.js';
|
|
22
|
-
import { createModelActions } from './channel/model-actions.js';
|
|
23
|
-
import { createWorkspaceActions } from './channel/workspace-actions.js';
|
|
24
|
-
import { createModelSwitchAction } from './channel/model-switch.js';
|
|
25
|
-
import { createFileActions } from './channel/file-actions.js';
|
|
26
|
-
import { createReportActions } from './channel/reports.js';
|
|
27
|
-
import { createSessionMetadataActions } from './channel/session-metadata.js';
|
|
28
|
-
import { createForeignBrowser } from './migrate/browse.js';
|
|
29
|
-
import { createAgentViewProjection } from './channel/agent-view-projection.js';
|
|
30
|
-
import { createJobProjection } from './channel/job-projection.js';
|
|
31
|
-
import { createExternalCommandInvoker } from './channel/external-commands.js';
|
|
32
|
-
import { createLoadedContextRefresher } from './channel/loaded-context.js';
|
|
33
|
-
import { createSkillCatalog } from './channel/skill-catalog.js';
|
|
34
|
-
import { createBackgroundCurrentAction } from './channel/background-action.js';
|
|
35
|
-
import { createSubagentProjection } from './channel/subagent-projection.js';
|
|
36
|
-
import { createChannelNotifications } from './channel/notifications.js';
|
|
37
|
-
import { createAttachedContextRegistry } from './channel/attached-context.js';
|
|
38
|
-
import { createSelectionAttachments } from './channel/ide-selection.js';
|
|
39
|
-
import { IdeChannel, ideLockDir } from './ide-channel.js';
|
|
40
|
-
import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
|
|
41
|
-
import { readGrantStore } from '../adapter/standard/grants.js';
|
|
42
|
-
import { isCommandCompletionToken, LOCAL_COMMANDS } from '../commands.js';
|
|
43
|
-
import { t } from '../i18n.js';
|
|
44
|
-
import { touchSession } from '../sessionHistory.js';
|
|
45
|
-
import { DEFAULT_SESSION_MODES, resolveSessionModes } from '../sessionModes.js';
|
|
46
|
-
import { channelCommands } from './channel/commands.js';
|
|
47
|
-
import { createChannelEmitter } from './channel/emitter.js';
|
|
48
|
-
import { createInputActions } from './channel/input-actions.js';
|
|
49
|
-
import { createComposerImages } from './channel/composer-images.js';
|
|
50
|
-
import { snapshotLiveSessionEvents } from './compat/liveSession.js';
|
|
51
|
-
import { runForegroundShell } from './compat/shell.js';
|
|
52
|
-
import { createPermissionModeRoster } from './channel/mode-roster.js';
|
|
53
|
-
import { createPermissionModeActions } from './channel/mode-permission-actions.js';
|
|
54
|
-
import { mentionAttachments } from './channel/mentions.js';
|
|
55
|
-
import { legacyPermissionPresetSnapshot, permissionPresetSnapshotFromService, unavailablePermissionPresetSnapshot } from './channel/permissions.js';
|
|
56
|
-
import { createPreferences } from './channel/preferences.js';
|
|
57
|
-
import { createSettingsHosts } from './channel/settings-host.js';
|
|
58
|
-
import { createChannelOwner, registerChannelOwner } from './channel/owner.js';
|
|
59
|
-
import { foldBack } from './channel/transcript.js';
|
|
60
|
-
import { getHostCommandTrees } from './command-trees.js';
|
|
61
|
-
import { installDecisionGuard, markDecisionDispatchTopology } from './decision-guard.js';
|
|
62
|
-
import { dispatchTuiDecision, dispatchTuiNotification, normalizeCancelDecision } from './extension-events.js';
|
|
63
|
-
import { getHostGrantStore } from './host-grants.js';
|
|
64
|
-
import { getHostMessageObserver } from './message-observer.js';
|
|
65
|
-
import { getHostRenderers } from './renderers.js';
|
|
66
|
-
import { getHostSceneRuntime } from './scenes.js';
|
|
67
|
-
import { listSummaries, noteBranch } from './sessions/index.js';
|
|
68
|
-
import { getHostSettingsSections, getLocalSettingsSectionsHost } from './settings-sections.js';
|
|
69
|
-
import { getHostThemes } from './themes.js';
|
|
70
|
-
import { createLocalWorkspaceRuntime, getHostWorkspaceRuntime } from './workspaces.js';
|
|
71
|
-
/** Token buffer below the context window at which the context-low warning fires. */
|
|
72
|
-
const CONTEXT_WARNING_BUFFER_TOKENS = 20_000;
|
|
73
|
-
/**
|
|
74
|
-
* Read the persistence backend's full session list (empty without one) —
|
|
75
|
-
* the agent view's "stopped" rows come from this snapshot.
|
|
76
|
-
* @param ctx - The channel's context.
|
|
77
|
-
* @returns Classified summaries, most recently active first.
|
|
78
|
-
*/
|
|
79
|
-
async function listSessionsSnapshot(ctx) {
|
|
80
|
-
const persistence = ctx.get('sessionPersistence');
|
|
81
|
-
if (!persistence)
|
|
82
|
-
return [];
|
|
83
|
-
return listSummaries(persistence);
|
|
84
|
-
}
|
|
1
|
+
import { createDshSession, isAgentSession } from './backend/session.js';
|
|
2
|
+
import { createCoreChannel } from './channel/core/compose.js';
|
|
3
|
+
import { attachDshExtensions } from './channel/extensions.js';
|
|
4
|
+
import { attachSessionWorkingActivity } from './channel/session-activity.js';
|
|
5
|
+
import { createChannelOwner } from './channel/owner.js';
|
|
85
6
|
/**
|
|
86
7
|
* Create the live channel state for one agent session: replay the durable
|
|
87
|
-
* transcript, subscribe to the
|
|
8
|
+
* transcript, subscribe to the session's events, and expose every TUI action.
|
|
88
9
|
* @internal
|
|
89
10
|
* @param ctx - The plugin context; optional services are resolved via ctx.get.
|
|
90
|
-
* @param
|
|
91
|
-
*
|
|
11
|
+
* @param initial - The session the channel renders; rewinds, resumes, and
|
|
12
|
+
* model switches replace it. A raw DSH agent (direct embedders, fixtures) is
|
|
13
|
+
* wrapped as a DSH session together with `options.handle`.
|
|
92
14
|
* @param options - Boot options: model route, cwd, provider, and the
|
|
93
|
-
* reasoning-effort / working-activity
|
|
15
|
+
* reasoning-effort / working-activity preferences.
|
|
94
16
|
* @returns The live channel state, subscribed and ready to render.
|
|
95
17
|
*/
|
|
96
|
-
export function createChannel(ctx,
|
|
18
|
+
export function createChannel(ctx, initial, options) {
|
|
97
19
|
const owner = createChannelOwner();
|
|
98
20
|
try {
|
|
99
|
-
|
|
21
|
+
const session = isAgentSession(initial) ? initial : createDshSession(ctx, { agent: initial, handle: options.handle });
|
|
22
|
+
const core = createCoreChannel(ctx, session, options, owner);
|
|
23
|
+
// DSH extensions attach only to a DSH session; other backends get the
|
|
24
|
+
// core and whatever their session capabilities offer.
|
|
25
|
+
const native = session.capabilities.native.dsh;
|
|
26
|
+
if (native !== undefined)
|
|
27
|
+
attachDshExtensions(core, ctx, native, options);
|
|
28
|
+
// A backend that builds its own working line (the Claude backend) exposes
|
|
29
|
+
// it as a capability. DSH keeps using its projection above. Without the
|
|
30
|
+
// capability or the publish option nothing is attached.
|
|
31
|
+
if (session.capabilities.workingActivity !== undefined)
|
|
32
|
+
attachSessionWorkingActivity(core, options);
|
|
33
|
+
return core.start();
|
|
100
34
|
}
|
|
101
35
|
catch (error) {
|
|
102
36
|
// Setup is one transaction from the first acquired resource. Preserve the
|
|
@@ -108,975 +42,6 @@ export function createChannel(ctx, initialAgent, options) {
|
|
|
108
42
|
throw error;
|
|
109
43
|
}
|
|
110
44
|
}
|
|
111
|
-
function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
112
|
-
const rowIds = { value: 0 };
|
|
113
|
-
const binding = createChannelBinding(initialAgent, options.handle, owner);
|
|
114
|
-
// Detached work (/fork and agent-view dispatch) is owned until a caller
|
|
115
|
-
// explicitly transfers the temporary handle to its destination ledger.
|
|
116
|
-
const createDetachedHandle = createDetachedHandleFactory(owner);
|
|
117
|
-
const adapterRuntime = adapterRuntimeFor(ctx);
|
|
118
|
-
const themeHost = getHostThemes(ctx.get('tuiThemes'));
|
|
119
|
-
// Detached handles are a stable ledger shared with adoption actions. The
|
|
120
|
-
// agent-view factory itself starts only after the full state surface exists.
|
|
121
|
-
const backgroundHandles = new Map();
|
|
122
|
-
let backgroundCurrentAction;
|
|
123
|
-
let agentView;
|
|
124
|
-
let unsubscribeScenes;
|
|
125
|
-
// D-7 backstop: the extensions row installs the decision-subscription
|
|
126
|
-
// gate, but the channel IS the dispatch path — a stale patch without that
|
|
127
|
-
// row (or a bare embed mounting neither) would otherwise leave tui/input
|
|
128
|
-
// & friends subscribable by default, silently voiding the default-deny
|
|
129
|
-
// posture. Idempotent per cordis root, so the full-patch path installs
|
|
130
|
-
// exactly once whichever side runs first. One store instance serves both
|
|
131
|
-
// the gate and the invoke checkpoint below.
|
|
132
|
-
// Keep a private fallback for bare embedders, but resolve the host-owned
|
|
133
|
-
// store on every operation so a plugin-host row mounted later (or a custom
|
|
134
|
-
// live GrantStore) is not shadowed by an early snapshot.
|
|
135
|
-
const fallbackGrantStore = readGrantStore(undefined, undefined, adapterRuntime);
|
|
136
|
-
const currentGrantStore = () => getHostGrantStore(ctx.get('tuiPluginHost')) ?? fallbackGrantStore;
|
|
137
|
-
installDecisionGuard(ctx, currentGrantStore());
|
|
138
|
-
// The channel is the real DecisionEvents dispatch path. Record that
|
|
139
|
-
// topology so the live driver can distinguish "guard installed" (not a
|
|
140
|
-
// live feature) from "events can actually be dispatched here". The
|
|
141
|
-
// returned disposer is owned by this channel's Cordis lifecycle below.
|
|
142
|
-
const unmarkDecisionTopology = markDecisionDispatchTopology(ctx);
|
|
143
|
-
// This marker is effectful topology state, so own it at acquisition. A
|
|
144
|
-
// later setup failure must roll it back without waiting for final wiring.
|
|
145
|
-
owner.own(unmarkDecisionTopology);
|
|
146
|
-
// Subagent projection owns the child store, transcript row identity and
|
|
147
|
-
// stream batching. Transport subscriptions below only route scoped events.
|
|
148
|
-
const subagentProjection = createSubagentProjection(() => state, {
|
|
149
|
-
rowIds,
|
|
150
|
-
agent: () => binding.agent,
|
|
151
|
-
subagents: () => ctx.get('subagents'),
|
|
152
|
-
lookupChild: id => {
|
|
153
|
-
const agents = ctx.get('agents');
|
|
154
|
-
return agents?.get(id);
|
|
155
|
-
},
|
|
156
|
-
});
|
|
157
|
-
owner.own(() => subagentProjection.dispose());
|
|
158
|
-
const subagentControl = subagentProjection.control;
|
|
159
|
-
// Job projection owns registry callbacks and transcript rows. The optional
|
|
160
|
-
// service attachment has no authority after its injected lifetime ends.
|
|
161
|
-
const jobProjection = createJobProjection(() => state, {
|
|
162
|
-
owner, notify: (...args) => notify(...args), rowIds, agent: () => binding.agent, steer: text => channelCommands(state).steer(text),
|
|
163
|
-
});
|
|
164
|
-
const jobStore = jobProjection.store;
|
|
165
|
-
const jobControl = jobProjection.control;
|
|
166
|
-
const attachJobs = jobProjection.attach;
|
|
167
|
-
const resetJobProjection = jobProjection.reset;
|
|
168
|
-
const reanchorJobProjection = jobProjection.reanchor;
|
|
169
|
-
// The DSH slash-command registry (optional service): /plan, /goal and
|
|
170
|
-
// friends register here; the TUI merges their descriptors into the slash
|
|
171
|
-
// menu and dispatches through `execute` (which logs the paired
|
|
172
|
-
// command/run + command/done records). Absent the service, only the
|
|
173
|
-
// built-in local commands exist.
|
|
174
|
-
const commandService = ctx.get('commands');
|
|
175
|
-
// messages.observe broker (optional service, C-042): mounted by the
|
|
176
|
-
// dsh-tui-plugin-host row; absent the row, publish is a no-op and nothing
|
|
177
|
-
// else changes (soft degradation, #183).
|
|
178
|
-
const messageObserver = getHostMessageObserver(ctx.get('tuiMessageObserver'));
|
|
179
|
-
// Workspace registry runtime (optional service, issue #183): mounted by
|
|
180
|
-
// the bundle patch's dsh-tui-workspaces row; absent the row (stale patch
|
|
181
|
-
// or a bare embedder), degrade to the local-only runtime. plugin.ts owns
|
|
182
|
-
// the degraded-boot warning for profile launches.
|
|
183
|
-
const workspaceService = getHostWorkspaceRuntime(ctx.get('tuiWorkspaces')) ?? createLocalWorkspaceRuntime();
|
|
184
|
-
const commandTrees = getHostCommandTrees(ctx.get('tuiCommandTrees'));
|
|
185
|
-
// The `/settings` screen reads its host on EVERY render, so the host must
|
|
186
|
-
// be a stable object: a fresh literal per call would re-fire the screen's
|
|
187
|
-
// host-keyed effects endlessly (render → new host → effect → state →
|
|
188
|
-
// render). The underlying services are fixed for the channel's lifetime,
|
|
189
|
-
// so compute once and cache.
|
|
190
|
-
// Plugin scene runtime (optional service, same degradation rule as
|
|
191
|
-
// tuiWorkspaces/tuiCommandTrees): mounted by the bundle patch's
|
|
192
|
-
// dsh-tui-scenes row; absent the row, `pluginScene` simply stays undefined.
|
|
193
|
-
const sceneRuntime = getHostSceneRuntime(ctx.get('tuiScenes'));
|
|
194
|
-
// Falls back to the in-package local host when the composition's service
|
|
195
|
-
// row is unavailable (issue #557: the row can be disposed right after
|
|
196
|
-
// load in real compositions); the TUI's own section registers there.
|
|
197
|
-
const settingsSectionsRuntime = getHostSettingsSections(ctx.get('tuiSettingsSections')) ?? getLocalSettingsSectionsHost(ctx);
|
|
198
|
-
// Custom-entry text renderers (optional service, dsh-tui-extensions row):
|
|
199
|
-
// absent the row, unknown plugin event types stay invisible in the
|
|
200
|
-
// transcript, exactly as before the seam existed.
|
|
201
|
-
const rendererRuntime = getHostRenderers(ctx.get('tuiRenderers'));
|
|
202
|
-
// Shift+Tab session-mode cycle: cordis.yml `modes` wins; absent/empty/
|
|
203
|
-
// atom-less → the built-in default/plan/full cycle (sessionModes.ts).
|
|
204
|
-
// Configured entries may additionally pin a durable `permission` preset
|
|
205
|
-
// identity (permission + plan allowed; permission + sandbox/approval is
|
|
206
|
-
// contradictory and dropped with a warning).
|
|
207
|
-
const { modes: resolvedConfiguredSessionModes, dropped: droppedModeIds } = resolveSessionModes(options.modes);
|
|
208
|
-
const invalidConfiguredPermissionIds = resolvedConfiguredSessionModes
|
|
209
|
-
.filter(spec => spec.permission !== undefined && !isCommandCompletionToken(spec.permission))
|
|
210
|
-
.map(spec => spec.id);
|
|
211
|
-
const filteredConfiguredSessionModes = resolvedConfiguredSessionModes
|
|
212
|
-
.filter(spec => spec.permission === undefined || isCommandCompletionToken(spec.permission));
|
|
213
|
-
const configuredSessionModes = filteredConfiguredSessionModes.length > 0
|
|
214
|
-
? filteredConfiguredSessionModes
|
|
215
|
-
: DEFAULT_SESSION_MODES;
|
|
216
|
-
if (droppedModeIds.length > 0) {
|
|
217
|
-
ctx.logger.warn(`dsh-tui: session modes ${droppedModeIds.map(id => `"${id}"`).join(', ')} declare no plan/sandbox/approval/permission atom; dropped from the Shift+Tab cycle`);
|
|
218
|
-
}
|
|
219
|
-
// Runtime permission roster: third-party presets enter the Shift+Tab cycle
|
|
220
|
-
// after the configured/default modes, rebuilt from the live service snapshot.
|
|
221
|
-
const permissionRoster = createPermissionModeRoster(ctx, {
|
|
222
|
-
configuredModes: configuredSessionModes,
|
|
223
|
-
agent: () => binding.agent,
|
|
224
|
-
warn: message => ctx.logger.warn(message),
|
|
225
|
-
});
|
|
226
|
-
const sessionModes = permissionRoster.modes;
|
|
227
|
-
const emitter = createChannelEmitter(() => state, () => subagentProjection.flush());
|
|
228
|
-
// The emitter is created before the complete state surface exists. Put it
|
|
229
|
-
// in the construction rollback funnel immediately; normal release remains
|
|
230
|
-
// idempotent through the same disposer.
|
|
231
|
-
owner.own(() => emitter.dispose());
|
|
232
|
-
// foldRows incremental cursor (see foldRows): rows only append past the
|
|
233
|
-
// fold line, so each pass touches only newly-eligible rows.
|
|
234
|
-
const foldCursor = { rows: null, index: 0 };
|
|
235
|
-
const notify = (...args) => {
|
|
236
|
-
if (!owner.current())
|
|
237
|
-
return () => undefined;
|
|
238
|
-
return channelCommands(state).notify(...args);
|
|
239
|
-
};
|
|
240
|
-
const bookkeeping = createContextBookkeeping(() => state, (text, options) => notify(text, options), percent => t('context-low-warning', { percent }), CONTEXT_WARNING_BUFFER_TOKENS);
|
|
241
|
-
const { warning: contextWarning, resetContextWarning, checkContextWarning, trackPending, untrackPending } = bookkeeping;
|
|
242
|
-
// IDE selection channel (AC-5): one IdeChannel per channel factory, started
|
|
243
|
-
// in the background against the session cwd — lock discovery needs it, env
|
|
244
|
-
// direct-connect does not but tolerates the extra hint. start() is fully
|
|
245
|
-
// non-throwing and self-degrading, so a missing IDE costs nothing and
|
|
246
|
-
// startup never waits on the loopback dial.
|
|
247
|
-
const ideChannel = new IdeChannel();
|
|
248
|
-
void ideChannel.start(process.env, ideLockDir(), options.cwd).catch(() => { });
|
|
249
|
-
let currentSelection;
|
|
250
|
-
ideChannel.onSelection(snapshot => {
|
|
251
|
-
// The channel already clears empty snapshots internally; mirror that here
|
|
252
|
-
// so consumption reads one consistent variable.
|
|
253
|
-
currentSelection = snapshot.isEmpty ? undefined : snapshot;
|
|
254
|
-
// Live prompt-footer badge: the projection must reach the screen BEFORE
|
|
255
|
-
// the user submits — emit() bumps `version` so the useSyncExternalStore
|
|
256
|
-
// tree re-renders with the new badge immediately.
|
|
257
|
-
state.selection = currentSelection;
|
|
258
|
-
state.emit();
|
|
259
|
-
});
|
|
260
|
-
/**
|
|
261
|
-
* Re-target the IDE selection link when the session's working directory
|
|
262
|
-
* changes (/resume adopts the persisted header cwd, /workspace switches to
|
|
263
|
-
* another directory, a background session is adopted): a selection made in
|
|
264
|
-
* the OLD workspace would otherwise stay projected — the badge shows it and
|
|
265
|
-
* the next submit attaches the wrong file — and the OLD link would keep
|
|
266
|
-
* pushing the old window's selections into the new workspace.
|
|
267
|
-
*
|
|
268
|
-
* rebind() drops the link and rediscovers against the new cwd (env-direct
|
|
269
|
-
* reconnects to the same spawned server; lock scan only ever returns
|
|
270
|
-
* candidates whose workspaceFolders cover the new cwd). Callers set
|
|
271
|
-
* state.cwd BEFORE this runs, so it reads the fresh value (maintainer
|
|
272
|
-
* review round 3: this used to only clear the cached selection and keep
|
|
273
|
-
* the stale connection alive).
|
|
274
|
-
*/
|
|
275
|
-
const resetIdeSelection = () => {
|
|
276
|
-
currentSelection = undefined;
|
|
277
|
-
state.selection = undefined;
|
|
278
|
-
state.emit();
|
|
279
|
-
void ideChannel.rebind(state.cwd).catch(() => { });
|
|
280
|
-
};
|
|
281
|
-
const selectionAttachments = createSelectionAttachments();
|
|
282
|
-
// "Send to Chat" (side-panel §6.7): staged panel contexts are a session-scoped
|
|
283
|
-
// projection like the selection above — the registry writes through the live
|
|
284
|
-
// state (so the shared `session-projection reset` clears them with everything
|
|
285
|
-
// else) and the submit path takes them off in one step.
|
|
286
|
-
const contextRegistry = createAttachedContextRegistry(() => state, () => state.emit());
|
|
287
|
-
const composer = createComposerImages(ctx, owner, { generation: () => state.agentBindingGeneration });
|
|
288
|
-
const inputDelivery = createInputDelivery(ctx, owner, binding, () => state, (...args) => notify(...args), trackPending, untrackPending, composer, () => currentSelection, (messageId, info) => selectionAttachments.remember(messageId, info), () => contextRegistry.consume());
|
|
289
|
-
const { dispatchUserText, deliverUserText, retireAttachment, withDecisionPending, clearStagedImages } = inputDelivery;
|
|
290
|
-
/**
|
|
291
|
-
* The `tui/session-switch` decision event (pi's `session_before_switch`),
|
|
292
|
-
* fired before `/new` or `/resume` replaces the live session (rewind has
|
|
293
|
-
* its own prompt event). The first answering plugin may veto the switch;
|
|
294
|
-
* the reason is toasted here so the fallback string stays host-localized.
|
|
295
|
-
*/
|
|
296
|
-
const sessionSwitchVetoed = async (kind, targetSessionId) => {
|
|
297
|
-
// D-6 stale detection captures the AGENT REFERENCE (session ids are
|
|
298
|
-
// reusable — ABA): a slow decision must not let an older /resume roll
|
|
299
|
-
// over a newer session the user already switched to mid-await.
|
|
300
|
-
const originAgent = binding.agent;
|
|
301
|
-
const decision = await withDecisionPending('tui/session-switch', dispatchTuiDecision(ctx, 'tui/session-switch', {
|
|
302
|
-
kind,
|
|
303
|
-
...(targetSessionId === undefined ? {} : { targetSessionId }),
|
|
304
|
-
sessionId: state.agentId,
|
|
305
|
-
cwd: state.cwd,
|
|
306
|
-
}, normalizeCancelDecision));
|
|
307
|
-
if (binding.agent !== originAgent) {
|
|
308
|
-
// The world changed while the decision parked: drop the pending
|
|
309
|
-
// switch instead of replacing the user's newer session.
|
|
310
|
-
notify(t('ext-stale-dropped'), { color: 'warning', timeoutMs: 4000 });
|
|
311
|
-
return true;
|
|
312
|
-
}
|
|
313
|
-
if (decision !== undefined) {
|
|
314
|
-
notify(decision.reason ?? t('ext-action-cancelled'), { color: 'warning', timeoutMs: 4000 });
|
|
315
|
-
return true;
|
|
316
|
-
}
|
|
317
|
-
return false;
|
|
318
|
-
};
|
|
319
|
-
/** Fire-and-forget `tui/session-switched` (parallel): per-session plugin
|
|
320
|
-
* state rebinds here. Listener failures are logged, never propagated —
|
|
321
|
-
* the switch itself already succeeded. */
|
|
322
|
-
const notifySessionSwitched = (kind, sessionId, previousSessionId) => {
|
|
323
|
-
try {
|
|
324
|
-
void dispatchTuiNotification(ctx, 'tui/session-switched', { kind, sessionId, previousSessionId, cwd: state.cwd }).catch((error) => {
|
|
325
|
-
ctx.logger.warn('dsh-tui: tui/session-switched listener failed: %o', error);
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
catch (error) {
|
|
329
|
-
// A bare embedder's context may lack the event bus entirely; the
|
|
330
|
-
// switch itself already succeeded, so this stays a log line.
|
|
331
|
-
ctx.logger.warn('dsh-tui: tui/session-switched dispatch failed: %o', error);
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
/**
|
|
335
|
-
* Swap the live agent for a freshly created fork (rewindTo and the session
|
|
336
|
-
* tree's rewindToNode share this tail): reset every session-scoped
|
|
337
|
-
* projection, replay the fork's seed into a fresh transcript (tokens/
|
|
338
|
-
* spinner counters land back at the rewind point, matching the fork),
|
|
339
|
-
* rebind subscriptions to the new agent, and free the replaced handle.
|
|
340
|
-
* Returns the source session's id (for the session-switched notification).
|
|
341
|
-
*/
|
|
342
|
-
// Installed after ChannelState initialization. The action surface is inert
|
|
343
|
-
// during construction, then delegates its synchronous adoption tail to the
|
|
344
|
-
// binding-owned session-adoption module.
|
|
345
|
-
let adoptForkedAgent;
|
|
346
|
-
/** Monotonic token: only the latest `interruptAndDeliver` re-queues, so a
|
|
347
|
-
* second interrupt while the abort settles cannot double-deliver. */
|
|
348
|
-
const inputConvergence = { interruptSeq: 0, cancelInFlight: false };
|
|
349
|
-
// Cancellation is asynchronous: a fast second Esc can arrive after the
|
|
350
|
-
// driver has accepted the first abort but before its turn/end event lands.
|
|
351
|
-
// Do not cancel the same driver twice, or the second cancel can swallow the
|
|
352
|
-
// replacement work queued by interruptAndDeliver and leave the UI gated on
|
|
353
|
-
// a working flag that has not observed turn/end yet.
|
|
354
|
-
// Model selection is installed by bindAgent; route/effort state is owned by model-actions.
|
|
355
|
-
const selection = { current: undefined, assembled: undefined };
|
|
356
|
-
// Model/effort/preset actions are composed after state construction.
|
|
357
|
-
// Registry command policy and rc.8 image encoding are an owner-scoped module.
|
|
358
|
-
const externalCommands = createExternalCommandInvoker(ctx, {
|
|
359
|
-
commandService,
|
|
360
|
-
runtime: adapterRuntime,
|
|
361
|
-
agent: () => binding.agent,
|
|
362
|
-
capture: () => binding.capture(),
|
|
363
|
-
bindingCurrent: capture => binding.isCurrent(capture),
|
|
364
|
-
allows: (subject, permission, scope) => currentGrantStore().allows(subject, permission, scope),
|
|
365
|
-
composer,
|
|
366
|
-
attachments: () => mentionAttachments(ctx),
|
|
367
|
-
notify: (...args) => notify(...args),
|
|
368
|
-
});
|
|
369
|
-
const executeRegistryCommand = externalCommands.invokeText;
|
|
370
|
-
// Durable mode folds/transitions are composed after state construction.
|
|
371
|
-
// Model/preset completion caches are owned by model-actions.ts.
|
|
372
|
-
// Session actions close over these inert placeholders. They are explicitly
|
|
373
|
-
// installed after ChannelState initialization below.
|
|
374
|
-
let settleManualCompaction;
|
|
375
|
-
let compactManualSession;
|
|
376
|
-
let cancelManualCompaction;
|
|
377
|
-
let forkSessionAction;
|
|
378
|
-
let rewindToAction;
|
|
379
|
-
let rewindToNodeAction;
|
|
380
|
-
let resumeToAction;
|
|
381
|
-
let newSessionAction;
|
|
382
|
-
let resumeInto;
|
|
383
|
-
let adoptLiveAgent;
|
|
384
|
-
// This is the one necessary cyclic seam: mode actions need the completed
|
|
385
|
-
// state, while the state exposes their command surface. It is assigned before
|
|
386
|
-
// the channel starts binding/session observation.
|
|
387
|
-
let modeActions;
|
|
388
|
-
let modelActions;
|
|
389
|
-
let workspaceActions;
|
|
390
|
-
let switchModelAction;
|
|
391
|
-
let fileActions;
|
|
392
|
-
let reportActions;
|
|
393
|
-
let sessionMetadataActions;
|
|
394
|
-
let localActions;
|
|
395
|
-
let commandCompletions;
|
|
396
|
-
const actionReadiness = createChannelActionReadiness();
|
|
397
|
-
const getReadyActions = () => {
|
|
398
|
-
owner.assertActive();
|
|
399
|
-
return actionReadiness.getReadyActions();
|
|
400
|
-
};
|
|
401
|
-
const actionMethods = createChannelActionMethods(getReadyActions);
|
|
402
|
-
// Capability facts for the bound agent (channel/capabilities.ts). Reads are
|
|
403
|
-
// service lookups, so both consumers may call it freely: the public
|
|
404
|
-
// `capabilities()` accessor and the command-list annotation below.
|
|
405
|
-
const capabilitiesOf = () => resolveAgentCapabilities(agentCapabilityEvidence(ctx, binding.agent));
|
|
406
|
-
// Official occupancy source (absent in compositions without the token meter):
|
|
407
|
-
// `read` is a cached lookup, so the accessor on the state below stays cheap.
|
|
408
|
-
const contextPressure = options.contextPressure;
|
|
409
|
-
const state = {
|
|
410
|
-
...createInputActions(() => state, () => binding.agent, owner, inputConvergence, composer, (text, placement, images) => dispatchUserText(text, placement, images), (command, includeInContext) => getReadyActions().runLocalCommand(command, includeInContext)),
|
|
411
|
-
subscribe: emitter.subscribe,
|
|
412
|
-
emit: emitter.emit,
|
|
413
|
-
emitStream: emitter.emitStream,
|
|
414
|
-
...createSettingsHosts(ctx, owner.assertActive),
|
|
415
|
-
...createPreferences(() => state),
|
|
416
|
-
/** Mount-owned settings namespace: the section registers under it, so this
|
|
417
|
-
* is the only ns whose section carries the TUI's user layer. */
|
|
418
|
-
settingsNamespace: options.settingsNs ?? 'dsh-tui',
|
|
419
|
-
get autoRecapOnOpen() {
|
|
420
|
-
const settings = ctx.get('settings');
|
|
421
|
-
if (settings === undefined)
|
|
422
|
-
return false;
|
|
423
|
-
const ns = settings.describe({ redactSecrets: true }).find(entry => entry.ns === state.settingsNamespace);
|
|
424
|
-
return ns?.value?.recapOnOpen !== false;
|
|
425
|
-
},
|
|
426
|
-
...createInitialChannelView(options, {
|
|
427
|
-
agentId: binding.agent.id,
|
|
428
|
-
sessionId: binding.agent.session.id,
|
|
429
|
-
mode: sessionModes[0],
|
|
430
|
-
cwdDescription: workspaceService.describe(options.cwd).description ?? options.cwd,
|
|
431
|
-
}),
|
|
432
|
-
// Deprecated pre-rename alias of `minimalUi`. An accessor is required here
|
|
433
|
-
// (a field set in createInitialChannelView would be copied by the spread
|
|
434
|
-
// into a stale data property). Read-only on purpose: the only supported
|
|
435
|
-
// write path is `setMinimalUi()` / its `setMinimal()` alias, and the
|
|
436
|
-
// frozen `ChannelUi` view third-party scenes receive exposes it read-only
|
|
437
|
-
// anyway.
|
|
438
|
-
get minimal() {
|
|
439
|
-
return state.minimalUi;
|
|
440
|
-
},
|
|
441
|
-
/**
|
|
442
|
-
* Context occupancy is DERIVED here, not stored: it combines the cached
|
|
443
|
-
* host projection value (a map lookup) with this channel's own fallback
|
|
444
|
-
* sample and capacity. An accessor is what keeps "one source of truth"
|
|
445
|
-
* true without republishing a derived value from every mutation site that
|
|
446
|
-
* can move the window or the sample (replay, resume, model switch, reset).
|
|
447
|
-
*/
|
|
448
|
-
get contextOccupancy() {
|
|
449
|
-
return resolveContextOccupancy(contextPressure?.read(state.sessionId), state.lastUsage, state.contextWindow);
|
|
450
|
-
},
|
|
451
|
-
// Annotated from the start: Help and `/` completion read `commandList`
|
|
452
|
-
// before the first skill-catalog refresh publishes a new one, and a command
|
|
453
|
-
// whose capability is missing must never look usable in that window.
|
|
454
|
-
commandList: annotateCommandCapabilities(LOCAL_COMMANDS, capabilitiesOf()),
|
|
455
|
-
capabilities: capabilitiesOf,
|
|
456
|
-
...actionMethods,
|
|
457
|
-
subagentControl,
|
|
458
|
-
jobControl,
|
|
459
|
-
stagedImageGeneration: composer.stagedImageGeneration,
|
|
460
|
-
stageImage: composer.stageImage,
|
|
461
|
-
stageComposerImage: composer.stageComposerImage,
|
|
462
|
-
hasStagedImage: composer.hasStagedImage,
|
|
463
|
-
discardStagedImage: composer.discardStagedImage,
|
|
464
|
-
stagedImage: composer.stagedImage,
|
|
465
|
-
stagedImageLimits: composer.stagedImageLimits,
|
|
466
|
-
// "Send to Chat" projection + actions (see `contextRegistry` above; its
|
|
467
|
-
// methods close over the registry's own state, so they carry no `this`).
|
|
468
|
-
attachedContexts: [],
|
|
469
|
-
attachContext: contextRegistry.attach,
|
|
470
|
-
detachContext: contextRegistry.detach,
|
|
471
|
-
/**
|
|
472
|
-
* The `tui/rewind-prompt` decision event (pi's `session_before_fork`):
|
|
473
|
-
* fired when the rewind picker confirms a message, before any fork
|
|
474
|
-
* work. The first answering plugin may cancel the rewind (the picker
|
|
475
|
-
* stays open; the reason is toasted here so the UI string stays
|
|
476
|
-
* host-localized when absent) or offer extra modes rendered in the
|
|
477
|
-
* confirm pane. Returns 'cancel', the modes, or null for "no opinion".
|
|
478
|
-
*/
|
|
479
|
-
promptRewind: createRewindPromptAction(ctx, {
|
|
480
|
-
agent: () => binding.agent,
|
|
481
|
-
state: () => state,
|
|
482
|
-
withDecisionPending,
|
|
483
|
-
notify,
|
|
484
|
-
}),
|
|
485
|
-
buildSessionTree: createSessionTreeReader(ctx, binding, () => state.cwd, (...args) => notify(...args), owner),
|
|
486
|
-
notify: createChannelNotifications(() => state, owner),
|
|
487
|
-
permissionPresets() {
|
|
488
|
-
let service;
|
|
489
|
-
try {
|
|
490
|
-
service = ctx.get('permissionPresets');
|
|
491
|
-
}
|
|
492
|
-
catch {
|
|
493
|
-
return unavailablePermissionPresetSnapshot();
|
|
494
|
-
}
|
|
495
|
-
if (service === undefined)
|
|
496
|
-
return legacyPermissionPresetSnapshot(state.mode.sandbox);
|
|
497
|
-
return permissionPresetSnapshotFromService(service, binding.agent.session);
|
|
498
|
-
},
|
|
499
|
-
settingsSections() {
|
|
500
|
-
return settingsSectionsRuntime?.list() ?? [];
|
|
501
|
-
},
|
|
502
|
-
subscribeSettingsSections(listener) {
|
|
503
|
-
return emitter.subscribe(listener);
|
|
504
|
-
},
|
|
505
|
-
pluginScene: sceneRuntime?.active,
|
|
506
|
-
openPluginScene(id) {
|
|
507
|
-
return sceneRuntime?.open(id) ?? false;
|
|
508
|
-
},
|
|
509
|
-
closePluginScene() {
|
|
510
|
-
sceneRuntime?.close();
|
|
511
|
-
},
|
|
512
|
-
releaseContributions() {
|
|
513
|
-
// Owner cleanup is exhaustive, but it can report an external cleanup
|
|
514
|
-
// failure. The emitter and the IDE loopback link are both OUTSIDE the
|
|
515
|
-
// owner and must still stop no matter which earlier step throws — a
|
|
516
|
-
// bare trailing ideChannel.stop() used to be skipped whenever
|
|
517
|
-
// owner.dispose() threw, leaking the socket (maintainer review round 3).
|
|
518
|
-
try {
|
|
519
|
-
owner.dispose();
|
|
520
|
-
}
|
|
521
|
-
finally {
|
|
522
|
-
try {
|
|
523
|
-
emitter.dispose();
|
|
524
|
-
}
|
|
525
|
-
finally {
|
|
526
|
-
ideChannel.stop();
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
traceEvents() {
|
|
531
|
-
// Immutable per-append snapshot (dsh-session caches the frozen array);
|
|
532
|
-
// reads follow agent swaps (/resume /rewind /new) automatically.
|
|
533
|
-
return snapshotLiveSessionEvents(binding.agent.session);
|
|
534
|
-
},
|
|
535
|
-
};
|
|
536
|
-
// Register the raw state before any specialist can synchronously publish a
|
|
537
|
-
// callback. The renderer lease binds its external authority later, but this
|
|
538
|
-
// owner already makes teardown and construction failure fail closed.
|
|
539
|
-
registerChannelOwner(state, owner);
|
|
540
|
-
// The projection's change feed is the only thing that can move occupancy
|
|
541
|
-
// between session events (a compaction rewriting the surface, the prompt
|
|
542
|
-
// growing before the next request); republish so the footer, the status
|
|
543
|
-
// commands and the warning read the fresh value immediately. The store is
|
|
544
|
-
// host-wide, so the emit is unconditional — the accessor already ignores
|
|
545
|
-
// another session's value.
|
|
546
|
-
if (contextPressure !== undefined) {
|
|
547
|
-
owner.own(contextPressure.subscribe(() => {
|
|
548
|
-
if (owner.current())
|
|
549
|
-
state.emit();
|
|
550
|
-
}));
|
|
551
|
-
}
|
|
552
|
-
// Agent-view is activated after the complete state/action surface exists:
|
|
553
|
-
// no roster callback or persistence continuation can observe an unbound UI.
|
|
554
|
-
agentView = createAgentViewProjection(ctx, {
|
|
555
|
-
owner, binding, cwd: () => state.cwd,
|
|
556
|
-
configuredPreset: options.configuredPreset,
|
|
557
|
-
configuredProvider: options.configuredProvider,
|
|
558
|
-
configuredModel: options.configuredModel,
|
|
559
|
-
provider: options.provider, model: options.model,
|
|
560
|
-
notify,
|
|
561
|
-
listPersisted: () => listSessionsSnapshot(ctx),
|
|
562
|
-
createDetached: createDetachedHandle,
|
|
563
|
-
sessionSwitchVetoed: (kind, sessionId) => sessionSwitchVetoed(kind, sessionId),
|
|
564
|
-
adoptLive: target => adoptLiveAgent(target),
|
|
565
|
-
resumeInto: (sessionId, kind, keepCurrent) => resumeInto(sessionId, kind, keepCurrent),
|
|
566
|
-
backgroundCurrent: () => backgroundCurrentAction(),
|
|
567
|
-
backgroundHandles,
|
|
568
|
-
});
|
|
569
|
-
// The injection callback may synchronously publish its initial list, so it
|
|
570
|
-
// is installed only after the full action surface is ready below.
|
|
571
|
-
const startJobs = () => {
|
|
572
|
-
if (typeof ctx.inject === 'function') {
|
|
573
|
-
ctx.inject(['jobs'], jobsCtx => {
|
|
574
|
-
attachJobs(jobsCtx.jobs, dispose => jobsCtx.effect(() => dispose));
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
else {
|
|
578
|
-
attachJobs(ctx.get?.('jobs'));
|
|
579
|
-
}
|
|
580
|
-
};
|
|
581
|
-
// Catalog/context services own their caches, registrations and async origin fences.
|
|
582
|
-
const skillCatalog = createSkillCatalog(ctx, {
|
|
583
|
-
owner,
|
|
584
|
-
commandService,
|
|
585
|
-
agent: () => binding.agent,
|
|
586
|
-
cwd: () => state.cwd,
|
|
587
|
-
setCommands(commands) {
|
|
588
|
-
// Annotate before publishing: Help and `/` completion both read
|
|
589
|
-
// `commandList`, so a command whose capability is missing says so
|
|
590
|
-
// instead of looking usable and failing on use.
|
|
591
|
-
state.commandList = annotateCommandCapabilities(commands, capabilitiesOf());
|
|
592
|
-
state.emit();
|
|
593
|
-
},
|
|
594
|
-
commandDescriptions: name => commandTrees?.descriptions(name),
|
|
595
|
-
// Attached-context pass-through (T03 consumes the third parameter in the
|
|
596
|
-
// fallback branch): the skill catalog never loses the FIFO/decision fence.
|
|
597
|
-
deliverUserText: (text, placement, attach) => deliverUserText(text, placement, [], attach),
|
|
598
|
-
});
|
|
599
|
-
const skillViewOptions = skillCatalog.viewOptions;
|
|
600
|
-
const skillRegistryFor = skillCatalog.registryFor;
|
|
601
|
-
const refreshCommandList = skillCatalog.refreshCommands;
|
|
602
|
-
const refreshSkillCommands = skillCatalog.refreshSkillCommands;
|
|
603
|
-
const releaseSkillCommands = skillCatalog.release;
|
|
604
|
-
// Each helper captures binding/cwd at invocation, rather than receiving a
|
|
605
|
-
// root-state bag. Its late completions are rejected by owner + binding.
|
|
606
|
-
fileActions = createFileActions({
|
|
607
|
-
owner,
|
|
608
|
-
capture: () => binding.capture(),
|
|
609
|
-
current: capture => binding.isCurrent(capture),
|
|
610
|
-
cwd: () => state.cwd,
|
|
611
|
-
fs: () => ctx.get('fs'),
|
|
612
|
-
});
|
|
613
|
-
reportActions = createReportActions(ctx, {
|
|
614
|
-
owner,
|
|
615
|
-
capture: () => binding.capture(),
|
|
616
|
-
current: capture => binding.isCurrent(capture),
|
|
617
|
-
cwd: () => state.cwd,
|
|
618
|
-
model: () => state.model,
|
|
619
|
-
provider: () => options.provider,
|
|
620
|
-
contextWindow: () => state.contextWindow,
|
|
621
|
-
sessionTitle: () => state.sessionTitle,
|
|
622
|
-
runtime: adapterRuntime,
|
|
623
|
-
grantStore: currentGrantStore,
|
|
624
|
-
});
|
|
625
|
-
const foreignBrowser = createForeignBrowser(() => ctx.get('sessionPersistence'), owner.signal);
|
|
626
|
-
sessionMetadataActions = createSessionMetadataActions(ctx, {
|
|
627
|
-
owner,
|
|
628
|
-
binding,
|
|
629
|
-
provider: () => state.provider,
|
|
630
|
-
model: () => state.model,
|
|
631
|
-
emit: () => state.emit(),
|
|
632
|
-
sessionTitle: () => state.sessionTitle,
|
|
633
|
-
setSessionTitle: title => { state.sessionTitle = title; },
|
|
634
|
-
setSessionColor: color => { state.sessionColor = color; },
|
|
635
|
-
forgetAgentView: sessionId => agentView.forget(sessionId),
|
|
636
|
-
setPersistedSessions: rows => agentView.setPersisted(rows),
|
|
637
|
-
skillRegistryFor,
|
|
638
|
-
skillViewOptions,
|
|
639
|
-
});
|
|
640
|
-
const loadedContext = createLoadedContextRefresher(ctx, {
|
|
641
|
-
owner,
|
|
642
|
-
agent: () => binding.agent,
|
|
643
|
-
cwd: () => state.cwd,
|
|
644
|
-
skillRegistryFor,
|
|
645
|
-
skillViewOptions,
|
|
646
|
-
publish(context) { state.loadedContext = context; state.emit(); },
|
|
647
|
-
});
|
|
648
|
-
const refreshLoadedContext = loadedContext.refresh;
|
|
649
|
-
const startRuntimeSubscriptions = () => {
|
|
650
|
-
owner.own(ctx.on('commands/change', () => { if (owner.current())
|
|
651
|
-
modeActions.refreshMode(); }));
|
|
652
|
-
owner.own(settingsSectionsRuntime?.subscribe(() => { if (owner.current())
|
|
653
|
-
state.emit(); }) ?? (() => undefined));
|
|
654
|
-
const disposeScenes = sceneRuntime?.subscribe(() => {
|
|
655
|
-
if (state.pluginScene === sceneRuntime.active)
|
|
656
|
-
return;
|
|
657
|
-
state.pluginScene = sceneRuntime.active;
|
|
658
|
-
state.emit();
|
|
659
|
-
});
|
|
660
|
-
if (disposeScenes !== undefined) {
|
|
661
|
-
unsubscribeScenes = disposeScenes;
|
|
662
|
-
owner.own(() => {
|
|
663
|
-
if (unsubscribeScenes !== disposeScenes)
|
|
664
|
-
return;
|
|
665
|
-
unsubscribeScenes = undefined;
|
|
666
|
-
disposeScenes();
|
|
667
|
-
});
|
|
668
|
-
}
|
|
669
|
-
};
|
|
670
|
-
const bash = ctx.get('shell');
|
|
671
|
-
const projector = createChannelProjection(state, {
|
|
672
|
-
agent: () => binding.agent, rowIds, resetContextWarning, jobs: jobStore, inputConvergence,
|
|
673
|
-
checkContextWarning, notify: (...args) => notify(...args),
|
|
674
|
-
tools: ctx.get('tools'), renderer: rendererRuntime,
|
|
675
|
-
attachments: () => ctx.get('attachments'),
|
|
676
|
-
selectionAttached: messageId => selectionAttachments.take(messageId),
|
|
677
|
-
});
|
|
678
|
-
localActions = createLocalActions({
|
|
679
|
-
ctx,
|
|
680
|
-
owner,
|
|
681
|
-
binding,
|
|
682
|
-
state,
|
|
683
|
-
rowIds,
|
|
684
|
-
projector,
|
|
685
|
-
subagents: subagentProjection,
|
|
686
|
-
jobs: jobProjection,
|
|
687
|
-
foldBack,
|
|
688
|
-
workspace: workspaceService,
|
|
689
|
-
shell: bash,
|
|
690
|
-
notify,
|
|
691
|
-
});
|
|
692
|
-
// Replay the durable transcript first, then follow live events. The same
|
|
693
|
-
// seed re-populates the subagent dashboard's durable discovery facts
|
|
694
|
-
// (`subagent/catalog`, workflow member edges) so a resumed session keeps
|
|
695
|
-
// its dispatched-children history (issue #966).
|
|
696
|
-
const replaySessionSeed = (events) => {
|
|
697
|
-
projector.replayEvents(events);
|
|
698
|
-
subagentProjection.bootstrapFromLog(events);
|
|
699
|
-
};
|
|
700
|
-
replaySessionSeed(snapshotLiveSessionEvents(binding.agent.session));
|
|
701
|
-
projector.settleStreaming();
|
|
702
|
-
// Attached to an idle agent: any replayed turn/start belongs to a previous
|
|
703
|
-
// session run, so the spinner must not come up on boot.
|
|
704
|
-
state.working = false;
|
|
705
|
-
state.cancelPending = false;
|
|
706
|
-
state.status = binding.agent.status;
|
|
707
|
-
state.emit();
|
|
708
|
-
modelActions = createModelActions(ctx, state, {
|
|
709
|
-
owner,
|
|
710
|
-
binding,
|
|
711
|
-
selection,
|
|
712
|
-
initialEffort: options.effort,
|
|
713
|
-
agent: () => binding.agent,
|
|
714
|
-
notify,
|
|
715
|
-
checkContextWarning,
|
|
716
|
-
});
|
|
717
|
-
commandCompletions = createCommandCompletions({
|
|
718
|
-
state: () => state,
|
|
719
|
-
themeHost,
|
|
720
|
-
commandTrees,
|
|
721
|
-
workspaceCommands: () => workspaceService.commands(),
|
|
722
|
-
model: modelActions,
|
|
723
|
-
});
|
|
724
|
-
switchModelAction = createModelSwitchAction(ctx, state, {
|
|
725
|
-
owner,
|
|
726
|
-
binding,
|
|
727
|
-
rowIds,
|
|
728
|
-
// Compaction is installed below before the channel binds or exposes input.
|
|
729
|
-
settleCompaction: () => settleManualCompaction(),
|
|
730
|
-
resetProjector: () => projector.reset(),
|
|
731
|
-
resetSubagents: subagentProjection.reset,
|
|
732
|
-
resetJobs: resetJobProjection,
|
|
733
|
-
replay: replaySessionSeed,
|
|
734
|
-
settleReplay: projector.settleStreaming,
|
|
735
|
-
bindAgent: () => bindAgent(),
|
|
736
|
-
refreshCommands: refreshCommandList,
|
|
737
|
-
refreshLoadedContext,
|
|
738
|
-
refreshSkillCommands,
|
|
739
|
-
clearStagedImages,
|
|
740
|
-
dropModelCompletion: () => modelActions.dropModelNodeCache(),
|
|
741
|
-
notify,
|
|
742
|
-
});
|
|
743
|
-
workspaceActions = createWorkspaceActions(state, {
|
|
744
|
-
owner,
|
|
745
|
-
service: workspaceService,
|
|
746
|
-
// This reference is intentionally lazy: session construction is installed
|
|
747
|
-
// later, before any UI action can invoke workspace switching.
|
|
748
|
-
newSession: target => resumeActions.newSessionWithTarget(target),
|
|
749
|
-
refreshGitBranch: () => refreshGitBranch(),
|
|
750
|
-
notify,
|
|
751
|
-
});
|
|
752
|
-
modeActions = createPermissionModeActions(ctx, state, {
|
|
753
|
-
owner,
|
|
754
|
-
runtime: adapterRuntime,
|
|
755
|
-
binding,
|
|
756
|
-
sessionModes,
|
|
757
|
-
roster: permissionRoster,
|
|
758
|
-
commandService,
|
|
759
|
-
executeRegistryCommand,
|
|
760
|
-
notify,
|
|
761
|
-
});
|
|
762
|
-
// Event subscription routing is a distinct binding owner. It captures the
|
|
763
|
-
// live binding generation through binding.subscribe and refuses retained
|
|
764
|
-
// callbacks after owner revocation; projection remains single-writer.
|
|
765
|
-
const bindingEvents = createBindingEvents(ctx, {
|
|
766
|
-
owner,
|
|
767
|
-
binding,
|
|
768
|
-
state,
|
|
769
|
-
seedActivity: options.seedActivity,
|
|
770
|
-
seedContextOccupancy: options.seedContextOccupancy,
|
|
771
|
-
inputConvergence,
|
|
772
|
-
selection,
|
|
773
|
-
modelActions,
|
|
774
|
-
modeActions,
|
|
775
|
-
projector,
|
|
776
|
-
subagents: subagentProjection,
|
|
777
|
-
agentView,
|
|
778
|
-
messageObserver,
|
|
779
|
-
retireAttachment,
|
|
780
|
-
});
|
|
781
|
-
const rawBindAgent = bindingEvents.bind;
|
|
782
|
-
/** Bind the new agent, then re-anchor the job projection: its event
|
|
783
|
-
* subscription is deliberately owner-agnostic, so this is what makes the
|
|
784
|
-
* /jobs roster follow a session switch immediately instead of waiting for
|
|
785
|
-
* the new session's first job event. */
|
|
786
|
-
const bindAgent = () => { rawBindAgent(); reanchorJobProjection(); };
|
|
787
|
-
const sessionAdoption = createSessionAdoption(state, {
|
|
788
|
-
binding,
|
|
789
|
-
rowIds,
|
|
790
|
-
resetProjector: () => projector.reset(),
|
|
791
|
-
resetSubagents: subagentProjection.reset,
|
|
792
|
-
resetJobs: resetJobProjection,
|
|
793
|
-
replay: replaySessionSeed,
|
|
794
|
-
settleReplay: projector.settleStreaming,
|
|
795
|
-
bindAgent,
|
|
796
|
-
refreshCommands: refreshCommandList,
|
|
797
|
-
refreshLoadedContext,
|
|
798
|
-
refreshSkillCommands,
|
|
799
|
-
clearStagedImages,
|
|
800
|
-
touchSession,
|
|
801
|
-
});
|
|
802
|
-
adoptForkedAgent = sessionAdoption.adoptForkedAgent;
|
|
803
|
-
adoptLiveAgent = createLiveAgentAdoption(state, {
|
|
804
|
-
binding,
|
|
805
|
-
backgroundHandles,
|
|
806
|
-
rowIds,
|
|
807
|
-
resetProjector: () => projector.reset(),
|
|
808
|
-
resetSubagents: subagentProjection.reset,
|
|
809
|
-
restoreSubagents: subagentProjection.restore,
|
|
810
|
-
parkSubagents: subagentProjection.park,
|
|
811
|
-
resetJobs: resetJobProjection,
|
|
812
|
-
replay: replaySessionSeed,
|
|
813
|
-
settleReplay: projector.settleStreaming,
|
|
814
|
-
describeWorkspace: cwd => workspaceService.describe(cwd),
|
|
815
|
-
refreshGitBranch: () => refreshGitBranch(),
|
|
816
|
-
bindAgent,
|
|
817
|
-
refreshCommands: refreshCommandList,
|
|
818
|
-
refreshLoadedContext,
|
|
819
|
-
refreshSkillCommands,
|
|
820
|
-
clearStagedImages,
|
|
821
|
-
resetIdeSelection,
|
|
822
|
-
notifySessionSwitched,
|
|
823
|
-
notifyAgentView: agentView.notify,
|
|
824
|
-
});
|
|
825
|
-
const resumeActions = createSessionResumeActions(ctx, state, {
|
|
826
|
-
configuredPreset: options.configuredPreset,
|
|
827
|
-
configuredProvider: options.configuredProvider,
|
|
828
|
-
configuredModel: options.configuredModel,
|
|
829
|
-
provider: options.provider,
|
|
830
|
-
model: options.model,
|
|
831
|
-
}, {
|
|
832
|
-
owner,
|
|
833
|
-
binding,
|
|
834
|
-
// `/resume` shares the live-adoption path with the session supervisor, so
|
|
835
|
-
// a target already running in this process is re-attached rather than
|
|
836
|
-
// resumed twice from its log (which would mount one log in two places).
|
|
837
|
-
adoptLive: target => adoptLiveAgent(target),
|
|
838
|
-
parkSubagents: subagentProjection.park,
|
|
839
|
-
backgroundHandles,
|
|
840
|
-
rowIds,
|
|
841
|
-
resetProjector: () => projector.reset(),
|
|
842
|
-
resetSubagents: subagentProjection.reset,
|
|
843
|
-
resetJobs: resetJobProjection,
|
|
844
|
-
replay: replaySessionSeed,
|
|
845
|
-
settleReplay: projector.settleStreaming,
|
|
846
|
-
describeWorkspace: cwd => workspaceService.describe(cwd),
|
|
847
|
-
refreshGitBranch: () => refreshGitBranch(),
|
|
848
|
-
bindAgent,
|
|
849
|
-
refreshCommands: refreshCommandList,
|
|
850
|
-
refreshLoadedContext,
|
|
851
|
-
refreshSkillCommands,
|
|
852
|
-
clearStagedImages,
|
|
853
|
-
resetIdeSelection,
|
|
854
|
-
settleCompaction: () => settleManualCompaction(),
|
|
855
|
-
sessionSwitchVetoed,
|
|
856
|
-
notify,
|
|
857
|
-
notifySessionSwitched,
|
|
858
|
-
runtime: adapterRuntime,
|
|
859
|
-
});
|
|
860
|
-
resumeInto = resumeActions.resumeInto;
|
|
861
|
-
resumeToAction = resumeActions.resumeTo;
|
|
862
|
-
newSessionAction = resumeActions.newSession;
|
|
863
|
-
rewindToNodeAction = createTreeRewindAction(ctx, state, {
|
|
864
|
-
owner,
|
|
865
|
-
binding,
|
|
866
|
-
settleCompaction: () => settleManualCompaction(),
|
|
867
|
-
notify,
|
|
868
|
-
adoptForkedAgent,
|
|
869
|
-
notifySessionSwitched,
|
|
870
|
-
});
|
|
871
|
-
rewindToAction = createRewindToAction(ctx, state, {
|
|
872
|
-
owner,
|
|
873
|
-
binding,
|
|
874
|
-
settleCompaction: () => settleManualCompaction(),
|
|
875
|
-
notify,
|
|
876
|
-
adoptForkedAgent,
|
|
877
|
-
notifySessionSwitched,
|
|
878
|
-
});
|
|
879
|
-
forkSessionAction = createForkSessionAction(ctx, state, {
|
|
880
|
-
owner,
|
|
881
|
-
settleCompaction: () => settleManualCompaction(),
|
|
882
|
-
notify,
|
|
883
|
-
source: () => binding.agent.session,
|
|
884
|
-
createDetachedHandle,
|
|
885
|
-
});
|
|
886
|
-
const manualCompaction = createManualCompaction(ctx, state, {
|
|
887
|
-
owner,
|
|
888
|
-
agent: () => binding.agent,
|
|
889
|
-
withDecisionPending,
|
|
890
|
-
notify,
|
|
891
|
-
});
|
|
892
|
-
settleManualCompaction = manualCompaction.settle;
|
|
893
|
-
compactManualSession = manualCompaction.compact;
|
|
894
|
-
cancelManualCompaction = manualCompaction.cancel;
|
|
895
|
-
backgroundCurrentAction = createBackgroundCurrentAction(ctx, state, {
|
|
896
|
-
configuredPreset: options.configuredPreset,
|
|
897
|
-
configuredProvider: options.configuredProvider,
|
|
898
|
-
configuredModel: options.configuredModel,
|
|
899
|
-
provider: options.provider,
|
|
900
|
-
model: options.model,
|
|
901
|
-
}, {
|
|
902
|
-
owner,
|
|
903
|
-
binding,
|
|
904
|
-
backgroundHandles,
|
|
905
|
-
rowIds,
|
|
906
|
-
resetProjector: () => projector.reset(),
|
|
907
|
-
resetSubagents: subagentProjection.reset,
|
|
908
|
-
parkSubagents: subagentProjection.park,
|
|
909
|
-
resetJobs: resetJobProjection,
|
|
910
|
-
refreshEffortLevels: () => modelActions.refreshEffortLevels(),
|
|
911
|
-
bindAgent,
|
|
912
|
-
refreshCommands: refreshCommandList,
|
|
913
|
-
refreshLoadedContext,
|
|
914
|
-
refreshSkillCommands,
|
|
915
|
-
clearStagedImages,
|
|
916
|
-
notifySessionSwitched,
|
|
917
|
-
notify: (...args) => notify(...args),
|
|
918
|
-
notifyAgentView: agentView.notify,
|
|
919
|
-
});
|
|
920
|
-
// Complete the entire public action surface before any callback, catalog,
|
|
921
|
-
// registry, binding, or timer can run. The state methods above are typed,
|
|
922
|
-
// pure delegates through this one readiness cell; no successful-looking
|
|
923
|
-
// construction placeholder remains callable.
|
|
924
|
-
actionReadiness.install({
|
|
925
|
-
commandCompletions,
|
|
926
|
-
runLocalCommand: localActions.runLocalCommand,
|
|
927
|
-
runPermissionPreset: modeActions.runPermissionPreset,
|
|
928
|
-
loadOlder: localActions.loadOlder,
|
|
929
|
-
rewindTo: rewindToAction,
|
|
930
|
-
rewindToNode: rewindToNodeAction,
|
|
931
|
-
forkSession: forkSessionAction,
|
|
932
|
-
resumeTo: resumeToAction,
|
|
933
|
-
newSession: newSessionAction,
|
|
934
|
-
listWorkspaces: workspaceActions.listWorkspaces,
|
|
935
|
-
listWorkspaceRegistry: workspaceActions.listWorkspaceRegistry,
|
|
936
|
-
removeWorkspace: workspaceActions.removeWorkspace,
|
|
937
|
-
renameWorkspaceAt: workspaceActions.renameWorkspaceAt,
|
|
938
|
-
resolveWorkspace: workspaceActions.resolveWorkspace,
|
|
939
|
-
switchWorkspace: workspaceActions.switchWorkspace,
|
|
940
|
-
renameWorkspace: workspaceActions.renameWorkspace,
|
|
941
|
-
workspaceCommands: workspaceActions.workspaceCommands,
|
|
942
|
-
runWorkspaceCommand: workspaceActions.runWorkspaceCommand,
|
|
943
|
-
switchModel: switchModelAction,
|
|
944
|
-
listEfforts: modelActions.listEfforts,
|
|
945
|
-
setEffort: modelActions.setEffort,
|
|
946
|
-
setDefaultEffort: modelActions.setDefaultEffort,
|
|
947
|
-
cycleMode: modeActions.cycleMode,
|
|
948
|
-
clear: localActions.clear,
|
|
949
|
-
setActivityFrames: localActions.setActivityFrames,
|
|
950
|
-
listPresets: modelActions.listPresets,
|
|
951
|
-
switchPreset: modelActions.switchPreset,
|
|
952
|
-
listModels: modelActions.listModels,
|
|
953
|
-
listProviders: modelActions.listProviders,
|
|
954
|
-
invalidateModelCompletion: modelActions.dropModelNodeCache,
|
|
955
|
-
listSkills: sessionMetadataActions.listSkills,
|
|
956
|
-
describeCredential: sessionMetadataActions.describeCredential,
|
|
957
|
-
balanceInfo: reportActions.balanceInfo,
|
|
958
|
-
sideQuestion: sessionMetadataActions.sideQuestion,
|
|
959
|
-
listFileCandidates: fileActions.listFileCandidates,
|
|
960
|
-
listFiles: fileActions.listFiles,
|
|
961
|
-
cachedSessions: sessionMetadataActions.cachedSessions,
|
|
962
|
-
listSessions: sessionMetadataActions.listSessions,
|
|
963
|
-
previewSession: sessionMetadataActions.previewSession,
|
|
964
|
-
listForeignSources: foreignBrowser.listSources,
|
|
965
|
-
listForeignSessions: foreignBrowser.listSessions,
|
|
966
|
-
importForeignSession: foreignBrowser.importSession,
|
|
967
|
-
bindApprovalStore: agentView.bindApprovalStore,
|
|
968
|
-
agentViewRows: agentView.rows,
|
|
969
|
-
subscribeAgentView: agentView.subscribe,
|
|
970
|
-
dispatchBackgroundAgent: agentView.dispatch,
|
|
971
|
-
stopBackgroundAgent: agentView.stop,
|
|
972
|
-
attachToAgent: agentView.attach,
|
|
973
|
-
peekAgentSession: agentView.peek,
|
|
974
|
-
replyToAgent: agentView.reply,
|
|
975
|
-
backgroundCurrent: agentView.backgroundCurrent,
|
|
976
|
-
setResumeTarget: sessionMetadataActions.setResumeTarget,
|
|
977
|
-
renameSession: sessionMetadataActions.renameSession,
|
|
978
|
-
setSessionColor: sessionMetadataActions.setSessionColor,
|
|
979
|
-
recapRecent: sessionMetadataActions.recapRecent,
|
|
980
|
-
deleteSession: sessionMetadataActions.deleteSession,
|
|
981
|
-
renameSessionTo: sessionMetadataActions.renameSessionTo,
|
|
982
|
-
compact: compactManualSession,
|
|
983
|
-
cancelCompact: cancelManualCompaction,
|
|
984
|
-
runExternalCommand: externalCommands.invokeText,
|
|
985
|
-
runExternalCommandOutcome: externalCommands.invoke,
|
|
986
|
-
pushLocal: localActions.pushLocal,
|
|
987
|
-
mcpStatus: reportActions.mcpStatus,
|
|
988
|
-
exportSession: reportActions.exportSession,
|
|
989
|
-
initWorkspace: reportActions.initWorkspace,
|
|
990
|
-
doctorInfo: reportActions.doctorInfo,
|
|
991
|
-
pluginsInfo: reportActions.pluginsInfo,
|
|
992
|
-
listSubagents: localActions.listSubagents,
|
|
993
|
-
});
|
|
994
|
-
// Subagents inherit provider/model from AgentOptions, but resumed TUI
|
|
995
|
-
// agents can legitimately carry their route only in persisted request
|
|
996
|
-
// headers. Their child scopes do not share this channel's per-agent
|
|
997
|
-
// ModelSelectionRef, so fill an otherwise incomplete first request from
|
|
998
|
-
// the active route. Keep complete child-specific routes authoritative.
|
|
999
|
-
const disposeInheritedChildRoute = ctx.on('agent/request', async (_payload, next) => {
|
|
1000
|
-
// This listener intentionally serves child scopes, not the bound agent's
|
|
1001
|
-
// selection pipeline. Capture the foreground route before awaiting so an
|
|
1002
|
-
// old child waterfall cannot borrow a later binding's model (A→B→A safe).
|
|
1003
|
-
const capture = binding.capture();
|
|
1004
|
-
const provider = state.provider;
|
|
1005
|
-
const model = state.model;
|
|
1006
|
-
const resolved = await next();
|
|
1007
|
-
if (!owner.current() || !binding.isCurrent(capture))
|
|
1008
|
-
return resolved;
|
|
1009
|
-
if (typeof resolved.provider === 'string' && resolved.provider.length > 0 &&
|
|
1010
|
-
typeof resolved.model === 'string' && resolved.model.length > 0) {
|
|
1011
|
-
return resolved;
|
|
1012
|
-
}
|
|
1013
|
-
return { ...resolved, provider, model };
|
|
1014
|
-
});
|
|
1015
|
-
owner.own(disposeInheritedChildRoute);
|
|
1016
|
-
try {
|
|
1017
|
-
// Everything below can synchronously invoke external callbacks. It runs
|
|
1018
|
-
// only after the owner is registered and the complete delegate surface is
|
|
1019
|
-
// installed; the outer construction transaction rolls every step back.
|
|
1020
|
-
agentView.start();
|
|
1021
|
-
startRuntimeSubscriptions();
|
|
1022
|
-
startJobs();
|
|
1023
|
-
skillCatalog.start();
|
|
1024
|
-
void refreshLoadedContext();
|
|
1025
|
-
bindAgent();
|
|
1026
|
-
}
|
|
1027
|
-
catch (error) {
|
|
1028
|
-
// Keep the setup failure primary. The outer construction funnel attempts
|
|
1029
|
-
// every cleanup, including partial subscriptions from this exact step.
|
|
1030
|
-
throw error;
|
|
1031
|
-
}
|
|
1032
|
-
// Cordis owns the Channel lifetime. Rebinding handles the common case;
|
|
1033
|
-
// this effect closes the final timer and releases the DecisionEvents
|
|
1034
|
-
// dispatch-topology marker when the Channel's context unloads.
|
|
1035
|
-
const effect = ctx.effect;
|
|
1036
|
-
effect?.call(ctx, () => () => {
|
|
1037
|
-
// The context owns the complete Channel lifetime, not merely the skill
|
|
1038
|
-
// command contribution. Keep emitter teardown in the same finally funnel.
|
|
1039
|
-
state.releaseContributions();
|
|
1040
|
-
}, 'dsh-tui channel lifecycle');
|
|
1041
|
-
// Statusline breadcrumb: current git branch of the session cwd (best-effort).
|
|
1042
|
-
// Re-run when an agent swap adopts a different persisted cwd (/resume,
|
|
1043
|
-
// issue #96) so the breadcrumb never shows the previous workspace's branch.
|
|
1044
|
-
const refreshGitBranch = () => {
|
|
1045
|
-
state.gitBranch = undefined;
|
|
1046
|
-
if (!bash)
|
|
1047
|
-
return;
|
|
1048
|
-
// Capture the requested cwd: a /resume landing while this query is in
|
|
1049
|
-
// flight refreshes the branch for the NEW cwd, so a late reply from the
|
|
1050
|
-
// old workspace must be dropped (statusline staleness, issue #96 review).
|
|
1051
|
-
const requestedCwd = state.cwd;
|
|
1052
|
-
void runForegroundShell(bash, {
|
|
1053
|
-
command: 'git branch --show-current',
|
|
1054
|
-
workdir: requestedCwd,
|
|
1055
|
-
timeoutMs: 3000,
|
|
1056
|
-
})
|
|
1057
|
-
.then((result) => {
|
|
1058
|
-
if (!owner.current() || state.cwd !== requestedCwd)
|
|
1059
|
-
return;
|
|
1060
|
-
const branch = result.stdout.text.trim();
|
|
1061
|
-
if (branch !== '') {
|
|
1062
|
-
state.gitBranch = branch;
|
|
1063
|
-
// Note it against the session too. A session log records no branch,
|
|
1064
|
-
// and nothing can reconstruct one after the fact, so the browser can
|
|
1065
|
-
// only show a branch for sessions this install actually used — which
|
|
1066
|
-
// is exactly what the column claims.
|
|
1067
|
-
noteBranch(binding.agent.session.id, branch);
|
|
1068
|
-
state.emit();
|
|
1069
|
-
}
|
|
1070
|
-
})
|
|
1071
|
-
.catch(() => {
|
|
1072
|
-
// Git branch detection is best-effort; on Windows the sandbox
|
|
1073
|
-
// backend may be unavailable (no confinement yet) or the cwd may
|
|
1074
|
-
// not be a git repo. Either way the statusline simply stays blank.
|
|
1075
|
-
});
|
|
1076
|
-
};
|
|
1077
|
-
refreshGitBranch();
|
|
1078
|
-
return state;
|
|
1079
|
-
}
|
|
1080
45
|
export { expandMentions } from './channel/mentions.js';
|
|
1081
46
|
export { sessionCwdMatches } from './channel/paths.js';
|
|
1082
47
|
export { emptyTokenUsage } from './channel/usage.js';
|