@deepseek-harness-tui/dsh-tui 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -14
- package/bin/dsh-tui.js +200 -34
- package/cordis.patch.yml +16 -52
- package/cordis.yml +6 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +44 -7
- package/guide/dsh-tui-guide/claude-backend.md +28 -6
- package/guide/dsh-tui-guide/codex-backend.en.md +34 -7
- package/guide/dsh-tui-guide/codex-backend.md +17 -2
- package/guide/dsh-tui-guide/configuration.en.md +129 -16
- package/guide/dsh-tui-guide/configuration.md +110 -14
- package/guide/dsh-tui-guide/interaction.en.md +57 -24
- package/guide/dsh-tui-guide/interaction.md +42 -19
- package/guide/dsh-tui-guide/plugins.en.md +36 -3
- package/guide/dsh-tui-guide/plugins.md +21 -2
- package/guide/dsh-tui-guide/themes.en.md +23 -14
- package/guide/dsh-tui-guide/themes.md +19 -12
- package/guide/dsh-tui-guide/user-guide.en.md +51 -20
- package/guide/dsh-tui-guide/user-guide.md +41 -21
- package/lib/settings.json +103 -9
- package/lib/types/adapter/channel/ui-policy.d.ts +1 -1
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +3 -0
- package/lib/types/adapter/channel/ui.d.ts +2 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +6 -2
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
- package/lib/types/adapter/kernel/runtime.js +2 -0
- package/lib/types/adapter/ports/channel-settings.d.ts +9 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +50 -12
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +21 -0
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/spec/backend-capabilities.d.ts +22 -0
- package/lib/types/adapter/spec/backend-capabilities.d.ts.map +1 -0
- package/lib/types/adapter/spec/backend-capabilities.js +49 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
- package/lib/types/adapter/spec/protocol-constants.js +10 -3
- package/lib/types/adapter/spec/tui-contributions.d.ts +3 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
- package/lib/types/adapter/spec/tui-contributions.js +7 -0
- package/lib/types/adapter/standard/registry.d.ts +6 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -1
- package/lib/types/adapter/standard/registry.js +65 -15
- package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -1
- package/lib/types/adapter/standard/tui-extension.js +7 -1
- package/lib/types/adapter/standard/types.d.ts +10 -1
- package/lib/types/adapter/standard/types.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.js +52 -0
- package/lib/types/agent/backend-manifest.d.ts +152 -0
- package/lib/types/agent/backend-manifest.d.ts.map +1 -0
- package/lib/types/agent/backend-manifest.js +14 -0
- package/lib/types/agent/backend.d.ts +71 -5
- package/lib/types/agent/backend.d.ts.map +1 -1
- package/lib/types/agent/capabilities.d.ts +6 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -1
- package/lib/types/agent/index.d.ts +2 -0
- package/lib/types/agent/index.d.ts.map +1 -1
- package/lib/types/agent/refs.d.ts +11 -1
- package/lib/types/agent/refs.d.ts.map +1 -1
- package/lib/types/agent/starting-session.d.ts +4 -0
- package/lib/types/agent/starting-session.d.ts.map +1 -0
- package/lib/types/agent/starting-session.js +19 -0
- package/lib/types/backends/claude/activity.d.ts +1 -1
- package/lib/types/backends/claude/activity.d.ts.map +1 -1
- package/lib/types/backends/claude/activity.js +5 -5
- package/lib/types/backends/claude/auth.d.ts.map +1 -1
- package/lib/types/backends/claude/auth.js +10 -3
- package/lib/types/backends/claude/backend.d.ts.map +1 -1
- package/lib/types/backends/claude/backend.js +103 -29
- package/lib/types/backends/claude/catalog.d.ts +2 -1
- package/lib/types/backends/claude/catalog.d.ts.map +1 -1
- package/lib/types/backends/claude/catalog.js +15 -5
- package/lib/types/backends/claude/channels.d.ts +5 -3
- package/lib/types/backends/claude/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/channels.js +5 -4
- package/lib/types/backends/claude/contract.d.ts +4 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -1
- package/lib/types/backends/claude/contract.js +4 -0
- package/lib/types/backends/claude/controls.d.ts +4 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -1
- package/lib/types/backends/claude/controls.js +34 -42
- package/lib/types/backends/claude/dialogs.d.ts +8 -2
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -1
- package/lib/types/backends/claude/dialogs.js +24 -16
- package/lib/types/backends/claude/images.d.ts +1 -1
- package/lib/types/backends/claude/images.d.ts.map +1 -1
- package/lib/types/backends/claude/images.js +7 -7
- package/lib/types/backends/claude/manifest.d.ts +21 -0
- package/lib/types/backends/claude/manifest.d.ts.map +1 -0
- package/lib/types/backends/claude/manifest.js +29 -0
- package/lib/types/backends/claude/older-history.js +2 -2
- package/lib/types/backends/claude/permissions.js +11 -11
- package/lib/types/backends/claude/prefs.d.ts +4 -2
- package/lib/types/backends/claude/prefs.d.ts.map +1 -1
- package/lib/types/backends/claude/prefs.js +4 -3
- package/lib/types/backends/claude/process.d.ts +16 -4
- package/lib/types/backends/claude/process.d.ts.map +1 -1
- package/lib/types/backends/claude/process.js +100 -37
- package/lib/types/backends/claude/send-message.d.ts +1 -1
- package/lib/types/backends/claude/send-message.d.ts.map +1 -1
- package/lib/types/backends/claude/session/auth.js +22 -22
- package/lib/types/backends/claude/session/channels.d.ts +4 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/session/channels.js +5 -3
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -1
- package/lib/types/backends/claude/session/lifecycle.js +31 -23
- package/lib/types/backends/claude/session/store.js +8 -8
- package/lib/types/backends/claude/session/subagents.js +2 -2
- package/lib/types/backends/claude/session/types.d.ts +7 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -1
- package/lib/types/backends/claude/side-query.js +3 -3
- package/lib/types/backends/claude/task-output.js +5 -5
- package/lib/types/backends/claude/text.d.ts +778 -0
- package/lib/types/backends/claude/text.d.ts.map +1 -0
- package/lib/types/backends/claude/text.js +298 -0
- package/lib/types/backends/claude/transcript-file.d.ts +1 -1
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -1
- package/lib/types/backends/claude/transcript-file.js +4 -4
- package/lib/types/backends/claude/translate/attempts.js +2 -2
- package/lib/types/backends/claude/translate/core.js +3 -3
- package/lib/types/backends/claude/translate/messages.js +4 -4
- package/lib/types/backends/claude/translate/system.js +14 -14
- package/lib/types/backends/claude/translate/tasks.js +2 -2
- package/lib/types/backends/claude/translate/types.d.ts +1 -1
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -1
- package/lib/types/backends/codex/auth/external-tokens.js +16 -16
- package/lib/types/backends/codex/auth/status.js +14 -14
- package/lib/types/backends/codex/backend.d.ts +4 -19
- package/lib/types/backends/codex/backend.d.ts.map +1 -1
- package/lib/types/backends/codex/backend.js +118 -25
- package/lib/types/backends/codex/catalog.d.ts +2 -1
- package/lib/types/backends/codex/catalog.d.ts.map +1 -1
- package/lib/types/backends/codex/catalog.js +63 -18
- package/lib/types/backends/codex/channels.d.ts +6 -3
- package/lib/types/backends/codex/channels.d.ts.map +1 -1
- package/lib/types/backends/codex/channels.js +15 -13
- package/lib/types/backends/codex/detect.d.ts.map +1 -1
- package/lib/types/backends/codex/detect.js +9 -6
- package/lib/types/backends/codex/manifest.d.ts +30 -0
- package/lib/types/backends/codex/manifest.d.ts.map +1 -0
- package/lib/types/backends/codex/manifest.js +23 -0
- package/lib/types/backends/codex/prefs.d.ts +4 -2
- package/lib/types/backends/codex/prefs.d.ts.map +1 -1
- package/lib/types/backends/codex/prefs.js +4 -3
- package/lib/types/backends/codex/rpc/hub.js +2 -2
- package/lib/types/backends/codex/session/activity.d.ts +1 -1
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -1
- package/lib/types/backends/codex/session/activity.js +13 -13
- package/lib/types/backends/codex/session/approvals.js +30 -30
- package/lib/types/backends/codex/session/commands.d.ts +8 -2
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
- package/lib/types/backends/codex/session/commands.js +71 -23
- package/lib/types/backends/codex/session/controls.d.ts +1 -1
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
- package/lib/types/backends/codex/session/controls.js +21 -16
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
- package/lib/types/backends/codex/session/goals.js +3 -3
- package/lib/types/backends/codex/session/history.js +2 -2
- package/lib/types/backends/codex/session/images.js +8 -8
- package/lib/types/backends/codex/session/input.d.ts +6 -2
- package/lib/types/backends/codex/session/input.d.ts.map +1 -1
- package/lib/types/backends/codex/session/input.js +55 -13
- package/lib/types/backends/codex/session/plan-review.js +6 -6
- package/lib/types/backends/codex/session/session.d.ts.map +1 -1
- package/lib/types/backends/codex/session/session.js +66 -34
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
- package/lib/types/backends/codex/session/side-query.js +27 -9
- package/lib/types/backends/codex/session/state.d.ts +6 -1
- package/lib/types/backends/codex/session/state.d.ts.map +1 -1
- package/lib/types/backends/codex/session/subagents.js +5 -5
- package/lib/types/backends/codex/session/tasks.js +4 -4
- package/lib/types/backends/codex/text.d.ts +933 -0
- package/lib/types/backends/codex/text.d.ts.map +1 -0
- package/lib/types/backends/codex/text.js +313 -0
- package/lib/types/backends/codex/translate/items.js +4 -4
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/live.js +11 -8
- package/lib/types/backends/codex/translate/notices.js +10 -10
- package/lib/types/backends/shared/channel-slug.d.ts +4 -0
- package/lib/types/backends/shared/channel-slug.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-slug.js +25 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
- package/lib/types/backends/shared/channel-tokens.js +30 -23
- package/lib/types/{channel → backends/shared}/elicitation.d.ts +78 -21
- package/lib/types/backends/shared/elicitation.d.ts.map +1 -0
- package/lib/types/{channel → backends/shared}/elicitation.js +64 -66
- package/lib/types/backends/shared/image-size.d.ts +33 -0
- package/lib/types/backends/shared/image-size.d.ts.map +1 -0
- package/lib/types/backends/shared/image-size.js +134 -0
- package/lib/types/{utils → backends/shared}/jsonl.d.ts +5 -1
- package/lib/types/backends/shared/jsonl.d.ts.map +1 -0
- package/lib/types/{utils → backends/shared}/jsonl.js +5 -1
- package/lib/types/backends/shared/localized-text.d.ts +30 -0
- package/lib/types/backends/shared/localized-text.d.ts.map +1 -0
- package/lib/types/backends/shared/localized-text.js +24 -0
- package/lib/types/backends/shared/platform-text.d.ts +88 -0
- package/lib/types/backends/shared/platform-text.d.ts.map +1 -0
- package/lib/types/backends/shared/platform-text.js +33 -0
- package/lib/types/branding.d.ts +13 -0
- package/lib/types/branding.d.ts.map +1 -1
- package/lib/types/branding.js +18 -0
- package/lib/types/channel/channel-slug.d.ts +3 -1
- package/lib/types/channel/channel-slug.d.ts.map +1 -1
- package/lib/types/channel/channel-slug.js +3 -1
- package/lib/types/channel/sanitize.d.ts +7 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +9 -0
- package/lib/types/channel/usage.d.ts.map +1 -1
- package/lib/types/channel/usage.js +5 -0
- package/lib/types/commands.d.ts +5 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +47 -8
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -1
- package/lib/types/components/AgentMessageComposer.js +3 -2
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +4 -2
- package/lib/types/components/Chat/JobCard.js +3 -3
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +20 -6
- package/lib/types/components/ContextBarView.d.ts +5 -1
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +6 -3
- package/lib/types/components/ExtensionDialog.d.ts.map +1 -1
- package/lib/types/components/ExtensionDialog.js +2 -3
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +14 -3
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/KernelPicker.d.ts.map +1 -1
- package/lib/types/components/KernelPicker.js +1 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +9 -6
- package/lib/types/components/MarkdownTable.d.ts.map +1 -1
- package/lib/types/components/MarkdownTable.js +4 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +18 -5
- package/lib/types/components/ModelPicker.d.ts +24 -31
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +115 -40
- package/lib/types/components/PromptEditor.d.ts +3 -3
- package/lib/types/components/PromptInput.d.ts +21 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +58 -118
- package/lib/types/components/SdkInstallWizard.d.ts +3 -1
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -1
- package/lib/types/components/SdkInstallWizard.js +8 -1
- package/lib/types/components/SearchBox.d.ts +13 -15
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +58 -27
- package/lib/types/components/ThemePicker.d.ts +1 -1
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +14 -11
- package/lib/types/components/Tooltip.js +1 -1
- package/lib/types/components/WorkingSpinner.js +1 -1
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
- package/lib/types/components/WorkspaceFlowPicker.js +4 -3
- package/lib/types/components/composerImageTokens.d.ts +24 -0
- package/lib/types/components/composerImageTokens.d.ts.map +1 -0
- package/lib/types/components/composerImageTokens.js +37 -0
- package/lib/types/components/design-system/InputCaret.d.ts +7 -0
- package/lib/types/components/design-system/InputCaret.d.ts.map +1 -0
- package/lib/types/components/design-system/InputCaret.js +9 -0
- package/lib/types/components/design-system/ListItem.d.ts +13 -2
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +11 -5
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +6 -8
- package/lib/types/components/kernelCatalog.d.ts +55 -11
- package/lib/types/components/kernelCatalog.d.ts.map +1 -1
- package/lib/types/components/kernelCatalog.js +42 -23
- package/lib/types/components/launchpadActions.d.ts +4 -0
- package/lib/types/components/launchpadActions.d.ts.map +1 -1
- package/lib/types/components/launchpadActions.js +5 -4
- package/lib/types/components/launchpadLayout.d.ts.map +1 -1
- package/lib/types/components/launchpadLayout.js +2 -2
- package/lib/types/components/messages/UserPromptMessage.d.ts +4 -3
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +4 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +4 -3
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -1
- package/lib/types/components/questions/ProviderModelEditor.js +3 -13
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -1
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
- package/lib/types/components/sessions/ForeignSessionRow.js +5 -2
- package/lib/types/components/sessions/SessionListRow.d.ts +3 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +5 -2
- package/lib/types/components/sidePanel/PanelBar.d.ts +1 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelBar.js +21 -17
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +2 -1
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts +6 -4
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelLayout.js +33 -7
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +4 -2
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +12 -4
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +59 -15
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +4 -2
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +12 -6
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -2
- package/lib/types/components/sidePanel/types.d.ts +1 -1
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts +2 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +11 -1
- package/lib/types/components/splashFonts.d.ts +24 -1
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +40 -5
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +5 -2
- package/lib/types/dsh-adapter/admission-loader.d.ts +20 -0
- package/lib/types/dsh-adapter/admission-loader.d.ts.map +1 -0
- package/lib/types/dsh-adapter/admission-loader.js +256 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +3 -0
- package/lib/types/dsh-adapter/backend-admission.d.ts +64 -0
- package/lib/types/dsh-adapter/backend-admission.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-admission.js +34 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts +26 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-contribution.js +37 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts +136 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-registry.js +285 -0
- package/lib/types/dsh-adapter/backends.d.ts +67 -24
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backends.generated.d.ts +12 -0
- package/lib/types/dsh-adapter/backends.generated.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.generated.js +6 -0
- package/lib/types/dsh-adapter/backends.js +92 -46
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +2 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +9 -3
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +8 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +16 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +18 -46
- package/lib/types/dsh-adapter/channel/channel-host.d.ts +45 -0
- package/lib/types/dsh-adapter/channel/channel-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/channel-host.js +1 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +16 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +4 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +36 -5
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts +14 -0
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/cordis-host.js +35 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.js +15 -6
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +7 -3
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +3 -0
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +12 -28
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +318 -117
- package/lib/types/dsh-adapter/channel/core/files.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/files.js +1 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +12 -6
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/host.js +69 -35
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +5 -3
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +5 -2
- package/lib/types/dsh-adapter/channel/core/session-controls.js +2 -2
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +7 -4
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/session-switch.js +8 -4
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.js +75 -16
- package/lib/types/dsh-adapter/channel/extensions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +41 -22
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +14 -5
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +205 -24
- package/lib/types/dsh-adapter/channel/mentions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +1 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +138 -8
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +40 -28
- package/lib/types/dsh-adapter/channel/model-selection.d.ts +17 -0
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-selection.js +109 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +12 -21
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +39 -102
- package/lib/types/dsh-adapter/channel/projection.js +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +11 -3
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +33 -20
- package/lib/types/dsh-adapter/channel/session-listing.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/session-listing.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-listing.js +51 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +3 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +56 -27
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +15 -8
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +38 -24
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +38 -24
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +1 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +37 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +14 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +66 -6
- package/lib/types/dsh-adapter/channel/task-completion.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/task-completion.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/task-completion.js +114 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +1 -1
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts +81 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.js +138 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +9 -8
- package/lib/types/dsh-adapter/channel-ui.d.ts +3 -1
- package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel-ui.js +4 -2
- package/lib/types/dsh-adapter/channel.d.ts +2 -2
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +19 -5
- package/lib/types/dsh-adapter/context-occupancy.d.ts +81 -4
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -1
- package/lib/types/dsh-adapter/context-occupancy.js +108 -17
- package/lib/types/dsh-adapter/contract.d.ts +1 -1
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +15 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts +36 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/entry-slot.js +28 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts +22 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -0
- package/lib/types/dsh-adapter/fresh-agent.js +221 -0
- package/lib/types/dsh-adapter/host-access.d.ts +16 -1
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +53 -2
- package/lib/types/dsh-adapter/host-contract.d.ts +103 -0
- package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-contract.js +76 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts +106 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-dsh.js +466 -0
- package/lib/types/dsh-adapter/host-entry.d.ts +9 -0
- package/lib/types/dsh-adapter/host-entry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-entry.js +228 -0
- package/lib/types/dsh-adapter/index.d.ts +55 -18
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +59 -7
- package/lib/types/dsh-adapter/install/executors.d.ts +44 -0
- package/lib/types/dsh-adapter/install/executors.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/executors.js +15 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts +3 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.js +150 -0
- package/lib/types/dsh-adapter/jobs.d.ts +7 -0
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +13 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts +50 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts.map +1 -0
- package/lib/types/dsh-adapter/lite-profile.js +49 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +4 -3
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/profiles.js +5 -1
- package/lib/types/dsh-adapter/panels.d.ts +7 -0
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/panels.js +35 -2
- package/lib/types/dsh-adapter/plugin-completions.d.ts +32 -0
- package/lib/types/dsh-adapter/plugin-completions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-completions.js +80 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +21 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-declaration.js +53 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +13 -2
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-host.js +34 -8
- package/lib/types/dsh-adapter/plugin-manager.d.ts +68 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manager.js +51 -0
- package/lib/types/dsh-adapter/plugin.d.ts +50 -1
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +870 -233
- package/lib/types/dsh-adapter/plugins-info.d.ts +44 -8
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +354 -34
- package/lib/types/dsh-adapter/process-exit.d.ts +43 -0
- package/lib/types/dsh-adapter/process-exit.d.ts.map +1 -0
- package/lib/types/dsh-adapter/process-exit.js +60 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts +18 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/root-dispose.js +28 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts +20 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-list-metadata.js +56 -0
- package/lib/types/dsh-adapter/session-seed.d.ts +11 -0
- package/lib/types/dsh-adapter/session-seed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-seed.js +47 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +11 -5
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +0 -2
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/snapshot.js +7 -70
- package/lib/types/dsh-adapter/startup-args.d.ts +2 -0
- package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -1
- package/lib/types/dsh-adapter/startup-args.js +5 -0
- package/lib/types/dsh-adapter/subagents.d.ts +33 -1
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +110 -8
- package/lib/types/dsh-adapter/tui-settings.d.ts +57 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts.map +1 -0
- package/lib/types/dsh-adapter/tui-settings.js +199 -0
- package/lib/types/effortPrefs.d.ts +6 -3
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +7 -4
- package/lib/types/hostEntryRoute.d.ts +18 -0
- package/lib/types/hostEntryRoute.d.ts.map +1 -0
- package/lib/types/hostEntryRoute.js +57 -0
- package/lib/types/i18n.d.ts +363 -1432
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +155 -385
- package/lib/types/ink/components/AlternateScreen.js +2 -2
- package/lib/types/ink/components/App.d.ts +1 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +16 -4
- package/lib/types/ink/components/CursorDeclarationContext.d.ts +9 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -1
- package/lib/types/ink/components/CursorDeclarationContext.js +2 -0
- package/lib/types/ink/hooks/use-copy-on-select.d.ts +2 -2
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.js +13 -7
- package/lib/types/ink/hooks/use-declared-cursor.d.ts +11 -3
- package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-declared-cursor.js +30 -10
- package/lib/types/ink/ink.d.ts +22 -17
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +151 -40
- package/lib/types/ink/kitty-graphics.d.ts +2 -0
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +6 -1
- package/lib/types/ink/node-cache.d.ts +2 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/output.d.ts +10 -4
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +14 -10
- package/lib/types/ink/render-node-to-output.d.ts +5 -2
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +27 -9
- package/lib/types/ink/renderer.d.ts +1 -0
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +4 -3
- package/lib/types/ink/root.d.ts +4 -1
- package/lib/types/ink/root.d.ts.map +1 -1
- package/lib/types/ink/screen.d.ts +4 -2
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/selection.d.ts +10 -1
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +94 -25
- package/lib/types/ink/stdin-handoff.d.ts +11 -0
- package/lib/types/ink/stdin-handoff.d.ts.map +1 -0
- package/lib/types/ink/stdin-handoff.js +20 -0
- package/lib/types/ink/styles.d.ts +2 -1
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +6 -4
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.js +16 -39
- package/lib/types/ink/terminal-notification.d.ts +8 -0
- package/lib/types/ink/terminal-notification.d.ts.map +1 -0
- package/lib/types/ink/terminal-notification.js +83 -0
- package/lib/types/ink/terminal.d.ts +9 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +34 -1
- package/lib/types/ink/termio/csi.d.ts +11 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -1
- package/lib/types/ink/termio/csi.js +13 -0
- package/lib/types/ink/update-overflow-guard.d.ts +6 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +17 -0
- package/lib/types/ink/wrap-text.d.ts +6 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +17 -0
- package/lib/types/kernelPrefs.d.ts +129 -16
- package/lib/types/kernelPrefs.d.ts.map +1 -1
- package/lib/types/kernelPrefs.js +98 -35
- package/lib/types/math/inline-layout.d.ts +2 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -1
- package/lib/types/math/inline-layout.js +5 -27
- package/lib/types/modelGroups.d.ts +15 -27
- package/lib/types/modelGroups.d.ts.map +1 -1
- package/lib/types/modelGroups.js +17 -31
- package/lib/types/modelPrefs.d.ts +5 -4
- package/lib/types/modelPrefs.d.ts.map +1 -1
- package/lib/types/modelPrefs.js +5 -4
- package/lib/types/modelRoute.d.ts +23 -9
- package/lib/types/modelRoute.d.ts.map +1 -1
- package/lib/types/modelRoute.js +25 -11
- package/lib/types/permissionPrefs.d.ts +34 -0
- package/lib/types/permissionPrefs.d.ts.map +1 -0
- package/lib/types/permissionPrefs.js +61 -0
- package/lib/types/plugin-host.d.ts +1 -0
- package/lib/types/plugin-host.d.ts.map +1 -1
- package/lib/types/presetPrefs.d.ts +17 -3
- package/lib/types/presetPrefs.d.ts.map +1 -1
- package/lib/types/presetPrefs.js +20 -3
- package/lib/types/reload.d.ts +6 -10
- package/lib/types/reload.d.ts.map +1 -1
- package/lib/types/reload.js +14 -14
- package/lib/types/screens/Chat.d.ts +22 -15
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +442 -272
- package/lib/types/screens/Launchpad.d.ts +27 -17
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +241 -78
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +53 -12
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +6 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +24 -7
- package/lib/types/screens/StatusMetrics.d.ts +46 -1
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +72 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +8 -4
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -1
- package/lib/types/screens/chat/useKernelPicker.js +61 -21
- package/lib/types/screens/chat/useModelPicker.d.ts +42 -0
- package/lib/types/screens/chat/useModelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useModelPicker.js +182 -0
- package/lib/types/screens/chatOverlay.d.ts +11 -4
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +0 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +26 -5
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +51 -29
- package/lib/types/sessionHistory.d.ts +5 -0
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +5 -0
- package/lib/types/sessions/listSnapshot.d.ts +6 -0
- package/lib/types/sessions/listSnapshot.d.ts.map +1 -0
- package/lib/types/sessions/listSnapshot.js +67 -0
- package/lib/types/settings/definitions.d.ts +50 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +42 -8
- package/lib/types/terminal-utils/cjk-emphasis.d.ts +28 -0
- package/lib/types/terminal-utils/cjk-emphasis.d.ts.map +1 -0
- package/lib/types/terminal-utils/cjk-emphasis.js +31 -0
- package/lib/types/terminal-utils/markdown.d.ts +3 -1
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +7 -2
- package/lib/types/theme.d.ts +29 -12
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +310 -23
- package/lib/types/themeCatalog.d.ts.map +1 -1
- package/lib/types/themeCatalog.js +21 -2
- package/lib/types/tips.js +4 -4
- package/lib/types/tuiSettingsFile.d.ts +56 -0
- package/lib/types/tuiSettingsFile.d.ts.map +1 -0
- package/lib/types/tuiSettingsFile.js +206 -0
- package/lib/types/ui.d.ts +2 -0
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +2 -0
- package/lib/types/update.d.ts +72 -26
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +131 -43
- package/lib/types/utils/bmp.d.ts +7 -0
- package/lib/types/utils/bmp.d.ts.map +1 -1
- package/lib/types/utils/bmp.js +27 -0
- package/lib/types/utils/bootTrace.d.ts +2 -0
- package/lib/types/utils/bootTrace.d.ts.map +1 -0
- package/lib/types/utils/bootTrace.js +20 -0
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +11 -3
- package/lib/types/utils/credentials.d.ts +14 -2
- package/lib/types/utils/credentials.d.ts.map +1 -1
- package/lib/types/utils/credentials.js +34 -11
- package/lib/types/utils/imageResize.d.ts +10 -20
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +61 -134
- package/lib/types/utils/inputPaste.d.ts +2 -2
- package/lib/types/utils/inputPaste.js +2 -2
- package/lib/types/utils/pastedImagePath.d.ts +5 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
- package/lib/types/utils/pastedImagePath.js +33 -0
- package/package.json +36 -6
- package/presets/winbash.mjs +716 -0
- package/tui-profile/protocols/profile-definitions.d.ts +1 -0
- package/tui-profile/protocols/profile-definitions.js +14 -0
- package/tui-profile/protocols/tui-contributions.d.ts +55 -0
- package/tui-profile/protocols/tui-contributions.js +141 -0
- package/tui-profile/registry/contracts/backend-v1alpha1.json +13 -0
- package/tui-profile/registry/registry-0.15.json +12 -0
- package/lib/types/backends/claude/install.d.ts +0 -15
- package/lib/types/backends/claude/install.d.ts.map +0 -1
- package/lib/types/backends/claude/install.js +0 -91
- package/lib/types/channel/elicitation.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts +0 -42
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.js +0 -51
- package/lib/types/utils/jsonl.d.ts.map +0 -1
|
@@ -31,13 +31,31 @@
|
|
|
31
31
|
* bundle and therefore no token meter; the projection key is simply not
|
|
32
32
|
* registered. The store stays empty and the channel falls back to the
|
|
33
33
|
* last-request sample it has always shown (see `resolveContextOccupancy`).
|
|
34
|
+
*
|
|
35
|
+
* The SAME unit also publishes `contextBreakdown` — the heuristic composition of
|
|
36
|
+
* that total (system prompt / request-envelope tool schemas / everything else).
|
|
37
|
+
* This module reads it on the same seam and stores it beside the occupancy,
|
|
38
|
+
* because the segmented bar draws what the context is made of while its length
|
|
39
|
+
* and readout must follow the provider-anchored total: without the composition
|
|
40
|
+
* the bar had to price its own transcript text, which systematically misses the
|
|
41
|
+
* request envelope (tool schemas) and the injected context. Absence is normal
|
|
42
|
+
* here too — a meter older than the projection publishes no composition, and the
|
|
43
|
+
* bar keeps using this app's own estimates alone.
|
|
34
44
|
* @module dsh-tui/dsh-adapter/context-occupancy
|
|
35
45
|
*/
|
|
36
46
|
import type { Context } from '@deepseek-ai/cordis';
|
|
37
|
-
import type { ContextOccupancy } from '../adapter/ports/channel-view.js';
|
|
47
|
+
import type { ContextBreakdown, ContextOccupancy } from '../adapter/ports/channel-view.js';
|
|
38
48
|
import type { ProjectionRegistryLike } from './activity-store.js';
|
|
39
49
|
/** The projection key the host token meter publishes. */
|
|
40
50
|
export declare const CONTEXT_PRESSURE_PROJECTION_KEY = "contextPressure";
|
|
51
|
+
/** The composition key the SAME meter unit publishes (see
|
|
52
|
+
* {@link ContextBreakdownView}); absent on harness lines whose meter predates
|
|
53
|
+
* it, which every reader here treats as "no composition known". */
|
|
54
|
+
export declare const CONTEXT_BREAKDOWN_PROJECTION_KEY = "contextBreakdown";
|
|
55
|
+
/** The two keys of the one meter unit this store folds. Each maps to its own
|
|
56
|
+
* table, so the write path is typed by key: a third key — or a typo — cannot
|
|
57
|
+
* compile its way into an occupancy value. */
|
|
58
|
+
type ContextMeterKey = typeof CONTEXT_PRESSURE_PROJECTION_KEY | typeof CONTEXT_BREAKDOWN_PROJECTION_KEY;
|
|
41
59
|
/**
|
|
42
60
|
* The official `contextPressure` wire value.
|
|
43
61
|
*
|
|
@@ -54,6 +72,30 @@ export interface ContextPressureView {
|
|
|
54
72
|
/** Newest recorded route capacity, when an adapter advertised one. */
|
|
55
73
|
readonly contextWindow?: number;
|
|
56
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* The official `contextBreakdown` wire value.
|
|
77
|
+
*
|
|
78
|
+
* Structural copy of `@deepseek-ai/dsh-token-meter`'s `ContextBreakdownProjection`,
|
|
79
|
+
* the composition half of the same meter unit that publishes `contextPressure`:
|
|
80
|
+
* system prompt, the newest request envelope's TOOL SCHEMAS, and everything else
|
|
81
|
+
* on the surface. Its own doc is explicit that the three are a heuristic
|
|
82
|
+
* composition — "approximations of composition, never … a total" — because the
|
|
83
|
+
* fixed density estimator underprices CJK text and JSON schemas; the
|
|
84
|
+
* provider-anchored total stays `contextPressure`.
|
|
85
|
+
*
|
|
86
|
+
* Fields are optional here even though the host declares them required: a
|
|
87
|
+
* partially-filled wire value must degrade to "this part is unknown" instead of
|
|
88
|
+
* discarding the whole reading (the discipline {@link ContextPressureView} keeps).
|
|
89
|
+
*/
|
|
90
|
+
export interface ContextBreakdownView {
|
|
91
|
+
/** Heuristic tokens of the last nonempty surviving system prompt. */
|
|
92
|
+
readonly systemTokens?: number;
|
|
93
|
+
/** Heuristic tokens of the newest request envelope's tool schemas. */
|
|
94
|
+
readonly toolsTokens?: number;
|
|
95
|
+
/** Heuristic tokens of every other visible surface node (including
|
|
96
|
+
* superseded system prompts and injected context). */
|
|
97
|
+
readonly messageTokens?: number;
|
|
98
|
+
}
|
|
57
99
|
/**
|
|
58
100
|
* The reader the channel gets: a cached lookup plus a change feed.
|
|
59
101
|
*
|
|
@@ -63,6 +105,10 @@ export interface ContextPressureView {
|
|
|
63
105
|
*/
|
|
64
106
|
export interface ContextPressureSource {
|
|
65
107
|
read(sessionId: string): ContextPressureView | undefined;
|
|
108
|
+
/** The same unit's composition value, when the harness publishes it. An
|
|
109
|
+
* absent method (or an absent value) means the bar falls back to this app's
|
|
110
|
+
* own per-content-type estimates alone. */
|
|
111
|
+
readBreakdown?(sessionId: string): ContextBreakdownView | undefined;
|
|
66
112
|
subscribe(listener: () => void): () => void;
|
|
67
113
|
}
|
|
68
114
|
/**
|
|
@@ -88,6 +134,23 @@ export declare function asContextPressureView(value: unknown): ContextPressureVi
|
|
|
88
134
|
* @returns the occupancy numerator, or `undefined` before any provider sample.
|
|
89
135
|
*/
|
|
90
136
|
export declare function contextPressureUsedTokens(view: ContextPressureView): number | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Narrow one `contextBreakdown` wire value: a value carrying no known field is
|
|
139
|
+
* dropped, a partially-filled one is kept so its known parts still reach the
|
|
140
|
+
* bar. Passed THROUGH (not copied) for the same identity-is-the-change-test
|
|
141
|
+
* reason as {@link asContextPressureView}.
|
|
142
|
+
* @param value - Raw projection value.
|
|
143
|
+
* @returns the value as a breakdown view, or `undefined`.
|
|
144
|
+
*/
|
|
145
|
+
export declare function asContextBreakdownView(value: unknown): ContextBreakdownView | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Normalise the host's composition value into the port shape the footer reads,
|
|
148
|
+
* filling absent fields with 0 (a partial value must not blank the sections the
|
|
149
|
+
* host did report).
|
|
150
|
+
* @param view - The narrowed projection value, if any.
|
|
151
|
+
* @returns the composition, or `undefined` when the harness publishes none.
|
|
152
|
+
*/
|
|
153
|
+
export declare function resolveContextBreakdown(view: ContextBreakdownView | undefined): ContextBreakdown | undefined;
|
|
91
154
|
/**
|
|
92
155
|
* Resolve the ONE occupancy reading the footer, the segmented bar, the working
|
|
93
156
|
* line's pressure prefix, the status commands and the context-low warning share.
|
|
@@ -117,7 +180,8 @@ export declare function resolveContextOccupancy(projected: ContextPressureView |
|
|
|
117
180
|
readonly max?: number;
|
|
118
181
|
}): ContextOccupancy | undefined;
|
|
119
182
|
/**
|
|
120
|
-
* The latest `contextPressure`
|
|
183
|
+
* The latest `contextPressure` (and, when published, `contextBreakdown`) value
|
|
184
|
+
* for the session on screen.
|
|
121
185
|
*
|
|
122
186
|
* Effectively single-current, mirroring {@link ActivityStore}: binding a
|
|
123
187
|
* session names the one the UI shows, and every other id is dropped — the
|
|
@@ -131,6 +195,10 @@ export declare function resolveContextOccupancy(projected: ContextPressureView |
|
|
|
131
195
|
*/
|
|
132
196
|
export declare class ContextOccupancyStore implements ContextPressureSource {
|
|
133
197
|
private readonly values;
|
|
198
|
+
/** The same sessions' composition values — another key of the SAME meter
|
|
199
|
+
* unit, folded alongside the pressure so the bar never reads a composition
|
|
200
|
+
* from a different log position than its total. */
|
|
201
|
+
private readonly breakdowns;
|
|
134
202
|
private readonly listeners;
|
|
135
203
|
/** The session the UI is showing (the last {@link seed}); the only id kept. */
|
|
136
204
|
private currentId;
|
|
@@ -160,11 +228,14 @@ export declare class ContextOccupancyStore implements ContextPressureSource {
|
|
|
160
228
|
/**
|
|
161
229
|
* Record one value from the projection change feed.
|
|
162
230
|
* @param sessionId - Session the value belongs to.
|
|
231
|
+
* @param key - Projection key the value was published under.
|
|
163
232
|
* @param value - The published wire value.
|
|
164
233
|
*/
|
|
165
|
-
update(sessionId: string, value: unknown): void;
|
|
234
|
+
update(sessionId: string, key: ContextMeterKey, value: unknown): void;
|
|
166
235
|
/** The current value for one session, stable between updates. */
|
|
167
236
|
read(sessionId: string): ContextPressureView | undefined;
|
|
237
|
+
/** The current composition for one session, when the harness publishes it. */
|
|
238
|
+
readBreakdown(sessionId: string): ContextBreakdownView | undefined;
|
|
168
239
|
/** Subscribe to value changes; returns the unsubscribe function. */
|
|
169
240
|
subscribe(listener: () => void): () => void;
|
|
170
241
|
/**
|
|
@@ -175,6 +246,9 @@ export declare class ContextOccupancyStore implements ContextPressureSource {
|
|
|
175
246
|
noteReadFailure(error: unknown): void;
|
|
176
247
|
/** Store one already-narrowed value for the current session and emit on change. */
|
|
177
248
|
private remember;
|
|
249
|
+
/** One key's map write, with the identity-is-the-change-test rule the host's
|
|
250
|
+
* reference reuse relies on, and the emit on every real transition. */
|
|
251
|
+
private rememberIn;
|
|
178
252
|
/** Drop every id that is not the current one; emit when a value went. */
|
|
179
253
|
private pruneToCurrent;
|
|
180
254
|
private emit;
|
|
@@ -191,7 +265,9 @@ export declare class ContextOccupancyStore implements ContextPressureSource {
|
|
|
191
265
|
* The feed is event-driven and carries the whole value, so a change costs one
|
|
192
266
|
* narrow + one map write. A long resumed session (thousands of replayed events)
|
|
193
267
|
* therefore pays O(changes of this unit) and never a per-event fold; rendering
|
|
194
|
-
* pays a map lookup, never a `snapshot()`.
|
|
268
|
+
* pays a map lookup, never a `snapshot()`. Both keys of the unit ride the one
|
|
269
|
+
* feed/subscription pair: a composition change repaints the bar on the same
|
|
270
|
+
* republish an occupancy change does.
|
|
195
271
|
* @param ctx - Host context of the composition root.
|
|
196
272
|
* @param store - Store to fill.
|
|
197
273
|
*/
|
|
@@ -206,4 +282,5 @@ export declare function attachContextPressureProjection(ctx: Context, store: Con
|
|
|
206
282
|
* @returns the store the channel reads from.
|
|
207
283
|
*/
|
|
208
284
|
export declare function createContextOccupancyStore(ctx: Context): ContextOccupancyStore;
|
|
285
|
+
export {};
|
|
209
286
|
//# sourceMappingURL=context-occupancy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-occupancy.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/context-occupancy.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"context-occupancy.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/context-occupancy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAG1F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAEjE,yDAAyD;AACzD,eAAO,MAAM,+BAA+B,oBAAoB,CAAA;AAEhE;;oEAEoE;AACpE,eAAO,MAAM,gCAAgC,qBAAqB,CAAA;AAElE;;+CAE+C;AAC/C,KAAK,eAAe,GAAG,OAAO,+BAA+B,GAAG,OAAO,gCAAgC,CAAA;AAUvG;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,iGAAiG;IACjG,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,2GAA2G;IAC3G,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;IACjC,sEAAsE;IACtE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAChC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,oBAAoB;IACnC,qEAAqE;IACrE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,sEAAsE;IACtE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B;2DACuD;IACvD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAAA;IACxD;;gDAE4C;IAC5C,aAAa,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAAA;IACnE,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;CAC5C;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,SAAS,CAYrF;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,CAEvF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,GAAG,SAAS,CAYvF;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAO5G;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,mBAAmB,GAAG,SAAS,EAC1C,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,EAC5E,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,YAAY,CAAC,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9D,gBAAgB,GAAG,SAAS,CAe9B;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,qBAAsB,YAAW,qBAAqB;IACjE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;IAChE;;wDAEoD;IACpD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0C;IACrE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,+EAA+E;IAC/E,OAAO,CAAC,SAAS,CAAoB;IACrC,kFAAkF;IAClF,OAAO,CAAC,cAAc,CAAS;IAC/B,yEAAyE;IACzE,OAAO,CAAC,QAAQ,CAAoC;IACpD,gFAAgF;IAChF,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyC;gBAElD,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;IAI5C;;;;;OAKG;IACH,cAAc,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI;IAKtD;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAmB5B;;;;;OAKG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAIrE,iEAAiE;IACjE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAIxD,8EAA8E;IAC9E,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS;IAIlE,oEAAoE;IACpE,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAK3C;;;;OAIG;IACH,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAOrC,mFAAmF;IACnF,OAAO,CAAC,QAAQ;IAUhB;4EACwE;IACxE,OAAO,CAAC,UAAU;IAiBlB,yEAAyE;IACzE,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,IAAI;CAGb;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,GAAG,IAAI,CAyBhG;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,qBAAqB,CAI/E"}
|
|
@@ -31,10 +31,31 @@
|
|
|
31
31
|
* bundle and therefore no token meter; the projection key is simply not
|
|
32
32
|
* registered. The store stays empty and the channel falls back to the
|
|
33
33
|
* last-request sample it has always shown (see `resolveContextOccupancy`).
|
|
34
|
+
*
|
|
35
|
+
* The SAME unit also publishes `contextBreakdown` — the heuristic composition of
|
|
36
|
+
* that total (system prompt / request-envelope tool schemas / everything else).
|
|
37
|
+
* This module reads it on the same seam and stores it beside the occupancy,
|
|
38
|
+
* because the segmented bar draws what the context is made of while its length
|
|
39
|
+
* and readout must follow the provider-anchored total: without the composition
|
|
40
|
+
* the bar had to price its own transcript text, which systematically misses the
|
|
41
|
+
* request envelope (tool schemas) and the injected context. Absence is normal
|
|
42
|
+
* here too — a meter older than the projection publishes no composition, and the
|
|
43
|
+
* bar keeps using this app's own estimates alone.
|
|
34
44
|
* @module dsh-tui/dsh-adapter/context-occupancy
|
|
35
45
|
*/
|
|
36
46
|
/** The projection key the host token meter publishes. */
|
|
37
47
|
export const CONTEXT_PRESSURE_PROJECTION_KEY = 'contextPressure';
|
|
48
|
+
/** The composition key the SAME meter unit publishes (see
|
|
49
|
+
* {@link ContextBreakdownView}); absent on harness lines whose meter predates
|
|
50
|
+
* it, which every reader here treats as "no composition known". */
|
|
51
|
+
export const CONTEXT_BREAKDOWN_PROJECTION_KEY = 'contextBreakdown';
|
|
52
|
+
/** Narrow an arbitrary change-feed key to the two this store folds.
|
|
53
|
+
* @param key - Projection key as the feed reports it.
|
|
54
|
+
* @returns whether the key belongs to the context meter unit.
|
|
55
|
+
*/
|
|
56
|
+
function isContextMeterKey(key) {
|
|
57
|
+
return key === CONTEXT_PRESSURE_PROJECTION_KEY || key === CONTEXT_BREAKDOWN_PROJECTION_KEY;
|
|
58
|
+
}
|
|
38
59
|
function finiteNumber(value) {
|
|
39
60
|
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
40
61
|
}
|
|
@@ -78,6 +99,46 @@ export function asContextPressureView(value) {
|
|
|
78
99
|
export function contextPressureUsedTokens(view) {
|
|
79
100
|
return view.projectedTokens ?? view.pressureTokens;
|
|
80
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Narrow one `contextBreakdown` wire value: a value carrying no known field is
|
|
104
|
+
* dropped, a partially-filled one is kept so its known parts still reach the
|
|
105
|
+
* bar. Passed THROUGH (not copied) for the same identity-is-the-change-test
|
|
106
|
+
* reason as {@link asContextPressureView}.
|
|
107
|
+
* @param value - Raw projection value.
|
|
108
|
+
* @returns the value as a breakdown view, or `undefined`.
|
|
109
|
+
*/
|
|
110
|
+
export function asContextBreakdownView(value) {
|
|
111
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value))
|
|
112
|
+
return undefined;
|
|
113
|
+
const record = value;
|
|
114
|
+
const fields = ['systemTokens', 'toolsTokens', 'messageTokens'];
|
|
115
|
+
let known = false;
|
|
116
|
+
for (const field of fields) {
|
|
117
|
+
const raw = record[field];
|
|
118
|
+
if (raw === undefined)
|
|
119
|
+
continue;
|
|
120
|
+
if (finiteNumber(raw) === undefined)
|
|
121
|
+
return undefined;
|
|
122
|
+
known = true;
|
|
123
|
+
}
|
|
124
|
+
return known ? value : undefined;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Normalise the host's composition value into the port shape the footer reads,
|
|
128
|
+
* filling absent fields with 0 (a partial value must not blank the sections the
|
|
129
|
+
* host did report).
|
|
130
|
+
* @param view - The narrowed projection value, if any.
|
|
131
|
+
* @returns the composition, or `undefined` when the harness publishes none.
|
|
132
|
+
*/
|
|
133
|
+
export function resolveContextBreakdown(view) {
|
|
134
|
+
if (view === undefined)
|
|
135
|
+
return undefined;
|
|
136
|
+
return {
|
|
137
|
+
systemTokens: view.systemTokens ?? 0,
|
|
138
|
+
toolsTokens: view.toolsTokens ?? 0,
|
|
139
|
+
messageTokens: view.messageTokens ?? 0,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
81
142
|
/**
|
|
82
143
|
* Resolve the ONE occupancy reading the footer, the segmented bar, the working
|
|
83
144
|
* line's pressure prefix, the status commands and the context-low warning share.
|
|
@@ -116,7 +177,8 @@ export function resolveContextOccupancy(projected, sample, requestWindow, backen
|
|
|
116
177
|
};
|
|
117
178
|
}
|
|
118
179
|
/**
|
|
119
|
-
* The latest `contextPressure`
|
|
180
|
+
* The latest `contextPressure` (and, when published, `contextBreakdown`) value
|
|
181
|
+
* for the session on screen.
|
|
120
182
|
*
|
|
121
183
|
* Effectively single-current, mirroring {@link ActivityStore}: binding a
|
|
122
184
|
* session names the one the UI shows, and every other id is dropped — the
|
|
@@ -130,6 +192,10 @@ export function resolveContextOccupancy(projected, sample, requestWindow, backen
|
|
|
130
192
|
*/
|
|
131
193
|
export class ContextOccupancyStore {
|
|
132
194
|
values = new Map();
|
|
195
|
+
/** The same sessions' composition values — another key of the SAME meter
|
|
196
|
+
* unit, folded alongside the pressure so the bar never reads a composition
|
|
197
|
+
* from a different log position than its total. */
|
|
198
|
+
breakdowns = new Map();
|
|
133
199
|
listeners = new Set();
|
|
134
200
|
/** The session the UI is showing (the last {@link seed}); the only id kept. */
|
|
135
201
|
currentId;
|
|
@@ -171,8 +237,12 @@ export class ContextOccupancyStore {
|
|
|
171
237
|
if (registry === undefined)
|
|
172
238
|
return;
|
|
173
239
|
try {
|
|
174
|
-
|
|
175
|
-
|
|
240
|
+
// Both keys in ONE snapshot: one materialization, one consistent cut.
|
|
241
|
+
// A harness whose meter predates `contextBreakdown` simply omits it.
|
|
242
|
+
const keys = [CONTEXT_PRESSURE_PROJECTION_KEY, CONTEXT_BREAKDOWN_PROJECTION_KEY];
|
|
243
|
+
const values = registry.snapshot(session, keys).values;
|
|
244
|
+
this.remember(this.currentId, CONTEXT_PRESSURE_PROJECTION_KEY, values[CONTEXT_PRESSURE_PROJECTION_KEY]);
|
|
245
|
+
this.remember(this.currentId, CONTEXT_BREAKDOWN_PROJECTION_KEY, values[CONTEXT_BREAKDOWN_PROJECTION_KEY]);
|
|
176
246
|
}
|
|
177
247
|
catch (error) {
|
|
178
248
|
this.noteReadFailure(error);
|
|
@@ -181,15 +251,20 @@ export class ContextOccupancyStore {
|
|
|
181
251
|
/**
|
|
182
252
|
* Record one value from the projection change feed.
|
|
183
253
|
* @param sessionId - Session the value belongs to.
|
|
254
|
+
* @param key - Projection key the value was published under.
|
|
184
255
|
* @param value - The published wire value.
|
|
185
256
|
*/
|
|
186
|
-
update(sessionId, value) {
|
|
187
|
-
this.remember(sessionId,
|
|
257
|
+
update(sessionId, key, value) {
|
|
258
|
+
this.remember(sessionId, key, value);
|
|
188
259
|
}
|
|
189
260
|
/** The current value for one session, stable between updates. */
|
|
190
261
|
read(sessionId) {
|
|
191
262
|
return this.values.get(sessionId);
|
|
192
263
|
}
|
|
264
|
+
/** The current composition for one session, when the harness publishes it. */
|
|
265
|
+
readBreakdown(sessionId) {
|
|
266
|
+
return this.breakdowns.get(sessionId);
|
|
267
|
+
}
|
|
193
268
|
/** Subscribe to value changes; returns the unsubscribe function. */
|
|
194
269
|
subscribe(listener) {
|
|
195
270
|
this.listeners.add(listener);
|
|
@@ -208,14 +283,25 @@ export class ContextOccupancyStore {
|
|
|
208
283
|
this.warn?.(`dsh-tui: context-pressure projection read failed: ${detail}`);
|
|
209
284
|
}
|
|
210
285
|
/** Store one already-narrowed value for the current session and emit on change. */
|
|
211
|
-
remember(sessionId,
|
|
286
|
+
remember(sessionId, key, value) {
|
|
287
|
+
// One key, one table: a key outside this union cannot reach here (see
|
|
288
|
+
// `isContextMeterKey`), so neither table can be written by a typo.
|
|
289
|
+
if (key === CONTEXT_BREAKDOWN_PROJECTION_KEY) {
|
|
290
|
+
this.rememberIn(this.breakdowns, sessionId, asContextBreakdownView(value));
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
this.rememberIn(this.values, sessionId, asContextPressureView(value));
|
|
294
|
+
}
|
|
295
|
+
/** One key's map write, with the identity-is-the-change-test rule the host's
|
|
296
|
+
* reference reuse relies on, and the emit on every real transition. */
|
|
297
|
+
rememberIn(map, sessionId, view) {
|
|
212
298
|
if (this.currentId !== undefined && sessionId !== this.currentId)
|
|
213
299
|
return;
|
|
214
|
-
const previous =
|
|
300
|
+
const previous = map.get(sessionId);
|
|
215
301
|
if (view === undefined) {
|
|
216
302
|
if (previous === undefined)
|
|
217
303
|
return;
|
|
218
|
-
|
|
304
|
+
map.delete(sessionId);
|
|
219
305
|
this.emit();
|
|
220
306
|
return;
|
|
221
307
|
}
|
|
@@ -224,7 +310,7 @@ export class ContextOccupancyStore {
|
|
|
224
310
|
// whole change test.
|
|
225
311
|
if (previous === view)
|
|
226
312
|
return;
|
|
227
|
-
|
|
313
|
+
map.set(sessionId, view);
|
|
228
314
|
this.emit();
|
|
229
315
|
}
|
|
230
316
|
/** Drop every id that is not the current one; emit when a value went. */
|
|
@@ -232,11 +318,13 @@ export class ContextOccupancyStore {
|
|
|
232
318
|
if (this.currentId === undefined)
|
|
233
319
|
return;
|
|
234
320
|
let removed = false;
|
|
235
|
-
for (const
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
321
|
+
for (const map of [this.values, this.breakdowns]) {
|
|
322
|
+
for (const id of [...map.keys()]) {
|
|
323
|
+
if (id === this.currentId)
|
|
324
|
+
continue;
|
|
325
|
+
map.delete(id);
|
|
326
|
+
removed = true;
|
|
327
|
+
}
|
|
240
328
|
}
|
|
241
329
|
if (removed)
|
|
242
330
|
this.emit();
|
|
@@ -258,7 +346,9 @@ export class ContextOccupancyStore {
|
|
|
258
346
|
* The feed is event-driven and carries the whole value, so a change costs one
|
|
259
347
|
* narrow + one map write. A long resumed session (thousands of replayed events)
|
|
260
348
|
* therefore pays O(changes of this unit) and never a per-event fold; rendering
|
|
261
|
-
* pays a map lookup, never a `snapshot()`.
|
|
349
|
+
* pays a map lookup, never a `snapshot()`. Both keys of the unit ride the one
|
|
350
|
+
* feed/subscription pair: a composition change repaints the bar on the same
|
|
351
|
+
* republish an occupancy change does.
|
|
262
352
|
* @param ctx - Host context of the composition root.
|
|
263
353
|
* @param store - Store to fill.
|
|
264
354
|
*/
|
|
@@ -271,9 +361,10 @@ export function attachContextPressureProjection(ctx, store) {
|
|
|
271
361
|
let offFeed;
|
|
272
362
|
try {
|
|
273
363
|
offFeed = registry.onChanged((session, key, value) => {
|
|
274
|
-
|
|
364
|
+
// Two keys of one unit: the total (occupancy) and the composition.
|
|
365
|
+
if (!isContextMeterKey(key))
|
|
275
366
|
return;
|
|
276
|
-
store.update(String(session.id), value);
|
|
367
|
+
store.update(String(session.id), key, value);
|
|
277
368
|
});
|
|
278
369
|
}
|
|
279
370
|
catch (error) {
|
|
@@ -24,7 +24,7 @@ export declare const UPSTREAM_VALIDATED_VERSIONS: readonly ["0.1.0-rc.6", "0.1.0
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const UPSTREAM_FRAMEWORK_MAJORS: Record<string, number>;
|
|
26
26
|
/** Official packages the adapter consumes at runtime or as types. */
|
|
27
|
-
export declare const UPSTREAM_BLESSED_PACKAGES: readonly ["@deepseek-ai/cordis", "@deepseek-ai/schemastery", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-preset-registry", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-ptc-runtime-node", "@deepseek-ai/dsh-commands", "@deepseek-ai/dsh-cordis-host-runner", "@deepseek-ai/dsh-deepseek-account", "@deepseek-ai/dsh-host-webserver", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-pi-ai", "@deepseek-ai/dsh-persona", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-storage", "@deepseek-ai/dsh-storage-domain", "@deepseek-ai/dsh-storage-json", "@deepseek-ai/dsh-workspace", "@deepseek-ai/dsh-web-app", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-terminal", "@deepseek-ai/dsh-terminal-bash", "@deepseek-ai/dsh-tool-ask-user", "@deepseek-ai/dsh-tool-bash-persistent", "@deepseek-ai/dsh-tool-cordis", "@deepseek-ai/dsh-tool-subagent", "@deepseek-ai/dsh-user-approval", "@deepseek-ai/dsh-user-questions"];
|
|
27
|
+
export declare const UPSTREAM_BLESSED_PACKAGES: readonly ["@deepseek-ai/cordis", "@deepseek-ai/schemastery", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-preset-registry", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-ptc-runtime-node", "@deepseek-ai/dsh-commands", "@deepseek-ai/dsh-cordis-host-runner", "@deepseek-ai/dsh-deepseek-account", "@deepseek-ai/dsh-host-webserver", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-pi-ai", "@deepseek-ai/dsh-persona", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-storage", "@deepseek-ai/dsh-storage-domain", "@deepseek-ai/dsh-storage-json", "@deepseek-ai/dsh-workspace", "@deepseek-ai/dsh-web-app", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-terminal", "@deepseek-ai/dsh-terminal-bash", "@deepseek-ai/dsh-tool-ask-user", "@deepseek-ai/dsh-tool-bash-persistent", "@deepseek-ai/dsh-tool-cordis", "@deepseek-ai/dsh-tool-subagent", "@deepseek-ai/dsh-user-approval", "@deepseek-ai/dsh-user-questions", "@deepseek-ai/dsh-app-boot", "@deepseek-ai/dsh-cmdline", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-http-proxy", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-plugin-manager"];
|
|
28
28
|
export interface UpstreamDriftEntry {
|
|
29
29
|
package: string;
|
|
30
30
|
installed: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"AAmBA,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,2BAA2B,2QAkB9B,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG5D,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,uuCAwC5B,CAAA;AAEV,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB;AAoBD,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;AAE/D,4FAA4F;AAC5F,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,CAAC,CAAA;AAEvG,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,oBAAoB,GAAG,SAAS,CAKlG;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAQxF;AAkBD,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,QAA6D,CAAA;AAYlG,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAqB9E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAE9F;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,SAAS,CAQ3D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAKnF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,MAAM,EAAE,CAQV;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,kBAAkB,EAAE,CAuBtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEtE,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,iBAAiB,CAAA;IACvB,sFAAsF;IACtF,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,oBAAoB,GAAG,SAAS,CA0BlC"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { readFileSync } from 'node:fs';
|
|
17
17
|
import { fileURLToPath } from 'node:url';
|
|
18
|
+
import { ADAPTER_TYPE_PACKAGES, HOST_TYPE_PACKAGES } from './host-contract.js';
|
|
18
19
|
/** Primary validated upstream line (newest). */
|
|
19
20
|
export const UPSTREAM_VALIDATED_VERSION = '0.2.0-rc.2';
|
|
20
21
|
/**
|
|
@@ -96,6 +97,12 @@ export const UPSTREAM_BLESSED_PACKAGES = [
|
|
|
96
97
|
'@deepseek-ai/dsh-tool-subagent',
|
|
97
98
|
'@deepseek-ai/dsh-user-approval',
|
|
98
99
|
'@deepseek-ai/dsh-user-questions',
|
|
100
|
+
// The packages the standalone entry's host boot takes types from
|
|
101
|
+
// (./host-contract.ts; loaded from the host by realpath).
|
|
102
|
+
...HOST_TYPE_PACKAGES,
|
|
103
|
+
// The packages the adapter takes types from for host services it reaches
|
|
104
|
+
// through `ctx` (./host-contract.ts; the host CLI supplies them).
|
|
105
|
+
...ADAPTER_TYPE_PACKAGES,
|
|
99
106
|
];
|
|
100
107
|
// These capabilities are loaded dynamically and did not exist on every
|
|
101
108
|
// supported host line. Their absence is valid at runtime, not in the CI tree.
|
|
@@ -105,6 +112,14 @@ const OPTIONAL_RUNTIME_PACKAGES = new Set([
|
|
|
105
112
|
'@deepseek-ai/dsh-deepseek-account',
|
|
106
113
|
'@deepseek-ai/dsh-host-webserver',
|
|
107
114
|
'@deepseek-ai/dsh-web-app',
|
|
115
|
+
// Never resolved from this package at run time: the standalone entry loads
|
|
116
|
+
// them from the installed dsh by realpath (./host-dsh.ts), and a profile
|
|
117
|
+
// has no copy of them (peers are not auto-installed there).
|
|
118
|
+
...HOST_TYPE_PACKAGES,
|
|
119
|
+
// Same reason, a different route: these are reached through `ctx` inside a
|
|
120
|
+
// booted profile, where the package the dsh CLI ships resolves through the
|
|
121
|
+
// loader. The consumer answers with a degradation notice when it is absent.
|
|
122
|
+
...ADAPTER_TYPE_PACKAGES,
|
|
108
123
|
]);
|
|
109
124
|
/** Parse an upstream prerelease version; undefined when unparseable. */
|
|
110
125
|
export function parseUpstreamVersion(version) {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hand-off between this package's entry and the runtime it mounts. On the
|
|
3
|
+
* DSH kernel the slot is also published for the profile's `dsh-tui` row in the
|
|
4
|
+
* same Cordis root: the row then runs only the DSH side through `attachDsh`
|
|
5
|
+
* (without a published slot it takes its usual path). On `globalThis` +
|
|
6
|
+
* `Symbol.for` so a row loaded from another copy of this package still meets
|
|
7
|
+
* the entry. Other kernels keep it private: the entry composes the light profile.
|
|
8
|
+
*/
|
|
9
|
+
/** Hooks are filled by the entry's runtime. */
|
|
10
|
+
export interface EntrySlot {
|
|
11
|
+
/** The DSH kernel: the screen waits for the row's `attachDsh`. */
|
|
12
|
+
readonly dsh: boolean;
|
|
13
|
+
/** Set by the row as soon as it applies, so the entry can tell whether a
|
|
14
|
+
* `dsh-tui` row exists once the composition settled. */
|
|
15
|
+
rowSeen: boolean;
|
|
16
|
+
/** The DSH side. The row calls it once, after the Loader settled; it never
|
|
17
|
+
* throws (a failure lands in the mounted screen). */
|
|
18
|
+
attachDsh?: (ctx: unknown, runtimeConfig: unknown, configOwner: unknown) => Promise<void>;
|
|
19
|
+
/** DSH: the composition failed or had no `dsh-tui` row, the startup session
|
|
20
|
+
* will never come. `logPath` is the saved startup report, if any. */
|
|
21
|
+
composeFailed?: (error: unknown, logPath?: string) => void;
|
|
22
|
+
/** The composition settled (DSH: with a `dsh-tui` row, so a startup open
|
|
23
|
+
* that failed meanwhile is that open's failure); re-reads mount-time
|
|
24
|
+
* resolutions of services composed after the mount. */
|
|
25
|
+
composeSucceeded?: () => void;
|
|
26
|
+
/** Resolves once the screen's first frame reached the terminal; awaited
|
|
27
|
+
* before the composition's synchronous stretch. */
|
|
28
|
+
firstFrameFlushed?: () => Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
/** The entry's slot, published for the `dsh-tui` row on the DSH kernel. */
|
|
31
|
+
export declare function createEntrySlot(dsh: boolean): EntrySlot;
|
|
32
|
+
/** The published slot, if this process's entry mounted the screen. */
|
|
33
|
+
export declare function peekEntrySlot(): EntrySlot | undefined;
|
|
34
|
+
/** Take the DSH-side hook once: a second row (or a recompose) finds none. */
|
|
35
|
+
export declare function takeEntryAttach(): EntrySlot['attachDsh'];
|
|
36
|
+
//# sourceMappingURL=entry-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-slot.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/entry-slot.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+CAA+C;AAC/C,MAAM,WAAW,SAAS;IACxB,kEAAkE;IAClE,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB;6DACyD;IACzD,OAAO,EAAE,OAAO,CAAA;IAChB;0DACsD;IACtD,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACzF;0EACsE;IACtE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D;;4DAEwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC7B;wDACoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACxC;AAMD,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CAIvD;AAED,sEAAsE;AACtE,wBAAgB,aAAa,IAAI,SAAS,GAAG,SAAS,CAErD;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,IAAI,SAAS,CAAC,WAAW,CAAC,CAKxD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hand-off between this package's entry and the runtime it mounts. On the
|
|
3
|
+
* DSH kernel the slot is also published for the profile's `dsh-tui` row in the
|
|
4
|
+
* same Cordis root: the row then runs only the DSH side through `attachDsh`
|
|
5
|
+
* (without a published slot it takes its usual path). On `globalThis` +
|
|
6
|
+
* `Symbol.for` so a row loaded from another copy of this package still meets
|
|
7
|
+
* the entry. Other kernels keep it private: the entry composes the light profile.
|
|
8
|
+
*/
|
|
9
|
+
const ENTRY_SLOT_KEY = Symbol.for('@deepseek-harness-tui/dsh-tui:host-entry');
|
|
10
|
+
/** The entry's slot, published for the `dsh-tui` row on the DSH kernel. */
|
|
11
|
+
export function createEntrySlot(dsh) {
|
|
12
|
+
const slot = { dsh, rowSeen: false };
|
|
13
|
+
if (dsh)
|
|
14
|
+
globalThis[ENTRY_SLOT_KEY] = slot;
|
|
15
|
+
return slot;
|
|
16
|
+
}
|
|
17
|
+
/** The published slot, if this process's entry mounted the screen. */
|
|
18
|
+
export function peekEntrySlot() {
|
|
19
|
+
return globalThis[ENTRY_SLOT_KEY];
|
|
20
|
+
}
|
|
21
|
+
/** Take the DSH-side hook once: a second row (or a recompose) finds none. */
|
|
22
|
+
export function takeEntryAttach() {
|
|
23
|
+
const slot = peekEntrySlot();
|
|
24
|
+
const attach = slot?.attachDsh;
|
|
25
|
+
if (slot !== undefined)
|
|
26
|
+
slot.attachDsh = undefined;
|
|
27
|
+
return attach;
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { AgentHandle, CreateAgentOptions } from '@deepseek-ai/dsh-agent';
|
|
3
|
+
import type { Session, SessionEvent } from '@deepseek-ai/dsh-session';
|
|
4
|
+
type AgentCreator = {
|
|
5
|
+
create(options: CreateAgentOptions): Promise<AgentHandle>;
|
|
6
|
+
};
|
|
7
|
+
/** Policy facts held in memory until the session has further activity. */
|
|
8
|
+
export declare const INITIAL_POLICY_EVENTS: ReadonlySet<string>;
|
|
9
|
+
/** Source-less legacy messages and explicit user messages count as human input. */
|
|
10
|
+
export declare function isHumanSource(source: unknown): boolean;
|
|
11
|
+
/** Policy commands also emit command envelopes and nonhuman inbox notices. */
|
|
12
|
+
export declare function isPolicyPlaneActivity(event: SessionEvent): boolean;
|
|
13
|
+
/** Initialization-only fresh session with no persistence requested yet. */
|
|
14
|
+
export declare function isUnstoredFreshSession(session: Session | undefined): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Startup and `/new` use an unseeded DSH session. Permission initialization
|
|
17
|
+
* alone must not publish a stored conversation; all facts still belong to
|
|
18
|
+
* the real Session, and the official JSONL writer owns their eventual storage.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createFreshAgent(ctx: Context, agents: AgentCreator, options: CreateAgentOptions): Promise<AgentHandle>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=fresh-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fresh-agent.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/fresh-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAc,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACzF,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAiB,MAAM,0BAA0B,CAAA;AAkBpF,KAAK,YAAY,GAAG;IAAE,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;CAAE,CAAA;AAyCjF,0EAA0E;AAC1E,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAAkF,CAAA;AAKxI,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAItD;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAWlE;AAID,2EAA2E;AAC3E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAE5E;AAuFD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CAsB5H"}
|