@deepseek-harness-tui/dsh-tui 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -5
- package/assets/claude-girl/claude-girl-happy.png +0 -0
- package/assets/claude-girl/claude-girl.png +0 -0
- package/assets/codex-girl/codex-girl-happy.png +0 -0
- package/assets/codex-girl/codex-girl.png +0 -0
- package/bin/dsh-tui.js +104 -18
- package/cordis.patch.yml +2 -0
- package/cordis.yml +2 -0
- package/guide/dsh-tui-guide/SKILL.md +4 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +203 -0
- package/guide/dsh-tui-guide/claude-backend.md +161 -0
- package/guide/dsh-tui-guide/codex-backend.en.md +297 -0
- package/guide/dsh-tui-guide/codex-backend.md +257 -0
- package/guide/dsh-tui-guide/configuration.en.md +9 -2
- package/guide/dsh-tui-guide/configuration.md +9 -2
- package/guide/dsh-tui-guide/interaction.en.md +169 -27
- package/guide/dsh-tui-guide/interaction.md +115 -17
- package/guide/dsh-tui-guide/themes.en.md +24 -2
- package/guide/dsh-tui-guide/themes.md +21 -2
- package/guide/dsh-tui-guide/user-guide.en.md +38 -23
- package/guide/dsh-tui-guide/user-guide.md +22 -11
- package/guide/dsh-tui-guide/vscode.en.md +1 -0
- package/guide/dsh-tui-guide/vscode.md +1 -0
- package/lib/settings.json +139 -6
- package/lib/types/adapter/channel/state.d.ts.map +1 -1
- package/lib/types/adapter/channel/state.js +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +17 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +29 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +45 -5
- package/lib/types/adapter/ports/channel-catalog.d.ts +7 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-display.d.ts +7 -1
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +5 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +183 -6
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +477 -13
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/agent/backend.d.ts +168 -0
- package/lib/types/agent/backend.d.ts.map +1 -0
- package/lib/types/agent/backend.js +1 -0
- package/lib/types/agent/capabilities.d.ts +461 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -0
- package/lib/types/agent/capabilities.js +1 -0
- package/lib/types/agent/events.d.ts +733 -0
- package/lib/types/agent/events.d.ts.map +1 -0
- package/lib/types/agent/events.js +2 -0
- package/lib/types/agent/index.d.ts +8 -0
- package/lib/types/agent/index.d.ts.map +1 -0
- package/lib/types/agent/index.js +7 -0
- package/lib/types/agent/messages.d.ts +52 -0
- package/lib/types/agent/messages.d.ts.map +1 -0
- package/lib/types/agent/messages.js +91 -0
- package/lib/types/agent/presentation.d.ts +29 -0
- package/lib/types/agent/presentation.d.ts.map +1 -0
- package/lib/types/agent/presentation.js +4 -0
- package/lib/types/agent/refs.d.ts +30 -0
- package/lib/types/agent/refs.d.ts.map +1 -0
- package/lib/types/agent/refs.js +39 -0
- package/lib/types/agent/session.d.ts +78 -0
- package/lib/types/agent/session.d.ts.map +1 -0
- package/lib/types/agent/session.js +1 -0
- package/lib/types/backends/claude/activity.d.ts +53 -0
- package/lib/types/backends/claude/activity.d.ts.map +1 -0
- package/lib/types/backends/claude/activity.js +103 -0
- package/lib/types/backends/claude/auth.d.ts +245 -0
- package/lib/types/backends/claude/auth.d.ts.map +1 -0
- package/lib/types/backends/claude/auth.js +503 -0
- package/lib/types/backends/claude/backend.d.ts +32 -0
- package/lib/types/backends/claude/backend.d.ts.map +1 -0
- package/lib/types/backends/claude/backend.js +296 -0
- package/lib/types/backends/claude/catalog.d.ts +17 -0
- package/lib/types/backends/claude/catalog.d.ts.map +1 -0
- package/lib/types/backends/claude/catalog.js +94 -0
- package/lib/types/backends/claude/channels.d.ts +63 -0
- package/lib/types/backends/claude/channels.d.ts.map +1 -0
- package/lib/types/backends/claude/channels.js +275 -0
- package/lib/types/backends/claude/contract.d.ts +37 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -0
- package/lib/types/backends/claude/contract.js +46 -0
- package/lib/types/backends/claude/controls.d.ts +134 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -0
- package/lib/types/backends/claude/controls.js +425 -0
- package/lib/types/backends/claude/dialogs.d.ts +62 -0
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -0
- package/lib/types/backends/claude/dialogs.js +253 -0
- package/lib/types/backends/claude/flag-settings.d.ts +12 -0
- package/lib/types/backends/claude/flag-settings.d.ts.map +1 -0
- package/lib/types/backends/claude/flag-settings.js +49 -0
- package/lib/types/backends/claude/images.d.ts +49 -0
- package/lib/types/backends/claude/images.d.ts.map +1 -0
- package/lib/types/backends/claude/images.js +94 -0
- package/lib/types/backends/claude/index.d.ts +5 -0
- package/lib/types/backends/claude/index.d.ts.map +1 -0
- package/lib/types/backends/claude/index.js +4 -0
- package/lib/types/backends/claude/install.d.ts +15 -0
- package/lib/types/backends/claude/install.d.ts.map +1 -0
- package/lib/types/backends/claude/install.js +91 -0
- package/lib/types/backends/claude/modelEnv.d.ts +64 -0
- package/lib/types/backends/claude/modelEnv.d.ts.map +1 -0
- package/lib/types/backends/claude/modelEnv.js +199 -0
- package/lib/types/backends/claude/narrow.d.ts +10 -0
- package/lib/types/backends/claude/narrow.d.ts.map +1 -0
- package/lib/types/backends/claude/narrow.js +8 -0
- package/lib/types/backends/claude/older-history.d.ts +16 -0
- package/lib/types/backends/claude/older-history.d.ts.map +1 -0
- package/lib/types/backends/claude/older-history.js +101 -0
- package/lib/types/backends/claude/options.d.ts +181 -0
- package/lib/types/backends/claude/options.d.ts.map +1 -0
- package/lib/types/backends/claude/options.js +208 -0
- package/lib/types/backends/claude/permissions.d.ts +83 -0
- package/lib/types/backends/claude/permissions.d.ts.map +1 -0
- package/lib/types/backends/claude/permissions.js +331 -0
- package/lib/types/backends/claude/prefs.d.ts +55 -0
- package/lib/types/backends/claude/prefs.d.ts.map +1 -0
- package/lib/types/backends/claude/prefs.js +150 -0
- package/lib/types/backends/claude/process.d.ts +19 -0
- package/lib/types/backends/claude/process.d.ts.map +1 -0
- package/lib/types/backends/claude/process.js +156 -0
- package/lib/types/backends/claude/replay.d.ts +129 -0
- package/lib/types/backends/claude/replay.d.ts.map +1 -0
- package/lib/types/backends/claude/replay.js +505 -0
- package/lib/types/backends/claude/sdk-warnings.d.ts +23 -0
- package/lib/types/backends/claude/sdk-warnings.d.ts.map +1 -0
- package/lib/types/backends/claude/sdk-warnings.js +55 -0
- package/lib/types/backends/claude/sdk.d.ts +12 -0
- package/lib/types/backends/claude/sdk.d.ts.map +1 -0
- package/lib/types/backends/claude/sdk.js +34 -0
- package/lib/types/backends/claude/send-message.d.ts +54 -0
- package/lib/types/backends/claude/send-message.d.ts.map +1 -0
- package/lib/types/backends/claude/send-message.js +65 -0
- package/lib/types/backends/claude/session/auth.d.ts +47 -0
- package/lib/types/backends/claude/session/auth.d.ts.map +1 -0
- package/lib/types/backends/claude/session/auth.js +226 -0
- package/lib/types/backends/claude/session/channels.d.ts +82 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -0
- package/lib/types/backends/claude/session/channels.js +45 -0
- package/lib/types/backends/claude/session/input.d.ts +16 -0
- package/lib/types/backends/claude/session/input.d.ts.map +1 -0
- package/lib/types/backends/claude/session/input.js +64 -0
- package/lib/types/backends/claude/session/lifecycle.d.ts +6 -0
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -0
- package/lib/types/backends/claude/session/lifecycle.js +852 -0
- package/lib/types/backends/claude/session/store.d.ts +17 -0
- package/lib/types/backends/claude/session/store.d.ts.map +1 -0
- package/lib/types/backends/claude/session/store.js +122 -0
- package/lib/types/backends/claude/session/subagents.d.ts +13 -0
- package/lib/types/backends/claude/session/subagents.d.ts.map +1 -0
- package/lib/types/backends/claude/session/subagents.js +77 -0
- package/lib/types/backends/claude/session/types.d.ts +89 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -0
- package/lib/types/backends/claude/session/types.js +1 -0
- package/lib/types/backends/claude/session.d.ts +4 -0
- package/lib/types/backends/claude/session.d.ts.map +1 -0
- package/lib/types/backends/claude/session.js +2 -0
- package/lib/types/backends/claude/side-query.d.ts +34 -0
- package/lib/types/backends/claude/side-query.d.ts.map +1 -0
- package/lib/types/backends/claude/side-query.js +116 -0
- package/lib/types/backends/claude/task-output.d.ts +13 -0
- package/lib/types/backends/claude/task-output.d.ts.map +1 -0
- package/lib/types/backends/claude/task-output.js +101 -0
- package/lib/types/backends/claude/tools.d.ts +45 -0
- package/lib/types/backends/claude/tools.d.ts.map +1 -0
- package/lib/types/backends/claude/tools.js +231 -0
- package/lib/types/backends/claude/transcript-file.d.ts +41 -0
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -0
- package/lib/types/backends/claude/transcript-file.js +195 -0
- package/lib/types/backends/claude/translate/attempts.d.ts +33 -0
- package/lib/types/backends/claude/translate/attempts.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/attempts.js +243 -0
- package/lib/types/backends/claude/translate/content.d.ts +33 -0
- package/lib/types/backends/claude/translate/content.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/content.js +91 -0
- package/lib/types/backends/claude/translate/core.d.ts +76 -0
- package/lib/types/backends/claude/translate/core.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/core.js +447 -0
- package/lib/types/backends/claude/translate/events.d.ts +9 -0
- package/lib/types/backends/claude/translate/events.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/events.js +77 -0
- package/lib/types/backends/claude/translate/lanes.d.ts +31 -0
- package/lib/types/backends/claude/translate/lanes.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/lanes.js +177 -0
- package/lib/types/backends/claude/translate/messages.d.ts +36 -0
- package/lib/types/backends/claude/translate/messages.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/messages.js +202 -0
- package/lib/types/backends/claude/translate/system.d.ts +40 -0
- package/lib/types/backends/claude/translate/system.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/system.js +399 -0
- package/lib/types/backends/claude/translate/tasks.d.ts +19 -0
- package/lib/types/backends/claude/translate/tasks.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/tasks.js +159 -0
- package/lib/types/backends/claude/translate/types.d.ts +114 -0
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/types.js +1 -0
- package/lib/types/backends/claude/translate.d.ts +9 -0
- package/lib/types/backends/claude/translate.d.ts.map +1 -0
- package/lib/types/backends/claude/translate.js +6 -0
- package/lib/types/backends/codex/auth/external-tokens.d.ts +66 -0
- package/lib/types/backends/codex/auth/external-tokens.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/external-tokens.js +325 -0
- package/lib/types/backends/codex/auth/route.d.ts +14 -0
- package/lib/types/backends/codex/auth/route.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/route.js +52 -0
- package/lib/types/backends/codex/auth/status.d.ts +16 -0
- package/lib/types/backends/codex/auth/status.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/status.js +115 -0
- package/lib/types/backends/codex/backend.d.ts +58 -0
- package/lib/types/backends/codex/backend.d.ts.map +1 -0
- package/lib/types/backends/codex/backend.js +201 -0
- package/lib/types/backends/codex/catalog.d.ts +17 -0
- package/lib/types/backends/codex/catalog.d.ts.map +1 -0
- package/lib/types/backends/codex/catalog.js +128 -0
- package/lib/types/backends/codex/channels.d.ts +59 -0
- package/lib/types/backends/codex/channels.d.ts.map +1 -0
- package/lib/types/backends/codex/channels.js +274 -0
- package/lib/types/backends/codex/contract.d.ts +46 -0
- package/lib/types/backends/codex/contract.d.ts.map +1 -0
- package/lib/types/backends/codex/contract.js +80 -0
- package/lib/types/backends/codex/detect.d.ts +14 -0
- package/lib/types/backends/codex/detect.d.ts.map +1 -0
- package/lib/types/backends/codex/detect.js +90 -0
- package/lib/types/backends/codex/index.d.ts +6 -0
- package/lib/types/backends/codex/index.d.ts.map +1 -0
- package/lib/types/backends/codex/index.js +5 -0
- package/lib/types/backends/codex/modes.d.ts +16 -0
- package/lib/types/backends/codex/modes.d.ts.map +1 -0
- package/lib/types/backends/codex/modes.js +49 -0
- package/lib/types/backends/codex/narrow.d.ts +20 -0
- package/lib/types/backends/codex/narrow.d.ts.map +1 -0
- package/lib/types/backends/codex/narrow.js +18 -0
- package/lib/types/backends/codex/prefs.d.ts +42 -0
- package/lib/types/backends/codex/prefs.d.ts.map +1 -0
- package/lib/types/backends/codex/prefs.js +124 -0
- package/lib/types/backends/codex/protocol/index.d.ts +149 -0
- package/lib/types/backends/codex/protocol/index.d.ts.map +1 -0
- package/lib/types/backends/codex/protocol/index.js +130 -0
- package/lib/types/backends/codex/rpc/binary.d.ts +35 -0
- package/lib/types/backends/codex/rpc/binary.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/binary.js +174 -0
- package/lib/types/backends/codex/rpc/client.d.ts +72 -0
- package/lib/types/backends/codex/rpc/client.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/client.js +214 -0
- package/lib/types/backends/codex/rpc/hub.d.ts +105 -0
- package/lib/types/backends/codex/rpc/hub.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/hub.js +532 -0
- package/lib/types/backends/codex/rpc/transport.d.ts +39 -0
- package/lib/types/backends/codex/rpc/transport.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/transport.js +212 -0
- package/lib/types/backends/codex/session/activity.d.ts +18 -0
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -0
- package/lib/types/backends/codex/session/activity.js +108 -0
- package/lib/types/backends/codex/session/approvals.d.ts +39 -0
- package/lib/types/backends/codex/session/approvals.d.ts.map +1 -0
- package/lib/types/backends/codex/session/approvals.js +477 -0
- package/lib/types/backends/codex/session/commands.d.ts +37 -0
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -0
- package/lib/types/backends/codex/session/commands.js +141 -0
- package/lib/types/backends/codex/session/controls.d.ts +37 -0
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -0
- package/lib/types/backends/codex/session/controls.js +303 -0
- package/lib/types/backends/codex/session/goals.d.ts +25 -0
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -0
- package/lib/types/backends/codex/session/goals.js +97 -0
- package/lib/types/backends/codex/session/history.d.ts +52 -0
- package/lib/types/backends/codex/session/history.d.ts.map +1 -0
- package/lib/types/backends/codex/session/history.js +196 -0
- package/lib/types/backends/codex/session/images.d.ts +17 -0
- package/lib/types/backends/codex/session/images.d.ts.map +1 -0
- package/lib/types/backends/codex/session/images.js +138 -0
- package/lib/types/backends/codex/session/input.d.ts +75 -0
- package/lib/types/backends/codex/session/input.d.ts.map +1 -0
- package/lib/types/backends/codex/session/input.js +294 -0
- package/lib/types/backends/codex/session/plan-review.d.ts +19 -0
- package/lib/types/backends/codex/session/plan-review.d.ts.map +1 -0
- package/lib/types/backends/codex/session/plan-review.js +48 -0
- package/lib/types/backends/codex/session/prompts.d.ts +7 -0
- package/lib/types/backends/codex/session/prompts.d.ts.map +1 -0
- package/lib/types/backends/codex/session/prompts.js +47 -0
- package/lib/types/backends/codex/session/session.d.ts +12 -0
- package/lib/types/backends/codex/session/session.d.ts.map +1 -0
- package/lib/types/backends/codex/session/session.js +871 -0
- package/lib/types/backends/codex/session/side-query.d.ts +25 -0
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -0
- package/lib/types/backends/codex/session/side-query.js +121 -0
- package/lib/types/backends/codex/session/state.d.ts +57 -0
- package/lib/types/backends/codex/session/state.d.ts.map +1 -0
- package/lib/types/backends/codex/session/state.js +1 -0
- package/lib/types/backends/codex/session/subagents.d.ts +28 -0
- package/lib/types/backends/codex/session/subagents.d.ts.map +1 -0
- package/lib/types/backends/codex/session/subagents.js +286 -0
- package/lib/types/backends/codex/session/tasks.d.ts +25 -0
- package/lib/types/backends/codex/session/tasks.d.ts.map +1 -0
- package/lib/types/backends/codex/session/tasks.js +207 -0
- package/lib/types/backends/codex/session/tool-output.d.ts +9 -0
- package/lib/types/backends/codex/session/tool-output.d.ts.map +1 -0
- package/lib/types/backends/codex/session/tool-output.js +29 -0
- package/lib/types/backends/codex/translate/commands.d.ts +30 -0
- package/lib/types/backends/codex/translate/commands.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/commands.js +103 -0
- package/lib/types/backends/codex/translate/events.d.ts +9 -0
- package/lib/types/backends/codex/translate/events.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/events.js +71 -0
- package/lib/types/backends/codex/translate/items.d.ts +112 -0
- package/lib/types/backends/codex/translate/items.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/items.js +375 -0
- package/lib/types/backends/codex/translate/live.d.ts +39 -0
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/live.js +315 -0
- package/lib/types/backends/codex/translate/notices.d.ts +27 -0
- package/lib/types/backends/codex/translate/notices.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/notices.js +99 -0
- package/lib/types/backends/codex/translate/presentation.d.ts +49 -0
- package/lib/types/backends/codex/translate/presentation.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/presentation.js +237 -0
- package/lib/types/backends/codex/translate/replay.d.ts +18 -0
- package/lib/types/backends/codex/translate/replay.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/replay.js +33 -0
- package/lib/types/backends/codex/translate/usage.d.ts +29 -0
- package/lib/types/backends/codex/translate/usage.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/usage.js +65 -0
- package/lib/types/backends/shared/atomic-file.d.ts +4 -0
- package/lib/types/backends/shared/atomic-file.d.ts.map +1 -0
- package/lib/types/backends/shared/atomic-file.js +52 -0
- package/lib/types/backends/shared/channel-tokens.d.ts +29 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-tokens.js +161 -0
- package/lib/types/backends/shared/display-path.d.ts +3 -0
- package/lib/types/backends/shared/display-path.d.ts.map +1 -0
- package/lib/types/backends/shared/display-path.js +12 -0
- package/lib/types/branding.d.ts +92 -0
- package/lib/types/branding.d.ts.map +1 -0
- package/lib/types/branding.js +117 -0
- package/lib/types/channel/activity.d.ts +53 -0
- package/lib/types/channel/activity.d.ts.map +1 -0
- package/lib/types/channel/activity.js +955 -0
- package/lib/types/channel/capabilities.d.ts +24 -0
- package/lib/types/channel/capabilities.d.ts.map +1 -0
- package/lib/types/channel/capabilities.js +57 -0
- package/lib/types/channel/channel-slug.d.ts +9 -0
- package/lib/types/channel/channel-slug.d.ts.map +1 -0
- package/lib/types/channel/channel-slug.js +15 -0
- package/lib/types/channel/channel-wizard.d.ts +30 -0
- package/lib/types/channel/channel-wizard.d.ts.map +1 -0
- package/lib/types/channel/channel-wizard.js +226 -0
- package/lib/types/channel/elicitation.d.ts +135 -0
- package/lib/types/channel/elicitation.d.ts.map +1 -0
- package/lib/types/channel/elicitation.js +360 -0
- package/lib/types/channel/goal-command.d.ts +49 -0
- package/lib/types/channel/goal-command.d.ts.map +1 -0
- package/lib/types/channel/goal-command.js +72 -0
- package/lib/types/channel/history-restore.d.ts +16 -0
- package/lib/types/channel/history-restore.d.ts.map +1 -0
- package/lib/types/channel/history-restore.js +214 -0
- package/lib/types/channel/interaction.d.ts +38 -0
- package/lib/types/channel/interaction.d.ts.map +1 -0
- package/lib/types/channel/interaction.js +110 -0
- package/lib/types/channel/job-format.d.ts +6 -0
- package/lib/types/channel/job-format.d.ts.map +1 -0
- package/lib/types/channel/job-format.js +12 -0
- package/lib/types/channel/live-output.d.ts +35 -0
- package/lib/types/channel/live-output.d.ts.map +1 -0
- package/lib/types/channel/live-output.js +74 -0
- package/lib/types/channel/model-capabilities.d.ts +10 -0
- package/lib/types/channel/model-capabilities.d.ts.map +1 -0
- package/lib/types/channel/model-capabilities.js +51 -0
- package/lib/types/channel/permissions.d.ts +155 -0
- package/lib/types/channel/permissions.d.ts.map +1 -0
- package/lib/types/channel/permissions.js +188 -0
- package/lib/types/channel/projection.d.ts +110 -0
- package/lib/types/channel/projection.d.ts.map +1 -0
- package/lib/types/channel/projection.js +1521 -0
- package/lib/types/channel/question-record.d.ts +76 -0
- package/lib/types/channel/question-record.d.ts.map +1 -0
- package/lib/types/channel/question-record.js +109 -0
- package/lib/types/channel/questions.d.ts +204 -0
- package/lib/types/channel/questions.d.ts.map +1 -0
- package/lib/types/channel/questions.js +286 -0
- package/lib/types/channel/sanitize.d.ts +49 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -0
- package/lib/types/channel/sanitize.js +88 -0
- package/lib/types/channel/selection-record.d.ts +18 -0
- package/lib/types/channel/selection-record.d.ts.map +1 -0
- package/lib/types/channel/selection-record.js +45 -0
- package/lib/types/channel/side-prompts.d.ts +59 -0
- package/lib/types/channel/side-prompts.d.ts.map +1 -0
- package/lib/types/channel/side-prompts.js +127 -0
- package/lib/types/channel/transcript.d.ts +17 -0
- package/lib/types/channel/transcript.d.ts.map +1 -0
- package/lib/types/channel/transcript.js +19 -0
- package/lib/types/channel/usage.d.ts +48 -0
- package/lib/types/channel/usage.d.ts.map +1 -0
- package/lib/types/channel/usage.js +143 -0
- package/lib/types/commands.d.ts +147 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +196 -2
- package/lib/types/components/AgentMessageComposer.d.ts +50 -0
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -0
- package/lib/types/components/AgentMessageComposer.js +159 -0
- package/lib/types/components/BtwPanel.d.ts +13 -12
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +35 -24
- package/lib/types/components/ChannelPicker.d.ts +40 -0
- package/lib/types/components/ChannelPicker.d.ts.map +1 -0
- package/lib/types/components/ChannelPicker.js +26 -0
- package/lib/types/components/Chat/JobCard.d.ts +29 -31
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +31 -112
- package/lib/types/components/Chat/SubagentMessage.d.ts +4 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -1
- package/lib/types/components/Chat/SubagentMessage.js +10 -3
- package/lib/types/components/ClaudeGirl.d.ts +27 -0
- package/lib/types/components/ClaudeGirl.d.ts.map +1 -0
- package/lib/types/components/ClaudeGirl.js +30 -0
- package/lib/types/components/CodeBlockFrame.d.ts +19 -0
- package/lib/types/components/CodeBlockFrame.d.ts.map +1 -0
- package/lib/types/components/CodeBlockFrame.js +138 -0
- package/lib/types/components/CommandSuggestions.d.ts +10 -1
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +20 -3
- package/lib/types/components/ContextBarView.d.ts +2 -2
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +18 -8
- package/lib/types/components/EffortChargeGlyph.d.ts +1 -1
- package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -1
- package/lib/types/components/EffortChargeGlyph.js +3 -4
- package/lib/types/components/EffortInputBorder.d.ts +1 -2
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -1
- package/lib/types/components/EffortInputBorder.js +7 -4
- package/lib/types/components/EffortSlider.d.ts +5 -1
- package/lib/types/components/EffortSlider.d.ts.map +1 -1
- package/lib/types/components/EffortSlider.js +2 -2
- package/lib/types/components/EffortTierBadge.d.ts +1 -2
- package/lib/types/components/EffortTierBadge.d.ts.map +1 -1
- package/lib/types/components/EffortTierBadge.js +8 -5
- package/lib/types/components/GoalTodoPanel.d.ts +2 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +11 -5
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/JobsPanel.d.ts +8 -9
- package/lib/types/components/JobsPanel.d.ts.map +1 -1
- package/lib/types/components/JobsPanel.js +72 -13
- package/lib/types/components/KernelPicker.d.ts +28 -0
- package/lib/types/components/KernelPicker.d.ts.map +1 -0
- package/lib/types/components/KernelPicker.js +37 -0
- package/lib/types/components/LogoV2.d.ts +7 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +120 -24
- package/lib/types/components/Markdown.d.ts +2 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +37 -8
- package/lib/types/components/MathBlock.d.ts.map +1 -1
- package/lib/types/components/MathBlock.js +3 -1
- package/lib/types/components/MermaidDiagram.d.ts.map +1 -1
- package/lib/types/components/MermaidDiagram.js +7 -5
- package/lib/types/components/MessageList.d.ts +21 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +62 -42
- package/lib/types/components/ModePicker.d.ts +20 -0
- package/lib/types/components/ModePicker.d.ts.map +1 -0
- package/lib/types/components/ModePicker.js +17 -0
- package/lib/types/components/PromptInput.d.ts +2 -2
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +308 -55
- package/lib/types/components/SdkInstallWizard.d.ts +44 -0
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -0
- package/lib/types/components/SdkInstallWizard.js +18 -0
- package/lib/types/components/SearchBox.d.ts +7 -8
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +18 -9
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +113 -6
- package/lib/types/components/StarPrompt.d.ts.map +1 -1
- package/lib/types/components/StarPrompt.js +5 -3
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +6 -4
- package/lib/types/components/SubagentCard.d.ts +2 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +25 -18
- package/lib/types/components/SubagentDashboard.d.ts +10 -6
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +32 -21
- package/lib/types/components/SubagentDetailScene.d.ts +16 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +196 -45
- package/lib/types/components/SyntaxText.d.ts.map +1 -1
- package/lib/types/components/SyntaxText.js +4 -1
- package/lib/types/components/TurnInterruptedRow.d.ts +3 -1
- package/lib/types/components/TurnInterruptedRow.d.ts.map +1 -1
- package/lib/types/components/TurnInterruptedRow.js +6 -3
- package/lib/types/components/TurnUsageRow.d.ts +24 -0
- package/lib/types/components/TurnUsageRow.d.ts.map +1 -0
- package/lib/types/components/TurnUsageRow.js +46 -0
- package/lib/types/components/WorkingSpinner.d.ts +2 -1
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
- package/lib/types/components/WorkingSpinner.js +21 -4
- package/lib/types/components/approvals/ApprovalPanel.d.ts +36 -13
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +173 -25
- package/lib/types/components/claudeGirlSprite.d.ts +18 -0
- package/lib/types/components/claudeGirlSprite.d.ts.map +1 -0
- package/lib/types/components/claudeGirlSprite.js +48 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +46 -13
- package/lib/types/components/design-system/ThemedText.d.ts +3 -1
- package/lib/types/components/design-system/ThemedText.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemedText.js +2 -2
- package/lib/types/components/diffPatch.d.ts +55 -0
- package/lib/types/components/diffPatch.d.ts.map +1 -0
- package/lib/types/components/diffPatch.js +142 -0
- package/lib/types/components/kernelCatalog.d.ts +48 -0
- package/lib/types/components/kernelCatalog.d.ts.map +1 -0
- package/lib/types/components/kernelCatalog.js +53 -0
- package/lib/types/components/launchpadActions.d.ts +13 -6
- package/lib/types/components/launchpadActions.d.ts.map +1 -1
- package/lib/types/components/launchpadActions.js +26 -4
- package/lib/types/components/launchpadParams.d.ts +101 -0
- package/lib/types/components/launchpadParams.d.ts.map +1 -0
- package/lib/types/components/launchpadParams.js +171 -0
- package/lib/types/components/maidPortrait.d.ts +37 -5
- package/lib/types/components/maidPortrait.d.ts.map +1 -1
- package/lib/types/components/maidPortrait.js +73 -54
- package/lib/types/components/messages/AgentMessageFlow.d.ts +20 -0
- package/lib/types/components/messages/AgentMessageFlow.d.ts.map +1 -0
- package/lib/types/components/messages/AgentMessageFlow.js +37 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +6 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +29 -5
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +11 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +289 -36
- package/lib/types/components/messages/TranscriptLeaves.d.ts +85 -0
- package/lib/types/components/messages/TranscriptLeaves.d.ts.map +1 -0
- package/lib/types/components/messages/TranscriptLeaves.js +74 -0
- package/lib/types/components/messages/agentTeam.d.ts +69 -0
- package/lib/types/components/messages/agentTeam.d.ts.map +1 -0
- package/lib/types/components/messages/agentTeam.js +53 -0
- package/lib/types/components/messages/liveOutputLines.d.ts +33 -0
- package/lib/types/components/messages/liveOutputLines.d.ts.map +1 -0
- package/lib/types/components/messages/liveOutputLines.js +100 -0
- package/lib/types/components/messages/subagentTranscript.d.ts +146 -0
- package/lib/types/components/messages/subagentTranscript.d.ts.map +1 -0
- package/lib/types/components/messages/subagentTranscript.js +304 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +16 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +76 -6
- package/lib/types/components/questions/PlanReviewPanel.d.ts +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +11 -6
- package/lib/types/components/questions/ProviderModelEditor.d.ts +12 -0
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -0
- package/lib/types/components/questions/ProviderModelEditor.js +266 -0
- package/lib/types/components/shimmer.d.ts +26 -0
- package/lib/types/components/shimmer.d.ts.map +1 -1
- package/lib/types/components/shimmer.js +26 -0
- package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/InfoPanel.js +13 -8
- package/lib/types/components/sidePanel/PanelBar.d.ts +0 -24
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelBar.js +55 -77
- package/lib/types/components/sidePanel/PanelStore.d.ts +3 -1
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelStore.js +8 -4
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +3 -10
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +9 -12
- package/lib/types/components/sidePanel/TrajectoryPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/TrajectoryPanel.js +78 -14
- package/lib/types/components/sidePanel/agentViewStore.d.ts +20 -0
- package/lib/types/components/sidePanel/agentViewStore.d.ts.map +1 -0
- package/lib/types/components/sidePanel/agentViewStore.js +26 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +50 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.js +45 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts +13 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +147 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +14 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +131 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +30 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +87 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts +111 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/threads.js +302 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +70 -30
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts +4 -46
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +19 -55
- package/lib/types/components/sidePanel/companion/mood.d.ts +32 -0
- package/lib/types/components/sidePanel/companion/mood.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/mood.js +44 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts +34 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/skins.js +203 -29
- package/lib/types/components/splashFonts.d.ts +17 -9
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +119 -15
- package/lib/types/components/splashLayout.d.ts.map +1 -1
- package/lib/types/components/splashLayout.js +3 -1
- package/lib/types/components/subagentDetailMemory.d.ts +17 -0
- package/lib/types/components/subagentDetailMemory.d.ts.map +1 -0
- package/lib/types/components/subagentDetailMemory.js +28 -0
- package/lib/types/components/trajectory/Inspector.d.ts.map +1 -1
- package/lib/types/components/trajectory/Inspector.js +9 -0
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -1
- package/lib/types/components/trajectory/Ledger.js +7 -1
- package/lib/types/components/trajectory/scope.d.ts +64 -0
- package/lib/types/components/trajectory/scope.d.ts.map +1 -0
- package/lib/types/components/trajectory/scope.js +88 -0
- package/lib/types/components/trajectory/useTrajectoryScope.d.ts +42 -0
- package/lib/types/components/trajectory/useTrajectoryScope.d.ts.map +1 -0
- package/lib/types/components/trajectory/useTrajectoryScope.js +86 -0
- package/lib/types/customTheme.d.ts +4 -6
- package/lib/types/customTheme.d.ts.map +1 -1
- package/lib/types/customTheme.js +6 -8
- package/lib/types/dsh-adapter/approvals.d.ts +18 -5
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +17 -4
- package/lib/types/dsh-adapter/backend/session.d.ts +64 -0
- package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend/session.js +291 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts +58 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend/translate.js +467 -0
- package/lib/types/dsh-adapter/backends.d.ts +49 -0
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.js +124 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +16 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +109 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +7 -5
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +19 -9
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +58 -135
- package/lib/types/dsh-adapter/channel/binding.d.ts +61 -14
- package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding.js +102 -35
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +33 -4
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +3 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +4 -3
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +39 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/actions.js +152 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +145 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +289 -0
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +217 -0
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/compose.js +938 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts +57 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/files.js +45 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +55 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/host.js +116 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.js +117 -0
- package/lib/types/dsh-adapter/channel/core/local-images.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/core/local-images.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/local-images.js +147 -0
- package/lib/types/dsh-adapter/channel/core/reports.d.ts +12 -0
- package/lib/types/dsh-adapter/channel/core/reports.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/reports.js +77 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.d.ts +39 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.js +219 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +174 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.js +390 -0
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/sessions.js +268 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/decisions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/decisions.js +4 -4
- package/lib/types/dsh-adapter/channel/emitter.d.ts +15 -2
- package/lib/types/dsh-adapter/channel/emitter.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/emitter.js +5 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts +36 -0
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/extensions.js +714 -0
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts +1 -10
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/ide-selection.js +4 -46
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +27 -4
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-actions.js +240 -21
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +21 -5
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +65 -27
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +10 -32
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +10 -78
- package/lib/types/dsh-adapter/channel/local-fs.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/local-fs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/local-fs.js +46 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +38 -5
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +9 -6
- package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/preferences.js +16 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts +16 -13
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +38 -1143
- package/lib/types/dsh-adapter/channel/question-record.d.ts +3 -75
- package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/question-record.js +3 -107
- package/lib/types/dsh-adapter/channel/session-activity.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/session-activity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-activity.js +42 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.js +3 -1
- package/lib/types/dsh-adapter/channel/session-fork.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +2 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +7 -3
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -9
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +4 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +5 -10
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +74 -113
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +7 -6
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +8 -7
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/skill-catalog.js +2 -2
- package/lib/types/dsh-adapter/channel/state.d.ts +72 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +7 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +58 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +153 -9
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts +114 -0
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/subagent-transcript.js +279 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +7 -15
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +17 -21
- package/lib/types/dsh-adapter/channel/types.d.ts +16 -7
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.d.ts +3 -23
- package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.js +5 -111
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +2 -1
- package/lib/types/dsh-adapter/channel.d.ts +17 -8
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +24 -1059
- package/lib/types/dsh-adapter/context-occupancy.d.ts +6 -1
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -1
- package/lib/types/dsh-adapter/context-occupancy.js +6 -1
- package/lib/types/dsh-adapter/decision-guard.d.ts +24 -0
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/decision-guard.js +44 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +4 -1
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extension-events.js +22 -10
- package/lib/types/dsh-adapter/index.d.ts +41 -3
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +28 -1
- package/lib/types/dsh-adapter/jobs.d.ts +5 -3
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +53 -14
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -16
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +3 -29
- package/lib/types/dsh-adapter/oauth-credential-source.d.ts +34 -0
- package/lib/types/dsh-adapter/oauth-credential-source.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth-credential-source.js +66 -0
- package/lib/types/dsh-adapter/plugin.d.ts +38 -2
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +546 -110
- package/lib/types/dsh-adapter/provider-model-capabilities.d.ts +10 -0
- package/lib/types/dsh-adapter/provider-model-capabilities.d.ts.map +1 -0
- package/lib/types/dsh-adapter/provider-model-capabilities.js +80 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +8 -2
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +118 -52
- package/lib/types/dsh-adapter/questions.d.ts +29 -124
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +33 -267
- package/lib/types/dsh-adapter/recap.d.ts +3 -15
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -1
- package/lib/types/dsh-adapter/recap.js +3 -46
- package/lib/types/dsh-adapter/sanitize.d.ts +4 -44
- package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sanitize.js +4 -84
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +3 -1
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -1
- package/lib/types/dsh-adapter/session-mount-heartbeat.js +4 -2
- package/lib/types/dsh-adapter/sessions/digest.d.ts +18 -3
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +60 -27
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +6 -4
- package/lib/types/dsh-adapter/sessions/recovery.d.ts +2 -2
- package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/recovery.js +23 -14
- package/lib/types/dsh-adapter/sessions/store.d.ts +2 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +1 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts +2 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +3 -13
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +7 -0
- package/lib/types/dsh-adapter/themes.d.ts +1 -1
- package/lib/types/dsh-adapter/themes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/agent-source.d.ts +84 -0
- package/lib/types/dsh-adapter/trajectory/agent-source.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/agent-source.js +601 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +31 -1
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.js +28 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts +3 -1
- package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/index.js +1 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +7 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/inspect.js +70 -2
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +4 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.js +36 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts +13 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
- package/lib/types/effortPrefs.d.ts +7 -0
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +11 -2
- package/lib/types/handoffAck.d.ts +57 -0
- package/lib/types/handoffAck.d.ts.map +1 -0
- package/lib/types/handoffAck.js +154 -0
- package/lib/types/handoffEvents.d.ts +52 -0
- package/lib/types/handoffEvents.d.ts.map +1 -0
- package/lib/types/handoffEvents.js +128 -0
- package/lib/types/i18n.d.ts +3189 -68
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +855 -9
- package/lib/types/ink/colorize.d.ts.map +1 -1
- package/lib/types/ink/colorize.js +8 -2
- package/lib/types/ink/components/AlternateScreen.d.ts +12 -1
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -1
- package/lib/types/ink/components/AlternateScreen.js +25 -4
- package/lib/types/ink/components/App.d.ts +5 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +52 -5
- package/lib/types/ink/components/Image.d.ts +8 -1
- package/lib/types/ink/components/Image.d.ts.map +1 -1
- package/lib/types/ink/components/Image.js +2 -2
- package/lib/types/ink/components/Text.d.ts +8 -1
- package/lib/types/ink/components/Text.d.ts.map +1 -1
- package/lib/types/ink/components/Text.js +11 -1
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +75 -3
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-input.js +9 -4
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +8 -2
- package/lib/types/ink/kitty-graphics.d.ts +7 -2
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +15 -7
- package/lib/types/ink/node-cache.d.ts +15 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/node-cache.js +4 -1
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +2 -0
- package/lib/types/ink/parse-keypress.d.ts +13 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +438 -19
- package/lib/types/ink/reconciler.d.ts.map +1 -1
- package/lib/types/ink/reconciler.js +9 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +200 -4
- package/lib/types/ink/render-stats.d.ts +35 -0
- package/lib/types/ink/render-stats.d.ts.map +1 -0
- package/lib/types/ink/render-stats.js +53 -0
- package/lib/types/ink/sixel-codec.d.ts +11 -1
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +10 -3
- package/lib/types/ink/sixel-graphics.js +2 -2
- package/lib/types/ink/styles.d.ts +46 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +7 -0
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.d.ts +1 -1
- package/lib/types/ink/terminal-querier.js +4 -4
- package/lib/types/ink/text-decoration.d.ts +49 -0
- package/lib/types/ink/text-decoration.d.ts.map +1 -0
- package/lib/types/ink/text-decoration.js +235 -0
- package/lib/types/ink/update-overflow-guard.d.ts +9 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +41 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +5 -1
- package/lib/types/kernelPrefs.d.ts +51 -0
- package/lib/types/kernelPrefs.d.ts.map +1 -0
- package/lib/types/kernelPrefs.js +126 -0
- package/lib/types/modelRecents.d.ts +10 -2
- package/lib/types/modelRecents.d.ts.map +1 -1
- package/lib/types/modelRecents.js +20 -7
- package/lib/types/screens/AgentTranscriptScene.d.ts +42 -0
- package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -0
- package/lib/types/screens/AgentTranscriptScene.js +269 -0
- package/lib/types/screens/Chat.d.ts +45 -7
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +625 -113
- package/lib/types/screens/Launchpad.d.ts +24 -7
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +147 -28
- package/lib/types/screens/SessionSupervisor.d.ts +3 -3
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +69 -5
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +211 -7
- package/lib/types/screens/StatusLine.d.ts +40 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +131 -19
- package/lib/types/screens/StatusMetrics.d.ts +53 -17
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +141 -30
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/screens/TrajectoryScene.js +74 -12
- package/lib/types/screens/chat/backendCommands.d.ts +37 -0
- package/lib/types/screens/chat/backendCommands.d.ts.map +1 -0
- package/lib/types/screens/chat/backendCommands.js +51 -0
- package/lib/types/screens/chat/useBackendChannels.d.ts +20 -0
- package/lib/types/screens/chat/useBackendChannels.d.ts.map +1 -0
- package/lib/types/screens/chat/useBackendChannels.js +117 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +23 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useKernelPicker.js +72 -0
- package/lib/types/screens/chatOverlay.d.ts +32 -2
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +9 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useForeignSessions.js +5 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +14 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +97 -22
- package/lib/types/sessionHistory.d.ts +18 -1
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +46 -4
- package/lib/types/sessionPins.d.ts +7 -0
- package/lib/types/sessionPins.d.ts.map +1 -1
- package/lib/types/sessionPins.js +9 -0
- package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
- package/lib/types/sessions/resumeFailure.js +2 -1
- package/lib/types/settings/definitions.d.ts +74 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +50 -4
- package/lib/types/terminal-utils/hyperlink.d.ts +2 -2
- package/lib/types/terminal-utils/hyperlink.d.ts.map +1 -1
- package/lib/types/terminal-utils/hyperlink.js +21 -4
- package/lib/types/terminal-utils/markdown.d.ts +34 -6
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +257 -66
- package/lib/types/theme.d.ts +49 -8
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +514 -18
- package/lib/types/tips.js +2 -2
- package/lib/types/trajectory/effortIgnition.d.ts +25 -7
- package/lib/types/trajectory/effortIgnition.d.ts.map +1 -1
- package/lib/types/trajectory/effortIgnition.js +106 -34
- package/lib/types/trajectory/window.d.ts +26 -0
- package/lib/types/trajectory/window.d.ts.map +1 -0
- package/lib/types/trajectory/window.js +27 -0
- package/lib/types/tuiDisplayPrefs.d.ts +38 -1
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +45 -1
- package/lib/types/update.d.ts +88 -3
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +285 -18
- package/lib/types/utils/crashDetail.d.ts +56 -0
- package/lib/types/utils/crashDetail.d.ts.map +1 -0
- package/lib/types/utils/crashDetail.js +175 -0
- package/lib/types/utils/imageResize.d.ts +9 -23
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +24 -20
- package/lib/types/utils/inputPaste.d.ts +9 -8
- package/lib/types/utils/inputPaste.d.ts.map +1 -1
- package/lib/types/utils/inputPaste.js +53 -16
- package/lib/types/utils/jsonl.d.ts +24 -0
- package/lib/types/utils/jsonl.d.ts.map +1 -0
- package/lib/types/utils/jsonl.js +36 -0
- package/package.json +18 -2
|
@@ -176,6 +176,19 @@ export function readSubagent(data) {
|
|
|
176
176
|
label: str(data, 'label'),
|
|
177
177
|
model: str(data, 'agentModel'),
|
|
178
178
|
mode: str(data, 'mode'),
|
|
179
|
+
agentId: str(data, 'agentId'),
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
/** Read one bounded ask-time question structure, or `undefined` when malformed. */
|
|
183
|
+
function readAskQuestion(record) {
|
|
184
|
+
const question = str(record, 'question');
|
|
185
|
+
if (question === undefined)
|
|
186
|
+
return undefined;
|
|
187
|
+
const options = record.options;
|
|
188
|
+
return {
|
|
189
|
+
...(str(record, 'header') === undefined ? {} : { header: str(record, 'header') }),
|
|
190
|
+
question,
|
|
191
|
+
options: Array.isArray(options) ? options.filter((entry) => typeof entry === 'string') : [],
|
|
179
192
|
};
|
|
180
193
|
}
|
|
181
194
|
/** Narrow an `approval/asked` payload. */
|
|
@@ -185,11 +198,26 @@ export function readApprovalAsked(data) {
|
|
|
185
198
|
const id = str(data, 'id');
|
|
186
199
|
if (id === undefined)
|
|
187
200
|
return undefined;
|
|
201
|
+
const ask = str(data, 'ask');
|
|
202
|
+
const options = data.options;
|
|
203
|
+
const questions = data.questions;
|
|
188
204
|
return {
|
|
189
205
|
id,
|
|
190
206
|
toolName: str(data, 'toolName'),
|
|
191
207
|
callId: str(data, 'callId'),
|
|
192
208
|
reason: str(data, 'reason'),
|
|
209
|
+
...(ask === 'permission' || ask === 'question' ? { ask } : {}),
|
|
210
|
+
agentId: str(data, 'agentId'),
|
|
211
|
+
title: str(data, 'title'),
|
|
212
|
+
command: str(data, 'command'),
|
|
213
|
+
blockedPath: str(data, 'blockedPath'),
|
|
214
|
+
options: Array.isArray(options) ? options.filter((entry) => typeof entry === 'string') : undefined,
|
|
215
|
+
questions: Array.isArray(questions)
|
|
216
|
+
? questions
|
|
217
|
+
.filter((entry) => isRecord(entry))
|
|
218
|
+
.map(readAskQuestion)
|
|
219
|
+
.filter((entry) => entry !== undefined)
|
|
220
|
+
: undefined,
|
|
193
221
|
};
|
|
194
222
|
}
|
|
195
223
|
/** Narrow an `approval/decided` payload. */
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
export { buildTrajectory, emptyTrajectory, extendTrajectory, type StepTiming, type TrajBuild, } from './projection.js';
|
|
12
12
|
export { aggregate, forEachCall, sortRows } from './aggregate.js';
|
|
13
13
|
export { inspectNode, type InspectDetail, type InspectSection } from './inspect.js';
|
|
14
|
+
export type { RawTrajEvent } from './guards.js';
|
|
14
15
|
export { channelOf, columnOfIndex, dominantChannel, projectWave } from './wave.js';
|
|
15
|
-
export {
|
|
16
|
+
export { createAgentTrajectorySource, type AgentTrajectorySource } from './agent-source.js';
|
|
17
|
+
export { BURST_MIN, burstDurationMs, burstErrors, burstRunning, HOTSPOT_SORTS, previewText, WAVE_PROJECTIONS, type HotspotRow, type HotspotSort, type TrajAggregate, type TrajBurst, type TrajKind, type TrajNode, type TrajStatus, type TrajTokens, type TrajTotals, type TrajectoryLane, type WaveBand, type WaveBucket, type WaveChannel, type WaveProjection, } from './types.js';
|
|
16
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,eAAe,EACf,eAAe,EACf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AM,mBAAmB,CAAA;AAE3F,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAA"}
|
|
@@ -12,4 +12,5 @@ export { buildTrajectory, emptyTrajectory, extendTrajectory, } from './projectio
|
|
|
12
12
|
export { aggregate, forEachCall, sortRows } from './aggregate.js';
|
|
13
13
|
export { inspectNode } from './inspect.js';
|
|
14
14
|
export { channelOf, columnOfIndex, dominantChannel, projectWave } from './wave.js';
|
|
15
|
+
export { createAgentTrajectorySource } from './agent-source.js';
|
|
15
16
|
export { BURST_MIN, burstDurationMs, burstErrors, burstRunning, HOTSPOT_SORTS, previewText, WAVE_PROJECTIONS, } from './types.js';
|
|
@@ -27,6 +27,13 @@ export interface InspectDetail {
|
|
|
27
27
|
/** Short `key value` facts rendered on the header line. */
|
|
28
28
|
readonly facts: readonly string[];
|
|
29
29
|
readonly sections: readonly InspectSection[];
|
|
30
|
+
/**
|
|
31
|
+
* True when the row's owning event could not be re-read from the log (a
|
|
32
|
+
* compacted-away bracket, a pruned lane): the header facts above still
|
|
33
|
+
* stand, but the full content is shown as unavailable
|
|
34
|
+
* (`trajectory-inspect-unavailable`) rather than silently blank.
|
|
35
|
+
*/
|
|
36
|
+
readonly unresolved?: boolean;
|
|
30
37
|
}
|
|
31
38
|
/**
|
|
32
39
|
* Resolve the full detail for one ledger row.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/inspect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/inspect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAG1C,wCAAwC;AACxC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,wEAAwE;IACxE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;CAChC;AAED,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAA;IAC5C;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAC9B;AAgED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,aAAa,CA+H1F"}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* reads raw event payloads for display, and the boundary gate keeps it here.
|
|
12
12
|
* The scene renders the returned sections without knowing what an event is.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { t } from '../../i18n.js';
|
|
15
|
+
import { asRawEvents, readApprovalAsked, readRetry } from './guards.js';
|
|
15
16
|
/** Binary search for an event by seq; the log is seq-monotonic. */
|
|
16
17
|
function findBySeq(events, seq) {
|
|
17
18
|
let low = 0;
|
|
@@ -56,6 +57,31 @@ function allText(content) {
|
|
|
56
57
|
}
|
|
57
58
|
return parts.join('\n');
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* The answer text of the ask-tool result paired with a question's `callId`.
|
|
62
|
+
*
|
|
63
|
+
* A settled questionnaire reports only its `requestId`; the answer the user
|
|
64
|
+
* picked lands as the ask tool's own result, found by one backwards scan;
|
|
65
|
+
* absence stays absence.
|
|
66
|
+
*/
|
|
67
|
+
function pairedResultText(events, callId) {
|
|
68
|
+
for (let index = events.length - 1; index >= 0; index--) {
|
|
69
|
+
const event = events[index];
|
|
70
|
+
if (event.type !== 'tool/result')
|
|
71
|
+
continue;
|
|
72
|
+
const message = event.data?.message;
|
|
73
|
+
const source = typeof message === 'object' && message !== null
|
|
74
|
+
? message.source
|
|
75
|
+
: undefined;
|
|
76
|
+
if (typeof source !== 'object' || source === null)
|
|
77
|
+
continue;
|
|
78
|
+
if (source.callId !== callId)
|
|
79
|
+
continue;
|
|
80
|
+
const body = allText(message.content);
|
|
81
|
+
return body === '' ? undefined : body;
|
|
82
|
+
}
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
59
85
|
/**
|
|
60
86
|
* Resolve the full detail for one ledger row.
|
|
61
87
|
*
|
|
@@ -78,6 +104,13 @@ export function inspectNode(node, events) {
|
|
|
78
104
|
const { input, output, think, cacheRead } = node.tokens;
|
|
79
105
|
facts.push(`in ${input} · out ${output}${think > 0 ? ` · think ${think}` : ''}${cacheRead > 0 ? ` · cache ${cacheRead}` : ''}`);
|
|
80
106
|
}
|
|
107
|
+
// The neutral AgentEvent source stamps rows whose envelope
|
|
108
|
+
// time came from the trace clock rather than the backend: "this is when
|
|
109
|
+
// we saw it", not "this is when it happened". DSH events never carry the
|
|
110
|
+
// stamp, so their facts are unchanged.
|
|
111
|
+
if (data?.observed === true) {
|
|
112
|
+
facts.push(t('trajectory-time-observed'));
|
|
113
|
+
}
|
|
81
114
|
const sections = [];
|
|
82
115
|
switch (node.kind) {
|
|
83
116
|
case 'tool':
|
|
@@ -122,11 +155,46 @@ export function inspectNode(node, events) {
|
|
|
122
155
|
break;
|
|
123
156
|
}
|
|
124
157
|
case 'approval': {
|
|
158
|
+
// 审批/问卷的等待时长在表头右侧(已结束)或检视器的 live 行(等待
|
|
159
|
+
// 中)呈现;这里补上响应与来源。settled 事件只带 outcome,来源与
|
|
160
|
+
// 可选项只在 asked 载荷里。
|
|
125
161
|
if (node.detail !== undefined)
|
|
126
162
|
sections.push({ title: 'reason', body: node.detail });
|
|
127
163
|
if (node.outcome !== undefined) {
|
|
128
164
|
sections.push({ title: 'outcome', body: node.outcome, tone: node.status === 'error' ? 'error' : undefined });
|
|
129
165
|
}
|
|
166
|
+
const ask = readApprovalAsked(open?.data);
|
|
167
|
+
if (ask !== undefined) {
|
|
168
|
+
// 问卷的 settled 只报 requestId;答案在 callId 配对的 ask 工具结果里,
|
|
169
|
+
// 找不到就不显示。
|
|
170
|
+
if (ask.ask === 'question') {
|
|
171
|
+
const answer = ask.callId === undefined ? undefined : pairedResultText(raw, ask.callId);
|
|
172
|
+
if (answer !== undefined) {
|
|
173
|
+
sections.push({ title: 'response', body: answer });
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
const source = [];
|
|
177
|
+
if (ask.agentId !== undefined)
|
|
178
|
+
source.push(`agent ${ask.agentId.slice(0, 12)}`);
|
|
179
|
+
if (ask.title !== undefined && ask.title !== ask.reason)
|
|
180
|
+
source.push(ask.title);
|
|
181
|
+
if (ask.command !== undefined)
|
|
182
|
+
source.push(`command: ${ask.command}`);
|
|
183
|
+
if (ask.blockedPath !== undefined)
|
|
184
|
+
source.push(`blocked: ${ask.blockedPath}`);
|
|
185
|
+
if (ask.options !== undefined && ask.options.length > 0)
|
|
186
|
+
source.push(`options: ${ask.options.join(' | ')}`);
|
|
187
|
+
if (source.length > 0)
|
|
188
|
+
sections.push({ title: 'source', body: source.join('\n'), tone: 'dim' });
|
|
189
|
+
if (ask.questions !== undefined && ask.questions.length > 0) {
|
|
190
|
+
const lines = ask.questions.map((question, index) => {
|
|
191
|
+
const head = question.header === undefined ? '' : `[${question.header}] `;
|
|
192
|
+
const options = question.options.length === 0 ? '' : ` (${question.options.join(' | ')})`;
|
|
193
|
+
return `${index + 1}. ${head}${question.question}${options}`;
|
|
194
|
+
});
|
|
195
|
+
sections.push({ title: 'questions', body: lines.join('\n') });
|
|
196
|
+
}
|
|
197
|
+
}
|
|
130
198
|
break;
|
|
131
199
|
}
|
|
132
200
|
case 'user':
|
|
@@ -156,5 +224,5 @@ export function inspectNode(node, events) {
|
|
|
156
224
|
});
|
|
157
225
|
}
|
|
158
226
|
const title = node.label === '' ? node.kind : node.label;
|
|
159
|
-
return { title, facts, sections };
|
|
227
|
+
return { title, facts, sections, ...(open === undefined ? { unresolved: true } : {}) };
|
|
160
228
|
}
|
|
@@ -114,6 +114,10 @@ interface FoldState {
|
|
|
114
114
|
compactions: TrajNode[];
|
|
115
115
|
/** Live turn context for events that carry none. */
|
|
116
116
|
turn: number;
|
|
117
|
+
/** Turns whose rows already carry message-level usage: a turn-level
|
|
118
|
+
* report arriving on top of them counts the same tokens again and must
|
|
119
|
+
* not attach anywhere (see the turn/end backfill). */
|
|
120
|
+
tokenTurns: Set<number>;
|
|
117
121
|
/** Live step context; cleared at `step/end`. */
|
|
118
122
|
step: number | undefined;
|
|
119
123
|
/** True until the first `session/end-seed`; marks replayed history. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,EAgBL,KAAK,YAAY,EAClB,MAAM,aAAa,CAAA;AACpB,OAAO,EAA4B,KAAK,QAAQ,EAAmB,MAAM,YAAY,CAAA;AAGrF,6EAA6E;AAC7E,MAAM,WAAW,UAAU;IACzB,yBAAyB;IACz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iEAAiE;IACjE,UAAU,EAAE,QAAQ,EAAE,CAAA;CACvB;AA8pBD,2EAA2E;AAC3E,wBAAgB,eAAe,IAAI,SAAS,CAG3C;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,GAAG,IAAI,EAC1B,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,SAAS,CAwBX;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAE1E"}
|
|
@@ -66,6 +66,7 @@ function newState() {
|
|
|
66
66
|
hooks: new Map(),
|
|
67
67
|
compactions: [],
|
|
68
68
|
turn: 0,
|
|
69
|
+
tokenTurns: new Set(),
|
|
69
70
|
step: undefined,
|
|
70
71
|
seeding: true,
|
|
71
72
|
runKey: undefined,
|
|
@@ -103,6 +104,7 @@ function cloneState(previous) {
|
|
|
103
104
|
hooks: new Map(previous.hooks),
|
|
104
105
|
compactions: [...previous.compactions],
|
|
105
106
|
turn: previous.turn,
|
|
107
|
+
tokenTurns: new Set(previous.tokenTurns),
|
|
106
108
|
step: previous.step,
|
|
107
109
|
seeding: previous.seeding,
|
|
108
110
|
runKey: previous.runKey,
|
|
@@ -262,6 +264,16 @@ function consume(state, nodes, timing, event) {
|
|
|
262
264
|
? reason.kind
|
|
263
265
|
: undefined;
|
|
264
266
|
close(state, open, event, kind === 'completed' ? 'ok' : 'error', typeof kind === 'string' && kind !== 'completed' ? kind : undefined);
|
|
267
|
+
// Turn-level usage (the close event's own accounting) backfills the
|
|
268
|
+
// turn row ONLY when no message of the turn carried usage — the two
|
|
269
|
+
// levels describe the same tokens, so they never add up. DSH
|
|
270
|
+
// turn/end payloads carry no usage, so this arm stays closed for
|
|
271
|
+
// every DSH log.
|
|
272
|
+
const usage = readTokens(data?.usage);
|
|
273
|
+
if (usage !== undefined && open !== undefined && !state.tokenTurns.has(turn)) {
|
|
274
|
+
open.tokens = usage;
|
|
275
|
+
state.tokenTurns.add(turn);
|
|
276
|
+
}
|
|
265
277
|
state.turns.delete(turn);
|
|
266
278
|
state.step = undefined;
|
|
267
279
|
return;
|
|
@@ -339,6 +351,7 @@ function consume(state, nodes, timing, event) {
|
|
|
339
351
|
: undefined;
|
|
340
352
|
const tokens = readTokens(data?.usage);
|
|
341
353
|
let first = true;
|
|
354
|
+
let attached = false;
|
|
342
355
|
if (Array.isArray(content)) {
|
|
343
356
|
for (const block of content) {
|
|
344
357
|
if (typeof block !== 'object' || block === null)
|
|
@@ -361,9 +374,31 @@ function consume(state, nodes, timing, event) {
|
|
|
361
374
|
// first row so the hotspot aggregate counts it exactly once.
|
|
362
375
|
tokens: first ? tokens : undefined,
|
|
363
376
|
});
|
|
377
|
+
if (first && tokens !== undefined)
|
|
378
|
+
attached = true;
|
|
364
379
|
first = false;
|
|
365
380
|
}
|
|
366
381
|
}
|
|
382
|
+
if (tokens !== undefined && attached)
|
|
383
|
+
state.tokenTurns.add(turn);
|
|
384
|
+
// A message that settled no renderable block (a tool-only model
|
|
385
|
+
// response) still paid for its request: its usage parks on the open
|
|
386
|
+
// step row — the one bracket that already owns this model call — so
|
|
387
|
+
// the aggregate counts it exactly once. Merged, not replaced: several
|
|
388
|
+
// such responses can settle inside one step.
|
|
389
|
+
if (tokens !== undefined && !attached) {
|
|
390
|
+
const open = state.steps.get(`${turn}:${step ?? 0}`);
|
|
391
|
+
if (open !== undefined) {
|
|
392
|
+
open.tokens = open.tokens === undefined ? tokens : {
|
|
393
|
+
input: open.tokens.input + tokens.input,
|
|
394
|
+
output: open.tokens.output + tokens.output,
|
|
395
|
+
think: open.tokens.think + tokens.think,
|
|
396
|
+
cacheRead: open.tokens.cacheRead + tokens.cacheRead,
|
|
397
|
+
cacheWrite: open.tokens.cacheWrite + tokens.cacheWrite,
|
|
398
|
+
};
|
|
399
|
+
state.tokenTurns.add(turn);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
367
402
|
return;
|
|
368
403
|
}
|
|
369
404
|
case 'assistant/attempt': {
|
|
@@ -607,6 +642,7 @@ function consume(state, nodes, timing, event) {
|
|
|
607
642
|
step: state.step,
|
|
608
643
|
label: 'subagent',
|
|
609
644
|
detail: [payload.label, payload.model].filter(Boolean).join(' · ') || undefined,
|
|
645
|
+
agentId: payload.agentId,
|
|
610
646
|
});
|
|
611
647
|
return;
|
|
612
648
|
}
|
|
@@ -104,9 +104,22 @@ export interface TrajNode {
|
|
|
104
104
|
* range, so a re-seeded log re-marks the rows folded before it.
|
|
105
105
|
*/
|
|
106
106
|
seed?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* The subagent a `subagent/descriptor` row names — the drilldown anchor.
|
|
109
|
+
* Present only when the emitting source knew the id
|
|
110
|
+
* (the neutral AgentEvent fold); DSH descriptor payloads predate the
|
|
111
|
+
* field and their rows simply carry none.
|
|
112
|
+
*/
|
|
113
|
+
readonly agentId?: string;
|
|
107
114
|
}
|
|
108
115
|
/** Minimum run length that folds into a {@link TrajBurst}. */
|
|
109
116
|
export declare const BURST_MIN = 3;
|
|
117
|
+
/**
|
|
118
|
+
* One trajectory drilldown lane. The ports module owns the vocabulary
|
|
119
|
+
* (same layering as {@link RawTrajEvent});
|
|
120
|
+
* re-exported here so the trajectory barrel stays the UI's single import.
|
|
121
|
+
*/
|
|
122
|
+
export type { TrajectoryLane } from '../../adapter/ports/channel-view.js';
|
|
110
123
|
/** Timeline channel a node contributes to in the wave band. */
|
|
111
124
|
export type WaveChannel = 'input' | 'model' | 'tool';
|
|
112
125
|
/** One column of the wave band. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,iDAAiD;AACjD,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,MAAM,GACN,MAAM,GACN,WAAW,GACX,UAAU,GACV,MAAM,GACN,SAAS,GACT,OAAO,GACP,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MAAM,CAAA;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,gCAAgC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,kCAAkC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,4BAA4B;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;CAC5B;AAED,gDAAgD;AAChD,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEzD,qCAAqC;AACrC,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAAoC,CAAA;AAEpF;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAa9D"}
|
|
@@ -26,6 +26,13 @@ export declare function readEffortPref(dir?: string): string | undefined;
|
|
|
26
26
|
* @returns The winning level id, or undefined for the adapter default.
|
|
27
27
|
*/
|
|
28
28
|
export declare function resolveEffortDefault(settingsDefault: string | undefined, configured: string | undefined, persisted: string | undefined): string | undefined;
|
|
29
|
+
/** The standard reasoning-effort ladder, weakest to strongest. Served as the
|
|
30
|
+
* compatibility offer when a model catalog row declares reasoning support
|
|
31
|
+
* without listing its own tiers (pi-ai 0.87.x zai rows for glm-5.3* ship only
|
|
32
|
+
* `reasoning: true`): the kernel accepts the standard effort ids and is the
|
|
33
|
+
* set-time authority, so the ladder is an honest offer, not a guess. Mirrors
|
|
34
|
+
* the Claude backend's EFFORT_FALLBACK_TIERS (backends/claude/controls.ts). */
|
|
35
|
+
export declare const STANDARD_EFFORT_LADDER: readonly string[];
|
|
29
36
|
/**
|
|
30
37
|
* Resolve a preferred effort tier against a route's available tiers when the
|
|
31
38
|
* exact tier is absent: pick the NEAREST LOWER standard tier that the route
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effortPrefs.d.ts","sourceRoot":"","sources":["../../src/effortPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAS1E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAEpB;
|
|
1
|
+
{"version":3,"file":"effortPrefs.d.ts","sourceRoot":"","sources":["../../src/effortPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAS1E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAEpB;AAOD;;;;;+EAK+E;AAC/E,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAA8C,CAAA;AAElG;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAgBtG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQhF"}
|
package/lib/types/effortPrefs.js
CHANGED
|
@@ -43,8 +43,17 @@ export function readEffortPref(dir = PREFS_DIR) {
|
|
|
43
43
|
export function resolveEffortDefault(settingsDefault, configured, persisted) {
|
|
44
44
|
return settingsDefault ?? configured ?? persisted;
|
|
45
45
|
}
|
|
46
|
-
/** Standard effort-tier order, weakest to strongest
|
|
47
|
-
|
|
46
|
+
/** Standard effort-tier order, weakest to strongest (`xhigh` sits between
|
|
47
|
+
* `high` and `max`, matching the ladder the kernels accept — see
|
|
48
|
+
* STANDARD_EFFORT_LADDER). */
|
|
49
|
+
const EFFORT_TIER_ORDER = ['off', 'low', 'medium', 'high', 'xhigh', 'max'];
|
|
50
|
+
/** The standard reasoning-effort ladder, weakest to strongest. Served as the
|
|
51
|
+
* compatibility offer when a model catalog row declares reasoning support
|
|
52
|
+
* without listing its own tiers (pi-ai 0.87.x zai rows for glm-5.3* ship only
|
|
53
|
+
* `reasoning: true`): the kernel accepts the standard effort ids and is the
|
|
54
|
+
* set-time authority, so the ladder is an honest offer, not a guess. Mirrors
|
|
55
|
+
* the Claude backend's EFFORT_FALLBACK_TIERS (backends/claude/controls.ts). */
|
|
56
|
+
export const STANDARD_EFFORT_LADDER = ['low', 'medium', 'high', 'xhigh', 'max'];
|
|
48
57
|
/**
|
|
49
58
|
* Resolve a preferred effort tier against a route's available tiers when the
|
|
50
59
|
* exact tier is absent: pick the NEAREST LOWER standard tier that the route
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** fd number of the ACK pipe (stdio[3] of the spawn). */
|
|
2
|
+
export declare const HANDOFF_ACK_FD_ENV = "DSH_TUI_HANDOFF_ACK_FD";
|
|
3
|
+
/** 'alt' when the previous process left the terminal in the alternate screen. */
|
|
4
|
+
export declare const HANDOFF_SCREEN_ENV = "DSH_TUI_HANDOFF_SCREEN";
|
|
5
|
+
/** Attempt id, echoed in every ACK line and in restart.log. */
|
|
6
|
+
export declare const HANDOFF_ATTEMPT_ENV = "DSH_TUI_HANDOFF_ATTEMPT";
|
|
7
|
+
/** ACK line format: `dsh-tui-handoff <kind> <attemptId>`. */
|
|
8
|
+
export declare const ACK_PREFIX = "dsh-tui-handoff";
|
|
9
|
+
export type HandoffAckKind = 'adopted' | 'ready';
|
|
10
|
+
export type HandoffAckState = {
|
|
11
|
+
attemptId: string;
|
|
12
|
+
fd: number;
|
|
13
|
+
/**
|
|
14
|
+
* 'armed': env received, screen not mounted yet. 'adopted': AlternateScreen
|
|
15
|
+
* mounted; until ready this process must not write 1049l. 'ready': first
|
|
16
|
+
* frame flushed and acknowledged; this process now owns the screen.
|
|
17
|
+
*/
|
|
18
|
+
adoption: 'armed' | 'adopted' | 'ready';
|
|
19
|
+
/** The pipe stopped accepting writes (the old process is gone): stop sending. */
|
|
20
|
+
dead: boolean;
|
|
21
|
+
};
|
|
22
|
+
/** Read (and remove) the handoff env early in boot; undefined when this is not a handoff. */
|
|
23
|
+
export declare function beginHandoffAck(env?: NodeJS.ProcessEnv): HandoffAckState | undefined;
|
|
24
|
+
/** Whether this boot is a handoff replacement (read by AlternateScreen). */
|
|
25
|
+
export declare function handoffAckArmed(): boolean;
|
|
26
|
+
/** The handoff attempt id, for restart.log; undefined outside a handoff. */
|
|
27
|
+
export declare function handoffAttemptId(): string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Called by AlternateScreen once it has mounted on the inherited screen.
|
|
30
|
+
* Until ready, this process's exit cleanup leaves 1049l to the old process.
|
|
31
|
+
*/
|
|
32
|
+
export declare function noteScreenAdopted(): void;
|
|
33
|
+
/** The first frame after adoption has been flushed: send ready and take over the screen. */
|
|
34
|
+
export declare function markScreenReady(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Whether this process should write 1049l when it leaves the alternate
|
|
37
|
+
* screen. Always true outside a handoff. During one it is false until ready,
|
|
38
|
+
* because the old process closes the screen if this one dies first. A dead
|
|
39
|
+
* pipe also makes it true: closing twice is better than leaving the terminal
|
|
40
|
+
* in the alternate screen.
|
|
41
|
+
*/
|
|
42
|
+
export declare function ownsAltScreenExit(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Wrap stdout.write until the first write after adoption, and send ready
|
|
45
|
+
* from that write's flush callback. The wrapper removes itself before
|
|
46
|
+
* forwarding, so later writes go straight through. Does nothing outside a
|
|
47
|
+
* handoff.
|
|
48
|
+
*/
|
|
49
|
+
export declare function armFirstFrameAck(stdout: NodeJS.WriteStream): void;
|
|
50
|
+
/** Parse one ACK pipe line (old process side); null for anything else. */
|
|
51
|
+
export declare function parseHandoffAckLine(line: string): {
|
|
52
|
+
kind: HandoffAckKind;
|
|
53
|
+
attemptId: string;
|
|
54
|
+
} | null;
|
|
55
|
+
/** Test hook: install a state directly. */
|
|
56
|
+
export declare function __setHandoffAckStateForTest(next: HandoffAckState | undefined): void;
|
|
57
|
+
//# sourceMappingURL=handoffAck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoffAck.d.ts","sourceRoot":"","sources":["../../src/handoffAck.ts"],"names":[],"mappings":"AAqBA,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,2BAA2B,CAAA;AAC1D,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,2BAA2B,CAAA;AAC1D,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,4BAA4B,CAAA;AAE5D,6DAA6D;AAC7D,eAAO,MAAM,UAAU,oBAAoB,CAAA;AAE3C,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,CAAA;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,CAAA;IACV;;;;OAIG;IACH,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;IACvC,iFAAiF;IACjF,IAAI,EAAE,OAAO,CAAA;CACd,CAAA;AAID,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,eAAe,GAAG,SAAS,CAajG;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAErD;AAcD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAIxC;AAED,4FAA4F;AAC5F,wBAAgB,eAAe,IAAI,IAAI,CAKtC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAG3C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI,CAgCjE;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAIpG;AAED,2CAA2C;AAC3C,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,CAEnF"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replacement side of the fullscreen kernel-switch handoff.
|
|
3
|
+
*
|
|
4
|
+
* The old TUI process keeps the alternate screen open while it spawns the
|
|
5
|
+
* replacement, so the user never drops back to the main screen in between.
|
|
6
|
+
* The replacement reports on an extra pipe (fd 3) with two lines:
|
|
7
|
+
*
|
|
8
|
+
* adopted its AlternateScreen mounted on the screen it inherited (no
|
|
9
|
+
* second 1049h);
|
|
10
|
+
* ready its first frame after that has been flushed to the terminal.
|
|
11
|
+
*
|
|
12
|
+
* The alternate screen is closed exactly once: the old process closes it if
|
|
13
|
+
* the replacement dies before `ready`; from `ready` on the replacement owns
|
|
14
|
+
* it and closes it on its own exit.
|
|
15
|
+
*
|
|
16
|
+
* The old process's side (spawn, reading the pipe, classifying the outcome)
|
|
17
|
+
* is restartTui in src/update.ts. This module only tracks the replacement's
|
|
18
|
+
* state; the ACK is a writeSync to the given fd.
|
|
19
|
+
*/
|
|
20
|
+
import { writeSync } from 'node:fs';
|
|
21
|
+
/** fd number of the ACK pipe (stdio[3] of the spawn). */
|
|
22
|
+
export const HANDOFF_ACK_FD_ENV = 'DSH_TUI_HANDOFF_ACK_FD';
|
|
23
|
+
/** 'alt' when the previous process left the terminal in the alternate screen. */
|
|
24
|
+
export const HANDOFF_SCREEN_ENV = 'DSH_TUI_HANDOFF_SCREEN';
|
|
25
|
+
/** Attempt id, echoed in every ACK line and in restart.log. */
|
|
26
|
+
export const HANDOFF_ATTEMPT_ENV = 'DSH_TUI_HANDOFF_ATTEMPT';
|
|
27
|
+
/** ACK line format: `dsh-tui-handoff <kind> <attemptId>`. */
|
|
28
|
+
export const ACK_PREFIX = 'dsh-tui-handoff';
|
|
29
|
+
let state;
|
|
30
|
+
/** Read (and remove) the handoff env early in boot; undefined when this is not a handoff. */
|
|
31
|
+
export function beginHandoffAck(env = process.env) {
|
|
32
|
+
if (state !== undefined)
|
|
33
|
+
return state;
|
|
34
|
+
const fdRaw = env[HANDOFF_ACK_FD_ENV];
|
|
35
|
+
const attemptId = typeof env[HANDOFF_ATTEMPT_ENV] === 'string' ? env[HANDOFF_ATTEMPT_ENV] : '';
|
|
36
|
+
// Removed right away so a host recompose or a child of this process never sees them.
|
|
37
|
+
delete env[HANDOFF_ACK_FD_ENV];
|
|
38
|
+
delete env[HANDOFF_SCREEN_ENV];
|
|
39
|
+
delete env[HANDOFF_ATTEMPT_ENV];
|
|
40
|
+
if (fdRaw === undefined)
|
|
41
|
+
return undefined;
|
|
42
|
+
const fd = Number(fdRaw);
|
|
43
|
+
if (!Number.isInteger(fd) || fd < 0)
|
|
44
|
+
return undefined;
|
|
45
|
+
state = { attemptId, fd, adoption: 'armed', dead: false };
|
|
46
|
+
return state;
|
|
47
|
+
}
|
|
48
|
+
/** Whether this boot is a handoff replacement (read by AlternateScreen). */
|
|
49
|
+
export function handoffAckArmed() {
|
|
50
|
+
return state !== undefined;
|
|
51
|
+
}
|
|
52
|
+
/** The handoff attempt id, for restart.log; undefined outside a handoff. */
|
|
53
|
+
export function handoffAttemptId() {
|
|
54
|
+
return state?.attemptId === '' ? undefined : state?.attemptId;
|
|
55
|
+
}
|
|
56
|
+
function sendAck(kind) {
|
|
57
|
+
if (state === undefined || state.dead)
|
|
58
|
+
return;
|
|
59
|
+
try {
|
|
60
|
+
writeSync(state.fd, ACK_PREFIX + ' ' + kind + ' ' + state.attemptId + '\n');
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
// The old process is gone or closed the pipe. Ownership is not
|
|
64
|
+
// transferred by a lost ACK; ownsAltScreenExit() lets this process close
|
|
65
|
+
// the screen itself from now on.
|
|
66
|
+
state.dead = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Called by AlternateScreen once it has mounted on the inherited screen.
|
|
71
|
+
* Until ready, this process's exit cleanup leaves 1049l to the old process.
|
|
72
|
+
*/
|
|
73
|
+
export function noteScreenAdopted() {
|
|
74
|
+
if (state === undefined || state.adoption !== 'armed')
|
|
75
|
+
return;
|
|
76
|
+
sendAck('adopted');
|
|
77
|
+
if (!state.dead)
|
|
78
|
+
state.adoption = 'adopted';
|
|
79
|
+
}
|
|
80
|
+
/** The first frame after adoption has been flushed: send ready and take over the screen. */
|
|
81
|
+
export function markScreenReady() {
|
|
82
|
+
if (state === undefined || state.adoption !== 'adopted')
|
|
83
|
+
return;
|
|
84
|
+
sendAck('ready');
|
|
85
|
+
// A failed write marks the pipe dead instead; see ownsAltScreenExit.
|
|
86
|
+
if (!state.dead)
|
|
87
|
+
state.adoption = 'ready';
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Whether this process should write 1049l when it leaves the alternate
|
|
91
|
+
* screen. Always true outside a handoff. During one it is false until ready,
|
|
92
|
+
* because the old process closes the screen if this one dies first. A dead
|
|
93
|
+
* pipe also makes it true: closing twice is better than leaving the terminal
|
|
94
|
+
* in the alternate screen.
|
|
95
|
+
*/
|
|
96
|
+
export function ownsAltScreenExit() {
|
|
97
|
+
if (state === undefined)
|
|
98
|
+
return true;
|
|
99
|
+
return state.adoption === 'ready' || state.dead;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Wrap stdout.write until the first write after adoption, and send ready
|
|
103
|
+
* from that write's flush callback. The wrapper removes itself before
|
|
104
|
+
* forwarding, so later writes go straight through. Does nothing outside a
|
|
105
|
+
* handoff.
|
|
106
|
+
*/
|
|
107
|
+
export function armFirstFrameAck(stdout) {
|
|
108
|
+
if (state === undefined || state.adoption !== 'armed' || state.dead)
|
|
109
|
+
return;
|
|
110
|
+
const original = stdout.write;
|
|
111
|
+
const wrapper = function (...args) {
|
|
112
|
+
const adopted = state !== undefined && state.adoption === 'adopted';
|
|
113
|
+
if (!adopted) {
|
|
114
|
+
// Not mounted yet, so this is a probe or setup write, not a frame.
|
|
115
|
+
return original.apply(stdout, args);
|
|
116
|
+
}
|
|
117
|
+
// Unwrap first so the callback chain and every later write use the original.
|
|
118
|
+
try {
|
|
119
|
+
stdout.write = original;
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
// Read-only stream: the wrapper stays, and passes writes through once ready is sent.
|
|
123
|
+
}
|
|
124
|
+
const userCallback = typeof args[1] === 'function' ? args[1] : typeof args[2] === 'function' ? args[2] : undefined;
|
|
125
|
+
const chained = error => {
|
|
126
|
+
markScreenReady();
|
|
127
|
+
if (userCallback !== undefined)
|
|
128
|
+
userCallback(error);
|
|
129
|
+
};
|
|
130
|
+
if (typeof args[1] === 'string')
|
|
131
|
+
return original.call(stdout, args[0], args[1], chained);
|
|
132
|
+
return original.call(stdout, args[0], chained);
|
|
133
|
+
};
|
|
134
|
+
try {
|
|
135
|
+
stdout.write = wrapper;
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
// The flush cannot be observed: take the screen over now and stop ACKing,
|
|
139
|
+
// so the old process falls back to its no-ready path.
|
|
140
|
+
state.dead = true;
|
|
141
|
+
state.adoption = 'ready';
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/** Parse one ACK pipe line (old process side); null for anything else. */
|
|
145
|
+
export function parseHandoffAckLine(line) {
|
|
146
|
+
const match = new RegExp('^' + ACK_PREFIX + ' (adopted|ready) (.*)$').exec(line.trim());
|
|
147
|
+
if (match === null)
|
|
148
|
+
return null;
|
|
149
|
+
return { kind: match[1], attemptId: match[2] };
|
|
150
|
+
}
|
|
151
|
+
/** Test hook: install a state directly. */
|
|
152
|
+
export function __setHandoffAckStateForTest(next) {
|
|
153
|
+
state = next;
|
|
154
|
+
}
|