@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,9 +1,18 @@
|
|
|
1
1
|
import type { AgentHandle } from '@deepseek-ai/dsh-agent';
|
|
2
|
+
import type { OpenTarget, SessionCatalog } from '../../agent/backend.js';
|
|
3
|
+
import type { AgentEvent } from '../../agent/events.js';
|
|
4
|
+
import type { AgentSession } from '../../agent/session.js';
|
|
5
|
+
import type { PermissionStore } from '../../channel/permissions.js';
|
|
6
|
+
import type { QuestionStoreLike } from '../../channel/questions.js';
|
|
2
7
|
import type { ContextPressureSource } from '../context-occupancy.js';
|
|
8
|
+
import type { ActivityView } from '../activity-store.js';
|
|
3
9
|
import type { SessionModeSpec } from '../../sessionModes.js';
|
|
4
10
|
import { type JobGroupFoldMode, type PageMarginSetting, type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../../tuiDisplayPrefs.js';
|
|
5
11
|
import { type SplashFontSetting } from '../../components/splashFonts.js';
|
|
12
|
+
import { type BrandSetting } from '../../branding.js';
|
|
6
13
|
import type { ChannelState } from './types.js';
|
|
14
|
+
/** The DSH backend's user-facing name (capability snapshot default). */
|
|
15
|
+
export declare const DSH_BACKEND_LABEL = "DSH";
|
|
7
16
|
/** Launch configuration belongs to channel construction, not the composition root. */
|
|
8
17
|
export interface ChannelLaunchOptions {
|
|
9
18
|
model: string;
|
|
@@ -15,6 +24,15 @@ export interface ChannelLaunchOptions {
|
|
|
15
24
|
* projection value only arrives on change, so a resumed session needs this
|
|
16
25
|
* read to render its line before the next event lands. */
|
|
17
26
|
seedActivity?: (session: unknown) => void;
|
|
27
|
+
/** Land one backend-authored working-activity value for the bound session
|
|
28
|
+
* (the Claude backend's counterpart of the projection feed: the session's
|
|
29
|
+
* `workingActivity` capability, wired per binding in
|
|
30
|
+
* `channel/session-activity.ts`). Values are narrowed (`asActivityView`)
|
|
31
|
+
* before this is called; absent → the capability is not consumed. */
|
|
32
|
+
publishActivity?: (sessionId: string, view: ActivityView) => void;
|
|
33
|
+
/** Drop the bound session's backend-authored working-activity value (its
|
|
34
|
+
* session went away: the next binding, or the channel's release). */
|
|
35
|
+
clearActivity?: (sessionId: string) => void;
|
|
18
36
|
/**
|
|
19
37
|
* Official context-occupancy source (see `dsh-adapter/context-occupancy.ts`).
|
|
20
38
|
*
|
|
@@ -43,6 +61,7 @@ export interface ChannelLaunchOptions {
|
|
|
43
61
|
scrollGutter?: ScrollGutterMode;
|
|
44
62
|
pageMargin?: PageMarginSetting;
|
|
45
63
|
foldTerminalCommand?: boolean;
|
|
64
|
+
turnUsageRow?: boolean;
|
|
46
65
|
promptSessionLabel?: boolean;
|
|
47
66
|
expandEditor?: boolean;
|
|
48
67
|
smoothStreaming?: boolean;
|
|
@@ -52,6 +71,9 @@ export interface ChannelLaunchOptions {
|
|
|
52
71
|
/** Big-text face (settings `dsh-tui.splashFont`); absent → `daily`, the
|
|
53
72
|
* date rotation. Junk normalizes to `daily` (see `normalizeSplashFont`). */
|
|
54
73
|
splashFont?: SplashFontSetting;
|
|
74
|
+
/** Brand look (settings `dsh-tui.brand`); absent → `auto` (follow the
|
|
75
|
+
* active backend). Junk normalizes to `auto` (see `normalizeBrandSetting`). */
|
|
76
|
+
brand?: BrandSetting;
|
|
55
77
|
/** Maid portrait for the header splash (settings `dsh-tui.whaleGirl`;
|
|
56
78
|
* off by default). */
|
|
57
79
|
whaleGirl?: boolean;
|
|
@@ -66,6 +88,55 @@ export interface ChannelLaunchOptions {
|
|
|
66
88
|
configuredActivityFrames?: string;
|
|
67
89
|
agentPreset?: string;
|
|
68
90
|
modes?: readonly SessionModeSpec[];
|
|
91
|
+
/** User-facing name of the backend serving the session (capability
|
|
92
|
+
* snapshot, `cmd-unavailable-backend`); absent → the DSH label. */
|
|
93
|
+
backendLabel?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Open a session of the bound session's own backend: a fresh one (`/new`
|
|
96
|
+
* on a non-DSH session) or a persisted one (`/resume`, the session
|
|
97
|
+
* browser, a conversation rewind's fork). Absent → those are unavailable
|
|
98
|
+
* there. DSH sessions keep their own resume/new orchestration and ignore
|
|
99
|
+
* it.
|
|
100
|
+
*/
|
|
101
|
+
openSession?: (target: Extract<OpenTarget, {
|
|
102
|
+
readonly kind: 'create' | 'resume';
|
|
103
|
+
}>) => Promise<AgentSession>;
|
|
104
|
+
/**
|
|
105
|
+
* The backend's offline session catalog: the session browser's
|
|
106
|
+
* listing, preview, rename and delete for a non-DSH session.
|
|
107
|
+
* With `openSession` it enables `/resume`. DSH sessions ignore it.
|
|
108
|
+
*/
|
|
109
|
+
sessionCatalog?: SessionCatalog;
|
|
110
|
+
/**
|
|
111
|
+
* The backend's session preferences (TUI-side notes only, never the
|
|
112
|
+
* transcripts): the MRU note of each use, the launcher's
|
|
113
|
+
* last-session marker, and forgetting a deleted session.
|
|
114
|
+
*/
|
|
115
|
+
sessionPrefs?: {
|
|
116
|
+
touch(sessionId: string): void;
|
|
117
|
+
setLastSession(sessionId: string): void;
|
|
118
|
+
forget(sessionId: string): void;
|
|
119
|
+
};
|
|
120
|
+
/** The startup session's durable history, read before construction so
|
|
121
|
+
* the first bind paints it ahead of any live event. */
|
|
122
|
+
initialHistory?: readonly AgentEvent[];
|
|
123
|
+
/** How a user re-enters a session of this backend from a shell (the
|
|
124
|
+
* `/fork` notice); absent → the in-TUI `/resume` hint. */
|
|
125
|
+
resumeCommand?: (sessionId: string) => string;
|
|
126
|
+
/**
|
|
127
|
+
* The stores a non-DSH session's prompts park in: its
|
|
128
|
+
* `permission.request` events go to `permissions` (the panel Chat renders
|
|
129
|
+
* for this channel), its `question.request` events to `questions`. Absent →
|
|
130
|
+
* such events are dropped (a backend that declares no prompt capability).
|
|
131
|
+
* DSH sessions answer through their own seams and ignore it.
|
|
132
|
+
*/
|
|
133
|
+
interaction?: {
|
|
134
|
+
readonly permissions: PermissionStore;
|
|
135
|
+
readonly questions: QuestionStoreLike;
|
|
136
|
+
};
|
|
137
|
+
/** Lifetime handle of the agent when `createChannel` receives a raw DSH
|
|
138
|
+
* agent (direct embedders, fixtures); a passed `AgentSession` carries its
|
|
139
|
+
* own and this is ignored. */
|
|
69
140
|
handle?: AgentHandle;
|
|
70
141
|
}
|
|
71
142
|
/**
|
|
@@ -78,5 +149,5 @@ export declare function createInitialChannelView(options: ChannelLaunchOptions,
|
|
|
78
149
|
sessionId: string;
|
|
79
150
|
mode: ChannelState['mode'];
|
|
80
151
|
cwdDescription: string;
|
|
81
|
-
}): Pick<ChannelState, 'effortLevels' | 'version' | 'rows' | 'status' | 'sessionTitle' | 'sessionColor' | 'agentId' | 'sessionId' | 'agentBindingGeneration' | 'model' | 'provider' | 'tokens' | 'cwd' | 'displayCwd' | 'gitBranch' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'responseChars' | 'activeToolCount' | 'turnStart' | 'lastUserText' | 'notifications' | 'contextWindow' | 'reasoningEffort' | 'mode' | 'modeIndex' | 'activityFrames' | 'configuredProvider' | 'configuredModel' | 'configuredPreset' | 'configuredActivityFrames' | 'configuredLang' | 'diffLayout' | 'thinkingFold' | 'jobGroupFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'splashFont' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'agentPreset' | 'goal' | 'todos' | 'loadedContext' | 'pending' | 'commandList' | 'lastUsage' | 'tps' | 'tpsSamples' | 'contextSegments' | 'mainCost' | 'subagentCost' | 'subagents' | 'backgroundJobs' | 'selection'>;
|
|
152
|
+
}): Pick<ChannelState, 'effortLevels' | 'version' | 'rows' | 'status' | 'sessionTitle' | 'sessionColor' | 'agentId' | 'sessionId' | 'agentBindingGeneration' | 'model' | 'modelDisplay' | 'provider' | 'tokens' | 'cwd' | 'displayCwd' | 'gitBranch' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'responseChars' | 'activeToolCount' | 'turnStart' | 'lastUserText' | 'notifications' | 'contextWindow' | 'reasoningEffort' | 'mode' | 'modeIndex' | 'activityFrames' | 'configuredProvider' | 'configuredModel' | 'configuredPreset' | 'configuredActivityFrames' | 'configuredLang' | 'diffLayout' | 'thinkingFold' | 'jobGroupFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'turnUsageRow' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'splashFont' | 'brand' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'agentPreset' | 'goal' | 'todos' | 'loadedContext' | 'pending' | 'commandList' | 'lastUsage' | 'turnUsage' | 'tps' | 'tpsSamples' | 'contextSegments' | 'mainCost' | 'subagentCost' | 'subagents' | 'backgroundJobs' | 'selection'>;
|
|
82
153
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;A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YAAY,EAClB,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,cAAc,GAChF,SAAS,GAAG,WAAW,GAAG,wBAAwB,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAC7G,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,eAAe,GAAG,aAAa,GACvF,eAAe,GAAG,iBAAiB,GAAG,WAAW,GAAG,cAAc,GAClE,eAAe,GAAG,eAAe,GAAG,iBAAiB,GAAG,MAAM,GAAG,WAAW,GAC5E,gBAAgB,GAAG,oBAAoB,GAAG,iBAAiB,GAC3D,kBAAkB,GAAG,0BAA0B,GAAG,gBAAgB,GAAG,YAAY,GACjF,cAAc,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,YAAY,GAClF,qBAAqB,GAAG,cAAc,GAAG,oBAAoB,GAAG,cAAc,GAAG,iBAAiB,GAClG,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,YAAY,GAAG,OAAO,GAAG,WAAW,GAAG,iBAAiB,GAAG,mBAAmB,GACpH,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,iBAAiB,GAAG,mBAAmB,GACzG,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,GAAG,SAAS,GAAG,aAAa,GAC9E,WAAW,GAAG,WAAW,GAAG,KAAK,GAAG,YAAY,GAAG,iBAAiB,GAAG,UAAU,GAAG,cAAc,GAAG,WAAW,GAAG,gBAAgB,GAAG,WAAW,CAClJ,CA6BA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { normalizeJobGroupFold, normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../tuiDisplayPrefs.js';
|
|
2
2
|
import { normalizeActivityPreset } from '../../components/activityFrames.js';
|
|
3
3
|
import { normalizeSplashFont } from '../../components/splashFonts.js';
|
|
4
|
+
import { normalizeBrandSetting } from '../../branding.js';
|
|
5
|
+
/** The DSH backend's user-facing name (capability snapshot default). */
|
|
6
|
+
export const DSH_BACKEND_LABEL = 'DSH';
|
|
4
7
|
/**
|
|
5
8
|
* Neutral observable fields only. Behaviour is assembled explicitly by the
|
|
6
9
|
* composition root after each specialist owner exists, so this factory cannot
|
|
@@ -9,7 +12,7 @@ import { normalizeSplashFont } from '../../components/splashFonts.js';
|
|
|
9
12
|
export function createInitialChannelView(options, input) {
|
|
10
13
|
return {
|
|
11
14
|
effortLevels: undefined, version: 0, rows: [], selection: undefined, status: 'starting', sessionTitle: '', sessionColor: '',
|
|
12
|
-
agentId: input.agentId, sessionId: input.sessionId, agentBindingGeneration: 0, model: options.model, provider: options.provider,
|
|
15
|
+
agentId: input.agentId, sessionId: input.sessionId, agentBindingGeneration: 0, model: options.model, modelDisplay: undefined, provider: options.provider,
|
|
13
16
|
tokens: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, peak: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, idle: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 } },
|
|
14
17
|
cwd: options.cwd, displayCwd: input.cwdDescription, gitBranch: undefined, working: false,
|
|
15
18
|
compaction: undefined,
|
|
@@ -23,11 +26,12 @@ export function createInitialChannelView(options, input) {
|
|
|
23
26
|
jobGroupFold: normalizeJobGroupFold(options.jobGroupFold),
|
|
24
27
|
toolBackground: normalizeToolBackground(options.toolBackground), scrollGutter: normalizeScrollGutter(options.scrollGutter),
|
|
25
28
|
pageMargin: normalizePageMargin(options.pageMargin), foldTerminalCommand: options.foldTerminalCommand === true,
|
|
29
|
+
turnUsageRow: options.turnUsageRow === true,
|
|
26
30
|
promptSessionLabel: options.promptSessionLabel === true, expandEditor: options.expandEditor !== false,
|
|
27
31
|
smoothStreaming: options.smoothStreaming !== false, statusBar: normalizeStatusBar(options.statusBar),
|
|
28
|
-
whale: options.whale !== false, whaleIdle: options.whaleIdle !== false, whaleGirl: options.whaleGirl === true, splashFont: normalizeSplashFont(options.splashFont), minimalUi: options.minimalUi === true, activityEnabled: options.activity !== false,
|
|
32
|
+
whale: options.whale !== false, whaleIdle: options.whaleIdle !== false, whaleGirl: options.whaleGirl === true, splashFont: normalizeSplashFont(options.splashFont), brand: normalizeBrandSetting(options.brand), minimalUi: options.minimalUi === true, activityEnabled: options.activity !== false,
|
|
29
33
|
contextBarEnabled: options.contextBar !== false, agentPreset: options.agentPreset, goal: undefined,
|
|
30
|
-
todos: [], loadedContext: undefined, pending: [], commandList: [], lastUsage: undefined,
|
|
34
|
+
todos: [], loadedContext: undefined, pending: [], commandList: [], lastUsage: undefined, turnUsage: undefined,
|
|
31
35
|
tps: undefined, tpsSamples: [], contextSegments: { system: 0, prompt: 0, assistant: 0, thinking: 0, tools: 0 },
|
|
32
36
|
// 费用估算输入:主会话按模型分桶 + 子代理快照。与 tokens 并行累计,
|
|
33
37
|
// tokens 的既有语义/显示不变(DESIGN D2)。
|
|
@@ -1,15 +1,51 @@
|
|
|
1
1
|
import type { Agent, AssistantStreamFrame } from '@deepseek-ai/dsh-agent';
|
|
2
2
|
import { SubagentActivityStore } from '../subagents.js';
|
|
3
|
+
import type { SubagentTranscriptPage, SubagentTranscriptWindow } from '../../agent/capabilities.js';
|
|
4
|
+
import type { AgentIdentity, AgentMessageSubmitInput, AgentMessageSubmitResult, AgentMessageView } from '../../adapter/ports/channel-view.js';
|
|
3
5
|
import type { ChannelState } from './types.js';
|
|
4
6
|
type ProjectionState = Pick<ChannelState, 'rows' | 'subagents' | 'subagentCost' | 'emit' | 'emitStream'>;
|
|
7
|
+
/**
|
|
8
|
+
* Structural view of the host `ctx.subagents` continuation service
|
|
9
|
+
* (@deepseek-ai/dsh-subagent's SubagentRuntime) as this projection uses it.
|
|
10
|
+
* Reached by an optional service lookup, so every member is optional and
|
|
11
|
+
* the capability is the method's presence. Nothing here bypasses the
|
|
12
|
+
* continuation manager: `prompt` goes through its exact-parent authority,
|
|
13
|
+
* cold resume and inbox admission, `interrupt` through its authority check.
|
|
14
|
+
*/
|
|
15
|
+
export interface SubagentsServiceView {
|
|
16
|
+
interrupt?(target: string, reason: unknown): void;
|
|
17
|
+
/** Browser-authored prompt to a direct continuable child: resolves with
|
|
18
|
+
* the accepted message's inbox id. */
|
|
19
|
+
prompt?(request: {
|
|
20
|
+
readonly requestId: string;
|
|
21
|
+
readonly parentSessionId: string;
|
|
22
|
+
readonly childSessionId: string;
|
|
23
|
+
readonly mode: 'continuable';
|
|
24
|
+
readonly delivery: 'queue' | 'steer';
|
|
25
|
+
readonly content: readonly {
|
|
26
|
+
readonly type: 'text';
|
|
27
|
+
readonly text: string;
|
|
28
|
+
}[];
|
|
29
|
+
}, signal: AbortSignal): Promise<{
|
|
30
|
+
readonly messageId: string;
|
|
31
|
+
}>;
|
|
32
|
+
/** Durable direct-child catalog read; no Agent is loaded, so the rows
|
|
33
|
+
* carry no liveness guarantee. */
|
|
34
|
+
listChildren?(parentSessionId: string, signal?: AbortSignal): Promise<readonly SubagentCatalogEntryView[]>;
|
|
35
|
+
}
|
|
36
|
+
/** One `listChildren` catalog row (SubagentCatalogEntry, structural). */
|
|
37
|
+
export interface SubagentCatalogEntryView {
|
|
38
|
+
readonly id: string;
|
|
39
|
+
readonly createdAt: number;
|
|
40
|
+
readonly mode: 'one-shot' | 'continuable' | 'unknown';
|
|
41
|
+
readonly label?: string;
|
|
42
|
+
}
|
|
5
43
|
interface ProjectionDependencies {
|
|
6
44
|
rowIds: {
|
|
7
45
|
value: number;
|
|
8
46
|
};
|
|
9
47
|
agent(): Agent;
|
|
10
|
-
subagents():
|
|
11
|
-
interrupt?(target: string, reason: unknown): void;
|
|
12
|
-
} | undefined;
|
|
48
|
+
subagents(): SubagentsServiceView | undefined;
|
|
13
49
|
/** Optional child metadata lookup; failures must not suppress spawning. */
|
|
14
50
|
lookupChild(id: string): {
|
|
15
51
|
status?: string;
|
|
@@ -19,6 +55,17 @@ interface ProjectionDependencies {
|
|
|
19
55
|
model?: string;
|
|
20
56
|
};
|
|
21
57
|
} | undefined;
|
|
58
|
+
/** Aborted when the channel owner releases: cancels a prompt that has not
|
|
59
|
+
* been accepted yet (an accepted child inbox belongs to the continuation
|
|
60
|
+
* manager from then on). */
|
|
61
|
+
ownerSignal?: AbortSignal;
|
|
62
|
+
/** The DSH child transcript source (docs/dsh-child-transcript.md),
|
|
63
|
+
* injected only when the host composition serves session persistence.
|
|
64
|
+
* Its presence is the `SubagentControl.history` capability: the shared
|
|
65
|
+
* transcript tab renders exactly when it exists, with no backend-specific
|
|
66
|
+
* UI. The reader re-captures parent identity, binding generation and
|
|
67
|
+
* child ownership on every call, so a plain pass-through is fence-safe. */
|
|
68
|
+
readChildTranscript?: (agentId: string, window?: SubagentTranscriptWindow) => Promise<SubagentTranscriptPage | null>;
|
|
22
69
|
}
|
|
23
70
|
/**
|
|
24
71
|
* Keep each parked parent's reducer alive, including session links and the
|
|
@@ -29,6 +76,14 @@ export declare function createSubagentProjection(getState: () => ProjectionState
|
|
|
29
76
|
readonly store: SubagentActivityStore;
|
|
30
77
|
readonly pendingTaskDescriptions: string[];
|
|
31
78
|
control: {
|
|
79
|
+
message: {
|
|
80
|
+
via: "direct-continuable";
|
|
81
|
+
steer: true;
|
|
82
|
+
listTargets: () => Promise<readonly AgentIdentity[]>;
|
|
83
|
+
submit: (input: AgentMessageSubmitInput) => Promise<AgentMessageSubmitResult>;
|
|
84
|
+
messages: () => AgentMessageView[];
|
|
85
|
+
};
|
|
86
|
+
history?: ((agentId: string, window?: SubagentTranscriptWindow) => Promise<SubagentTranscriptPage | null>) | undefined;
|
|
32
87
|
interrupt: (id: string) => boolean;
|
|
33
88
|
};
|
|
34
89
|
onSessionEvent(session: unknown, event: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/subagent-projection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subagent-projection.d.ts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;;4BAcA,OAAO,SAAS;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;yBAgB9C,OAAO,SAAS,oBAAoB,GAAG,OAAO;kBAIrD,UAAU,QAwRH;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAG,IAAI,CAxR9C,CAAC,CAAC,CAAC,WAAW,MAAM,GAAG,IAAI;gBAC9D,UAAU,QA6SH;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,CAAA;KAAE,KAAG,IAAI,CA7SnE,CAAC,CAAC,CAAC,WAAW,MAAM,GAAG,IAAI;2BAC/C,OAAO;6BACL,SAAS,OAAO,EAAE;;;;kBAnFxB,KAAK,KAAG,IAAI;qBAIT,KAAK,KAAG,IAAI;kBAyFpB,KAAK;;;EAItB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
1
2
|
import { markChannelReadDirty } from '../../adapter/channel/read-view.js';
|
|
3
|
+
import { agentMessageFailureOf, agentMessageTextOf, agentRelaySourceOf, foldAgentMessage } from '../../agent/messages.js';
|
|
2
4
|
import { SubagentActivityStore } from '../subagents.js';
|
|
3
5
|
import { isSubagentToolName } from './projection-helpers.js';
|
|
4
6
|
/**
|
|
@@ -44,6 +46,11 @@ export function createSubagentProjection(getState, deps) {
|
|
|
44
46
|
// Transport passes null for an unkeyed event; never guess its ownership.
|
|
45
47
|
return parent === undefined ? active : undefined;
|
|
46
48
|
};
|
|
49
|
+
/** DSH Session id of a bus carrier session, when it carries one. */
|
|
50
|
+
const sessionIdOf = (session) => {
|
|
51
|
+
const id = session?.id;
|
|
52
|
+
return typeof id === 'string' ? id : undefined;
|
|
53
|
+
};
|
|
47
54
|
const park = (agent) => {
|
|
48
55
|
active.dropRows();
|
|
49
56
|
parked.set(agent, active);
|
|
@@ -70,19 +77,58 @@ export function createSubagentProjection(getState, deps) {
|
|
|
70
77
|
active.store.patch(saved.agentId, { status: 'unknown' });
|
|
71
78
|
}
|
|
72
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* The addressable roster: the parent's durable direct-child catalog,
|
|
82
|
+
* filtered to continuable children only. One-shot, unknown-mode and
|
|
83
|
+
* diagnostic rows are not addressable (fail closed), and a missing
|
|
84
|
+
* continuation service rejects instead of answering an empty roster.
|
|
85
|
+
*/
|
|
86
|
+
const listTargets = async () => {
|
|
87
|
+
const service = deps.subagents();
|
|
88
|
+
if (service?.listChildren === undefined)
|
|
89
|
+
throw new Error('dsh-tui: the subagents continuation service is unavailable');
|
|
90
|
+
const entries = await service.listChildren(String(deps.agent().session.id));
|
|
91
|
+
return entries
|
|
92
|
+
.filter(entry => entry.mode === 'continuable')
|
|
93
|
+
.map(entry => {
|
|
94
|
+
const status = active.store.get(entry.id)?.status;
|
|
95
|
+
return {
|
|
96
|
+
agentId: entry.id,
|
|
97
|
+
sessionId: entry.id,
|
|
98
|
+
...(entry.label === undefined ? {} : { label: entry.label }),
|
|
99
|
+
mode: 'continuable',
|
|
100
|
+
...(status === undefined ? {} : { status }),
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
};
|
|
73
104
|
return {
|
|
74
105
|
get store() { return active.store; },
|
|
75
106
|
get pendingTaskDescriptions() { return active.pendingTaskDescriptions; },
|
|
76
|
-
control: {
|
|
107
|
+
control: {
|
|
108
|
+
interrupt: (id) => active.control.interrupt(id),
|
|
109
|
+
// The shared transcript page source: the capability exists exactly
|
|
110
|
+
// when the injected reader does.
|
|
111
|
+
...(deps.readChildTranscript === undefined ? {} : { history: deps.readChildTranscript }),
|
|
112
|
+
message: {
|
|
113
|
+
via: 'direct-continuable',
|
|
114
|
+
// The prompt control plane takes both deliveries natively; the
|
|
115
|
+
// composer shows steer for Ctrl+Enter only because this says so.
|
|
116
|
+
steer: true,
|
|
117
|
+
listTargets,
|
|
118
|
+
submit: input => active.submitPrompt(input),
|
|
119
|
+
messages: () => [...active.agentMessages],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
77
122
|
onSessionEvent(session, event) {
|
|
78
123
|
let handled = false;
|
|
124
|
+
const parentId = sessionIdOf(session);
|
|
79
125
|
if (session === activeParent.session) {
|
|
80
|
-
active.onParentEvent(event);
|
|
126
|
+
active.onParentEvent(event, false, parentId);
|
|
81
127
|
handled = true;
|
|
82
128
|
}
|
|
83
129
|
for (const [parent, projection] of parked) {
|
|
84
130
|
if (session === parent.session) {
|
|
85
|
-
projection.onParentEvent(event);
|
|
131
|
+
projection.onParentEvent(event, false, parentId);
|
|
86
132
|
handled = true;
|
|
87
133
|
}
|
|
88
134
|
if (projection.onSessionEvent(session, event))
|
|
@@ -103,7 +149,7 @@ export function createSubagentProjection(getState, deps) {
|
|
|
103
149
|
// Live parked reducers already consumed this log. Re-folding historical
|
|
104
150
|
// workflow edges would overwrite the current epoch and its settlement.
|
|
105
151
|
if (!restored)
|
|
106
|
-
active.bootstrapFromLog(events);
|
|
152
|
+
active.bootstrapFromLog(events, sessionIdOf(activeParent.session));
|
|
107
153
|
else
|
|
108
154
|
active.syncNow();
|
|
109
155
|
},
|
|
@@ -137,6 +183,9 @@ export function createSubagentProjection(getState, deps) {
|
|
|
137
183
|
* replayed transcript with cards that the durable log never contained. */
|
|
138
184
|
function createSessionSubagentProjection(getState, deps) {
|
|
139
185
|
const store = new SubagentActivityStore();
|
|
186
|
+
/** Observed agent↔agent relay facts and prompt receipts of this parent,
|
|
187
|
+
* oldest first, folded by durable message id. */
|
|
188
|
+
const agentMessages = [];
|
|
140
189
|
const rowsByAgentId = new Map();
|
|
141
190
|
const pendingTaskDescriptions = [];
|
|
142
191
|
/** Workflow member identity: `tool-workflow/agent-end` carries no childId,
|
|
@@ -190,12 +239,37 @@ function createSessionSubagentProjection(getState, deps) {
|
|
|
190
239
|
syncNow();
|
|
191
240
|
return true;
|
|
192
241
|
};
|
|
242
|
+
/** A relay delivered into a tracked child: the durable
|
|
243
|
+
* AgentMessageSource names the sending session, the receiving side is
|
|
244
|
+
* this child. An admitted relay is 'queued', since nothing stronger is
|
|
245
|
+
* provable from the log alone; a plain user/message (no relay source)
|
|
246
|
+
* never becomes one. */
|
|
247
|
+
const noteChildRelay = (childId, event) => {
|
|
248
|
+
const data = event.data;
|
|
249
|
+
if (data === undefined || typeof data.id !== 'string' || data.id === '')
|
|
250
|
+
return;
|
|
251
|
+
const relay = agentRelaySourceOf(data.source);
|
|
252
|
+
if (relay === undefined)
|
|
253
|
+
return;
|
|
254
|
+
foldAgentMessage(agentMessages, {
|
|
255
|
+
messageId: data.id,
|
|
256
|
+
from: relay.senderSessionId,
|
|
257
|
+
to: childId,
|
|
258
|
+
via: 'agent-relay',
|
|
259
|
+
text: agentMessageTextOf(data.content),
|
|
260
|
+
state: 'queued',
|
|
261
|
+
...(typeof event.seq === 'number' ? { sourceRef: `seq:${event.seq}` } : {}),
|
|
262
|
+
observedAt: eventTime(event) ?? Date.now(),
|
|
263
|
+
});
|
|
264
|
+
};
|
|
193
265
|
const onSessionEvent = (session, event) => {
|
|
194
266
|
let id = store.getSubagentIdBySession(session);
|
|
195
267
|
if (id === undefined)
|
|
196
268
|
id = backfillSessionLink(session);
|
|
197
269
|
if (id === undefined)
|
|
198
270
|
return false;
|
|
271
|
+
if (event.type === 'user/message')
|
|
272
|
+
noteChildRelay(id, event);
|
|
199
273
|
store.onSessionEvent(id, event);
|
|
200
274
|
if (event.type === 'assistant/chunk') {
|
|
201
275
|
streamDirty = true;
|
|
@@ -293,12 +367,32 @@ function createSessionSubagentProjection(getState, deps) {
|
|
|
293
367
|
return typeof time === 'number' ? time : undefined;
|
|
294
368
|
};
|
|
295
369
|
/** Parent-session durable discovery events, live or folded from the log. */
|
|
296
|
-
const onParentEvent = (event, historical = false) => {
|
|
370
|
+
const onParentEvent = (event, historical = false, parentSessionId) => {
|
|
297
371
|
if (!event || typeof event !== 'object')
|
|
298
372
|
return;
|
|
299
373
|
const ev = event;
|
|
300
374
|
const data = ev.data ?? {};
|
|
301
375
|
const childId = typeof data.childId === 'string' ? data.childId : undefined;
|
|
376
|
+
if (ev.type === 'user/message') {
|
|
377
|
+
// A relay delivered into this parent: the durable AgentMessageSource
|
|
378
|
+
// names the sending session. Plain user text, injected context and
|
|
379
|
+
// settlement notices are not relays; they stay invisible here, just as
|
|
380
|
+
// the translator keeps them out of bubbles.
|
|
381
|
+
const relay = agentRelaySourceOf(data.source);
|
|
382
|
+
if (relay !== undefined && typeof data.id === 'string' && data.id !== '') {
|
|
383
|
+
foldAgentMessage(agentMessages, {
|
|
384
|
+
messageId: data.id,
|
|
385
|
+
from: relay.senderSessionId,
|
|
386
|
+
...(parentSessionId === undefined ? {} : { to: parentSessionId, parentSessionId }),
|
|
387
|
+
via: 'agent-relay',
|
|
388
|
+
text: agentMessageTextOf(data.content),
|
|
389
|
+
state: 'queued',
|
|
390
|
+
...(typeof ev.seq === 'number' ? { sourceRef: `seq:${ev.seq}` } : {}),
|
|
391
|
+
observedAt: eventTime(event) ?? Date.now(),
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
302
396
|
if (ev.type === 'tool/call') {
|
|
303
397
|
if (!historical && typeof data.name === 'string' && isSubagentToolName(data.name) && typeof data.arguments === 'string') {
|
|
304
398
|
try {
|
|
@@ -360,12 +454,12 @@ function createSessionSubagentProjection(getState, deps) {
|
|
|
360
454
|
/** Seed the dashboard from the durable parent log at bind/resume: catalog
|
|
361
455
|
* children and workflow members survive a restart. Historical children the
|
|
362
456
|
* registry no longer holds stay card-less (dashboard-only, `unknown`). */
|
|
363
|
-
const bootstrapFromLog = (events) => {
|
|
457
|
+
const bootstrapFromLog = (events, parentSessionId) => {
|
|
364
458
|
if (!Array.isArray(events))
|
|
365
459
|
return;
|
|
366
460
|
try {
|
|
367
461
|
for (const event of events)
|
|
368
|
-
onParentEvent(event, true);
|
|
462
|
+
onParentEvent(event, true, parentSessionId);
|
|
369
463
|
}
|
|
370
464
|
catch { /* bootstrap is best-effort discovery; live events remain authoritative */ }
|
|
371
465
|
syncNow();
|
|
@@ -421,6 +515,56 @@ function createSessionSubagentProjection(getState, deps) {
|
|
|
421
515
|
syncNow();
|
|
422
516
|
getState().emit();
|
|
423
517
|
};
|
|
518
|
+
/**
|
|
519
|
+
* The direct continuable prompt: one browser-authored message through
|
|
520
|
+
* the continuation manager, whose rules cover exact-parent authority,
|
|
521
|
+
* cold resume and inbox admission; this facade only shapes the request
|
|
522
|
+
* and folds the receipt. An accepted inbox is 'queued', never more; a
|
|
523
|
+
* failure maps to the stable vocabulary.
|
|
524
|
+
*/
|
|
525
|
+
const submitPrompt = async (input) => {
|
|
526
|
+
const service = deps.subagents();
|
|
527
|
+
if (service?.prompt === undefined)
|
|
528
|
+
return { ok: false, reason: 'unavailable' };
|
|
529
|
+
const text = input.text.trim();
|
|
530
|
+
if (text === '')
|
|
531
|
+
return { ok: false, reason: 'failed', message: 'empty text' };
|
|
532
|
+
// Fail closed on a child this roster already knows cannot take a
|
|
533
|
+
// continuation; the service re-checks with full authority regardless.
|
|
534
|
+
if (store.get(input.targetId)?.mode === 'one-shot')
|
|
535
|
+
return { ok: false, reason: 'not-resumable' };
|
|
536
|
+
const parentSessionId = String(deps.agent().session.id);
|
|
537
|
+
const requestId = `tui-${randomUUID()}`;
|
|
538
|
+
const signals = [new AbortController().signal, deps.ownerSignal, input.signal].filter((signal) => signal !== undefined);
|
|
539
|
+
try {
|
|
540
|
+
const receipt = await service.prompt({
|
|
541
|
+
requestId,
|
|
542
|
+
parentSessionId,
|
|
543
|
+
childSessionId: input.targetId,
|
|
544
|
+
mode: 'continuable',
|
|
545
|
+
delivery: input.delivery,
|
|
546
|
+
content: [{ type: 'text', text }],
|
|
547
|
+
}, AbortSignal.any(signals));
|
|
548
|
+
foldAgentMessage(agentMessages, {
|
|
549
|
+
messageId: receipt.messageId,
|
|
550
|
+
intentId: requestId,
|
|
551
|
+
from: 'user',
|
|
552
|
+
to: input.targetId,
|
|
553
|
+
via: 'direct-continuable',
|
|
554
|
+
text,
|
|
555
|
+
state: 'queued',
|
|
556
|
+
sourceRef: receipt.messageId,
|
|
557
|
+
observedAt: Date.now(),
|
|
558
|
+
parentSessionId,
|
|
559
|
+
});
|
|
560
|
+
syncNow();
|
|
561
|
+
getState().emit();
|
|
562
|
+
return { ok: true, intentId: requestId, messageId: receipt.messageId, state: 'queued' };
|
|
563
|
+
}
|
|
564
|
+
catch (error) {
|
|
565
|
+
return agentMessageFailureOf(error);
|
|
566
|
+
}
|
|
567
|
+
};
|
|
424
568
|
const control = {
|
|
425
569
|
interrupt(agentId) {
|
|
426
570
|
const child = store.get(agentId);
|
|
@@ -441,6 +585,6 @@ function createSessionSubagentProjection(getState, deps) {
|
|
|
441
585
|
},
|
|
442
586
|
};
|
|
443
587
|
const dropRows = () => { streamDirty = false; rowsByAgentId.clear(); };
|
|
444
|
-
const reset = () => { dropRows(); cardedIds.clear(); workflowMembers.clear(); pendingTaskDescriptions.length = 0; store.reset(); getState().subagents = []; getState().subagentCost = []; };
|
|
445
|
-
return { store, control, pendingTaskDescriptions, onSessionEvent, onStreamFrame, onParentEvent, bootstrapFromLog, onStart, onEnd, syncNow, flush, dropRows, reset };
|
|
588
|
+
const reset = () => { dropRows(); cardedIds.clear(); workflowMembers.clear(); pendingTaskDescriptions.length = 0; agentMessages.length = 0; store.reset(); getState().subagents = []; getState().subagentCost = []; };
|
|
589
|
+
return { store, control, pendingTaskDescriptions, agentMessages, onSessionEvent, onStreamFrame, onParentEvent, bootstrapFromLog, onStart, onEnd, syncNow, flush, dropRows, reset, submitPrompt };
|
|
446
590
|
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSH child transcript source (docs/dsh-child-transcript.md): the DSH
|
|
3
|
+
* implementation of the backend-neutral `SubagentControl.history` contract,
|
|
4
|
+
* next to Claude's on-disk child lane. Reads one direct child's own durable
|
|
5
|
+
* session log through the public persistence range API only
|
|
6
|
+
* (`ctx.sessionPersistence.open(id, 'read')` + `SessionHandle.read(offset,
|
|
7
|
+
* length)`) and translates the page through a throwaway DSH translator into
|
|
8
|
+
* the shared leaf vocabulary. The deprecated Session snapshot-events API and
|
|
9
|
+
* the raw session-log file readers are not used.
|
|
10
|
+
*
|
|
11
|
+
* Read shape (every step bounded and fenced):
|
|
12
|
+
* 1. ownership: the parent-owned `subagents.listChildren(parentId)` roster
|
|
13
|
+
* must name the child; a UI-supplied id is never opened on its own;
|
|
14
|
+
* 2. durability: when the agents registry still holds the child's exact
|
|
15
|
+
* live Session, the public `ctx.sessions.flush(session)` barrier runs
|
|
16
|
+
* first (no whenIdle wait, no Agent create/resume); a failed or timed-out
|
|
17
|
+
* flush falls back to whatever prefix is already persisted;
|
|
18
|
+
* 3. windows: the child's own events are `[inheritedEventCount, total)`;
|
|
19
|
+
* the fork-inherited prefix is never paged (a seeded header without its
|
|
20
|
+
* exact cut fails closed). `total` comes from `stat().eventCount` when
|
|
21
|
+
* the host states it, else from bounded single-event tail probes of the
|
|
22
|
+
* public range reader (never an unbounded whole-log read + slice);
|
|
23
|
+
* 4. translation: a fresh translator instance per call; only the leaf
|
|
24
|
+
* kinds (`assistant.message` / `tool.call` / `tool.result`) survive,
|
|
25
|
+
* each stamped with the child lane's `parentCallId`, so the shared
|
|
26
|
+
* fold/page/merge pipeline consumes them exactly like Claude's;
|
|
27
|
+
* 5. fences: the binding capture (session + generation) is re-checked after
|
|
28
|
+
* every await; a parent that moved on discards the page. The handle is
|
|
29
|
+
* closed exactly once on every path.
|
|
30
|
+
*/
|
|
31
|
+
import { type SessionEvent } from '@deepseek-ai/dsh-session';
|
|
32
|
+
import type { SubagentTranscriptPage, SubagentTranscriptWindow } from '../../agent/capabilities.js';
|
|
33
|
+
import type { DshTranslator } from '../backend/translate.js';
|
|
34
|
+
import type { SubagentsServiceView } from './subagent-projection.js';
|
|
35
|
+
/**
|
|
36
|
+
* One page window in source events. Claude pages by 400 SDK messages
|
|
37
|
+
* (`SUBAGENT_TRANSCRIPT_PAGE`) and the shared "load older" chunk is
|
|
38
|
+
* `TRANSCRIPT_OLDER_CHUNK = 400`, so DSH pages by 400 SessionEvents and the
|
|
39
|
+
* neutral cursor stays one unit wide for both backends.
|
|
40
|
+
*/
|
|
41
|
+
export declare const CHILD_TRANSCRIPT_PAGE_EVENTS = 400;
|
|
42
|
+
/** The binding identity one read captures and re-checks after every await. */
|
|
43
|
+
export interface ChildTranscriptCapture {
|
|
44
|
+
readonly sessionId: string;
|
|
45
|
+
readonly generation: number;
|
|
46
|
+
/** The bound session object, opaque here; the `isCurrent` fence compares
|
|
47
|
+
* identity (the caller's binding owns the real type). */
|
|
48
|
+
readonly session: object;
|
|
49
|
+
}
|
|
50
|
+
/** Structural slice of `ctx.sessionPersistence` the child transcript uses. */
|
|
51
|
+
export interface ChildPersistenceSource {
|
|
52
|
+
/** Cheap metadata observation; `eventCount` optional by contract. */
|
|
53
|
+
stat?(id: string, options?: {
|
|
54
|
+
readonly signal?: AbortSignal;
|
|
55
|
+
}): Promise<{
|
|
56
|
+
readonly eventCount?: unknown;
|
|
57
|
+
} | undefined>;
|
|
58
|
+
open(id: string, access: 'read', options?: {
|
|
59
|
+
readonly signal?: AbortSignal;
|
|
60
|
+
}): Promise<ChildPersistenceHandle>;
|
|
61
|
+
}
|
|
62
|
+
/** The public read-only `SessionHandle` as this module reads it. */
|
|
63
|
+
export interface ChildPersistenceHandle {
|
|
64
|
+
readonly id: unknown;
|
|
65
|
+
readonly header: {
|
|
66
|
+
readonly version?: unknown;
|
|
67
|
+
readonly id?: unknown;
|
|
68
|
+
readonly parentSession?: unknown;
|
|
69
|
+
readonly isSeeded?: unknown;
|
|
70
|
+
};
|
|
71
|
+
/** Exact fork-inherited prefix length stored with the log (0 unseeded). */
|
|
72
|
+
readonly inheritedEventCount?: unknown;
|
|
73
|
+
read(offset?: number, length?: number, options?: {
|
|
74
|
+
readonly signal?: AbortSignal;
|
|
75
|
+
}): Promise<{
|
|
76
|
+
readonly events: readonly SessionEvent[];
|
|
77
|
+
}>;
|
|
78
|
+
close(): Promise<void>;
|
|
79
|
+
}
|
|
80
|
+
/** Structural slice of `ctx.sessions` (dsh-session SessionStore). */
|
|
81
|
+
export interface ChildSessionsStore {
|
|
82
|
+
flush(session: object): Promise<unknown>;
|
|
83
|
+
}
|
|
84
|
+
export interface ChildTranscriptDeps {
|
|
85
|
+
/** Current binding identity; undefined when the DSH binding is gone. */
|
|
86
|
+
capture(): ChildTranscriptCapture | undefined;
|
|
87
|
+
/** False once the channel re/switched away from the captured binding. */
|
|
88
|
+
isCurrent(capture: ChildTranscriptCapture): boolean;
|
|
89
|
+
/** The continuation service (parent-owned child catalog). */
|
|
90
|
+
subagents(): SubagentsServiceView | undefined;
|
|
91
|
+
/** The persistence service, re-resolved per call (never cached stale). */
|
|
92
|
+
persistence(): ChildPersistenceSource | undefined;
|
|
93
|
+
/** The live sessions store for the pre-read flush barrier; optional. */
|
|
94
|
+
sessionsStore(): ChildSessionsStore | undefined;
|
|
95
|
+
/** Registry child lookup: the exact live Session when it is held. */
|
|
96
|
+
lookupChild(id: string): {
|
|
97
|
+
readonly session?: unknown;
|
|
98
|
+
} | undefined;
|
|
99
|
+
/** A throwaway translator per call: history must not touch the live
|
|
100
|
+
* translator's frame fence or open-call ledger (backend/session.ts's
|
|
101
|
+
* own `history()` rule). */
|
|
102
|
+
createTranslator(): DshTranslator;
|
|
103
|
+
/** Aborted when the channel owner releases; cancels a page read. */
|
|
104
|
+
readonly ownerSignal?: AbortSignal;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Read one child transcript page: the newest window, or the
|
|
108
|
+
* `window`-addressed older slice, of the child's own durable events. Null =
|
|
109
|
+
* the parent's catalog holds no such direct child; a rejection = the read
|
|
110
|
+
* failed (the transcript view shows "unavailable", never a fabricated empty
|
|
111
|
+
* page).
|
|
112
|
+
*/
|
|
113
|
+
export declare function readChildTranscriptPage(deps: ChildTranscriptDeps, agentId: string, window?: SubagentTranscriptWindow): Promise<SubagentTranscriptPage | null>;
|
|
114
|
+
//# sourceMappingURL=subagent-transcript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent-transcript.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/subagent-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACpF,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAGnG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAE5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,MAAM,CAAA;AAc/C,8EAA8E;AAC9E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B;8DAC0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,8EAA8E;AAC9E,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC,CAAA;IACtH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,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