@deepseek-harness-tui/dsh-tui 0.10.0 → 0.10.2
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 +5 -2
- package/bin/dsh-tui.js +99 -33
- package/cordis.patch.yml +25 -5
- package/lib/types/adapter/channel/actions.d.ts +17 -0
- package/lib/types/adapter/channel/actions.d.ts.map +1 -0
- package/lib/types/adapter/channel/actions.js +28 -0
- package/lib/types/adapter/channel/consumer.d.ts +34 -0
- package/lib/types/adapter/channel/consumer.d.ts.map +1 -0
- package/lib/types/adapter/channel/consumer.js +87 -0
- package/lib/types/adapter/channel/features.d.ts +12 -0
- package/lib/types/adapter/channel/features.d.ts.map +1 -0
- package/lib/types/adapter/channel/features.js +41 -0
- package/lib/types/adapter/channel/host-registry.d.ts +40 -0
- package/lib/types/adapter/channel/host-registry.d.ts.map +1 -0
- package/lib/types/adapter/channel/host-registry.js +120 -0
- package/lib/types/adapter/channel/index.d.ts +22 -0
- package/lib/types/adapter/channel/index.d.ts.map +1 -0
- package/lib/types/adapter/channel/index.js +21 -0
- package/lib/types/adapter/channel/internal-token.d.ts +12 -0
- package/lib/types/adapter/channel/internal-token.d.ts.map +1 -0
- package/lib/types/adapter/channel/internal-token.js +11 -0
- package/lib/types/adapter/channel/plugins.d.ts +17 -0
- package/lib/types/adapter/channel/plugins.d.ts.map +1 -0
- package/lib/types/adapter/channel/plugins.js +47 -0
- package/lib/types/adapter/channel/projection.d.ts +15 -0
- package/lib/types/adapter/channel/projection.d.ts.map +1 -0
- package/lib/types/adapter/channel/projection.js +59 -0
- package/lib/types/adapter/channel/provider.d.ts +52 -0
- package/lib/types/adapter/channel/provider.d.ts.map +1 -0
- package/lib/types/adapter/channel/provider.js +231 -0
- package/lib/types/adapter/channel/read-view.d.ts +4 -0
- package/lib/types/adapter/channel/read-view.d.ts.map +1 -0
- package/lib/types/adapter/channel/read-view.js +132 -0
- package/lib/types/adapter/channel/session-projection.d.ts +56 -0
- package/lib/types/adapter/channel/session-projection.d.ts.map +1 -0
- package/lib/types/adapter/channel/session-projection.js +247 -0
- package/lib/types/adapter/channel/state.d.ts +11 -0
- package/lib/types/adapter/channel/state.d.ts.map +1 -0
- package/lib/types/adapter/channel/state.js +55 -0
- package/lib/types/adapter/channel/transcript.d.ts +15 -0
- package/lib/types/adapter/channel/transcript.d.ts.map +1 -0
- package/lib/types/adapter/channel/transcript.js +22 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +106 -0
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -0
- package/lib/types/adapter/channel/ui-policy.js +166 -0
- package/lib/types/adapter/channel/ui.d.ts +16 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -0
- package/lib/types/adapter/channel/ui.js +168 -0
- package/lib/types/adapter/index.d.ts +20 -0
- package/lib/types/adapter/index.d.ts.map +1 -0
- package/lib/types/adapter/index.js +19 -0
- package/lib/types/adapter/kernel/contract-catalog.d.ts +12 -0
- package/lib/types/adapter/kernel/contract-catalog.d.ts.map +1 -0
- package/lib/types/adapter/kernel/contract-catalog.js +11 -0
- package/lib/types/adapter/kernel/diagnostics.d.ts +18 -0
- package/lib/types/adapter/kernel/diagnostics.d.ts.map +1 -0
- package/lib/types/adapter/kernel/diagnostics.js +16 -0
- package/lib/types/adapter/kernel/driver-types.d.ts +16 -0
- package/lib/types/adapter/kernel/driver-types.d.ts.map +1 -0
- package/lib/types/adapter/kernel/driver-types.js +8 -0
- package/lib/types/adapter/kernel/host-facade.d.ts +65 -0
- package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -0
- package/lib/types/adapter/kernel/host-facade.js +215 -0
- package/lib/types/adapter/kernel/host-probe-access.d.ts +71 -0
- package/lib/types/adapter/kernel/host-probe-access.d.ts.map +1 -0
- package/lib/types/adapter/kernel/host-probe-access.js +121 -0
- package/lib/types/adapter/kernel/index.d.ts +20 -0
- package/lib/types/adapter/kernel/index.d.ts.map +1 -0
- package/lib/types/adapter/kernel/index.js +19 -0
- package/lib/types/adapter/kernel/kernel-runtime.d.ts +138 -0
- package/lib/types/adapter/kernel/kernel-runtime.d.ts.map +1 -0
- package/lib/types/adapter/kernel/kernel-runtime.js +572 -0
- package/lib/types/adapter/kernel/ledger.d.ts +55 -0
- package/lib/types/adapter/kernel/ledger.d.ts.map +1 -0
- package/lib/types/adapter/kernel/ledger.js +33 -0
- package/lib/types/adapter/kernel/legacy-facade.d.ts +22 -0
- package/lib/types/adapter/kernel/legacy-facade.d.ts.map +1 -0
- package/lib/types/adapter/kernel/legacy-facade.js +34 -0
- package/lib/types/adapter/kernel/lifecycle.d.ts +38 -0
- package/lib/types/adapter/kernel/lifecycle.d.ts.map +1 -0
- package/lib/types/adapter/kernel/lifecycle.js +53 -0
- package/lib/types/adapter/kernel/replay-isolation.d.ts +27 -0
- package/lib/types/adapter/kernel/replay-isolation.d.ts.map +1 -0
- package/lib/types/adapter/kernel/replay-isolation.js +45 -0
- package/lib/types/adapter/kernel/replay.d.ts +132 -0
- package/lib/types/adapter/kernel/replay.d.ts.map +1 -0
- package/lib/types/adapter/kernel/replay.js +425 -0
- package/lib/types/adapter/kernel/runtime-context.d.ts +15 -0
- package/lib/types/adapter/kernel/runtime-context.d.ts.map +1 -0
- package/lib/types/adapter/kernel/runtime-context.js +24 -0
- package/lib/types/adapter/kernel/runtime.d.ts +70 -0
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -0
- package/lib/types/adapter/kernel/runtime.js +325 -0
- package/lib/types/adapter/kernel/slices/channel.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/channel.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/channel.js +8 -0
- package/lib/types/adapter/kernel/slices/decisions.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/decisions.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/decisions.js +10 -0
- package/lib/types/adapter/kernel/slices/extensions.d.ts +8 -0
- package/lib/types/adapter/kernel/slices/extensions.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/extensions.js +43 -0
- package/lib/types/adapter/kernel/slices/index.d.ts +19 -0
- package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/index.js +36 -0
- package/lib/types/adapter/kernel/slices/presentation.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/presentation.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/presentation.js +14 -0
- package/lib/types/adapter/kernel/slices/scenes.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/scenes.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/scenes.js +14 -0
- package/lib/types/adapter/kernel/slices/settings.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/settings.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/settings.js +12 -0
- package/lib/types/adapter/kernel/slices/types.d.ts +20 -0
- package/lib/types/adapter/kernel/slices/types.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/types.js +12 -0
- package/lib/types/adapter/kernel/slices/workspace.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/workspace.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/workspace.js +15 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +90 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-catalog.js +2 -0
- package/lib/types/adapter/ports/channel-display.d.ts +90 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-display.js +2 -0
- package/lib/types/adapter/ports/channel-session.d.ts +229 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-session.js +2 -0
- package/lib/types/adapter/ports/channel-settings.d.ts +273 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-settings.js +1 -0
- package/lib/types/adapter/ports/channel-ui.d.ts +569 -0
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-ui.js +1 -0
- package/lib/types/adapter/ports/channel-view.d.ts +609 -0
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-view.js +2 -0
- package/lib/types/adapter/ports/channel-workspace.d.ts +45 -0
- package/lib/types/adapter/ports/channel-workspace.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-workspace.js +2 -0
- package/lib/types/adapter/ports/channel.d.ts +145 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel.js +22 -0
- package/lib/types/adapter/ports/decisions.d.ts +18 -0
- package/lib/types/adapter/ports/decisions.d.ts.map +1 -0
- package/lib/types/adapter/ports/decisions.js +9 -0
- package/lib/types/adapter/ports/descriptor.d.ts +25 -0
- package/lib/types/adapter/ports/descriptor.d.ts.map +1 -0
- package/lib/types/adapter/ports/descriptor.js +11 -0
- package/lib/types/adapter/ports/extensions.d.ts +86 -0
- package/lib/types/adapter/ports/extensions.d.ts.map +1 -0
- package/lib/types/adapter/ports/extensions.js +9 -0
- package/lib/types/adapter/ports/index.d.ts +23 -0
- package/lib/types/adapter/ports/index.d.ts.map +1 -0
- package/lib/types/adapter/ports/index.js +14 -0
- package/lib/types/adapter/ports/owner.d.ts +19 -0
- package/lib/types/adapter/ports/owner.d.ts.map +1 -0
- package/lib/types/adapter/ports/owner.js +9 -0
- package/lib/types/adapter/ports/presentation.d.ts +81 -0
- package/lib/types/adapter/ports/presentation.d.ts.map +1 -0
- package/lib/types/adapter/ports/presentation.js +10 -0
- package/lib/types/adapter/ports/scenes.d.ts +24 -0
- package/lib/types/adapter/ports/scenes.d.ts.map +1 -0
- package/lib/types/adapter/ports/scenes.js +8 -0
- package/lib/types/adapter/ports/settings.d.ts +44 -0
- package/lib/types/adapter/ports/settings.d.ts.map +1 -0
- package/lib/types/adapter/ports/settings.js +9 -0
- package/lib/types/adapter/ports/workspace.d.ts +60 -0
- package/lib/types/adapter/ports/workspace.d.ts.map +1 -0
- package/lib/types/adapter/ports/workspace.js +8 -0
- package/lib/types/adapter/spec/index.d.ts +11 -0
- package/lib/types/adapter/spec/index.d.ts.map +1 -0
- package/lib/types/adapter/spec/index.js +10 -0
- package/lib/types/adapter/spec/profile.d.ts +10 -0
- package/lib/types/adapter/spec/profile.d.ts.map +1 -0
- package/lib/types/adapter/spec/profile.js +9 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts +60 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -0
- package/lib/types/adapter/spec/protocol-constants.js +129 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts +18 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -0
- package/lib/types/adapter/spec/tui-contributions.js +19 -0
- package/lib/types/adapter/standard/admission.d.ts +11 -0
- package/lib/types/adapter/standard/admission.d.ts.map +1 -0
- package/lib/types/adapter/standard/admission.js +10 -0
- package/lib/types/adapter/standard/descriptor.d.ts +74 -0
- package/lib/types/adapter/standard/descriptor.d.ts.map +1 -0
- package/lib/types/adapter/standard/descriptor.js +356 -0
- package/lib/types/{dsh-adapter → adapter/standard}/grants.d.ts +8 -3
- package/lib/types/adapter/standard/grants.d.ts.map +1 -0
- package/lib/types/{dsh-adapter → adapter/standard}/grants.js +14 -8
- package/lib/types/adapter/standard/index.d.ts +25 -0
- package/lib/types/adapter/standard/index.d.ts.map +1 -0
- package/lib/types/adapter/standard/index.js +24 -0
- package/lib/types/adapter/standard/negotiate.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/permission-scope.d.ts +3 -8
- package/lib/types/adapter/standard/permission-scope.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/permission-scope.js +4 -26
- package/lib/types/adapter/standard/protocols.d.ts +12 -0
- package/lib/types/adapter/standard/protocols.d.ts.map +1 -0
- package/lib/types/adapter/standard/protocols.js +11 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/registry.js +3 -15
- package/lib/types/adapter/standard/schema-check.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/schema-check.js +4 -2
- package/lib/types/adapter/standard/tui-extension.d.ts +25 -0
- package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -0
- package/lib/types/adapter/standard/tui-extension.js +45 -0
- package/lib/types/{plugin-spec → adapter/standard}/types.d.ts +3 -9
- package/lib/types/adapter/standard/types.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/validate.d.ts +3 -3
- package/lib/types/adapter/standard/validate.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/validate.js +14 -13
- package/lib/types/adapter/upstream/channel-driver.d.ts +22 -0
- package/lib/types/adapter/upstream/channel-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/channel-driver.js +424 -0
- package/lib/types/adapter/upstream/decisions-driver.d.ts +15 -0
- package/lib/types/adapter/upstream/decisions-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/decisions-driver.js +141 -0
- package/lib/types/adapter/upstream/detection.d.ts +26 -0
- package/lib/types/adapter/upstream/detection.d.ts.map +1 -0
- package/lib/types/adapter/upstream/detection.js +9 -0
- package/lib/types/adapter/upstream/driver.d.ts +50 -0
- package/lib/types/adapter/upstream/driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/driver.js +8 -0
- package/lib/types/adapter/upstream/extensions-driver.d.ts +24 -0
- package/lib/types/adapter/upstream/extensions-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/extensions-driver.js +697 -0
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts +45 -0
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/host-descriptor-driver.js +606 -0
- package/lib/types/adapter/upstream/index.d.ts +18 -0
- package/lib/types/adapter/upstream/index.d.ts.map +1 -0
- package/lib/types/adapter/upstream/index.js +15 -0
- package/lib/types/adapter/upstream/presentation-driver.d.ts +17 -0
- package/lib/types/adapter/upstream/presentation-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/presentation-driver.js +129 -0
- package/lib/types/adapter/upstream/scenes-driver.d.ts +18 -0
- package/lib/types/adapter/upstream/scenes-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/scenes-driver.js +170 -0
- package/lib/types/adapter/upstream/settings-driver.d.ts +20 -0
- package/lib/types/adapter/upstream/settings-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/settings-driver.js +173 -0
- package/lib/types/adapter/upstream/workspace-driver.d.ts +19 -0
- package/lib/types/adapter/upstream/workspace-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/workspace-driver.js +190 -0
- package/lib/types/api.d.ts +1 -1
- package/lib/types/api.d.ts.map +1 -1
- package/lib/types/commands.d.ts +2 -41
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +1 -1
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +8 -1
- package/lib/types/components/GoalTodoPanel.d.ts +2 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.js +7 -5
- package/lib/types/components/Markdown.d.ts +2 -2
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +28 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +46 -17
- package/lib/types/components/ModelPicker.d.ts +1 -1
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +8 -4
- package/lib/types/components/OverlayAbove.d.ts +22 -1
- package/lib/types/components/OverlayAbove.d.ts.map +1 -1
- package/lib/types/components/OverlayAbove.js +74 -5
- package/lib/types/components/PromptInput.d.ts +2 -1
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +14 -6
- package/lib/types/components/SkillsPicker.d.ts.map +1 -1
- package/lib/types/components/SkillsPicker.js +6 -4
- package/lib/types/components/Spinner/spinnerMode.d.ts +1 -5
- package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +61 -9
- package/lib/types/components/design-system/ThemedBox.d.ts +4 -2
- package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemedBox.js +2 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +69 -25
- package/lib/types/components/overlayBudget.d.ts +39 -0
- package/lib/types/components/overlayBudget.d.ts.map +1 -0
- package/lib/types/components/overlayBudget.js +43 -0
- package/lib/types/deepseekBalance.d.ts +2 -36
- package/lib/types/deepseekBalance.d.ts.map +1 -1
- package/lib/types/deepseekBalance.js +0 -14
- package/lib/types/deepseekPricing.d.ts +2 -1
- package/lib/types/deepseekPricing.d.ts.map +1 -1
- package/lib/types/deepseekPricing.js +8 -1
- package/lib/types/dsh-adapter/approvals.d.ts +11 -1
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +32 -12
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/action-readiness.js +83 -0
- package/lib/types/dsh-adapter/channel/activity.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/activity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/activity.js +113 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +64 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +295 -0
- package/lib/types/dsh-adapter/channel/background-action.d.ts +41 -0
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/background-action.js +86 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +65 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/binding-events.js +169 -0
- package/lib/types/dsh-adapter/channel/binding.d.ts +41 -0
- package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/binding.js +227 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +29 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/command-completions.js +94 -0
- package/lib/types/dsh-adapter/channel/commands.d.ts +8 -0
- package/lib/types/dsh-adapter/channel/commands.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/commands.js +9 -0
- package/lib/types/dsh-adapter/channel/compaction.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/compaction.js +116 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +57 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/composer-images.js +217 -0
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts +15 -0
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/composer-mentions.js +200 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +26 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +30 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/decisions.js +90 -0
- package/lib/types/dsh-adapter/channel/emitter.d.ts +10 -0
- package/lib/types/dsh-adapter/channel/emitter.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/emitter.js +71 -0
- package/lib/types/dsh-adapter/channel/external-commands.d.ts +31 -0
- package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/external-commands.js +187 -0
- package/lib/types/dsh-adapter/channel/file-actions.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/file-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/file-actions.js +45 -0
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/input-actions.js +135 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +37 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/input-delivery.js +305 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +28 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/job-projection.js +150 -0
- package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/lifetime-resources.js +33 -0
- package/lib/types/dsh-adapter/channel/loaded-context.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/loaded-context.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/loaded-context.js +62 -0
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +70 -0
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/local-actions.js +108 -0
- package/lib/types/dsh-adapter/channel/mentions.d.ts +29 -0
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mentions.js +235 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +30 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-actions.js +247 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +35 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +199 -0
- package/lib/types/dsh-adapter/channel/mode-permission.d.ts +58 -0
- package/lib/types/dsh-adapter/channel/mode-permission.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-permission.js +240 -0
- package/lib/types/dsh-adapter/channel/mode-roster.d.ts +51 -0
- package/lib/types/dsh-adapter/channel/mode-roster.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-roster.js +119 -0
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-actions.js +275 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-switch.js +98 -0
- package/lib/types/dsh-adapter/channel/notifications.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/notifications.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/notifications.js +24 -0
- package/lib/types/dsh-adapter/channel/owner.d.ts +18 -0
- package/lib/types/dsh-adapter/channel/owner.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/owner.js +73 -0
- package/lib/types/dsh-adapter/channel/paths.d.ts +31 -0
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/paths.js +147 -0
- package/lib/types/dsh-adapter/channel/permissions.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/permissions.js +187 -0
- package/lib/types/dsh-adapter/channel/preferences.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/preferences.js +103 -0
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/projection-helpers.js +63 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/projection.js +1021 -0
- package/lib/types/dsh-adapter/channel/reports.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/reports.js +171 -0
- package/lib/types/dsh-adapter/channel/session-actions.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/session-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-actions.js +29 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-adoption.js +35 -0
- package/lib/types/dsh-adapter/channel/session-fork.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-fork.js +85 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +62 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +81 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-metadata.js +209 -0
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +11 -0
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-reset.js +44 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +56 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-resume.js +240 -0
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-rewind.js +128 -0
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +138 -0
- package/lib/types/dsh-adapter/channel/session-tree.d.ts +10 -0
- package/lib/types/dsh-adapter/channel/session-tree.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-tree.js +503 -0
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/settings-host.js +256 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +33 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.js +215 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/state.js +31 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +47 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.js +140 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +73 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/transcript.js +312 -0
- package/lib/types/dsh-adapter/channel/types.d.ts +162 -0
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/types.js +1 -0
- package/lib/types/dsh-adapter/channel/usage.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/usage.js +48 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.js +56 -0
- package/lib/types/dsh-adapter/channel-facade-actions.d.ts +25 -0
- package/lib/types/dsh-adapter/channel-facade-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel-facade-actions.js +55 -0
- package/lib/types/dsh-adapter/channel-scene-outlet.d.ts +6 -0
- package/lib/types/dsh-adapter/channel-scene-outlet.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel-scene-outlet.js +13 -0
- package/lib/types/dsh-adapter/channel-ui.d.ts +9 -0
- package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel-ui.js +128 -0
- package/lib/types/dsh-adapter/channel.d.ts +9 -1525
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +753 -8145
- package/lib/types/dsh-adapter/command-trees.d.ts +1 -0
- package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -1
- package/lib/types/dsh-adapter/command-trees.js +20 -1
- package/lib/types/dsh-adapter/compat/liveSession.d.ts +8 -4
- package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/liveSession.js +28 -3
- package/lib/types/dsh-adapter/compat/persistence.d.ts +21 -0
- package/lib/types/dsh-adapter/compat/persistence.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/persistence.js +17 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +50 -11
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +325 -36
- package/lib/types/dsh-adapter/component-identity.d.ts +1 -1
- package/lib/types/dsh-adapter/component-identity.d.ts.map +1 -1
- package/lib/types/dsh-adapter/component-identity.js +1 -1
- package/lib/types/dsh-adapter/contract.d.ts +11 -9
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +19 -12
- package/lib/types/dsh-adapter/decision-guard.d.ts +56 -12
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/decision-guard.js +134 -22
- package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/dialogs.js +13 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts +5 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +53 -15
- package/lib/types/dsh-adapter/extension-events.d.ts +2 -9
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extension-events.js +0 -20
- package/lib/types/dsh-adapter/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extensions.js +3 -2
- package/lib/types/dsh-adapter/host-grants.d.ts +23 -0
- package/lib/types/dsh-adapter/host-grants.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-grants.js +45 -0
- package/lib/types/dsh-adapter/jobs.d.ts +2 -46
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +0 -25
- package/lib/types/dsh-adapter/message-observer.d.ts +15 -2
- package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -1
- package/lib/types/dsh-adapter/message-observer.js +157 -28
- package/lib/types/dsh-adapter/plugin-host.d.ts +80 -11
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-host.js +438 -41
- package/lib/types/dsh-adapter/plugin-storage.d.ts +11 -1
- package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-storage.js +150 -11
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +75 -34
- package/lib/types/dsh-adapter/plugins-info.d.ts +2 -2
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +11 -6
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +3 -2
- package/lib/types/dsh-adapter/providerWizard.d.ts +2 -159
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.d.ts +8 -0
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +18 -0
- package/lib/types/dsh-adapter/recap.d.ts +1 -9
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -1
- package/lib/types/dsh-adapter/recap.js +0 -14
- package/lib/types/dsh-adapter/renderers.d.ts +1 -0
- package/lib/types/dsh-adapter/renderers.d.ts.map +1 -1
- package/lib/types/dsh-adapter/renderers.js +26 -1
- package/lib/types/dsh-adapter/scenes.d.ts +3 -1
- package/lib/types/dsh-adapter/scenes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/scenes.js +31 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts +14 -95
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessionTree.js +51 -36
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +40 -19
- package/lib/types/dsh-adapter/sessions/frames.js +2 -0
- package/lib/types/dsh-adapter/sessions/index.d.ts +1 -1
- package/lib/types/dsh-adapter/sessions/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/index.js +1 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts +23 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +28 -17
- package/lib/types/dsh-adapter/sessions/store.d.ts +2 -2
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +12 -11
- package/lib/types/dsh-adapter/sessions/types.d.ts +4 -128
- package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/types.js +0 -13
- package/lib/types/dsh-adapter/settings-sections.d.ts +4 -95
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +50 -13
- package/lib/types/dsh-adapter/settingsEditor.d.ts +2 -36
- package/lib/types/dsh-adapter/settingsEditor.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settingsEditor.js +0 -18
- package/lib/types/dsh-adapter/shortcuts.d.ts +5 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -1
- package/lib/types/dsh-adapter/shortcuts.js +49 -0
- package/lib/types/dsh-adapter/status.d.ts +5 -0
- package/lib/types/dsh-adapter/status.d.ts.map +1 -1
- package/lib/types/dsh-adapter/status.js +29 -0
- package/lib/types/dsh-adapter/subagents.d.ts +9 -49
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +92 -1
- package/lib/types/dsh-adapter/themes.d.ts +1 -0
- package/lib/types/dsh-adapter/themes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/themes.js +29 -0
- package/lib/types/dsh-adapter/toast.d.ts +13 -0
- package/lib/types/dsh-adapter/toast.d.ts.map +1 -1
- package/lib/types/dsh-adapter/toast.js +31 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +2 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.js +2 -1
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +37 -18
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.js +43 -5
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +2 -2
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +31 -13
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.js +71 -14
- package/lib/types/dsh-adapter/trajectory/types.d.ts +1 -1
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/transcript-images.d.ts +2 -19
- package/lib/types/dsh-adapter/transcript-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.d.ts +2 -49
- package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.js +23 -3
- package/lib/types/i18n.d.ts +19 -7
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +8 -3
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +30 -33
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +32 -64
- package/lib/types/ink/get-max-width.d.ts +7 -15
- package/lib/types/ink/get-max-width.d.ts.map +1 -1
- package/lib/types/ink/get-max-width.js +7 -20
- package/lib/types/ink/ink.d.ts +1 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +22 -3
- package/lib/types/ink/layout/node.d.ts +2 -0
- package/lib/types/ink/layout/node.d.ts.map +1 -1
- package/lib/types/ink/layout/yoga.d.ts +1 -0
- package/lib/types/ink/layout/yoga.d.ts.map +1 -1
- package/lib/types/ink/layout/yoga.js +3 -0
- package/lib/types/ink/node-cache.d.ts +11 -0
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/node-cache.js +3 -0
- package/lib/types/ink/output.d.ts +6 -1
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +55 -65
- package/lib/types/ink/render-node-to-output.d.ts +24 -1
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +195 -71
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +14 -2
- package/lib/types/ink/styles.d.ts +12 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/tabstops.d.ts +3 -2
- package/lib/types/ink/tabstops.d.ts.map +1 -1
- package/lib/types/ink/tabstops.js +5 -4
- package/lib/types/ink/wrap-text.js +2 -2
- package/lib/types/modelGroups.d.ts +1 -1
- package/lib/types/modelGroups.d.ts.map +1 -1
- package/lib/types/modelRoute.js +1 -1
- package/lib/types/native-ts/yoga-layout/index.d.ts +8 -3
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +23 -8
- package/lib/types/plugin-host.d.ts +3 -4
- package/lib/types/plugin-host.d.ts.map +1 -1
- package/lib/types/plugin-host.js +8 -6
- package/lib/types/screens/AgentView.d.ts +1 -1
- package/lib/types/screens/AgentView.d.ts.map +1 -1
- package/lib/types/screens/Chat.d.ts +3 -2
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +91 -17
- package/lib/types/screens/SessionBrowser.d.ts +1 -1
- package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
- package/lib/types/screens/SessionTree.d.ts +1 -1
- package/lib/types/screens/SessionTree.d.ts.map +1 -1
- package/lib/types/screens/Settings.d.ts +1 -1
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.d.ts +1 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +40 -1
- package/lib/types/screens/TrajectoryScene.d.ts +1 -1
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/sessionModes.d.ts +11 -15
- package/lib/types/sessionModes.d.ts.map +1 -1
- package/lib/types/sessionModes.js +11 -0
- package/lib/types/tuiDisplayPrefs.d.ts +2 -68
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +5 -1
- package/lib/types/utils/credentials.d.ts +13 -0
- package/lib/types/utils/credentials.d.ts.map +1 -0
- package/lib/types/utils/credentials.js +41 -0
- package/lib/types/utils/fileSuggestions.d.ts +2 -9
- package/lib/types/utils/fileSuggestions.d.ts.map +1 -1
- package/lib/types/utils/fold-long-lines.d.ts +38 -0
- package/lib/types/utils/fold-long-lines.d.ts.map +1 -0
- package/lib/types/utils/fold-long-lines.js +91 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/pi-ai.d.ts +1 -1
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.js +4 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.js +15 -2
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +10 -10
- package/package.json +125 -81
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/agent.cordis.yml +20 -4
- package/presets/liangshen/compaction-epoch.mjs +3 -1
- package/presets/liangshen/instruction-hint.mjs +2 -1
- package/presets/liangshen/session-events.mjs +8 -0
- package/lib/types/dsh-adapter/grants.d.ts.map +0 -1
- package/lib/types/dsh-adapter/host-descriptor.d.ts +0 -24
- package/lib/types/dsh-adapter/host-descriptor.d.ts.map +0 -1
- package/lib/types/dsh-adapter/host-descriptor.js +0 -169
- package/lib/types/dsh-adapter/plugin-test-utils.d.ts +0 -62
- package/lib/types/dsh-adapter/plugin-test-utils.d.ts.map +0 -1
- package/lib/types/dsh-adapter/plugin-test-utils.js +0 -61
- package/lib/types/plugin-spec/negotiate.d.ts.map +0 -1
- package/lib/types/plugin-spec/permission-scope.d.ts.map +0 -1
- package/lib/types/plugin-spec/registry.d.ts.map +0 -1
- package/lib/types/plugin-spec/schema-check.d.ts.map +0 -1
- package/lib/types/plugin-spec/tui-extension.d.ts +0 -16
- package/lib/types/plugin-spec/tui-extension.d.ts.map +0 -1
- package/lib/types/plugin-spec/tui-extension.js +0 -79
- package/lib/types/plugin-spec/types.d.ts.map +0 -1
- package/lib/types/plugin-spec/validate.d.ts.map +0 -1
- package/lib/types/test-utils.d.ts +0 -2
- package/lib/types/test-utils.d.ts.map +0 -1
- package/lib/types/test-utils.js +0 -8
- /package/lib/types/{plugin-spec → adapter/standard}/negotiate.d.ts +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/negotiate.js +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/registry.d.ts +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/schema-check.d.ts +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/types.js +0 -0
|
@@ -1,1380 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { LlmModelInfo, LlmProviderInfo } from '@deepseek-ai/dsh-llm';
|
|
3
|
-
import { type ContentBlock } from '@deepseek-ai/dsh-llm';
|
|
4
|
-
import { type RecapOutcome } from './recap.js';
|
|
5
|
-
import { type BalanceResult } from '../deepseekBalance.js';
|
|
6
|
-
import { type SessionEvent } from '@deepseek-ai/dsh-session';
|
|
1
|
+
import { type ChannelLaunchOptions } from './channel/state.js';
|
|
7
2
|
import type { Context } from '@deepseek-ai/cordis';
|
|
8
|
-
import { type
|
|
9
|
-
import {
|
|
10
|
-
import { type PreviewEntry, type SessionSummary } from './sessions/index.js';
|
|
11
|
-
import { type FileCandidate } from '../utils/fileSuggestions.js';
|
|
12
|
-
import type { OAuthProviderStatus, ProviderSetupHost } from './providerWizard.js';
|
|
13
|
-
import { type SessionModeSpec } from '../sessionModes.js';
|
|
14
|
-
import { type PageMarginSetting, type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../tuiDisplayPrefs.js';
|
|
15
|
-
import { type SubagentState } from './subagents.js';
|
|
3
|
+
import { type Agent } from '@deepseek-ai/dsh-agent';
|
|
4
|
+
import type { ChannelState } from './channel/types.js';
|
|
16
5
|
export type { SubagentState } from './subagents.js';
|
|
17
|
-
import { type BackgroundJobState, type BackgroundJobStatus } from './jobs.js';
|
|
18
|
-
import type { SpinnerMode } from '../components/Spinner/spinnerMode.js';
|
|
19
|
-
import { type ActivityState } from 'dsh-working-activity/status';
|
|
20
|
-
import { type TuiWorkspaceCommand, type TuiWorkspaceCommandResult, type TuiWorkspaceTarget } from './workspaces.js';
|
|
21
|
-
import { type TuiSettingsSection } from './settings-sections.js';
|
|
22
|
-
import type { SettingsHost } from './settingsEditor.js';
|
|
23
|
-
import { type TuiSceneDescriptor } from './scenes.js';
|
|
24
|
-
import type { TuiRewindMode } from './extension-events.js';
|
|
25
|
-
import { type TranscriptImage } from './transcript-images.js';
|
|
26
|
-
type ChannelImageBlock = Extract<ContentBlock, {
|
|
27
|
-
type: 'image';
|
|
28
|
-
}>;
|
|
29
|
-
type ChannelImageMediaType = ChannelImageBlock['attachment']['mediaType'];
|
|
30
|
-
export interface StagedImageInput {
|
|
31
|
-
data: Uint8Array;
|
|
32
|
-
mediaType: ChannelImageMediaType;
|
|
33
|
-
name?: string;
|
|
34
|
-
/** Absolute local path the bytes were read from, for the preview card's
|
|
35
|
-
* path row. Not handed to the attachment store and never persisted. */
|
|
36
|
-
path?: string;
|
|
37
|
-
}
|
|
38
|
-
/** Opaque capability returned for one staged composer image. The visible
|
|
39
|
-
* `[Image #N]` label is deliberately absent: PromptInput owns presentation
|
|
40
|
-
* numbering while this id is the non-reusable attachment identity. */
|
|
41
|
-
export interface StagedImageHandle {
|
|
42
|
-
readonly stageId: string;
|
|
43
|
-
}
|
|
44
|
-
/** One visible composer token bound to its opaque staged-image capability. */
|
|
45
|
-
export interface ComposerImageRef {
|
|
46
|
-
readonly token: string;
|
|
47
|
-
readonly stageId: string;
|
|
48
|
-
}
|
|
49
|
-
/** Text plus the image capabilities that belong to that exact draft. */
|
|
50
|
-
export interface ComposerSubmission {
|
|
51
|
-
readonly text: string;
|
|
52
|
-
readonly images?: readonly ComposerImageRef[];
|
|
53
|
-
}
|
|
54
|
-
/** UI-safe projection of one settled DSH registry command. Keeping the
|
|
55
|
-
* result kind across the adapter boundary lets the composer retain a
|
|
56
|
-
* rejected image draft instead of treating the error text as success. */
|
|
57
|
-
export type ExternalCommandOutcome = {
|
|
58
|
-
readonly kind: 'success';
|
|
59
|
-
readonly text: string;
|
|
60
|
-
readonly consumeDraft: true;
|
|
61
|
-
} | {
|
|
62
|
-
readonly kind: 'error';
|
|
63
|
-
readonly text: string;
|
|
64
|
-
readonly consumeDraft: boolean;
|
|
65
|
-
};
|
|
66
|
-
/** Tool-call card state used by the transcript renderer. */
|
|
67
|
-
export interface ToolRow {
|
|
68
|
-
readonly callId: string;
|
|
69
|
-
readonly name: string;
|
|
70
|
-
/** Raw JSON arguments as the model produced them (displayed truncated). */
|
|
71
|
-
readonly argsText: string;
|
|
72
|
-
/** Full arguments, shown when Ctrl+O verbose mode is on; dropped when the
|
|
73
|
-
* row is folded (session log retains it). */
|
|
74
|
-
argsFull?: string;
|
|
75
|
-
status: 'running' | 'ok' | 'error';
|
|
76
|
-
resultText?: string;
|
|
77
|
-
/** Full result text, shown when Ctrl+O verbose mode is on. */
|
|
78
|
-
resultFull?: string;
|
|
79
|
-
errorText?: string;
|
|
80
|
-
/** Tool-owned render intent from dsh-tools `presentCall` (diff/terminal/
|
|
81
|
-
* generic). Drives the structured card body instead of the raw text. */
|
|
82
|
-
callView?: ToolCallView;
|
|
83
|
-
/** Tool-owned completed-state view from `presentResult` (applied diff
|
|
84
|
-
* hunks, terminal output, read content…). Wins over callView once set. */
|
|
85
|
-
resultView?: ToolResultView;
|
|
86
|
-
/** Wall-clock start of the call (live elapsed while running). */
|
|
87
|
-
startedAt: number;
|
|
88
|
-
/** Settled wall-clock duration, written by tool/result. */
|
|
89
|
-
durationMs?: number;
|
|
90
|
-
}
|
|
91
|
-
/** One file change in a tool presentation (dsh-tools FileDiff). */
|
|
92
|
-
export interface ToolFileDiff {
|
|
93
|
-
readonly path: string;
|
|
94
|
-
/** Prior content, or null for a new file / no before-image. */
|
|
95
|
-
readonly oldText: string | null;
|
|
96
|
-
readonly newText: string;
|
|
97
|
-
}
|
|
98
|
-
/** Pending-call render intent (structural subset of dsh-tools ToolCallView). */
|
|
99
|
-
export type ToolCallView = {
|
|
100
|
-
readonly card: 'generic';
|
|
101
|
-
readonly title: string;
|
|
102
|
-
readonly kind?: string;
|
|
103
|
-
} | {
|
|
104
|
-
readonly card: 'terminal';
|
|
105
|
-
readonly title: string;
|
|
106
|
-
readonly description?: string;
|
|
107
|
-
readonly cwd?: string;
|
|
108
|
-
} | {
|
|
109
|
-
readonly card: 'diff';
|
|
110
|
-
readonly title: string;
|
|
111
|
-
readonly diffs: readonly ToolFileDiff[];
|
|
112
|
-
};
|
|
113
|
-
/** Completed-call render intent (structural subset of dsh-tools
|
|
114
|
-
* ToolResultView). `web` results and unknown shapes fall back to raw text. */
|
|
115
|
-
export type ToolResultView = {
|
|
116
|
-
readonly card: 'generic';
|
|
117
|
-
readonly title?: string;
|
|
118
|
-
readonly content?: ReadonlyArray<{
|
|
119
|
-
readonly type: string;
|
|
120
|
-
readonly text?: string;
|
|
121
|
-
}>;
|
|
122
|
-
} | {
|
|
123
|
-
readonly card: 'terminal';
|
|
124
|
-
readonly title?: string;
|
|
125
|
-
readonly output?: string;
|
|
126
|
-
readonly exitCode?: number;
|
|
127
|
-
readonly signal?: string;
|
|
128
|
-
} | {
|
|
129
|
-
readonly card: 'diff';
|
|
130
|
-
readonly title?: string;
|
|
131
|
-
readonly diffs: readonly ToolFileDiff[];
|
|
132
|
-
} | {
|
|
133
|
-
readonly card: 'read';
|
|
134
|
-
readonly title?: string;
|
|
135
|
-
readonly path?: string;
|
|
136
|
-
readonly content?: ReadonlyArray<{
|
|
137
|
-
readonly type: string;
|
|
138
|
-
readonly text?: string;
|
|
139
|
-
}>;
|
|
140
|
-
} | {
|
|
141
|
-
readonly card: 'search';
|
|
142
|
-
readonly shape: 'matches';
|
|
143
|
-
readonly title?: string;
|
|
144
|
-
readonly files: ReadonlyArray<{
|
|
145
|
-
readonly path: string;
|
|
146
|
-
readonly matches: ReadonlyArray<{
|
|
147
|
-
readonly lineNumber: number;
|
|
148
|
-
readonly line: string;
|
|
149
|
-
}>;
|
|
150
|
-
}>;
|
|
151
|
-
readonly truncated: boolean;
|
|
152
|
-
readonly total: number;
|
|
153
|
-
} | {
|
|
154
|
-
readonly card: 'search';
|
|
155
|
-
readonly shape: 'paths';
|
|
156
|
-
readonly title?: string;
|
|
157
|
-
readonly paths: readonly string[];
|
|
158
|
-
readonly truncated: boolean;
|
|
159
|
-
readonly total: number;
|
|
160
|
-
};
|
|
161
|
-
/** Re-derives the presentation views foldRows dropped, threaded into
|
|
162
|
-
* foldBack (module-level, no ctx access) by the channel. */
|
|
163
|
-
export interface ToolViewPresenter {
|
|
164
|
-
call(name: string, rawArgs: string): ToolCallView | undefined;
|
|
165
|
-
result(name: string, rawArgs: string, data: SessionEvent<'tool/result'>['data']): ToolResultView | undefined;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Subagent row: displays a subagent's lifecycle (started → running → completed/failed).
|
|
169
|
-
* Derived from agent.task events and history events.
|
|
170
|
-
*/
|
|
171
|
-
export interface SubagentControl {
|
|
172
|
-
interrupt(agentId: string): boolean;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Background-job row control (`/jobs` panel): cancellation with the same
|
|
176
|
-
* authority the owning agent itself would use (`job_kill`). Returns false
|
|
177
|
-
* when the jobs service is absent or the job is unknown/foreign.
|
|
178
|
-
*/
|
|
179
|
-
export interface JobControl {
|
|
180
|
-
kill(id: string): boolean;
|
|
181
|
-
}
|
|
182
|
-
export interface SubagentRow {
|
|
183
|
-
agentId: string;
|
|
184
|
-
runId?: string;
|
|
185
|
-
description: string;
|
|
186
|
-
provider?: string;
|
|
187
|
-
model?: string;
|
|
188
|
-
effort?: string;
|
|
189
|
-
status: SubagentState['status'];
|
|
190
|
-
startedAt: number;
|
|
191
|
-
completedAt?: number;
|
|
192
|
-
durationMs?: number;
|
|
193
|
-
outputLines: string[];
|
|
194
|
-
toolCalls: SubagentState['toolCalls'];
|
|
195
|
-
tokens?: SubagentState['tokens'];
|
|
196
|
-
summary?: string;
|
|
197
|
-
stopReason?: string;
|
|
198
|
-
error?: string;
|
|
199
|
-
}
|
|
200
|
-
/** One background job as a live transcript card (see `kind: 'job'`). */
|
|
201
|
-
export interface JobRow {
|
|
202
|
-
id: string;
|
|
203
|
-
kind: string;
|
|
204
|
-
label: string;
|
|
205
|
-
status: BackgroundJobStatus;
|
|
206
|
-
detail?: string;
|
|
207
|
-
startedAt: number;
|
|
208
|
-
finishedAt?: number;
|
|
209
|
-
/** Mirrored `job_output` tail feeding the card's three-line waterfall. */
|
|
210
|
-
outputLines: readonly string[];
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* One rendered transcript row. The DSH session log is the source of truth:
|
|
214
|
-
* rows are derived from `session/event` records (and the initial
|
|
215
|
-
* `snapshotLiveSessionEvents(agent.session)` replay), never from optimistic local state.
|
|
216
|
-
*/
|
|
217
|
-
export interface ChatRow {
|
|
218
|
-
id: number;
|
|
219
|
-
kind: 'user' | 'assistant' | 'tool' | 'notice' | 'reasoning' | 'interrupt' | 'local' | 'local-output' | 'compact' | 'subagent' | 'job';
|
|
220
|
-
/** Extra label for non-human user rows (e.g. `steering`). */
|
|
221
|
-
label?: string;
|
|
222
|
-
/** Actual execution location for `!command` rows. */
|
|
223
|
-
executionTarget?: string;
|
|
224
|
-
text: string;
|
|
225
|
-
/** Durable session image blocks, loaded lazily through the attachment store. */
|
|
226
|
-
images?: readonly TranscriptImage[];
|
|
227
|
-
/** True while an assistant step is still streaming chunks. */
|
|
228
|
-
streaming?: boolean;
|
|
229
|
-
/** Present on `tool` rows; the card model. */
|
|
230
|
-
tool?: ToolRow;
|
|
231
|
-
/** Present on `subagent` rows; the subagent state snapshot. */
|
|
232
|
-
subagent?: SubagentRow;
|
|
233
|
-
/** Present on `job` rows; the background-job state snapshot. */
|
|
234
|
-
job?: JobRow;
|
|
235
|
-
/** Event wall-clock time (transcript-mode metadata, assistant rows). */
|
|
236
|
-
time?: number;
|
|
237
|
-
/** Present on `reasoning` rows once settled: thinking wall-clock duration. */
|
|
238
|
-
durationMs?: number;
|
|
239
|
-
/** Source session event seq — present on every log-derived row (rewind
|
|
240
|
-
* fork anchor on user rows; window-floor bookkeeping for the rest). */
|
|
241
|
-
seq?: number;
|
|
242
|
-
/** True when the row's full text was folded to keep the transcript window
|
|
243
|
-
* bounded (see MAX_ROWS); the session log still holds the full content
|
|
244
|
-
* and loadOlder() restores it. */
|
|
245
|
-
folded?: boolean;
|
|
246
|
-
/** True when loadOlder() restored this row from the log; restored rows are
|
|
247
|
-
* exempt from the next fold pass so a restore is not instantly undone. */
|
|
248
|
-
restored?: boolean;
|
|
249
|
-
/** True on rows created by LIVE event handling (not replay/resume/fold
|
|
250
|
-
* restore) — the smooth-streaming reveal animates freshly-arrived
|
|
251
|
-
* content only; replayed history must paint complete. Set once at
|
|
252
|
-
* creation; never mutated afterwards. */
|
|
253
|
-
fresh?: boolean;
|
|
254
|
-
}
|
|
255
|
-
/** One 计费时段(高峰/空闲)的 token 累计。 */
|
|
256
|
-
export interface TokenBucket {
|
|
257
|
-
input: number;
|
|
258
|
-
output: number;
|
|
259
|
-
cacheRead: number;
|
|
260
|
-
cacheWrite: number;
|
|
261
|
-
}
|
|
262
|
-
/** Running token totals across the session's assistant messages. */
|
|
263
|
-
export interface TokenUsage {
|
|
264
|
-
input: number;
|
|
265
|
-
output: number;
|
|
266
|
-
/** Prompt-cache hit tokens across the session (priced at the hit rate). */
|
|
267
|
-
cacheRead: number;
|
|
268
|
-
/** Prompt-cache write tokens across the session (priced with uncached input). */
|
|
269
|
-
cacheWrite: number;
|
|
270
|
-
/** Peak-hour tokens (billed at peak rates) — each usage lands in a bucket
|
|
271
|
-
* by its event time, so a session spanning both windows is priced per
|
|
272
|
-
* window instead of all at the current rate. */
|
|
273
|
-
peak: TokenBucket;
|
|
274
|
-
/** Off-peak-hour tokens (billed at idle rates). */
|
|
275
|
-
idle: TokenBucket;
|
|
276
|
-
}
|
|
277
|
-
/** 全零 token 累计(新会话 / 复位用)。 */
|
|
278
|
-
export declare function emptyTokenUsage(): TokenUsage;
|
|
279
|
-
/** In-process working-line snapshot derived from the base session stream. */
|
|
280
|
-
export type ActivityStatus = ActivityState;
|
|
281
|
-
/** A transient status message shown above the prompt input. */
|
|
282
|
-
export interface NotificationItem {
|
|
283
|
-
id: number;
|
|
284
|
-
text: string;
|
|
285
|
-
/** Theme color key; defaults to dim. */
|
|
286
|
-
color?: 'error' | 'warning' | 'success';
|
|
287
|
-
/** Auto-dismiss after this many ms (default 4000); 0 = sticky, removed
|
|
288
|
-
* only through the early-dismiss handle. */
|
|
289
|
-
timeoutMs: number;
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Durable same-session goal projection surfaced on the channel (see
|
|
293
|
-
* {@link Channel['goal']}). Mirrors the goal domain's `GoalSnapshot` +
|
|
294
|
-
* replay counters; declared locally so the UI needs no dsh-goal dependency.
|
|
295
|
-
*/
|
|
296
|
-
export interface ChannelGoal {
|
|
297
|
-
id: string;
|
|
298
|
-
revision: number;
|
|
299
|
-
objective: string;
|
|
300
|
-
phase: 'active' | 'paused' | 'blocked' | 'complete';
|
|
301
|
-
/** Total admitted goal-round cap. */
|
|
302
|
-
maxGoalRounds: number;
|
|
303
|
-
/** Highest admitted continuation round so far. */
|
|
304
|
-
roundsStarted: number;
|
|
305
|
-
/** Present exactly while `phase` is `blocked`. */
|
|
306
|
-
blockedReason?: {
|
|
307
|
-
code: string;
|
|
308
|
-
message: string;
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
/** The observable outcome of adopting a persisted session. */
|
|
312
|
-
export type ResumeResult = {
|
|
313
|
-
readonly ok: true;
|
|
314
|
-
} | {
|
|
315
|
-
readonly ok: false;
|
|
316
|
-
readonly reason: 'working';
|
|
317
|
-
} | {
|
|
318
|
-
readonly ok: false;
|
|
319
|
-
readonly reason: 'unavailable';
|
|
320
|
-
} | {
|
|
321
|
-
readonly ok: false;
|
|
322
|
-
readonly reason: 'cancelled';
|
|
323
|
-
} | {
|
|
324
|
-
readonly ok: false;
|
|
325
|
-
readonly reason: 'failed';
|
|
326
|
-
readonly error: string;
|
|
327
|
-
};
|
|
328
|
-
/**
|
|
329
|
-
* One session's state in the agent view.
|
|
330
|
-
* States describe the session's current lifecycle:
|
|
331
|
-
* `working` — a turn is running; `needs-input` — an approval request is
|
|
332
|
-
* parked for this agent; `idle` — live and waiting for the next prompt;
|
|
333
|
-
* `completed` — a live agent whose last turn ended (task finished, waiting);
|
|
334
|
-
* `failed` — the last turn ended with an error; `stopped` — the session's
|
|
335
|
-
* process is gone (persisted only).
|
|
336
|
-
*/
|
|
337
|
-
export type AgentViewStatus = 'working' | 'needs-input' | 'idle' | 'completed' | 'failed' | 'stopped';
|
|
338
|
-
/** One row in the agent view list. */
|
|
339
|
-
export interface AgentViewRow {
|
|
340
|
-
/** Session id — the attach/dispatch target. */
|
|
341
|
-
readonly id: string;
|
|
342
|
-
/** Display title (session title, or a fallback from the prompt/cwd). */
|
|
343
|
-
readonly title: string;
|
|
344
|
-
/** Absolute working directory the session runs in. */
|
|
345
|
-
readonly cwd: string;
|
|
346
|
-
/** One-line activity summary derived from the session's recent output. */
|
|
347
|
-
readonly summary: string;
|
|
348
|
-
readonly status: AgentViewStatus;
|
|
349
|
-
/** True when an agent for this session is alive in THIS process (✻ vs ∙). */
|
|
350
|
-
readonly live: boolean;
|
|
351
|
-
/** True when this is the session the TUI terminal is attached to. */
|
|
352
|
-
readonly current: boolean;
|
|
353
|
-
/** Unix epoch milliseconds when the session was created. */
|
|
354
|
-
readonly createdAt: number;
|
|
355
|
-
/** Unix epoch milliseconds of the session's latest activity. */
|
|
356
|
-
readonly updatedAt: number;
|
|
357
|
-
}
|
|
358
|
-
/** The observable outcome of dispatching a new background session. */
|
|
359
|
-
export type AgentViewDispatchResult = {
|
|
360
|
-
readonly ok: true;
|
|
361
|
-
readonly sessionId: string;
|
|
362
|
-
} | {
|
|
363
|
-
readonly ok: false;
|
|
364
|
-
readonly reason: 'unavailable';
|
|
365
|
-
} | {
|
|
366
|
-
readonly ok: false;
|
|
367
|
-
readonly reason: 'failed';
|
|
368
|
-
readonly error: string;
|
|
369
|
-
};
|
|
370
|
-
/** The observable outcome of backgrounding the attached session. */
|
|
371
|
-
export type BackgroundResult = {
|
|
372
|
-
readonly ok: true;
|
|
373
|
-
readonly backgroundedSessionId: string;
|
|
374
|
-
} | {
|
|
375
|
-
readonly ok: false;
|
|
376
|
-
};
|
|
377
|
-
/** Secret-free credential metadata for configuration and status surfaces. */
|
|
378
|
-
export interface CredentialStatus {
|
|
379
|
-
configured: boolean;
|
|
380
|
-
source?: string;
|
|
381
|
-
writable: boolean;
|
|
382
|
-
}
|
|
383
|
-
/** One entry of the latest todo-list snapshot (mirrors dsh-tool-todo's
|
|
384
|
-
* `TodoItem`; declared locally so the adapter needn't depend on that plugin). */
|
|
385
|
-
export interface TodoPanelItem {
|
|
386
|
-
content: string;
|
|
387
|
-
status: 'pending' | 'in_progress' | 'completed';
|
|
388
|
-
}
|
|
389
|
-
/** One named prompt contribution with its model-visible text. */
|
|
390
|
-
export interface LoadedContextEntry {
|
|
391
|
-
/** Provider-declared name (e.g. `harness:identity`, `deployment:persona`). */
|
|
392
|
-
readonly name: string;
|
|
393
|
-
/** The interpolated text the model receives for this entry. */
|
|
394
|
-
readonly text: string;
|
|
395
|
-
}
|
|
396
|
-
/** One discovered workspace instruction file (AGENTS.md-family). */
|
|
397
|
-
export interface LoadedContextFile {
|
|
398
|
-
/** Model-facing path (e.g. `./AGENTS.md`). */
|
|
399
|
-
readonly displayPath: string;
|
|
400
|
-
}
|
|
401
|
-
/** One model-invocable skill from the skill registry. */
|
|
402
|
-
export interface LoadedContextSkill {
|
|
403
|
-
readonly name: string;
|
|
404
|
-
readonly description: string;
|
|
405
|
-
}
|
|
406
|
-
/** One skill in the live agent's catalog, for the `/skills` picker (issue #204). */
|
|
407
|
-
export interface SkillInfo {
|
|
408
|
-
readonly name: string;
|
|
409
|
-
readonly description: string;
|
|
410
|
-
/** True when `/name` invokes it (it appears in the `/` menu, issue #86). */
|
|
411
|
-
readonly userInvocable: boolean;
|
|
412
|
-
/** Discovery source bucket (bundled / user-* / project-* / runtime / …). */
|
|
413
|
-
readonly source: string;
|
|
414
|
-
}
|
|
415
|
-
/** One model-visible tool from the prompt assembly. */
|
|
416
|
-
export interface LoadedContextTool {
|
|
417
|
-
readonly name: string;
|
|
418
|
-
readonly description: string;
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Snapshot of everything a fresh conversation for the current agent will
|
|
422
|
-
* load: the assembled system prompt (ordered sections, dynamic context,
|
|
423
|
-
* tools), the workspace instruction files baseline discovery would inject,
|
|
424
|
-
* and the skill catalog. Declared locally so screens and helpers consume a
|
|
425
|
-
* self-contained contract instead of the dsh-system-prompt/dsh-skill types.
|
|
426
|
-
*/
|
|
427
|
-
export interface LoadedContext {
|
|
428
|
-
/** Ordered system-prompt sections after strict variable interpolation. */
|
|
429
|
-
readonly sections: readonly LoadedContextEntry[];
|
|
430
|
-
/** Dynamic context contributions (runtime snapshot parts). */
|
|
431
|
-
readonly contexts: readonly LoadedContextEntry[];
|
|
432
|
-
/** Workspace instruction files (AGENTS.md-family) discovered for the cwd. */
|
|
433
|
-
readonly files: readonly LoadedContextFile[];
|
|
434
|
-
/** Model-invocable skills, when the skill registry is mounted. */
|
|
435
|
-
readonly skills: readonly LoadedContextSkill[];
|
|
436
|
-
/** Model-visible tools in assembly order. */
|
|
437
|
-
readonly tools: readonly LoadedContextTool[];
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* The public channel surface a screen renders: the full transcript and live
|
|
441
|
-
* status snapshot (tokens, spinner, working activity, goals, todos, loaded
|
|
442
|
-
* context) plus every action the TUI can take (submit, steer, cancel,
|
|
443
|
-
* rewind, resume, model switching, …). Implementations mutate internal state
|
|
444
|
-
* and bump `version` so subscribed screens re-render.
|
|
445
|
-
*/
|
|
446
|
-
export interface Channel {
|
|
447
|
-
/** Monotonic version — bump on every mutation so screens can re-render. */
|
|
448
|
-
readonly version: number;
|
|
449
|
-
readonly rows: readonly ChatRow[];
|
|
450
|
-
readonly status: AgentStatus | 'starting' | 'disposed';
|
|
451
|
-
readonly sessionTitle: string;
|
|
452
|
-
/** Per-session accent color name (`/color`), '' when unset — persisted via
|
|
453
|
-
* a `session/color` log event so it survives resume/rewind. Renders as
|
|
454
|
-
* the prompt-input border + session label chip accent. */
|
|
455
|
-
readonly sessionColor: string;
|
|
456
|
-
readonly agentId: string;
|
|
457
|
-
/** TUI-owned generation that changes on every live Agent rebind. */
|
|
458
|
-
readonly agentBindingGeneration: number;
|
|
459
|
-
/** `dsh-tui.recapOnOpen` (default on): auto-summarize the session tail
|
|
460
|
-
* into the dim AutoRecapRow when the session opens/resumes. Read live
|
|
461
|
-
* (settings service), so a `/settings` change applies on the next
|
|
462
|
-
* session switch; absent settings service → on. */
|
|
463
|
-
readonly autoRecapOnOpen: boolean;
|
|
464
|
-
/** Resolved model id (from the plugin config). */
|
|
465
|
-
readonly model: string;
|
|
466
|
-
/** Provider route of the live agent. */
|
|
467
|
-
readonly provider: string;
|
|
468
|
-
/** Raw cordis.yml `provider` key (undefined when unset) — the boot-time
|
|
469
|
-
* pin `/reload` must never override. */
|
|
470
|
-
readonly configuredProvider: string | undefined;
|
|
471
|
-
/** Raw cordis.yml `model` key (undefined when unset). */
|
|
472
|
-
readonly configuredModel: string | undefined;
|
|
473
|
-
/** Explicit cordis.yml `preset` (undefined = roster default wins) — `/reload`
|
|
474
|
-
* must not override a static deployment choice. */
|
|
475
|
-
readonly configuredPreset: string | undefined;
|
|
476
|
-
/** Explicit cordis.yml `activityFrames` (undefined = pref/default wins). */
|
|
477
|
-
readonly configuredActivityFrames: string | undefined;
|
|
478
|
-
/** Explicit cordis.yml `lang` (undefined = settings/lang.json wins). */
|
|
479
|
-
readonly configuredLang: string | undefined;
|
|
480
|
-
/** Running token totals across the session's assistant messages. */
|
|
481
|
-
readonly tokens: TokenUsage;
|
|
482
|
-
/** Working directory of the session. */
|
|
483
|
-
readonly cwd: string;
|
|
484
|
-
/** Human-facing cwd (remote POSIX path/URI instead of a host alias). */
|
|
485
|
-
readonly displayCwd: string;
|
|
486
|
-
/** Current git branch, when the cwd is inside a git worktree. */
|
|
487
|
-
readonly gitBranch: string | undefined;
|
|
488
|
-
/** True between turn/start and turn/end — drives the working spinner. */
|
|
489
|
-
readonly working: boolean;
|
|
490
|
-
/** True while a user-requested abort (Ctrl+C/Esc interrupt) has not yet
|
|
491
|
-
* converged — no turn/start or turn/end has retired the aborted turn.
|
|
492
|
-
* Chat uses it so a repeated Ctrl+C during a stuck abort force-exits. */
|
|
493
|
-
readonly cancelPending: boolean;
|
|
494
|
-
/** Which phase the spinner should present while working. */
|
|
495
|
-
readonly spinnerMode: SpinnerMode;
|
|
496
|
-
/** Chars streamed as text this turn (feeds the spinner token counter). */
|
|
497
|
-
readonly responseChars: number;
|
|
498
|
-
/** Number of tool calls still in flight this turn. */
|
|
499
|
-
readonly activeToolCount: number;
|
|
500
|
-
/** Wall-clock ms of turn/start (spinner elapsed timer). */
|
|
501
|
-
readonly turnStart: number;
|
|
502
|
-
/** Last user prompt text (sticky header + statusline). */
|
|
503
|
-
readonly lastUserText: string;
|
|
504
|
-
/** Transient notifications, newest last. */
|
|
505
|
-
readonly notifications: readonly NotificationItem[];
|
|
506
|
-
/** Adapter-advertised context capacity for the model route, when known. */
|
|
507
|
-
readonly contextWindow: number | undefined;
|
|
508
|
-
/** Reasoning effort of the latest request header, when the adapter sets one. */
|
|
509
|
-
readonly reasoningEffort: string | undefined;
|
|
510
|
-
/** The live route's reasoning-effort level ids, low → high (the last entry
|
|
511
|
-
* is the top tier). Consumed by top-tier-triggered UI (effort ignition). */
|
|
512
|
-
readonly effortLevels: readonly string[] | undefined;
|
|
513
|
-
/** Usage of the most recent request (context share + cache hits come from
|
|
514
|
-
* this, not the running totals — each request's input IS the context). */
|
|
515
|
-
readonly lastUsage: {
|
|
516
|
-
input: number;
|
|
517
|
-
output: number;
|
|
518
|
-
cacheRead: number;
|
|
519
|
-
cacheWrite: number;
|
|
520
|
-
} | undefined;
|
|
521
|
-
/** Output tokens per second of the current/last turn's response, when known. */
|
|
522
|
-
readonly tps: number | undefined;
|
|
523
|
-
/** Per-turn tps samples (sparkline history), oldest first. */
|
|
524
|
-
readonly tpsSamples: readonly {
|
|
525
|
-
tps: number;
|
|
526
|
-
at: number;
|
|
527
|
-
}[];
|
|
528
|
-
/** Latest in-process working-activity snapshot. */
|
|
529
|
-
readonly workingActivity: ActivityStatus | undefined;
|
|
530
|
-
/** Working-activity indicator preset name (`moon8`/`moon`/…/`random`). */
|
|
531
|
-
readonly activityFrames: string | undefined;
|
|
532
|
-
/** Edit/Write diff presentation preference (`auto`/`split`/`unified`). */
|
|
533
|
-
readonly diffLayout: 'auto' | 'split' | 'unified';
|
|
534
|
-
/** Thinking-block display (`preview` = 2-3 line live stream + fold per
|
|
535
|
-
* step; `full` = expanded until turn end). */
|
|
536
|
-
readonly thinkingFold: 'preview' | 'full';
|
|
537
|
-
/** Live tool-card background treatment. */
|
|
538
|
-
readonly toolBackground: ToolBackground;
|
|
539
|
-
/** What the fullscreen transcript's right gutter shows (settings
|
|
540
|
-
* `dsh-tui.scrollGutter`: turn timeline / proportional scrollbar /
|
|
541
|
-
* nothing). */
|
|
542
|
-
readonly scrollGutter: ScrollGutterMode;
|
|
543
|
-
/** Root page inset (settings `dsh-tui.pageMargin`): a preset name
|
|
544
|
-
* (`none` / `slim` / `normal` (default) / `roomy`) or a custom `NxM`
|
|
545
|
-
* spec (columns per side × rows top/bottom) inset the whole UI from the
|
|
546
|
-
* terminal edges — terminals without their own viewport padding (bare
|
|
547
|
-
* WSL, tmux, SSH) otherwise hug the screen border. */
|
|
548
|
-
readonly pageMargin: PageMarginSetting;
|
|
549
|
-
/** Terminal-card header folding (settings `dsh-tui.foldTerminalCommand`):
|
|
550
|
-
* collapse a multi-line command title to its first line + count hint. */
|
|
551
|
-
readonly foldTerminalCommand: boolean;
|
|
552
|
-
/** Whether the session-name chip shows on the prompt top border's right
|
|
553
|
-
* side (settings `dsh-tui.promptSessionLabel`; off by default). */
|
|
554
|
-
readonly promptSessionLabel: boolean;
|
|
555
|
-
/** Whether the fullscreen draft editor is enabled (settings
|
|
556
|
-
* `dsh-tui.expandEditor`; on by default) — gates the ⛶ affordance and
|
|
557
|
-
* the expandEditor shortcut. */
|
|
558
|
-
readonly expandEditor: boolean;
|
|
559
|
-
/** Smooth streaming reveal (settings `dsh-tui.smoothStreaming`; on by
|
|
560
|
-
* default): live-arriving assistant text, expanded thinking, and tool
|
|
561
|
-
* call bodies paint through a ~30fps reveal instead of jumping per
|
|
562
|
-
* provider burst. */
|
|
563
|
-
readonly smoothStreaming: boolean;
|
|
564
|
-
/** Live status-footer visibility and compactness preferences. */
|
|
565
|
-
readonly statusBar: Readonly<StatusBarConfig>;
|
|
566
|
-
/** Whether the header's pixel whale art shows (settings `dsh-tui.whale`). */
|
|
567
|
-
readonly whale: boolean;
|
|
568
|
-
/** Whether the settled header whale keeps behaving during the welcome
|
|
569
|
-
* phase — fin flutters, tail thumps, sleep after inactivity (settings
|
|
570
|
-
* `dsh-tui.whaleIdle`; on by default — an explicit false keeps the
|
|
571
|
-
* settled header timer-free). The first agent turn freezes the whale to
|
|
572
|
-
* the static standard frame regardless of this flag. */
|
|
573
|
-
readonly whaleIdle: boolean;
|
|
574
|
-
/** Minimal mode (settings `dsh-tui.minimal`): no header splash, no emoji
|
|
575
|
-
* glyphs, no decorative colors; code highlight and tool colors stay. */
|
|
576
|
-
readonly minimal: boolean;
|
|
577
|
-
/** Whether the in-process working-activity line is shown (config.activity). */
|
|
578
|
-
readonly activityEnabled: boolean;
|
|
579
|
-
/** Whether the segmented context bar row shows in the status footer
|
|
580
|
-
* (config.contextBar; the status/mode lines are unaffected). */
|
|
581
|
-
readonly contextBarEnabled: boolean;
|
|
582
|
-
/**
|
|
583
|
-
* Current same-session goal projection, when a goal exists. Derived live
|
|
584
|
-
* from the durable goal events in the session log — top-level
|
|
585
|
-
* `goal/change` snapshots (every goal mutation appends one) plus the
|
|
586
|
-
* goal-sourced continuation rounds that advance the counter — so this
|
|
587
|
-
* snapshot tracks create/edit/pause/resume/complete/block/clear in real
|
|
588
|
-
* time and replays correctly on resume/rewind.
|
|
589
|
-
*/
|
|
590
|
-
readonly goal: ChannelGoal | undefined;
|
|
591
|
-
/**
|
|
592
|
-
* Latest todo-list snapshot (`todo/write` whole-list event, last write
|
|
593
|
-
* wins). Log-only UI state, updated live and on replay.
|
|
594
|
-
*/
|
|
595
|
-
readonly todos: readonly TodoPanelItem[];
|
|
596
|
-
/**
|
|
597
|
-
* Snapshot of the context a fresh conversation for this agent will load
|
|
598
|
-
* (system prompt sections, dynamic context, workspace instructions, skill
|
|
599
|
-
* catalog, tools), computed at boot and on every agent swap. `undefined`
|
|
600
|
-
* while loading or when the snapshot could not be assembled — the startup
|
|
601
|
-
* panel stays hidden until it lands.
|
|
602
|
-
*/
|
|
603
|
-
readonly loadedContext: LoadedContext | undefined;
|
|
604
|
-
/**
|
|
605
|
-
* Messages submitted while the model was working and not yet claimed by a
|
|
606
|
-
* turn (`steer` → next step boundary of the running turn, `followup` →
|
|
607
|
-
* after the turn ends). Driven by agent inbox events.
|
|
608
|
-
*/
|
|
609
|
-
readonly pending: readonly PendingMessage[];
|
|
610
|
-
/**
|
|
611
|
-
* Effective slash commands: built-in locals plus plugin-registered
|
|
612
|
-
* commands (plan/goal/…) merged from the DSH command registry. The
|
|
613
|
-
* registry is the source of truth for external names — a plugin shadows
|
|
614
|
-
* nothing here; locals win on name collisions.
|
|
615
|
-
*/
|
|
616
|
-
readonly commandList: readonly LocalCommand[];
|
|
617
|
-
/** Context-aware slash completions, including plugin subcommands. */
|
|
618
|
-
commandCompletions(input: string): readonly CommandCompletion[];
|
|
619
|
-
/**
|
|
620
|
-
* Run a plugin-registered slash command against the live agent (DSH
|
|
621
|
-
* `dsh-commands` registry): logs `command/run`/`command/done` and returns
|
|
622
|
-
* the handler's result text. Kept stable for public scene consumers.
|
|
623
|
-
*/
|
|
624
|
-
runExternalCommand(name: string, rawInput: string, images?: readonly ComposerImageRef[]): Promise<string | undefined>;
|
|
625
|
-
/** Detailed companion used by draft-owning composers. `undefined` means
|
|
626
|
-
* the registry no longer has the command, so the draft stays untouched. */
|
|
627
|
-
runExternalCommandOutcome(name: string, rawInput: string, images?: readonly ComposerImageRef[]): Promise<ExternalCommandOutcome | undefined>;
|
|
628
|
-
/**
|
|
629
|
-
* TUI-side permission preset switch: the official `/permission` command
|
|
630
|
-
* when registered, otherwise the permission-presets service's own write
|
|
631
|
-
* path (the same handler the command drives). Resolves true when the
|
|
632
|
-
* durable identity confirms the target. Never falls through to the model.
|
|
633
|
-
*/
|
|
634
|
-
runPermissionPreset(name: string): Promise<boolean>;
|
|
635
|
-
/**
|
|
636
|
-
* Plugin-registered full-screen scene currently replacing the conversation
|
|
637
|
-
* (the `dsh-tui-scenes` runtime), if any. The chat screen renders its
|
|
638
|
-
* component INSTEAD of the transcript — the same whole-terminal treatment
|
|
639
|
-
* the trajectory scene gets — and hands it the keyboard; `undefined`
|
|
640
|
-
* renders the conversation normally.
|
|
641
|
-
*/
|
|
642
|
-
readonly pluginScene: TuiSceneDescriptor | undefined;
|
|
643
|
-
/**
|
|
644
|
-
* Open a registered plugin scene by id. Plugin command handlers usually
|
|
645
|
-
* call the runtime directly (`ctx.tuiScenes.open`); this passthrough lets
|
|
646
|
-
* host-side UI code do the same without touching cordis services.
|
|
647
|
-
*/
|
|
648
|
-
openPluginScene(id: string): boolean;
|
|
649
|
-
/** Close the open plugin scene, if any (a no-op otherwise). */
|
|
650
|
-
closePluginScene(): void;
|
|
651
|
-
/** 侧问(/btw):无工具单轮 LLM 调用,复用当前会话上下文;结果不落 session log。 */
|
|
652
|
-
sideQuestion(question: string, options?: {
|
|
653
|
-
signal?: AbortSignal;
|
|
654
|
-
onText?: (delta: string) => void;
|
|
655
|
-
}): Promise<{
|
|
656
|
-
answer: string | null;
|
|
657
|
-
error?: string;
|
|
658
|
-
}>;
|
|
659
|
-
/** Estimated context segments by content type (pi-nano-context style bar). */
|
|
660
|
-
readonly contextSegments: {
|
|
661
|
-
system: number;
|
|
662
|
-
prompt: number;
|
|
663
|
-
assistant: number;
|
|
664
|
-
thinking: number;
|
|
665
|
-
tools: number;
|
|
666
|
-
};
|
|
667
|
-
/** Active subagents spawned by the current session. */
|
|
668
|
-
readonly subagents: readonly SubagentState[];
|
|
669
|
-
/** Native control operations; unavailable providers safely return false. */
|
|
670
|
-
readonly subagentControl: SubagentControl;
|
|
671
|
-
/**
|
|
672
|
-
* Background jobs of the current session (`run_in_background` tool work),
|
|
673
|
-
* live-tracked from the harness job registry. Empty when the composition
|
|
674
|
-
* has no jobs service. Drives the `/jobs` panel, transcript job cards and
|
|
675
|
-
* the status-line chip.
|
|
676
|
-
*/
|
|
677
|
-
readonly backgroundJobs: readonly BackgroundJobState[];
|
|
678
|
-
/** Cancellation of a background job with the owning agent's authority. */
|
|
679
|
-
readonly jobControl: JobControl;
|
|
680
|
-
subscribe: (listener: () => void) => () => void;
|
|
681
|
-
/** Current composer generation. Async paste continuations capture this
|
|
682
|
-
* before I/O and must not mutate a different session's draft. */
|
|
683
|
-
stagedImageGeneration(): number;
|
|
684
|
-
/** Validate and persist an image, returning the historical scene-facing
|
|
685
|
-
* `[Image #N]` token accepted by submit/steer/registry commands. */
|
|
686
|
-
stageImage(input: StagedImageInput): Promise<string>;
|
|
687
|
-
/** Draft-safe composer companion: bind persistence to one session epoch
|
|
688
|
-
* and return an opaque capability whose visible label belongs to Prompt. */
|
|
689
|
-
stageComposerImage(input: StagedImageInput, generation: number): Promise<StagedImageHandle>;
|
|
690
|
-
/** Whether a capability is still live in the current composer session. */
|
|
691
|
-
hasStagedImage(stageId: string): boolean;
|
|
692
|
-
/** Revoke a capability that was staged for a draft which no longer exists.
|
|
693
|
-
* Durable attachment storage remains content-addressed; this only releases
|
|
694
|
-
* the editable-composer lookup and its preview facade. */
|
|
695
|
-
discardStagedImage(stageId: string): void;
|
|
696
|
-
/** The staged image behind one opaque capability, as the same lazily-read
|
|
697
|
-
* facade transcript rows use; undefined once evicted or cleared. */
|
|
698
|
-
stagedImage(stageId: string): TranscriptImage | undefined;
|
|
699
|
-
/** The profile's image-paste limits, for callers that must bound work
|
|
700
|
-
* BEFORE reading bytes (a Finder path is untrusted input). Undefined
|
|
701
|
-
* when the composition has no attachment service. */
|
|
702
|
-
stagedImageLimits(): {
|
|
703
|
-
readonly maxImageBytes: number;
|
|
704
|
-
readonly maxImagesPerMessage: number;
|
|
705
|
-
} | undefined;
|
|
706
|
-
submit(text: string, images?: readonly ComposerImageRef[]): void;
|
|
707
|
-
/**
|
|
708
|
-
* Steer a message into the running turn (Codex/pi semantics): injected at
|
|
709
|
-
* the next step boundary, the agent continues without aborting.
|
|
710
|
-
*/
|
|
711
|
-
steer(text: string, images?: readonly ComposerImageRef[]): void;
|
|
712
|
-
/** Pull a pending message back out of the inbox (Alt+Up) for re-editing. */
|
|
713
|
-
removePending(id: string): boolean;
|
|
714
|
-
/** Abort the in-flight turn (`Ctrl+C` while working). While `cancelPending`
|
|
715
|
-
* stays true the abort has not converged; Chat force-exits on the next
|
|
716
|
-
* Ctrl+C press in that window. */
|
|
717
|
-
cancel(): void;
|
|
718
|
-
/** Abort the in-flight turn and process `inputs` right away (Esc/Ctrl+Enter
|
|
719
|
-
* with queued input): each message is re-queued as a followup once the abort
|
|
720
|
-
* settles, so the new turn starts immediately. Plain strings remain the
|
|
721
|
-
* compatibility form for non-composer callers. Returns the count queued. */
|
|
722
|
-
interruptAndDeliver(inputs: readonly (string | ComposerSubmission)[]): number;
|
|
723
|
-
/** Rewind the conversation to a past user message (double-Esc rewind):
|
|
724
|
-
* forks the session through that message, swaps in a fresh agent, and
|
|
725
|
-
* returns the message text for re-editing — or `null` when unwritable.
|
|
726
|
-
* `mode` is the plugin-offered rewind mode the user picked (the
|
|
727
|
-
* tui/rewind-prompt seam), null for the plain conversation rewind. */
|
|
728
|
-
rewindTo(row: ChatRow, mode?: string | null): Promise<string | null>;
|
|
729
|
-
/**
|
|
730
|
-
* The rewind decision prompt (tui/rewind-prompt event): asked when the
|
|
731
|
-
* picker confirms a message, before the confirm pane renders. 'cancel'
|
|
732
|
-
* vetoes the rewind (reason already toasted), `{ modes }` adds plugin
|
|
733
|
-
* choices to the confirm pane, null means no opinion (plain confirm).
|
|
734
|
-
*/
|
|
735
|
-
promptRewind(row: ChatRow): Promise<{
|
|
736
|
-
modes: readonly TuiRewindMode[];
|
|
737
|
-
} | 'cancel' | null>;
|
|
738
|
-
/**
|
|
739
|
-
* The session family tree for the /tree screen (pi's Session Tree): the
|
|
740
|
-
* live session's whole lineage — ancestors, siblings, descendants —
|
|
741
|
-
* stitched across fork sessions into one message-level tree. `null` (with
|
|
742
|
-
* a notify) when session persistence is unavailable or the live session
|
|
743
|
-
* swapped while the family loaded.
|
|
744
|
-
*/
|
|
745
|
-
buildSessionTree(): Promise<SessionTreeData | null>;
|
|
746
|
-
/**
|
|
747
|
-
* Session-tree fork: `rewind` drops the picked user turn (its prompt comes
|
|
748
|
-
* back as the returned text), `fork` keeps the picked entry. `seq` is the
|
|
749
|
-
* tree entry's source event seq inside `sessionId`'s log; `sessionId` may
|
|
750
|
-
* be any family member (adopting a dead branch forks IT at the picked
|
|
751
|
-
* point). Null = refused (the channel notified why).
|
|
752
|
-
*/
|
|
753
|
-
rewindToNode(sessionId: string, seq: number, mode?: 'rewind' | 'fork'): Promise<string | null>;
|
|
754
|
-
/** `/fork`: fork the current session at its tip into a persisted copy the
|
|
755
|
-
* user enters via `/resume` — the live session keeps running untouched. */
|
|
756
|
-
forkSession(): Promise<boolean>;
|
|
757
|
-
/** Switch the live agent to a persisted session, replaying its history. */
|
|
758
|
-
resumeTo(sessionId: string): Promise<ResumeResult>;
|
|
759
|
-
/** Start a fresh conversation (`/new`): a brand-new agent + session, the
|
|
760
|
-
* transcript cleared, the resume marker forgotten. */
|
|
761
|
-
newSession(): Promise<boolean>;
|
|
762
|
-
/** Workspace targets contributed by the TUI and optional providers. */
|
|
763
|
-
listWorkspaces(): Promise<readonly TuiWorkspaceTarget[]>;
|
|
764
|
-
/** Resolve an absolute path, file URL, or provider URI. */
|
|
765
|
-
resolveWorkspace(reference: string): Promise<TuiWorkspaceTarget | undefined>;
|
|
766
|
-
/** Start a fresh session in the selected workspace. */
|
|
767
|
-
switchWorkspace(target: TuiWorkspaceTarget): Promise<boolean>;
|
|
768
|
-
/** Rename the current durable workspace. */
|
|
769
|
-
renameWorkspace(title: string): Promise<boolean>;
|
|
770
|
-
/** Provider-owned workspace subcommands. */
|
|
771
|
-
workspaceCommands(): readonly Pick<TuiWorkspaceCommand, 'name' | 'aliases' | 'description'>[];
|
|
772
|
-
runWorkspaceCommand(name: string, input: string): Promise<TuiWorkspaceCommandResult | undefined>;
|
|
773
|
-
/** Switch the live model (`/model` picker): forks the conversation at its
|
|
774
|
-
* current end and continues it with a new agent routed to `provider`/`model`.
|
|
775
|
-
* The history replays unchanged; only the request route changes. */
|
|
776
|
-
switchModel(provider: string, model: string): Promise<boolean>;
|
|
777
|
-
/** The live route's effort levels + adapter default for the `/effort`
|
|
778
|
-
* slider; empty `efforts` after notifying when unsupported/unavailable. */
|
|
779
|
-
listEfforts(): Promise<{
|
|
780
|
-
efforts: readonly EffortOption[];
|
|
781
|
-
defaultEffort: string | undefined;
|
|
782
|
-
}>;
|
|
783
|
-
/** Set one effort level by id (validated against the adapter list);
|
|
784
|
-
* false + a notify when the id is not offered. Persists like the old
|
|
785
|
-
* Shift+Tab cycle (~/.dsh-tui/effort.json). */
|
|
786
|
-
setEffort(id: string): Promise<boolean>;
|
|
787
|
-
/** Re-seat the default reasoning effort new sessions start on (the
|
|
788
|
-
* /settings 默认推理强度 field). Unlike {@link Channel.setEffort} it
|
|
789
|
-
* does not write effort.json — the settings user layer outranks that
|
|
790
|
-
* file — and `undefined` (the field's auto option) re-derives the boot
|
|
791
|
-
* chain (cordis.yml `effort` → persisted /effort choice → adapter
|
|
792
|
-
* default). The live agent is re-pinned too when its route offers the
|
|
793
|
-
* level, so a change lands on its next request. */
|
|
794
|
-
setDefaultEffort(id: string | undefined): void;
|
|
795
|
-
/** The session mode currently in force (matched from the session log, or
|
|
796
|
-
* the last one Shift+Tab applied). */
|
|
797
|
-
readonly mode: SessionModeSpec;
|
|
798
|
-
/** Index of `mode` in the configured cycle; 0 is the unmarked base mode. */
|
|
799
|
-
readonly modeIndex: number;
|
|
800
|
-
/** Shift+Tab: advance to the next configured session mode. */
|
|
801
|
-
cycleMode(): Promise<void>;
|
|
802
|
-
/** Read the official permission preset roster and current identity. */
|
|
803
|
-
permissionPresets(): PermissionPresetSnapshot;
|
|
804
|
-
/** The preset the CURRENT session runs under (issue #8), resolved from its
|
|
805
|
-
* log at create/resume time; undefined when no roster is mounted. */
|
|
806
|
-
readonly agentPreset: string | undefined;
|
|
807
|
-
/** The roster's presets for the `/preset` picker (empty without a roster). */
|
|
808
|
-
listPresets(): Promise<readonly PresetOption[]>;
|
|
809
|
-
/** Switch the agent preset (`/preset`): a blank session swaps composition
|
|
810
|
-
* in place (official `recompose` + logged `agent-preset/selected`); a
|
|
811
|
-
* started session is locked, so the choice persists as the default for
|
|
812
|
-
* future sessions instead. False when the roster is absent, the id is
|
|
813
|
-
* unknown/broken, or a turn is running. */
|
|
814
|
-
switchPreset(presetId: string): Promise<boolean>;
|
|
815
|
-
/** Reset the visible transcript (`/clear`). */
|
|
816
|
-
clear(): void;
|
|
817
|
-
/**
|
|
818
|
-
* Re-render rows older than the current in-memory window from the session
|
|
819
|
-
* log (rows beyond {@link ChannelState.rows}' cap are folded away; this
|
|
820
|
-
* restores them for review). Returns the number of rows restored, 0 when
|
|
821
|
-
* the whole log is already materialized.
|
|
822
|
-
*/
|
|
823
|
-
loadOlder(): number;
|
|
824
|
-
/** Push a transient notification above the prompt input. Returns an
|
|
825
|
-
* early-dismiss handle (the auto-timeout still runs as the backstop). */
|
|
826
|
-
notify(text: string, options?: {
|
|
827
|
-
color?: NotificationItem['color'];
|
|
828
|
-
timeoutMs?: number;
|
|
829
|
-
}): () => void;
|
|
830
|
-
/** Switch the working-activity indicator preset (`/activity`): validates
|
|
831
|
-
* the name, persists it to `~/.dsh-tui/working-activity.json`, and
|
|
832
|
-
* re-renders the indicator immediately; false when the name is unknown
|
|
833
|
-
* or the preference cannot be written. */
|
|
834
|
-
setActivityFrames(name: string): boolean;
|
|
835
|
-
/** Advertised models across every registered provider route (empty when the LLM service is absent). */
|
|
836
|
-
listModels(): Promise<readonly LlmModelInfo[]>;
|
|
837
|
-
/** Provider display identities for the same routes (picker group labels). */
|
|
838
|
-
listProviders(): Promise<readonly LlmProviderInfo[]>;
|
|
839
|
-
/** Drop the `/model <provider/id>` completion cache so the next `/model `
|
|
840
|
-
* refetch reflects a provider-catalog change (`/provider` add/edit/delete,
|
|
841
|
-
* OAuth sign-in/out) — the same consistency the picker's per-open refetch
|
|
842
|
-
* already provides. */
|
|
843
|
-
invalidateModelCompletion(): void;
|
|
844
|
-
/** The live agent's full skill catalog for `/skills` (issue #204) — name,
|
|
845
|
-
* description, invocation flags and source bucket. Undefined on a failed
|
|
846
|
-
* or incomplete registry read (the picker shows an error); empty only
|
|
847
|
-
* when no registry is mounted or it genuinely holds nothing. */
|
|
848
|
-
listSkills(): Promise<readonly SkillInfo[] | undefined>;
|
|
849
|
-
/** Safe credential metadata for `/login`; undefined without the service. */
|
|
850
|
-
describeCredential(ref: string): Promise<CredentialStatus | undefined>;
|
|
851
|
-
/** DeepSeek official account balance for `/balance`: resolves
|
|
852
|
-
* `DEEPSEEK_API_KEY` through the credentials seam (env fallback) and
|
|
853
|
-
* queries the official balance endpoint. The key is used only for the
|
|
854
|
-
* request header — never logged, printed or persisted. */
|
|
855
|
-
balanceInfo(): Promise<BalanceResult>;
|
|
856
|
-
/** Runtime capabilities for the `/provider` wizard, over the settings /
|
|
857
|
-
* credentials / llm seams; undefined when the composition lacks them
|
|
858
|
-
* (bare cordis.yml start without the dsh-base services). */
|
|
859
|
-
providerSetup(): ProviderSetupHost | undefined;
|
|
860
|
-
/** OAuth sign-in states from a mounted dsh-auth-style plugin; undefined
|
|
861
|
-
* without the plugin, so `/login` renders exactly what it did before. */
|
|
862
|
-
oauthProviderStatuses(): Promise<readonly OAuthProviderStatus[] | undefined>;
|
|
863
|
-
/**
|
|
864
|
-
* Runtime capabilities for the `/settings` screen, over the settings /
|
|
865
|
-
* credentials seams; undefined when the composition lacks the settings
|
|
866
|
-
* service (the screen then renders plugin sections as unavailable and
|
|
867
|
-
* namespaces read-only).
|
|
868
|
-
*/
|
|
869
|
-
settingsHost(): SettingsHost | undefined;
|
|
870
|
-
/** Plugin-declared settings sections from the `tuiSettingsSections` seam
|
|
871
|
-
* (empty when the seam or every provider is absent). */
|
|
872
|
-
settingsSections(): readonly TuiSettingsSection[];
|
|
873
|
-
/** Subscribe to settings-section register/unregister events. */
|
|
874
|
-
subscribeSettingsSections(listener: () => void): () => void;
|
|
875
|
-
/** Structured `@` file completion, using the session's remote fs service. */
|
|
876
|
-
listFileCandidates(query: string, options?: {
|
|
877
|
-
signal?: AbortSignal;
|
|
878
|
-
topK?: number;
|
|
879
|
-
}): Promise<readonly FileCandidate[]>;
|
|
880
|
-
/** Backward-compatible top-level/recursive listing. */
|
|
881
|
-
listFiles(): Promise<readonly string[]>;
|
|
882
|
-
/** Every session the persistence backend stores, classified and unfiltered
|
|
883
|
-
* — the browser (`/resume`) decides which of them a given view shows. */
|
|
884
|
-
listSessions(): Promise<readonly SessionSummary[]>;
|
|
885
|
-
/** Trailing exchanges of a persisted session, for the browser's preview. */
|
|
886
|
-
previewSession(sessionId: string): Promise<readonly PreviewEntry[]>;
|
|
887
|
-
/** Mark a session for `dsh-tui --resume` on the next launch. */
|
|
888
|
-
setResumeTarget(sessionId: string): void;
|
|
889
|
-
/** Rename the current session (/rename): appends a `session/title`
|
|
890
|
-
* event, which the status line and the /resume picker both read. */
|
|
891
|
-
renameSession(title: string): void;
|
|
892
|
-
/** Set the current session's accent color (`/color <name>`): appends a
|
|
893
|
-
* `session/color` event; '' clears it back to the theme default. */
|
|
894
|
-
setSessionColor(color: string): void;
|
|
895
|
-
/** Generate a recap of the session's recent activity (`/recap`): one
|
|
896
|
-
* tool-less LLM call over the tail exchanges, returning a one-line
|
|
897
|
-
* summary plus an optional proposed title. The answer is pure UI state
|
|
898
|
-
* and never enters the session log. */
|
|
899
|
-
recapRecent(options?: {
|
|
900
|
-
signal?: AbortSignal;
|
|
901
|
-
onText?: (delta: string) => void;
|
|
902
|
-
}): Promise<RecapOutcome>;
|
|
903
|
-
/** Delete a persisted session (`/resume` picker ctrl+d): removes its log
|
|
904
|
-
* directory, its last-used entry, and the resume marker when it points
|
|
905
|
-
* here. False for the live session or a missing/unwritable log. */
|
|
906
|
-
deleteSession(sessionId: string): Promise<boolean>;
|
|
907
|
-
/** Rename any persisted session (`/resume` picker ctrl+r): appends a
|
|
908
|
-
* `session/title` event to its log (live sessions go through the normal
|
|
909
|
-
* rename path). False when the log is absent or undecodable. */
|
|
910
|
-
renameSessionTo(sessionId: string, title: string): Promise<boolean>;
|
|
911
|
-
/** Manually compact the session history (/compact); no-op notify when the leaf lacks a compaction service. */
|
|
912
|
-
compact(): void;
|
|
913
|
-
/** Render a multi-line local report in the transcript (`/status`,
|
|
914
|
-
* `/doctor`, …): a `local` row plus one `local-output` row per line. */
|
|
915
|
-
pushLocal(title: string, lines: readonly string[]): void;
|
|
916
|
-
/** MCP server/tool status for /mcp: one line per server, or setup guidance. */
|
|
917
|
-
mcpStatus(): string[];
|
|
918
|
-
/** Write the conversation transcript to `dsh-tui-export-<ts>.md` in the
|
|
919
|
-
* session cwd; returns the written path, or null on failure. */
|
|
920
|
-
exportSession(): string | null;
|
|
921
|
-
/** Create `AGENTS.md` in the session cwd (DSH workspace-context file);
|
|
922
|
-
* returns the path, `'exists'` when already present, or null on failure. */
|
|
923
|
-
initWorkspace(): string | null;
|
|
924
|
-
/** Environment diagnostics for `/doctor`. */
|
|
925
|
-
doctorInfo(): string[];
|
|
926
|
-
/** Plugin contract/grant/ledger diagnostics for `/plugins` (C-070 trust
|
|
927
|
-
* banner first line; `check <path>` runs validatePlugin + negotiate). */
|
|
928
|
-
pluginsInfo(args: string): string[];
|
|
929
|
-
/** Subagent rows for `/agents` (DSH subagent service; empty message when
|
|
930
|
-
* the service is absent). */
|
|
931
|
-
listSubagents(): Promise<string[]>;
|
|
932
|
-
/**
|
|
933
|
-
* The agent view row snapshot: every live agent in
|
|
934
|
-
* this process plus every persisted session that no live agent owns,
|
|
935
|
-
* ordered needs-input/working first, then most recently active. Reading it
|
|
936
|
-
* is cheap; subscribe for changes.
|
|
937
|
-
*/
|
|
938
|
-
agentViewRows(): readonly AgentViewRow[];
|
|
939
|
-
/** Change feed for {@link agentViewRows}: fired on agent lifecycle/status
|
|
940
|
-
* changes and — throttled — on session events of background agents. */
|
|
941
|
-
subscribeAgentView(listener: () => void): () => void;
|
|
942
|
-
/**
|
|
943
|
-
* Dispatch a new background session (`agent view` input): creates an agent
|
|
944
|
-
* in this process, delivers the prompt as a user message, and keeps the
|
|
945
|
-
* TUI attached to its current session. The new session keeps running until
|
|
946
|
-
* it finishes its turn or is stopped — it lives only while this process
|
|
947
|
-
* does.
|
|
948
|
-
*/
|
|
949
|
-
dispatchBackgroundAgent(prompt: string): Promise<AgentViewDispatchResult>;
|
|
950
|
-
/** Stop a background session (Ctrl+X): abort its turn and dispose its
|
|
951
|
-
* agent; the persisted log survives for resume. False for the attached
|
|
952
|
-
* session or one this TUI does not own. */
|
|
953
|
-
stopBackgroundAgent(sessionId: string): Promise<boolean>;
|
|
954
|
-
/**
|
|
955
|
-
* Attach the TUI terminal to a session (`agent view` Enter/→): a live
|
|
956
|
-
* agent is adopted in place (its handle becomes the channel's), a
|
|
957
|
-
* persisted one resumes through the persistence seam. The previously
|
|
958
|
-
* attached agent is NOT disposed — it keeps running as a background
|
|
959
|
-
* session unless it was already idle with no history.
|
|
960
|
-
*/
|
|
961
|
-
attachToAgent(sessionId: string): Promise<ResumeResult>;
|
|
962
|
-
/** Trailing exchanges of any session — the live agent's in-memory log when
|
|
963
|
-
* it is alive in this process, the persisted artifact otherwise. */
|
|
964
|
-
peekAgentSession(sessionId: string): Promise<readonly PreviewEntry[]>;
|
|
965
|
-
/** `/bg` — background the attached session: swap the TUI to a fresh agent
|
|
966
|
-
* while the current one keeps running. The agent view lists it as a
|
|
967
|
-
* background session; `backgroundedSessionId` is the move's return target
|
|
968
|
-
* (Esc returns to that conversation). */
|
|
969
|
-
backgroundCurrent(): Promise<BackgroundResult>;
|
|
970
|
-
/** Send a follow-up user message to a session from the agent view's peek
|
|
971
|
-
* panel. Live sessions receive it directly; a session no live agent owns
|
|
972
|
-
* cannot take a reply (false + a notify to attach instead). */
|
|
973
|
-
replyToAgent(sessionId: string, text: string): Promise<boolean>;
|
|
974
|
-
/**
|
|
975
|
-
* Dispose the host-registry entries this channel registered (skill slash
|
|
976
|
-
* commands).
|
|
977
|
-
*
|
|
978
|
-
* `commandService.register` binds the registration to ITS own context, not
|
|
979
|
-
* the caller's, so the entries outlive this channel unless released: after a
|
|
980
|
-
* launcher recompose the stale registrations would still answer, but the
|
|
981
|
-
* fresh channel would see the names taken and stop managing them, freezing
|
|
982
|
-
* the menu. The plugin calls this from its teardown effect, where the real
|
|
983
|
-
* cordis context lives.
|
|
984
|
-
*/
|
|
985
|
-
releaseContributions(): void;
|
|
986
|
-
/**
|
|
987
|
-
* The live agent's session event log (immutable snapshot, replaced on
|
|
988
|
-
* every append — dsh-session caches the frozen array) — the `/trace`
|
|
989
|
-
* trajectory view's data source. Screens already re-render on `version`
|
|
990
|
-
* bumps, so a view reading this per render follows live events in real
|
|
991
|
-
* time; agent swaps (/resume /rewind /new) are reflected immediately.
|
|
992
|
-
*/
|
|
993
|
-
traceEvents(): readonly SessionEvent[];
|
|
994
|
-
}
|
|
995
|
-
/** @internal */
|
|
996
|
-
/** One roster entry in the `/preset` picker (see {@link Channel.listPresets}). */
|
|
997
|
-
export interface PresetOption {
|
|
998
|
-
id: string;
|
|
999
|
-
name?: string;
|
|
1000
|
-
description?: string;
|
|
1001
|
-
/** Present when the roster marked this preset unloadable (shown verbatim). */
|
|
1002
|
-
broken?: string;
|
|
1003
|
-
isDefault: boolean;
|
|
1004
|
-
}
|
|
1005
|
-
export type PermissionPresetAvailability = 'runtime' | 'legacy' | 'unavailable';
|
|
1006
|
-
export interface PermissionPresetOption {
|
|
1007
|
-
readonly value: string;
|
|
1008
|
-
readonly name: string;
|
|
1009
|
-
readonly description?: string;
|
|
1010
|
-
}
|
|
1011
|
-
export interface PermissionPresetCurrent {
|
|
1012
|
-
readonly value: string;
|
|
1013
|
-
readonly name: string;
|
|
1014
|
-
readonly description?: string;
|
|
1015
|
-
readonly kind: 'preset' | 'custom';
|
|
1016
|
-
}
|
|
1017
|
-
/**
|
|
1018
|
-
* Adapter-owned permission roster snapshot. `options` never contains the
|
|
1019
|
-
* official `custom` sentinel; it is represented only by `current`.
|
|
1020
|
-
*/
|
|
1021
|
-
export interface PermissionPresetSnapshot {
|
|
1022
|
-
readonly availability: PermissionPresetAvailability;
|
|
1023
|
-
readonly options: readonly PermissionPresetOption[];
|
|
1024
|
-
readonly current?: PermissionPresetCurrent;
|
|
1025
|
-
}
|
|
1026
|
-
/** @internal */
|
|
1027
|
-
/** One user message submitted while the model was working, not yet claimed
|
|
1028
|
-
* by a turn. `steer` lands at the next step boundary of the running turn;
|
|
1029
|
-
* `followup` waits for the turn to end. */
|
|
1030
|
-
export interface PendingMessage {
|
|
1031
|
-
id: string;
|
|
1032
|
-
text: string;
|
|
1033
|
-
images: readonly ComposerImageRef[];
|
|
1034
|
-
placement: 'steer' | 'followup';
|
|
1035
|
-
}
|
|
1036
|
-
/**
|
|
1037
|
-
* Mutable channel state owned by {@link createChannel}: the screen's
|
|
1038
|
-
* reactive store. Screens subscribe and re-render on `version` bumps; the
|
|
1039
|
-
* fields mirror the public {@link Channel} contract, and the `@internal`
|
|
1040
|
-
* emit hooks belong to the implementation.
|
|
1041
|
-
*/
|
|
1042
|
-
/** One adapter-owned reasoning-effort level for the `/effort` slider. */
|
|
1043
|
-
export interface EffortOption {
|
|
1044
|
-
id: string;
|
|
1045
|
-
name: string;
|
|
1046
|
-
description?: string;
|
|
1047
|
-
}
|
|
1048
|
-
export interface ChannelState {
|
|
1049
|
-
version: number;
|
|
1050
|
-
rows: ChatRow[];
|
|
1051
|
-
status: AgentStatus | 'starting' | 'disposed';
|
|
1052
|
-
sessionTitle: string;
|
|
1053
|
-
sessionColor: string;
|
|
1054
|
-
autoRecapOnOpen: boolean;
|
|
1055
|
-
agentId: string;
|
|
1056
|
-
/** TUI-owned generation that changes on every live Agent rebind. */
|
|
1057
|
-
agentBindingGeneration: number;
|
|
1058
|
-
model: string;
|
|
1059
|
-
provider: string;
|
|
1060
|
-
tokens: TokenUsage;
|
|
1061
|
-
cwd: string;
|
|
1062
|
-
displayCwd: string;
|
|
1063
|
-
gitBranch: string | undefined;
|
|
1064
|
-
working: boolean;
|
|
1065
|
-
/** Whether a requested abort is still converging (see the public Channel type). */
|
|
1066
|
-
cancelPending: boolean;
|
|
1067
|
-
spinnerMode: SpinnerMode;
|
|
1068
|
-
responseChars: number;
|
|
1069
|
-
activeToolCount: number;
|
|
1070
|
-
turnStart: number;
|
|
1071
|
-
lastUserText: string;
|
|
1072
|
-
notifications: NotificationItem[];
|
|
1073
|
-
/** Adapter-advertised context capacity for the model route, when known. */
|
|
1074
|
-
contextWindow: number | undefined;
|
|
1075
|
-
/** Reasoning effort of the latest request header, when the adapter sets one. */
|
|
1076
|
-
reasoningEffort: string | undefined;
|
|
1077
|
-
/** The live route's reasoning-effort level ids, low → high. */
|
|
1078
|
-
effortLevels: readonly string[] | undefined;
|
|
1079
|
-
/** Usage of the most recent request (context share + cache hits). */
|
|
1080
|
-
lastUsage: {
|
|
1081
|
-
input: number;
|
|
1082
|
-
output: number;
|
|
1083
|
-
cacheRead: number;
|
|
1084
|
-
cacheWrite: number;
|
|
1085
|
-
} | undefined;
|
|
1086
|
-
/** Output tokens per second of the current/last turn's response, when known. */
|
|
1087
|
-
tps: number | undefined;
|
|
1088
|
-
/** Per-turn tps samples (sparkline history), oldest first. */
|
|
1089
|
-
tpsSamples: {
|
|
1090
|
-
tps: number;
|
|
1091
|
-
at: number;
|
|
1092
|
-
}[];
|
|
1093
|
-
/** Latest working-activity snapshot (see the public Channel type). */
|
|
1094
|
-
workingActivity: ActivityStatus | undefined;
|
|
1095
|
-
/** Working-activity indicator preset (see the public Channel type). */
|
|
1096
|
-
activityFrames: string | undefined;
|
|
1097
|
-
/** Raw cordis.yml pins `/reload` must respect (see the public Channel type). */
|
|
1098
|
-
configuredProvider: string | undefined;
|
|
1099
|
-
configuredModel: string | undefined;
|
|
1100
|
-
configuredPreset: string | undefined;
|
|
1101
|
-
configuredActivityFrames: string | undefined;
|
|
1102
|
-
configuredLang: string | undefined;
|
|
1103
|
-
/** Diff presentation preference (see the public Channel type). */
|
|
1104
|
-
diffLayout: 'auto' | 'split' | 'unified';
|
|
1105
|
-
/** Thinking-block display (see the public Channel type). */
|
|
1106
|
-
thinkingFold: 'preview' | 'full';
|
|
1107
|
-
/** Tool-card background treatment (see the public Channel type). */
|
|
1108
|
-
toolBackground: ToolBackground;
|
|
1109
|
-
/** Transcript gutter mode (see the public Channel type). */
|
|
1110
|
-
scrollGutter: ScrollGutterMode;
|
|
1111
|
-
/** Root page inset setting (see the public Channel type). */
|
|
1112
|
-
pageMargin: PageMarginSetting;
|
|
1113
|
-
/** Terminal-card header folding (see the public Channel type). */
|
|
1114
|
-
foldTerminalCommand: boolean;
|
|
1115
|
-
/** Session-name chip on the prompt border (see the public Channel type). */
|
|
1116
|
-
promptSessionLabel: boolean;
|
|
1117
|
-
/** Fullscreen draft editor gate (see the public Channel type). */
|
|
1118
|
-
expandEditor: boolean;
|
|
1119
|
-
/** Smooth streaming reveal (see the public Channel type). */
|
|
1120
|
-
smoothStreaming: boolean;
|
|
1121
|
-
/** Status-footer preferences (see the public Channel type). */
|
|
1122
|
-
statusBar: StatusBarConfig;
|
|
1123
|
-
/** Apply a diff-layout change (see the public Channel type). */
|
|
1124
|
-
setDiffLayout(layout: 'auto' | 'split' | 'unified'): void;
|
|
1125
|
-
/** Apply a thinking-display change (see the public Channel type). */
|
|
1126
|
-
setThinkingFold(mode: 'preview' | 'full'): void;
|
|
1127
|
-
/** Apply a tool-card background change. */
|
|
1128
|
-
setToolBackground(background: ToolBackground): void;
|
|
1129
|
-
/** Apply a transcript gutter mode change. */
|
|
1130
|
-
setScrollGutter(mode: ScrollGutterMode): void;
|
|
1131
|
-
/** Apply a root page-inset setting change (drives the PageMargin box). */
|
|
1132
|
-
setPageMargin(setting: PageMarginSetting): void;
|
|
1133
|
-
/** Apply a terminal-card header folding change. */
|
|
1134
|
-
setFoldTerminalCommand(enabled: boolean): void;
|
|
1135
|
-
/** Apply a prompt session-name chip change. */
|
|
1136
|
-
setPromptSessionLabel(enabled: boolean): void;
|
|
1137
|
-
/** Apply a fullscreen-editor gate change. */
|
|
1138
|
-
setExpandEditor(enabled: boolean): void;
|
|
1139
|
-
/** Apply a smooth-streaming reveal change. */
|
|
1140
|
-
setSmoothStreaming(enabled: boolean): void;
|
|
1141
|
-
/** Apply status-footer preference changes. */
|
|
1142
|
-
setStatusBar(config: Partial<StatusBarConfig>): void;
|
|
1143
|
-
/** Whale header art switch (see the public Channel type). */
|
|
1144
|
-
whale: boolean;
|
|
1145
|
-
/** Idle whale behaviors switch (see the public Channel type). */
|
|
1146
|
-
whaleIdle: boolean;
|
|
1147
|
-
/** Apply a whale-visibility change (see the public Channel type). */
|
|
1148
|
-
setWhale(visible: boolean): void;
|
|
1149
|
-
/** Apply an idle-whale-behavior change (see the public Channel type). */
|
|
1150
|
-
setWhaleIdle(enabled: boolean): void;
|
|
1151
|
-
minimal: boolean;
|
|
1152
|
-
/** Apply a minimal-mode change (see the public Channel type). */
|
|
1153
|
-
setMinimal(enabled: boolean): void;
|
|
1154
|
-
/** Working-activity display switch (see the public Channel type). */
|
|
1155
|
-
activityEnabled: boolean;
|
|
1156
|
-
/** Context bar row switch (see the public Channel type). */
|
|
1157
|
-
contextBarEnabled: boolean;
|
|
1158
|
-
/** Current same-session goal projection (see the public Channel type). */
|
|
1159
|
-
goal: ChannelGoal | undefined;
|
|
1160
|
-
/** Latest todo-list snapshot (see the public Channel type). */
|
|
1161
|
-
todos: TodoPanelItem[];
|
|
1162
|
-
/** Loaded-context snapshot (see the public Channel type). */
|
|
1163
|
-
loadedContext: LoadedContext | undefined;
|
|
1164
|
-
/** Messages submitted while working, awaiting their turn/step boundary.
|
|
1165
|
-
* Driven by agent inbox events (inserted/claimed/discarded). */
|
|
1166
|
-
pending: PendingMessage[];
|
|
1167
|
-
/** 侧问(见 public Channel.sideQuestion)。 */
|
|
1168
|
-
sideQuestion(question: string, options?: {
|
|
1169
|
-
signal?: AbortSignal;
|
|
1170
|
-
onText?: (delta: string) => void;
|
|
1171
|
-
}): Promise<{
|
|
1172
|
-
answer: string | null;
|
|
1173
|
-
error?: string;
|
|
1174
|
-
}>;
|
|
1175
|
-
/** 会话 recap(见 public Channel.recapRecent)。 */
|
|
1176
|
-
recapRecent(options?: {
|
|
1177
|
-
signal?: AbortSignal;
|
|
1178
|
-
onText?: (delta: string) => void;
|
|
1179
|
-
}): Promise<RecapOutcome>;
|
|
1180
|
-
/** 会话强调色(见 public Channel.setSessionColor)。 */
|
|
1181
|
-
setSessionColor(color: string): void;
|
|
1182
|
-
/** Effective slash commands (see the public Channel type). */
|
|
1183
|
-
commandList: readonly LocalCommand[];
|
|
1184
|
-
/** Context-aware slash completions (see the public Channel type). */
|
|
1185
|
-
commandCompletions(input: string): readonly CommandCompletion[];
|
|
1186
|
-
/** Run a plugin-registered command (see the public Channel type). */
|
|
1187
|
-
runExternalCommand(name: string, rawInput: string, images?: readonly ComposerImageRef[]): Promise<string | undefined>;
|
|
1188
|
-
/** Run a command while retaining its draft-consumption outcome. */
|
|
1189
|
-
runExternalCommandOutcome(name: string, rawInput: string, images?: readonly ComposerImageRef[]): Promise<ExternalCommandOutcome | undefined>;
|
|
1190
|
-
/** TUI-side permission preset switch (see the public Channel type). */
|
|
1191
|
-
runPermissionPreset(name: string): Promise<boolean>;
|
|
1192
|
-
/** Open plugin scene mirrored from the scenes runtime (see the public Channel type). */
|
|
1193
|
-
pluginScene: TuiSceneDescriptor | undefined;
|
|
1194
|
-
/** Open a plugin scene by id (see the public Channel type). */
|
|
1195
|
-
openPluginScene(id: string): boolean;
|
|
1196
|
-
/** Close the open plugin scene (see the public Channel type). */
|
|
1197
|
-
closePluginScene(): void;
|
|
1198
|
-
/** Estimated context segments by content type (pi-nano-context style bar). */
|
|
1199
|
-
contextSegments: {
|
|
1200
|
-
system: number;
|
|
1201
|
-
prompt: number;
|
|
1202
|
-
assistant: number;
|
|
1203
|
-
thinking: number;
|
|
1204
|
-
tools: number;
|
|
1205
|
-
};
|
|
1206
|
-
/** Active subagents roster (see the public Channel type). */
|
|
1207
|
-
subagents: readonly SubagentState[];
|
|
1208
|
-
subagentControl: SubagentControl;
|
|
1209
|
-
/** Background jobs of the current session (see the public Channel type). */
|
|
1210
|
-
backgroundJobs: readonly BackgroundJobState[];
|
|
1211
|
-
jobControl: JobControl;
|
|
1212
|
-
subscribe: (listener: () => void) => () => void;
|
|
1213
|
-
stagedImageGeneration(): number;
|
|
1214
|
-
stageImage(input: StagedImageInput): Promise<string>;
|
|
1215
|
-
stageComposerImage(input: StagedImageInput, generation: number): Promise<StagedImageHandle>;
|
|
1216
|
-
hasStagedImage(stageId: string): boolean;
|
|
1217
|
-
discardStagedImage(stageId: string): void;
|
|
1218
|
-
stagedImage(stageId: string): TranscriptImage | undefined;
|
|
1219
|
-
stagedImageLimits(): {
|
|
1220
|
-
readonly maxImageBytes: number;
|
|
1221
|
-
readonly maxImagesPerMessage: number;
|
|
1222
|
-
} | undefined;
|
|
1223
|
-
/** @internal event bump (the public `notify(text)` posts a notification). */
|
|
1224
|
-
emit(): void;
|
|
1225
|
-
/** @internal frame-aligned emit for high-frequency streaming deltas:
|
|
1226
|
-
* version bumps synchronously but listeners fire at most once per 16ms
|
|
1227
|
-
* window (trailing edge). */
|
|
1228
|
-
emitStream(): void;
|
|
1229
|
-
submit(text: string, images?: readonly ComposerImageRef[]): void;
|
|
1230
|
-
steer(text: string, images?: readonly ComposerImageRef[]): void;
|
|
1231
|
-
removePending(id: string): boolean;
|
|
1232
|
-
cancel(): void;
|
|
1233
|
-
/** @internal interrupt-and-deliver (see the public Channel type). */
|
|
1234
|
-
interruptAndDeliver(inputs: readonly (string | ComposerSubmission)[]): number;
|
|
1235
|
-
rewindTo(row: ChatRow, mode?: string | null): Promise<string | null>;
|
|
1236
|
-
/** @internal rewind decision prompt (see the public Channel.promptRewind). */
|
|
1237
|
-
promptRewind(row: ChatRow): Promise<{
|
|
1238
|
-
modes: readonly TuiRewindMode[];
|
|
1239
|
-
} | 'cancel' | null>;
|
|
1240
|
-
/** @internal session-tree assembly (see the public Channel.buildSessionTree). */
|
|
1241
|
-
buildSessionTree(): Promise<SessionTreeData | null>;
|
|
1242
|
-
/** @internal tree-entry rewind/fork (see the public Channel.rewindToNode). */
|
|
1243
|
-
rewindToNode(sessionId: string, seq: number, mode?: 'rewind' | 'fork'): Promise<string | null>;
|
|
1244
|
-
/** @internal tip fork (see the public Channel.forkSession). */
|
|
1245
|
-
forkSession(): Promise<boolean>;
|
|
1246
|
-
/** Switch the live agent to a persisted session, replaying its history. */
|
|
1247
|
-
resumeTo(sessionId: string): Promise<ResumeResult>;
|
|
1248
|
-
/** Start a fresh conversation (`/new`). */
|
|
1249
|
-
newSession(): Promise<boolean>;
|
|
1250
|
-
listWorkspaces(): Promise<readonly TuiWorkspaceTarget[]>;
|
|
1251
|
-
resolveWorkspace(uri: string): Promise<TuiWorkspaceTarget | undefined>;
|
|
1252
|
-
switchWorkspace(target: TuiWorkspaceTarget): Promise<boolean>;
|
|
1253
|
-
renameWorkspace(title: string): Promise<boolean>;
|
|
1254
|
-
workspaceCommands(): readonly Pick<TuiWorkspaceCommand, 'name' | 'aliases' | 'description'>[];
|
|
1255
|
-
runWorkspaceCommand(name: string, input: string): Promise<TuiWorkspaceCommandResult | undefined>;
|
|
1256
|
-
/** Switch the live model (`/model` picker). */
|
|
1257
|
-
switchModel(provider: string, model: string): Promise<boolean>;
|
|
1258
|
-
/** The route's effort levels for `/effort` (see the public Channel type). */
|
|
1259
|
-
listEfforts(): Promise<{
|
|
1260
|
-
efforts: readonly EffortOption[];
|
|
1261
|
-
defaultEffort: string | undefined;
|
|
1262
|
-
}>;
|
|
1263
|
-
/** Set one effort level by id (see the public Channel type). */
|
|
1264
|
-
setEffort(id: string): Promise<boolean>;
|
|
1265
|
-
/** Re-seat the future-sessions default reasoning effort (see the public
|
|
1266
|
-
* Channel.setDefaultEffort). */
|
|
1267
|
-
setDefaultEffort(id: string | undefined): void;
|
|
1268
|
-
/** The session mode currently in force (see the public Channel type). */
|
|
1269
|
-
mode: SessionModeSpec;
|
|
1270
|
-
/** Index of `mode` in the configured cycle (see the public Channel type). */
|
|
1271
|
-
modeIndex: number;
|
|
1272
|
-
/** Shift+Tab session-mode advance (see the public Channel type). */
|
|
1273
|
-
cycleMode(): Promise<void>;
|
|
1274
|
-
/** Read the official permission preset roster and current identity. */
|
|
1275
|
-
permissionPresets(): PermissionPresetSnapshot;
|
|
1276
|
-
/** The preset the current session runs under (see the public Channel type). */
|
|
1277
|
-
agentPreset: string | undefined;
|
|
1278
|
-
/** The roster's presets for the `/preset` picker (see the public Channel type). */
|
|
1279
|
-
listPresets(): Promise<readonly PresetOption[]>;
|
|
1280
|
-
/** Switch the agent preset (see the public Channel type). */
|
|
1281
|
-
switchPreset(presetId: string): Promise<boolean>;
|
|
1282
|
-
clear(): void;
|
|
1283
|
-
/** @internal older-row restoration (see the public Channel.loadOlder). */
|
|
1284
|
-
loadOlder(): number;
|
|
1285
|
-
notify(text: string, options?: {
|
|
1286
|
-
color?: NotificationItem['color'];
|
|
1287
|
-
timeoutMs?: number;
|
|
1288
|
-
}): () => void;
|
|
1289
|
-
/** Switch the working-activity indicator preset (see the public Channel). */
|
|
1290
|
-
setActivityFrames(name: string): boolean;
|
|
1291
|
-
listModels(): Promise<readonly LlmModelInfo[]>;
|
|
1292
|
-
/** Provider display identities (see the public Channel type). */
|
|
1293
|
-
listProviders(): Promise<readonly LlmProviderInfo[]>;
|
|
1294
|
-
/** Drop the `/model` completion cache (see the public Channel type). */
|
|
1295
|
-
invalidateModelCompletion(): void;
|
|
1296
|
-
/** The live agent's skill catalog for `/skills` (see the public Channel type). */
|
|
1297
|
-
listSkills(): Promise<readonly SkillInfo[] | undefined>;
|
|
1298
|
-
/** Safe credential metadata for `/login` (see the public Channel type). */
|
|
1299
|
-
describeCredential(ref: string): Promise<CredentialStatus | undefined>;
|
|
1300
|
-
/** DeepSeek official balance for `/balance` (see the public Channel type). */
|
|
1301
|
-
balanceInfo(): Promise<BalanceResult>;
|
|
1302
|
-
/** `/provider` wizard capabilities (see the public Channel type). */
|
|
1303
|
-
providerSetup(): ProviderSetupHost | undefined;
|
|
1304
|
-
/** OAuth sign-in states (see the public Channel type). */
|
|
1305
|
-
oauthProviderStatuses(): Promise<readonly OAuthProviderStatus[] | undefined>;
|
|
1306
|
-
/** `/settings` screen capabilities (see the public Channel type). */
|
|
1307
|
-
settingsHost(): SettingsHost | undefined;
|
|
1308
|
-
/** Plugin-declared settings sections (see the public Channel type). */
|
|
1309
|
-
settingsSections(): readonly TuiSettingsSection[];
|
|
1310
|
-
/** Subscribe to settings-section register/unregister events. */
|
|
1311
|
-
subscribeSettingsSections(listener: () => void): () => void;
|
|
1312
|
-
listFileCandidates(query: string, options?: {
|
|
1313
|
-
signal?: AbortSignal;
|
|
1314
|
-
topK?: number;
|
|
1315
|
-
}): Promise<readonly FileCandidate[]>;
|
|
1316
|
-
listFiles(): Promise<readonly string[]>;
|
|
1317
|
-
listSessions(): Promise<readonly SessionSummary[]>;
|
|
1318
|
-
/** Trailing exchanges of a persisted session (see the public Channel type). */
|
|
1319
|
-
previewSession(sessionId: string): Promise<readonly PreviewEntry[]>;
|
|
1320
|
-
setResumeTarget(sessionId: string): void;
|
|
1321
|
-
/** Rename the current session (see the public Channel type). */
|
|
1322
|
-
renameSession(title: string): void;
|
|
1323
|
-
/** Delete a persisted session (see the public Channel type). */
|
|
1324
|
-
deleteSession(sessionId: string): Promise<boolean>;
|
|
1325
|
-
/** Rename any persisted session (see the public Channel type). */
|
|
1326
|
-
renameSessionTo(sessionId: string, title: string): Promise<boolean>;
|
|
1327
|
-
/** Manually compact the session history (/compact). */
|
|
1328
|
-
compact(): void;
|
|
1329
|
-
/** Multi-line local report (`/status`, `/doctor`, …). */
|
|
1330
|
-
pushLocal(title: string, lines: readonly string[]): void;
|
|
1331
|
-
/** MCP server/tool status for /mcp: one line per server, or setup guidance. */
|
|
1332
|
-
mcpStatus(): string[];
|
|
1333
|
-
/** Export the transcript to a markdown file (/export). */
|
|
1334
|
-
exportSession(): string | null;
|
|
1335
|
-
/** Create `AGENTS.md` in the session cwd (/init). */
|
|
1336
|
-
initWorkspace(): string | null;
|
|
1337
|
-
/** Environment diagnostics (/doctor). */
|
|
1338
|
-
doctorInfo(): string[];
|
|
1339
|
-
/** Plugin diagnostics (/plugins); see the public Channel type. */
|
|
1340
|
-
pluginsInfo(args: string): string[];
|
|
1341
|
-
/** Subagent rows (/agents). */
|
|
1342
|
-
listSubagents(): Promise<string[]>;
|
|
1343
|
-
/** See {@link Channel.agentViewRows}. */
|
|
1344
|
-
agentViewRows(): readonly AgentViewRow[];
|
|
1345
|
-
/** See {@link Channel.subscribeAgentView}. */
|
|
1346
|
-
subscribeAgentView(listener: () => void): () => void;
|
|
1347
|
-
/** See {@link Channel.dispatchBackgroundAgent}. */
|
|
1348
|
-
dispatchBackgroundAgent(prompt: string): Promise<AgentViewDispatchResult>;
|
|
1349
|
-
/** See {@link Channel.stopBackgroundAgent}. */
|
|
1350
|
-
stopBackgroundAgent(sessionId: string): Promise<boolean>;
|
|
1351
|
-
/** See {@link Channel.attachToAgent}. */
|
|
1352
|
-
attachToAgent(sessionId: string): Promise<ResumeResult>;
|
|
1353
|
-
/** See {@link Channel.peekAgentSession}. */
|
|
1354
|
-
peekAgentSession(sessionId: string): Promise<readonly PreviewEntry[]>;
|
|
1355
|
-
/** See {@link Channel.backgroundCurrent}. */
|
|
1356
|
-
backgroundCurrent(): Promise<BackgroundResult>;
|
|
1357
|
-
/** See {@link Channel.replyToAgent}. */
|
|
1358
|
-
replyToAgent(sessionId: string, text: string): Promise<boolean>;
|
|
1359
|
-
/**
|
|
1360
|
-
* Bind the plugin's approval store (post-construction): row derivation
|
|
1361
|
-
* reads its parked ask ids for the "needs input" state, and its emits
|
|
1362
|
-
* re-publish as agent-view changes.
|
|
1363
|
-
*/
|
|
1364
|
-
bindApprovalStore(store: {
|
|
1365
|
-
pendingAgentIds(): readonly string[];
|
|
1366
|
-
pendingAgentDetail(agentId: string): {
|
|
1367
|
-
toolName: string;
|
|
1368
|
-
reason?: string;
|
|
1369
|
-
command?: string;
|
|
1370
|
-
} | undefined;
|
|
1371
|
-
subscribe(listener: () => void): () => void;
|
|
1372
|
-
}): void;
|
|
1373
|
-
/** See {@link Channel.releaseContributions}. */
|
|
1374
|
-
releaseContributions(): void;
|
|
1375
|
-
/** Live session event log (see the public Channel type, `/trace`). */
|
|
1376
|
-
traceEvents(): readonly SessionEvent[];
|
|
1377
|
-
}
|
|
1378
6
|
/**
|
|
1379
7
|
* Create the live channel state for one agent session: replay the durable
|
|
1380
8
|
* transcript, subscribe to the agent's events, and expose every TUI action.
|
|
@@ -1386,154 +14,10 @@ export interface ChannelState {
|
|
|
1386
14
|
* reasoning-effort / working-activity / agent-handle preferences.
|
|
1387
15
|
* @returns The live channel state, subscribed and ready to render.
|
|
1388
16
|
*/
|
|
1389
|
-
export declare function createChannel(ctx: Context, initialAgent: Agent, options:
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
* startup until the first request/header event reports the adapter's
|
|
1396
|
-
* live value. */
|
|
1397
|
-
effort?: string;
|
|
1398
|
-
/** Derive the working line from base session events; default on. */
|
|
1399
|
-
activity?: boolean;
|
|
1400
|
-
/** Indicator preset for the working-activity line (`moon8`/`moon`/
|
|
1401
|
-
* `comet`/`dots`/… or `random`); default `moon8`. */
|
|
1402
|
-
activityFrames?: string;
|
|
1403
|
-
/** Edit/Write diff presentation; default `auto` (side-by-side ≥110
|
|
1404
|
-
* columns, unified below). */
|
|
1405
|
-
diffLayout?: 'auto' | 'split' | 'unified';
|
|
1406
|
-
/** Thinking-block display; default `preview` (2-3 line live preview,
|
|
1407
|
-
* fold per step) — `full` keeps thinking expanded until turn end. */
|
|
1408
|
-
thinkingFold?: 'preview' | 'full';
|
|
1409
|
-
/** Tool-card background treatment; default `none`. */
|
|
1410
|
-
toolBackground?: ToolBackground;
|
|
1411
|
-
/** Transcript gutter mode; default `timeline` (settings `dsh-tui.scrollGutter`). */
|
|
1412
|
-
scrollGutter?: ScrollGutterMode;
|
|
1413
|
-
/** Root page inset setting; default `normal` (settings `dsh-tui.pageMargin`). */
|
|
1414
|
-
pageMargin?: PageMarginSetting;
|
|
1415
|
-
/** Terminal-card header folding; default off (settings
|
|
1416
|
-
* `dsh-tui.foldTerminalCommand`). */
|
|
1417
|
-
foldTerminalCommand?: boolean;
|
|
1418
|
-
/** Session-name chip on the prompt top border; default off (settings
|
|
1419
|
-
* `dsh-tui.promptSessionLabel`). */
|
|
1420
|
-
promptSessionLabel?: boolean;
|
|
1421
|
-
/** Fullscreen draft editor entry points; default on (settings
|
|
1422
|
-
* `dsh-tui.expandEditor`). */
|
|
1423
|
-
expandEditor?: boolean;
|
|
1424
|
-
/** Smooth streaming reveal; default on (settings
|
|
1425
|
-
* `dsh-tui.smoothStreaming`). */
|
|
1426
|
-
smoothStreaming?: boolean;
|
|
1427
|
-
/** Status-footer field visibility and compactness. */
|
|
1428
|
-
statusBar?: Partial<StatusBarConfig>;
|
|
1429
|
-
/** Show the header's pixel whale art; default on. */
|
|
1430
|
-
whale?: boolean;
|
|
1431
|
-
/** Idle whale behaviors (fin/tail/sleep) after the intro settles;
|
|
1432
|
-
* default off (click-hearts are always available). */
|
|
1433
|
-
whaleIdle?: boolean;
|
|
1434
|
-
/** Minimal mode; default off (settings `dsh-tui.minimal`). */
|
|
1435
|
-
minimal?: boolean;
|
|
1436
|
-
/** Show the segmented context bar row in the status footer; default on
|
|
1437
|
-
* (cordis.yml `contextBar: false` hides it, issue #29). */
|
|
1438
|
-
contextBar?: boolean;
|
|
1439
|
-
/** cordis.yml's static preset choice (`preset` key): wins over the
|
|
1440
|
-
* persisted `/preset` preference for NEW sessions this channel starts. */
|
|
1441
|
-
configuredPreset?: string;
|
|
1442
|
-
/** cordis.yml's static route (`provider`/`model` keys), undefined when
|
|
1443
|
-
* unset: wins over the persisted `/model` preference for NEW sessions
|
|
1444
|
-
* only when BOTH halves are pinned (atomic rule, issue #67), and is the
|
|
1445
|
-
* only route a resume overrides the target's own record with. */
|
|
1446
|
-
configuredProvider?: string;
|
|
1447
|
-
configuredModel?: string;
|
|
1448
|
-
/** cordis.yml's raw `lang` key, undefined when unset: `/reload` consults
|
|
1449
|
-
* it so a static deployment choice is never overridden by lang.json. */
|
|
1450
|
-
configuredLang?: string;
|
|
1451
|
-
/** cordis.yml's raw `activityFrames` key, undefined when unset: the
|
|
1452
|
-
* static choice `/reload` must not override. */
|
|
1453
|
-
configuredActivityFrames?: string;
|
|
1454
|
-
/** The preset the initial agent's session runs under (from resolveAgent). */
|
|
1455
|
-
agentPreset?: string;
|
|
1456
|
-
/** Shift+Tab session-mode cycle from cordis.yml `modes`; undefined →
|
|
1457
|
-
* the built-in default/plan/full cycle (sessionModes.ts). */
|
|
1458
|
-
modes?: readonly SessionModeSpec[];
|
|
1459
|
-
/** Handle of the initial agent; disposed when a rewind replaces it. */
|
|
1460
|
-
handle?: AgentHandle;
|
|
1461
|
-
}): ChannelState;
|
|
1462
|
-
/**
|
|
1463
|
-
* `/resume` project filter (issue #96): exact cwd match, PLUS sessions
|
|
1464
|
-
* recorded in a subdirectory — pre-upgrade launches recorded the launch
|
|
1465
|
-
* subdirectory as the header cwd, and with the cwd default now resolving to
|
|
1466
|
-
* the git worktree root an exact match would hide those sessions forever.
|
|
1467
|
-
* They belong to the same workspace, so they stay listed. Comparison follows
|
|
1468
|
-
* the platform's filesystem semantics (case-insensitive on Windows — a
|
|
1469
|
-
* pre-upgrade header may record `C:\Repo` where the current launch resolves
|
|
1470
|
-
* `c:\repo`). `caseInsensitive` is a parameter (not a platform read) so the
|
|
1471
|
-
* verifier can exercise both modes on any host. Exported for
|
|
1472
|
-
* scripts/verify-session-cwd.mjs.
|
|
1473
|
-
*
|
|
1474
|
-
* Boundary rule (issue #153): container directories are nobody's workspace.
|
|
1475
|
-
* $HOME and the Windows root forms — plain drive roots (`C:`), UNC share
|
|
1476
|
-
* roots (`//server/share`), and extended-length roots (`//?/C:`,
|
|
1477
|
-
* `//?/UNC/server/share`) — are ancestors of unrelated projects, so the
|
|
1478
|
-
* descendant rules below would list every session on the machine from `~`
|
|
1479
|
-
* (and every session on the drive/share from those roots). At these
|
|
1480
|
-
* boundaries, in either direction, only an exact match passes.
|
|
1481
|
-
*/
|
|
1482
|
-
export declare function sessionCwdMatches(stateCwd: string, headerCwd: string, caseInsensitive?: boolean): boolean;
|
|
1483
|
-
/** The fs-service surface `@`-mention expansion consumes (dsh-fs-local). */
|
|
1484
|
-
export interface MentionFs {
|
|
1485
|
-
resolve(path: string): Promise<{
|
|
1486
|
-
displayPath: string;
|
|
1487
|
-
}>;
|
|
1488
|
-
stat(target: {
|
|
1489
|
-
displayPath: string;
|
|
1490
|
-
}): Promise<{
|
|
1491
|
-
type: 'file' | 'directory' | 'other';
|
|
1492
|
-
} | undefined>;
|
|
1493
|
-
readText(target: {
|
|
1494
|
-
displayPath: string;
|
|
1495
|
-
}): Promise<string>;
|
|
1496
|
-
readBytes?(target: {
|
|
1497
|
-
displayPath: string;
|
|
1498
|
-
}, signal: AbortSignal | undefined, maxBytes: number): Promise<Uint8Array>;
|
|
1499
|
-
listDir(target: {
|
|
1500
|
-
displayPath: string;
|
|
1501
|
-
}): Promise<Array<{
|
|
1502
|
-
name: string;
|
|
1503
|
-
type: 'file' | 'directory' | 'other';
|
|
1504
|
-
}>>;
|
|
1505
|
-
}
|
|
1506
|
-
type MentionImageBlock = ChannelImageBlock;
|
|
1507
|
-
type MentionImageMediaType = ChannelImageMediaType;
|
|
1508
|
-
/** Attachment subset used to turn an image path into a durable user block. */
|
|
1509
|
-
export interface MentionAttachments {
|
|
1510
|
-
readonly imageLimits: {
|
|
1511
|
-
readonly maxImageBytes: number;
|
|
1512
|
-
readonly maxImagesPerMessage: number;
|
|
1513
|
-
readonly maxMessageImageBytes: number;
|
|
1514
|
-
readonly mediaTypes: readonly MentionImageMediaType[];
|
|
1515
|
-
};
|
|
1516
|
-
saveImage(input: {
|
|
1517
|
-
data: Uint8Array;
|
|
1518
|
-
mediaType: MentionImageMediaType;
|
|
1519
|
-
name?: string;
|
|
1520
|
-
}): Promise<MentionImageBlock['attachment']>;
|
|
1521
|
-
}
|
|
1522
|
-
export interface MentionExpansion {
|
|
1523
|
-
/** Model-facing blocks: the typed text first, one block per attachment. */
|
|
1524
|
-
blocks: ContentBlock[];
|
|
1525
|
-
/** Paths that resolved and were attached (for the confirmation notice). */
|
|
1526
|
-
attached: string[];
|
|
1527
|
-
/** Mention tokens that failed to resolve (kept literal, warned about). */
|
|
1528
|
-
missing: string[];
|
|
1529
|
-
}
|
|
1530
|
-
/**
|
|
1531
|
-
* Expand a submitted text's `@` mentions (issue #15) into model-facing
|
|
1532
|
-
* attachment blocks: supported image files become durable image blocks,
|
|
1533
|
-
* other files contribute capped text, and directories contribute a shallow
|
|
1534
|
-
* listing. Reads always go through the active fs service, so provider-owned
|
|
1535
|
-
* workspaces keep their routing semantics. The typed text stays first and
|
|
1536
|
-
* verbatim. Best-effort failures degrade to `missing`, never a failed send.
|
|
1537
|
-
*/
|
|
1538
|
-
export declare function expandMentions(fs: MentionFs | undefined, cwd: string, text: string, attachments?: MentionAttachments, stagedImages?: ReadonlyMap<string, MentionImageBlock['attachment']>): Promise<MentionExpansion>;
|
|
17
|
+
export declare function createChannel(ctx: Context, initialAgent: Agent, options: ChannelLaunchOptions): ChannelState;
|
|
18
|
+
export type { ChannelLaunchOptions } from './channel/state.js';
|
|
19
|
+
export { expandMentions } from './channel/mentions.js';
|
|
20
|
+
export { sessionCwdMatches } from './channel/paths.js';
|
|
21
|
+
export type { ActivityStatus, AgentViewDispatchResult, AgentViewRow, AgentViewStatus, BackgroundResult, Channel, ChannelGoal, ChannelState, ChatRow, ComposerImageRef, ComposerSubmission, CredentialStatus, EffortOption, ExternalCommandOutcome, JobControl, JobRow, LoadedContext, LoadedContextEntry, LoadedContextFile, LoadedContextSkill, LoadedContextTool, MentionAttachments, MentionExpansion, MentionFs, NotificationItem, PendingMessage, PermissionPresetAvailability, PermissionPresetCurrent, PermissionPresetOption, PermissionPresetSnapshot, PresetOption, ResumeResult, SkillInfo, StagedImageHandle, StagedImageInput, SubagentControl, SubagentRow, TodoPanelItem, TokenBucket, TokenUsage, ToolCallView, ToolFileDiff, ToolResultView, ToolRow, ToolViewPresenter, TranscriptImage } from './channel/types.js';
|
|
22
|
+
export { emptyTokenUsage } from './channel/usage.js';
|
|
1539
23
|
//# sourceMappingURL=channel.d.ts.map
|