@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
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ask-user-question store, the UI-side half of every structured ask: the
|
|
3
|
+
* DSH user-interaction seam (`ctx.userQuestions`, the model-facing
|
|
4
|
+
* `ask_user_question` tool), local wizards (`/provider`, `/login`) and a
|
|
5
|
+
* non-DSH session's `question.request` events (Claude `AskUserQuestion`,
|
|
6
|
+
* `ExitPlanMode`) all park here. The store surfaces one question at a time to
|
|
7
|
+
* the TUI questionnaire and settles the asker's promise when the user
|
|
8
|
+
* answers, cancels, or the asker's abort signal fires.
|
|
9
|
+
*
|
|
10
|
+
* Queue semantics mirror the official dsh-tui chat/questions machine: asks
|
|
11
|
+
* arrive one at a time in practice (the tool blocks until answered), but
|
|
12
|
+
* concurrent asks from subagents are drained FIFO.
|
|
13
|
+
*
|
|
14
|
+
* This store owns the interaction only. The answered-questionnaire transcript
|
|
15
|
+
* record belongs to the projection: it is folded from the persisted tool result
|
|
16
|
+
* (`channel/question-record.ts`, issue #1009), never pushed from here, so it
|
|
17
|
+
* survives `/resume`, rewind and replay.
|
|
18
|
+
*
|
|
19
|
+
* Backend-neutral (`verify:boundary`): the request/answer shapes are the
|
|
20
|
+
* store's own (structurally the DSH protocol's, so `src/dsh-adapter/` passes
|
|
21
|
+
* its official types straight through), and the interruption error is
|
|
22
|
+
* injected: the DSH store rejects with the protocol's `UserQuestionError`
|
|
23
|
+
* (`src/dsh-adapter/questions.ts`), which dsh-plan-mode keys on.
|
|
24
|
+
*/
|
|
25
|
+
import { assertCapabilityShadowPolicy, defaultAdapterRuntime, } from '../adapter/kernel/runtime.js';
|
|
26
|
+
/** The default interruption error (a host may inject its protocol's own). */
|
|
27
|
+
export class QuestionInterruptedError extends Error {
|
|
28
|
+
code;
|
|
29
|
+
constructor(message, code) {
|
|
30
|
+
super(message);
|
|
31
|
+
this.name = 'QuestionInterruptedError';
|
|
32
|
+
this.code = code;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Whether `error` is an ask rejected by the user or by an abort (either
|
|
36
|
+
* store's interruption error carries the code). */
|
|
37
|
+
export function isQuestionInterruption(error) {
|
|
38
|
+
const code = typeof error === 'object' && error !== null ? error.code : undefined;
|
|
39
|
+
return code === 'ASK_CANCELLED' || code === 'ASK_ABORTED';
|
|
40
|
+
}
|
|
41
|
+
function isDefined(value) {
|
|
42
|
+
return value !== undefined;
|
|
43
|
+
}
|
|
44
|
+
function copyDraft(draft) {
|
|
45
|
+
return {
|
|
46
|
+
selected: [...draft.selected],
|
|
47
|
+
...(draft.custom !== undefined ? { custom: draft.custom } : {}),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function selectionFromAnswer(answer) {
|
|
51
|
+
return copyDraft(answer);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Ask-user-question store: parks asks, surfaces one question at a time to
|
|
55
|
+
* the TUI, and settles each ask when the user answers or the batch is
|
|
56
|
+
* interrupted. The TUI subscribes for re-renders and answers via
|
|
57
|
+
* {@link QuestionStore.answerCurrent}.
|
|
58
|
+
*/
|
|
59
|
+
export class QuestionStore {
|
|
60
|
+
/** The adapter runtime the shadow-policy guard is evaluated against. */
|
|
61
|
+
runtime;
|
|
62
|
+
interruption;
|
|
63
|
+
constructor(options = {}) {
|
|
64
|
+
this.runtime = options.runtime ?? defaultAdapterRuntime();
|
|
65
|
+
this.interruption = options.interruption ?? ((message, code) => new QuestionInterruptedError(message, code));
|
|
66
|
+
}
|
|
67
|
+
queue = [];
|
|
68
|
+
active;
|
|
69
|
+
listeners = new Set();
|
|
70
|
+
batchSeq = 0;
|
|
71
|
+
/**
|
|
72
|
+
* Cached snapshot: useSyncExternalStore requires a stable reference while
|
|
73
|
+
* nothing changed (a fresh object per call would loop re-renders).
|
|
74
|
+
*/
|
|
75
|
+
snapshotCache = null;
|
|
76
|
+
/**
|
|
77
|
+
* Subscribe to store changes (useSyncExternalStore contract).
|
|
78
|
+
* @param listener - Called after every mutation that changes the snapshot.
|
|
79
|
+
* @returns An unsubscribe function removing the listener.
|
|
80
|
+
*/
|
|
81
|
+
subscribe(listener) {
|
|
82
|
+
this.listeners.add(listener);
|
|
83
|
+
return () => {
|
|
84
|
+
this.listeners.delete(listener);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The question the TUI should render now, or null when idle.
|
|
89
|
+
* @returns The cached snapshot; the reference is stable between mutations.
|
|
90
|
+
*/
|
|
91
|
+
getSnapshot() {
|
|
92
|
+
return this.snapshotCache;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Whether a panel callback still belongs to the question it was rendered
|
|
96
|
+
* for. One stdin batch can deliver → and then Enter to the panel that
|
|
97
|
+
* was mounted for the first key, after the store has already moved.
|
|
98
|
+
*/
|
|
99
|
+
stillCurrent(key) {
|
|
100
|
+
return this.snapshotCache?.key === key;
|
|
101
|
+
}
|
|
102
|
+
emit() {
|
|
103
|
+
for (const listener of this.listeners)
|
|
104
|
+
listener();
|
|
105
|
+
}
|
|
106
|
+
/** Rebuild the cached snapshot after any mutation of active/index. */
|
|
107
|
+
rebuildSnapshot() {
|
|
108
|
+
const pending = this.active;
|
|
109
|
+
if (pending === undefined) {
|
|
110
|
+
this.snapshotCache = null;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const question = pending.request.questions[pending.index];
|
|
114
|
+
const savedDraft = pending.drafts[pending.index];
|
|
115
|
+
const savedAnswer = pending.answers[pending.index];
|
|
116
|
+
this.snapshotCache = question === undefined ? null : {
|
|
117
|
+
key: `${pending.batchId}-${pending.index}`,
|
|
118
|
+
question,
|
|
119
|
+
position: pending.index + 1,
|
|
120
|
+
total: pending.request.questions.length,
|
|
121
|
+
answered: pending.index,
|
|
122
|
+
...(savedDraft !== undefined
|
|
123
|
+
? { draft: savedDraft }
|
|
124
|
+
: savedAnswer !== undefined
|
|
125
|
+
? { draft: selectionFromAnswer(savedAnswer) }
|
|
126
|
+
: {}),
|
|
127
|
+
canGoBack: pending.index > 0,
|
|
128
|
+
canGoForward: pending.index + 1 < pending.request.questions.length,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Asker entry point for the DSH `ask_user_question` provider, local wizards
|
|
133
|
+
* (e.g. `/provider`) and the channel's backend question bridge.
|
|
134
|
+
* @param request - The ask request: questions plus optional abort signal.
|
|
135
|
+
* @param options - `redact` hides answer text from the answered-questionnaire
|
|
136
|
+
* transcript record (use for batches that collect secrets such as API keys).
|
|
137
|
+
* @returns A promise settling with the collected answers when the user
|
|
138
|
+
* submits the batch, or rejecting when the ask is interrupted.
|
|
139
|
+
*/
|
|
140
|
+
ask(request, options) {
|
|
141
|
+
assertCapabilityShadowPolicy('host.presentation.ask', this.runtime.mode, this.runtime.slices);
|
|
142
|
+
return new Promise((resolve, reject) => {
|
|
143
|
+
const pending = {
|
|
144
|
+
request,
|
|
145
|
+
batchId: ++this.batchSeq,
|
|
146
|
+
index: 0,
|
|
147
|
+
answers: new Array(request.questions.length),
|
|
148
|
+
drafts: new Array(request.questions.length),
|
|
149
|
+
...(options?.redact ? { redact: true } : {}),
|
|
150
|
+
resolve,
|
|
151
|
+
reject,
|
|
152
|
+
onAbort: () => {
|
|
153
|
+
if (this.active === pending) {
|
|
154
|
+
this.active = undefined;
|
|
155
|
+
this.rebuildSnapshot();
|
|
156
|
+
this.fail(pending);
|
|
157
|
+
this.startNext();
|
|
158
|
+
this.emit();
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
const at = this.queue.indexOf(pending);
|
|
162
|
+
if (at >= 0)
|
|
163
|
+
this.queue.splice(at, 1);
|
|
164
|
+
this.fail(pending);
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
request.signal?.addEventListener('abort', pending.onAbort, { once: true });
|
|
168
|
+
this.queue.push(pending);
|
|
169
|
+
this.startNext();
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/** Advance to the next queued ask, if any. */
|
|
173
|
+
startNext() {
|
|
174
|
+
if (this.active !== undefined || this.queue.length === 0)
|
|
175
|
+
return;
|
|
176
|
+
this.active = this.queue.shift();
|
|
177
|
+
this.rebuildSnapshot();
|
|
178
|
+
this.emit();
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* The user submitted an answer for the current question; replaces any
|
|
182
|
+
* previous answer at that position, advances to the next unanswered
|
|
183
|
+
* question, and settles the batch once every question is answered.
|
|
184
|
+
* @param selection - Selected option labels plus optional custom text.
|
|
185
|
+
*/
|
|
186
|
+
answerCurrent(selection) {
|
|
187
|
+
const pending = this.active;
|
|
188
|
+
const question = pending?.request.questions[pending.index];
|
|
189
|
+
if (pending === undefined || question === undefined)
|
|
190
|
+
return;
|
|
191
|
+
const answer = {
|
|
192
|
+
id: question.id,
|
|
193
|
+
selected: [...selection.selected],
|
|
194
|
+
...(selection.custom !== undefined && selection.custom !== ''
|
|
195
|
+
? { custom: selection.custom }
|
|
196
|
+
: {}),
|
|
197
|
+
};
|
|
198
|
+
pending.answers[pending.index] = answer;
|
|
199
|
+
pending.drafts[pending.index] = copyDraft(selection);
|
|
200
|
+
// The answers array is sparse until each question is committed. `every`
|
|
201
|
+
// skips holes, so a peek-ahead answer would look complete and settle
|
|
202
|
+
// early. Read every index explicitly.
|
|
203
|
+
const complete = pending.request.questions.every((_, index) => pending.answers[index] !== undefined);
|
|
204
|
+
if (complete) {
|
|
205
|
+
// Batch complete: settle the asker's promise and drain the next queued
|
|
206
|
+
// ask if any. Filling the last gap after a → peek counts — the user
|
|
207
|
+
// should not have to walk onto an already-answered tail just to submit.
|
|
208
|
+
// The transcript record is NOT written here — it is projected from the
|
|
209
|
+
// persisted tool result (issue #1009), so it survives `/resume`,
|
|
210
|
+
// rewind and every replay.
|
|
211
|
+
const answers = pending.answers.filter(isDefined);
|
|
212
|
+
this.active = undefined;
|
|
213
|
+
pending.resolve({ answers });
|
|
214
|
+
this.startNext();
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
const after = pending.request.questions.findIndex((_, index) => index > pending.index && pending.answers[index] === undefined);
|
|
218
|
+
const firstGap = pending.request.questions.findIndex((_, index) => pending.answers[index] === undefined);
|
|
219
|
+
pending.index = after >= 0 ? after : firstGap;
|
|
220
|
+
}
|
|
221
|
+
this.rebuildSnapshot();
|
|
222
|
+
this.emit();
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Navigate to the next question without committing the current one. The
|
|
226
|
+
* caller supplies the panel's draft so a peek forward does not discard
|
|
227
|
+
* in-progress text. No-op on the last question — Enter still owns submit.
|
|
228
|
+
*/
|
|
229
|
+
forwardCurrent(draft) {
|
|
230
|
+
const pending = this.active;
|
|
231
|
+
if (pending === undefined || pending.index + 1 >= pending.request.questions.length)
|
|
232
|
+
return;
|
|
233
|
+
if (draft !== undefined) {
|
|
234
|
+
pending.drafts[pending.index] = copyDraft(draft);
|
|
235
|
+
}
|
|
236
|
+
pending.index += 1;
|
|
237
|
+
this.rebuildSnapshot();
|
|
238
|
+
this.emit();
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Navigate to the previous question without cancelling the batch. The
|
|
242
|
+
* caller supplies the panel's current draft so partially typed text can be
|
|
243
|
+
* restored when the user returns.
|
|
244
|
+
*/
|
|
245
|
+
backCurrent(draft) {
|
|
246
|
+
const pending = this.active;
|
|
247
|
+
if (pending === undefined || pending.index <= 0)
|
|
248
|
+
return;
|
|
249
|
+
if (draft !== undefined) {
|
|
250
|
+
pending.drafts[pending.index] = copyDraft(draft);
|
|
251
|
+
}
|
|
252
|
+
pending.index -= 1;
|
|
253
|
+
this.rebuildSnapshot();
|
|
254
|
+
this.emit();
|
|
255
|
+
}
|
|
256
|
+
/** The user interrupted the questionnaire (Esc / Ctrl+C). */
|
|
257
|
+
cancelCurrent() {
|
|
258
|
+
const pending = this.active;
|
|
259
|
+
if (pending === undefined)
|
|
260
|
+
return;
|
|
261
|
+
this.active = undefined;
|
|
262
|
+
this.rebuildSnapshot();
|
|
263
|
+
this.cancel(pending);
|
|
264
|
+
this.startNext();
|
|
265
|
+
this.emit();
|
|
266
|
+
}
|
|
267
|
+
/** Reject the active and all queued asks (plugin teardown). */
|
|
268
|
+
rejectAll() {
|
|
269
|
+
const active = this.active;
|
|
270
|
+
this.active = undefined;
|
|
271
|
+
this.rebuildSnapshot();
|
|
272
|
+
if (active !== undefined)
|
|
273
|
+
this.fail(active);
|
|
274
|
+
for (const pending of this.queue.splice(0))
|
|
275
|
+
this.fail(pending);
|
|
276
|
+
this.emit();
|
|
277
|
+
}
|
|
278
|
+
/** User-initiated cancel — the asker learns the user wants to speak. */
|
|
279
|
+
cancel(pending) {
|
|
280
|
+
pending.reject(this.interruption('the user cancelled ask_user_question', 'ASK_CANCELLED'));
|
|
281
|
+
}
|
|
282
|
+
/** Asker-side interruption: abort signal fired or plugin teardown. */
|
|
283
|
+
fail(pending) {
|
|
284
|
+
pending.reject(this.interruption('ask_user_question was interrupted before the user answered', 'ASK_ABORTED'));
|
|
285
|
+
}
|
|
286
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The render-path sanitization contract for plugin-supplied text — the
|
|
3
|
+
* single implementation behind every managed-UI seam (dialogs, status line,
|
|
4
|
+
* entry renderers, rewind modes, decision notices). TUI-PROP-009 Track A
|
|
5
|
+
* makes these rules normative, so they live in exactly one place:
|
|
6
|
+
*
|
|
7
|
+
* - C0/C1 control chars are stripped (replaced by a space) — plugin text
|
|
8
|
+
* must never smuggle escape sequences onto the screen;
|
|
9
|
+
* - whitespace collapses to single spaces (render paths are single-line);
|
|
10
|
+
* - width is capped in terminal CELLS (never string.length) with an
|
|
11
|
+
* ellipsis.
|
|
12
|
+
*
|
|
13
|
+
* Non-scalar input is DROPPED, never `String()`-coerced — `String({})`
|
|
14
|
+
* would put "[object Object]" on the render path. Scalars
|
|
15
|
+
* (string/number/boolean) coerce through String() first.
|
|
16
|
+
*/
|
|
17
|
+
/** Sanitize an already-string value for the render path. */
|
|
18
|
+
export declare function cleanRenderText(value: string, maxCells: number): string;
|
|
19
|
+
/**
|
|
20
|
+
* Sanitize an untrusted (possibly non-string) value. Non-scalars — objects,
|
|
21
|
+
* arrays, functions, symbols, null/undefined — yield '' so the caller takes
|
|
22
|
+
* its drop/refuse path; scalars coerce then sanitize.
|
|
23
|
+
*/
|
|
24
|
+
export declare function cleanScalarText(value: unknown, maxCells: number): string;
|
|
25
|
+
/**
|
|
26
|
+
* Truncate to a cell budget WITHOUT ellipsis, whitespace folding, or any
|
|
27
|
+
* other mutation — the editing-path counterpart of {@link cleanRenderText}.
|
|
28
|
+
* An input panel caps what the user types/pastes; inserting '…' or
|
|
29
|
+
* collapsing their spaces would corrupt text they can still edit.
|
|
30
|
+
*/
|
|
31
|
+
export declare function capCells(value: string, maxCells: number): string;
|
|
32
|
+
/** C0/C1 control chars → space, nothing else touched. The single-line
|
|
33
|
+
* input panel flattens pasted chunks with this (newlines become spaces —
|
|
34
|
+
* the panel has no second row for them). */
|
|
35
|
+
export declare function flattenInline(value: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Single-line field ingress for terminal/clipboard paste: strip COMPLETE
|
|
38
|
+
* ANSI/OSC sequences first (paste content is user-controlled bytes — a
|
|
39
|
+
* smuggled ESC[… would otherwise break out of the render path), then flatten
|
|
40
|
+
* every remaining C0/C1 control char to a space. Unlike {@link flattenInline},
|
|
41
|
+
* this never leaves `[31m`-style residue behind; the two regexes mirror
|
|
42
|
+
* {@link cleanRenderText}'s strip, and the final pass covers the rest.
|
|
43
|
+
*/
|
|
44
|
+
export declare function flattenPasteInline(value: string): string;
|
|
45
|
+
/** Toast-bound plugin text (veto reasons, handled notices, rewind summaries)
|
|
46
|
+
* and single-line transcript notices are render-path data too: same
|
|
47
|
+
* sanitization, toast-width cap. */
|
|
48
|
+
export declare const NOTICE_CELLS = 200;
|
|
49
|
+
//# sourceMappingURL=sanitize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/channel/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAevE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGxE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQhE;AAED;;6CAE6C;AAC7C,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED;;qCAEqC;AACrC,eAAO,MAAM,YAAY,MAAM,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The render-path sanitization contract for plugin-supplied text — the
|
|
3
|
+
* single implementation behind every managed-UI seam (dialogs, status line,
|
|
4
|
+
* entry renderers, rewind modes, decision notices). TUI-PROP-009 Track A
|
|
5
|
+
* makes these rules normative, so they live in exactly one place:
|
|
6
|
+
*
|
|
7
|
+
* - C0/C1 control chars are stripped (replaced by a space) — plugin text
|
|
8
|
+
* must never smuggle escape sequences onto the screen;
|
|
9
|
+
* - whitespace collapses to single spaces (render paths are single-line);
|
|
10
|
+
* - width is capped in terminal CELLS (never string.length) with an
|
|
11
|
+
* ellipsis.
|
|
12
|
+
*
|
|
13
|
+
* Non-scalar input is DROPPED, never `String()`-coerced — `String({})`
|
|
14
|
+
* would put "[object Object]" on the render path. Scalars
|
|
15
|
+
* (string/number/boolean) coerce through String() first.
|
|
16
|
+
*/
|
|
17
|
+
import { stringWidth } from '../ink/stringWidth.js';
|
|
18
|
+
/** Sanitize an already-string value for the render path. */
|
|
19
|
+
export function cleanRenderText(value, maxCells) {
|
|
20
|
+
// Remove complete ANSI control sequences before stripping control bytes.
|
|
21
|
+
// Otherwise an SGR such as ESC[31m becomes the visible garbage "[31m".
|
|
22
|
+
const withoutAnsi = value
|
|
23
|
+
.replace(/\u001B\][^\u0007]*(?:\u0007|\u001B\\)/gu, '')
|
|
24
|
+
.replace(/\u001B\[[0-?]*[ -/]*[@-~]/gu, '');
|
|
25
|
+
// eslint-disable-next-line no-control-regex -- deliberate: sanitize untrusted render-path text
|
|
26
|
+
const flat = withoutAnsi.replace(/[\x00-\x1f\x7f-\x9f]/g, ' ').replace(/\s+/g, ' ').trim();
|
|
27
|
+
if (stringWidth(flat) <= maxCells)
|
|
28
|
+
return flat;
|
|
29
|
+
let out = '';
|
|
30
|
+
for (const ch of flat) {
|
|
31
|
+
if (stringWidth(out + ch) > maxCells - 1)
|
|
32
|
+
break;
|
|
33
|
+
out += ch;
|
|
34
|
+
}
|
|
35
|
+
return `${out}…`;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Sanitize an untrusted (possibly non-string) value. Non-scalars — objects,
|
|
39
|
+
* arrays, functions, symbols, null/undefined — yield '' so the caller takes
|
|
40
|
+
* its drop/refuse path; scalars coerce then sanitize.
|
|
41
|
+
*/
|
|
42
|
+
export function cleanScalarText(value, maxCells) {
|
|
43
|
+
if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'boolean')
|
|
44
|
+
return '';
|
|
45
|
+
return cleanRenderText(String(value), maxCells);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Truncate to a cell budget WITHOUT ellipsis, whitespace folding, or any
|
|
49
|
+
* other mutation — the editing-path counterpart of {@link cleanRenderText}.
|
|
50
|
+
* An input panel caps what the user types/pastes; inserting '…' or
|
|
51
|
+
* collapsing their spaces would corrupt text they can still edit.
|
|
52
|
+
*/
|
|
53
|
+
export function capCells(value, maxCells) {
|
|
54
|
+
if (stringWidth(value) <= maxCells)
|
|
55
|
+
return value;
|
|
56
|
+
let out = '';
|
|
57
|
+
for (const ch of value) {
|
|
58
|
+
if (stringWidth(out + ch) > maxCells)
|
|
59
|
+
break;
|
|
60
|
+
out += ch;
|
|
61
|
+
}
|
|
62
|
+
return out;
|
|
63
|
+
}
|
|
64
|
+
/** C0/C1 control chars → space, nothing else touched. The single-line
|
|
65
|
+
* input panel flattens pasted chunks with this (newlines become spaces —
|
|
66
|
+
* the panel has no second row for them). */
|
|
67
|
+
export function flattenInline(value) {
|
|
68
|
+
// eslint-disable-next-line no-control-regex -- deliberate: sanitize untrusted render-path text
|
|
69
|
+
return value.replace(/[\x00-\x1f\x7f-\x9f]/g, ' ');
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Single-line field ingress for terminal/clipboard paste: strip COMPLETE
|
|
73
|
+
* ANSI/OSC sequences first (paste content is user-controlled bytes — a
|
|
74
|
+
* smuggled ESC[… would otherwise break out of the render path), then flatten
|
|
75
|
+
* every remaining C0/C1 control char to a space. Unlike {@link flattenInline},
|
|
76
|
+
* this never leaves `[31m`-style residue behind; the two regexes mirror
|
|
77
|
+
* {@link cleanRenderText}'s strip, and the final pass covers the rest.
|
|
78
|
+
*/
|
|
79
|
+
export function flattenPasteInline(value) {
|
|
80
|
+
const withoutAnsi = value
|
|
81
|
+
.replace(/\u001B\][^\u0007]*(?:\u0007|\u001B\\)/gu, '')
|
|
82
|
+
.replace(/\u001B\[[0-?]*[ -/]*[@-~]/gu, '');
|
|
83
|
+
return flattenInline(withoutAnsi);
|
|
84
|
+
}
|
|
85
|
+
/** Toast-bound plugin text (veto reasons, handled notices, rewind summaries)
|
|
86
|
+
* and single-line transcript notices are render-path data too: same
|
|
87
|
+
* sanitization, toast-width cap. */
|
|
88
|
+
export const NOTICE_CELLS = 200;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replay of the IDE-selection indicator from durable user-message content.
|
|
3
|
+
* The submit path (`dsh-adapter/channel/ide-selection.ts`) appends an
|
|
4
|
+
* `<attached-file path="…" selection count="N">` text block the channel itself
|
|
5
|
+
* builds; parsing it back is channel-format knowledge, not backend knowledge,
|
|
6
|
+
* so it lives beside the shared projector that needs it.
|
|
7
|
+
*/
|
|
8
|
+
import type { SelectionAttachment } from '../adapter/ports/channel-view.js';
|
|
9
|
+
/**
|
|
10
|
+
* Derive the transcript indicator from the durable user-message content:
|
|
11
|
+
* the `<attached-file path="…" selection count="N">` block the submit path
|
|
12
|
+
* appended is part of the persisted event, so a replayed session can rebuild
|
|
13
|
+
* the "Selected N lines from <file>" line even though the in-memory
|
|
14
|
+
* message-id → attachment map starts empty. The indicator must not depend
|
|
15
|
+
* on process-local state.
|
|
16
|
+
*/
|
|
17
|
+
export declare function replaySelectionAttachment(content: readonly unknown[] | undefined): SelectionAttachment | undefined;
|
|
18
|
+
//# sourceMappingURL=selection-record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-record.d.ts","sourceRoot":"","sources":["../../../src/channel/selection-record.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAE3E;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,GACtC,mBAAmB,GAAG,SAAS,CA8BjC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive the transcript indicator from the durable user-message content:
|
|
3
|
+
* the `<attached-file path="…" selection count="N">` block the submit path
|
|
4
|
+
* appended is part of the persisted event, so a replayed session can rebuild
|
|
5
|
+
* the "Selected N lines from <file>" line even though the in-memory
|
|
6
|
+
* message-id → attachment map starts empty. The indicator must not depend
|
|
7
|
+
* on process-local state.
|
|
8
|
+
*/
|
|
9
|
+
export function replaySelectionAttachment(content) {
|
|
10
|
+
if (content === undefined)
|
|
11
|
+
return undefined;
|
|
12
|
+
for (const block of content) {
|
|
13
|
+
if (block === null || typeof block !== 'object')
|
|
14
|
+
continue;
|
|
15
|
+
const text = block.text;
|
|
16
|
+
if (block.type !== 'text' || typeof text !== 'string')
|
|
17
|
+
continue;
|
|
18
|
+
const opened = /^<attached-file path="([^"]+)" selection(?: count="(\d+)")?>\n/.exec(text);
|
|
19
|
+
if (opened === null)
|
|
20
|
+
continue;
|
|
21
|
+
let closed = text.slice(opened[0].length);
|
|
22
|
+
if (closed.endsWith('</attached-file>'))
|
|
23
|
+
closed = closed.slice(0, -'</attached-file>'.length);
|
|
24
|
+
// The builder writes `body\n</attached-file>` — strip the newline the
|
|
25
|
+
// close tag rode on, or every body counts one phantom line.
|
|
26
|
+
if (closed.endsWith('\n'))
|
|
27
|
+
closed = closed.slice(0, -1);
|
|
28
|
+
const lines = closed.split('\n').length;
|
|
29
|
+
// `count` is authoritative when present (the builder always writes it).
|
|
30
|
+
// Blocks persisted before it existed fall back to the old tail heuristic,
|
|
31
|
+
// which misreads a body whose last line is literally the truncation marker.
|
|
32
|
+
const counted = opened[2] === undefined ? undefined : Number(opened[2]);
|
|
33
|
+
return {
|
|
34
|
+
lines: counted ?? (closed.endsWith('\n[… truncated]') ? lines - 1 : lines),
|
|
35
|
+
// Reverse escapeSnippetAttr so the replayed indicator shows the path
|
|
36
|
+
// exactly as the live one did (`&` first so entities are not re-baked).
|
|
37
|
+
path: opened[1]
|
|
38
|
+
.replace(/</g, '<')
|
|
39
|
+
.replace(/>/g, '>')
|
|
40
|
+
.replace(/"/g, '"')
|
|
41
|
+
.replace(/&/g, '&'),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The backend-neutral prompt contracts of the TUI's side calls (`/btw`,
|
|
3
|
+
* `/recap`): what one tool-less, single-answer auxiliary call is asked, and
|
|
4
|
+
* how a recap answer is read back. Every backend's side call uses the same
|
|
5
|
+
* words: DSH sends them over its own derived history (`dsh-adapter/
|
|
6
|
+
* sideQuestion.ts`, `recap.ts`), Claude over a throwaway fork of the
|
|
7
|
+
* conversation (`backends/claude/side-query.ts`).
|
|
8
|
+
*
|
|
9
|
+
* Pure text: no I/O, no vendor types.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Describe the auxiliary call's scope: one answer from existing context,
|
|
13
|
+
* with no tools, follow-up actions, or interruption of the main session.
|
|
14
|
+
* `running` names the main task's in-flight work, one line each (the
|
|
15
|
+
* caller formats them), when the context the call sees ends mid-step.
|
|
16
|
+
*/
|
|
17
|
+
export declare function sideQuestionPrompt(question: string, running?: readonly string[]): string;
|
|
18
|
+
/**
|
|
19
|
+
* One earlier Q/A pair of a `/btw` side thread, as the thread store hands
|
|
20
|
+
* it to the next ask (answers already clipped to the per-answer budget).
|
|
21
|
+
*/
|
|
22
|
+
export interface SideThreadPriorTurn {
|
|
23
|
+
readonly question: string;
|
|
24
|
+
readonly answer: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Carry the recent turns of a side thread into the next single-turn ask:
|
|
28
|
+
* the pairs travel as explicit quoted context inside the question payload,
|
|
29
|
+
* so every backend's one-shot side call keeps its own contract unchanged
|
|
30
|
+
* (the wrapper still sees "one question, one answer, no tools"). The result
|
|
31
|
+
* is what the caller passes to `sideQuery.ask` as the question, not a
|
|
32
|
+
* second conversation: nothing here writes a session record anywhere.
|
|
33
|
+
*
|
|
34
|
+
* `omittedOlder` is the count of completed pairs the budget dropped from
|
|
35
|
+
* the front of the thread (turn-window or character budget); the note lets
|
|
36
|
+
* the model know earlier turns existed instead of silently forgetting.
|
|
37
|
+
*/
|
|
38
|
+
export declare function sideThreadQuestion(question: string, prior?: readonly SideThreadPriorTurn[], omittedOlder?: number): string;
|
|
39
|
+
/**
|
|
40
|
+
* Wrap a recent-activity excerpt with the single-response, JSON-only recap
|
|
41
|
+
* contract (a call that does not see the conversation itself).
|
|
42
|
+
*/
|
|
43
|
+
export declare function wrapRecapPrompt(activity: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* The recap request for a call that runs over the conversation itself (a
|
|
46
|
+
* fork of it): the same contract, about the conversation so far, with an
|
|
47
|
+
* emphasis on its recent part.
|
|
48
|
+
*/
|
|
49
|
+
export declare function conversationRecapPrompt(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Parse the model's recap response: extract the JSON object (tolerating
|
|
52
|
+
* stray prose around it); on failure the whole text becomes the summary
|
|
53
|
+
* and no title is proposed.
|
|
54
|
+
*/
|
|
55
|
+
export declare function parseRecapResponse(raw: string): {
|
|
56
|
+
summary: string;
|
|
57
|
+
title?: string;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=side-prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-prompts.d.ts","sourceRoot":"","sources":["../../../src/channel/side-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,SAAS,MAAM,EAAO,GAAG,MAAM,CAc5F;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,SAAS,mBAAmB,EAAO,EAC1C,YAAY,SAAI,GACf,MAAM,CAsBR;AASD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAOhD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAyBnF"}
|