@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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
3
|
+
import { readGrantStore } from '../../adapter/standard/grants.js';
|
|
4
|
+
import type { AdapterRuntimeOptions } from '../../adapter/kernel/runtime.js';
|
|
5
|
+
import type { ChannelOwner } from './owner.js';
|
|
6
|
+
/** Local reports and filesystem actions, fenced to the originating binding. */
|
|
7
|
+
export declare function createReportActions(ctx: Context, deps: {
|
|
8
|
+
owner: Pick<ChannelOwner, 'current'>;
|
|
9
|
+
capture(): {
|
|
10
|
+
readonly agent: Agent;
|
|
11
|
+
readonly generation: number;
|
|
12
|
+
};
|
|
13
|
+
current(capture: {
|
|
14
|
+
readonly agent: Agent;
|
|
15
|
+
readonly generation: number;
|
|
16
|
+
}): boolean;
|
|
17
|
+
cwd(): string;
|
|
18
|
+
model(): string;
|
|
19
|
+
provider(): string;
|
|
20
|
+
contextWindow(): number | undefined;
|
|
21
|
+
sessionTitle(): string;
|
|
22
|
+
runtime: AdapterRuntimeOptions;
|
|
23
|
+
grantStore(): ReturnType<typeof readGrantStore>;
|
|
24
|
+
}): {
|
|
25
|
+
balanceInfo: () => Promise<import("../../deepseekBalance.js").BalanceResult>;
|
|
26
|
+
mcpStatus: () => string[];
|
|
27
|
+
exportSession: () => string | null;
|
|
28
|
+
initWorkspace: () => string | "exists" | null;
|
|
29
|
+
doctorInfo: () => string[];
|
|
30
|
+
pluginsInfo: (args: string) => string[];
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=reports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/reports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAInD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAU5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IACtD,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,IAAI;QAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACjE,OAAO,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAA;IACjF,GAAG,IAAI,MAAM,CAAA;IACb,KAAK,IAAI,MAAM,CAAA;IACf,QAAQ,IAAI,MAAM,CAAA;IAClB,aAAa,IAAI,MAAM,GAAG,SAAS,CAAA;IACnC,YAAY,IAAI,MAAM,CAAA;IACtB,OAAO,EAAE,qBAAqB,CAAA;IAC9B,UAAU,IAAI,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;CAChD;;qBAcuB,MAAM,EAAE;yBAkCJ,MAAM,GAAG,IAAI;yBAsCb,MAAM,GAAG,QAAQ,GAAG,IAAI;sBAY3B,MAAM,EAAE;wBAmCJ,MAAM,KAAG,MAAM,EAAE;EAM7C"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { existsSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { collectAdapterDiagnostics } from '../../adapter/kernel/diagnostics.js';
|
|
4
|
+
import { fetchBalance } from '../../deepseekBalance.js';
|
|
5
|
+
import { t } from '../../i18n.js';
|
|
6
|
+
import { credentialRefDeclared } from '../../utils/credentials.js';
|
|
7
|
+
import { homeDir } from '../../utils/paths.js';
|
|
8
|
+
import { sessionsRoots } from '../compat/index.js';
|
|
9
|
+
import { snapshotLiveSessionEvents } from '../compat/liveSession.js';
|
|
10
|
+
import { getHostGrantStore } from '../host-grants.js';
|
|
11
|
+
import { getHostFacade } from '../plugin-host.js';
|
|
12
|
+
import { pluginsInfoLines } from '../plugins-info.js';
|
|
13
|
+
/** Local reports and filesystem actions, fenced to the originating binding. */
|
|
14
|
+
export function createReportActions(ctx, deps) {
|
|
15
|
+
const current = (capture) => deps.owner.current() && deps.current(capture);
|
|
16
|
+
const balanceInfo = async () => {
|
|
17
|
+
const capture = deps.capture();
|
|
18
|
+
const credentials = ctx.get('credentials');
|
|
19
|
+
let apiKey = '';
|
|
20
|
+
if (credentials) {
|
|
21
|
+
try {
|
|
22
|
+
apiKey = (await credentials.resolve('DEEPSEEK_API_KEY'))?.value ?? '';
|
|
23
|
+
}
|
|
24
|
+
catch { /* env fallback */ }
|
|
25
|
+
}
|
|
26
|
+
if (!current(capture))
|
|
27
|
+
return { ok: false, reason: 'network' };
|
|
28
|
+
return fetchBalance(apiKey || process.env.DEEPSEEK_API_KEY || '');
|
|
29
|
+
};
|
|
30
|
+
const mcpStatus = () => {
|
|
31
|
+
const runtime = ctx.get('tools');
|
|
32
|
+
const byServer = new Map();
|
|
33
|
+
for (const schema of runtime?.schemas() ?? []) {
|
|
34
|
+
const match = schema.name.match(/^mcp__([a-z0-9-]+)__(.+)$/);
|
|
35
|
+
if (!match)
|
|
36
|
+
continue;
|
|
37
|
+
const tools = byServer.get(match[1]) ?? [];
|
|
38
|
+
tools.push(match[2]);
|
|
39
|
+
byServer.set(match[1], tools);
|
|
40
|
+
}
|
|
41
|
+
if (byServer.size === 0)
|
|
42
|
+
return [
|
|
43
|
+
t('mcp-none-configured'), t('mcp-insert-hint'), ' - insert:',
|
|
44
|
+
' - id: mcp-context7', " name: '@deepseek-ai/dsh-mcp-client'",
|
|
45
|
+
' config: { transport: stdio, serverName: context7, command: npx, args: ["-y", "@upstash/context7-mcp"] }',
|
|
46
|
+
t('mcp-readme-hint'),
|
|
47
|
+
];
|
|
48
|
+
return [...byServer].map(([server, tools]) => t('mcp-server-tools', { server, count: tools.length, tools: tools.join(', ') }));
|
|
49
|
+
};
|
|
50
|
+
const firstTextOf = (content) => {
|
|
51
|
+
for (const block of content ?? []) {
|
|
52
|
+
if (block === null || typeof block !== 'object')
|
|
53
|
+
continue;
|
|
54
|
+
const record = block;
|
|
55
|
+
if (record.type === 'text' && typeof record.text === 'string')
|
|
56
|
+
return record.text.trim();
|
|
57
|
+
}
|
|
58
|
+
return '';
|
|
59
|
+
};
|
|
60
|
+
const textOf = (content) => (content ?? []).flatMap(block => {
|
|
61
|
+
if (block === null || typeof block !== 'object')
|
|
62
|
+
return [];
|
|
63
|
+
const record = block;
|
|
64
|
+
return record.type === 'text' && typeof record.text === 'string' ? [record.text] : [];
|
|
65
|
+
}).join('').trim();
|
|
66
|
+
const exportSession = () => {
|
|
67
|
+
const capture = deps.capture();
|
|
68
|
+
const agent = capture.agent;
|
|
69
|
+
const parts = [t('export-title'), '', t('export-time', { time: new Date().toLocaleString() }),
|
|
70
|
+
t('export-model', { model: deps.model() }), t('export-session', { id: agent.id }), t('export-dir', { cwd: deps.cwd() }), ''];
|
|
71
|
+
for (const event of snapshotLiveSessionEvents(agent.session)) {
|
|
72
|
+
switch (event.type) {
|
|
73
|
+
case 'user/message': {
|
|
74
|
+
if (event.data.source.kind !== 'user')
|
|
75
|
+
break;
|
|
76
|
+
const text = firstTextOf(event.data.content);
|
|
77
|
+
if (text)
|
|
78
|
+
parts.push(`${t('export-user-section')}\n\n${text}\n`);
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
case 'assistant/message':
|
|
82
|
+
for (const block of event.data.message.content) {
|
|
83
|
+
if (block.type === 'reasoning' && block.text)
|
|
84
|
+
parts.push(`${t('export-thinking-section')}\n\n${block.text}\n`);
|
|
85
|
+
else if (block.type === 'text' && block.text)
|
|
86
|
+
parts.push(`${t('export-assistant-section')}\n\n${block.text}\n`);
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
case 'tool/call':
|
|
90
|
+
parts.push(`${t('export-tool-section', { name: event.data.name })}\n\n\`\`\`json\n${event.data.arguments}\n\`\`\`\n`);
|
|
91
|
+
break;
|
|
92
|
+
case 'tool/result': {
|
|
93
|
+
const block = event.data.message.content[0];
|
|
94
|
+
if (block?.type === 'tool-result') {
|
|
95
|
+
const text = textOf(block.content);
|
|
96
|
+
if (text)
|
|
97
|
+
parts.push(`${t('export-result-section')}\n\n\`\`\`\n${text}\n\`\`\`\n`);
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (!current(capture))
|
|
104
|
+
return null;
|
|
105
|
+
try {
|
|
106
|
+
const target = join(deps.cwd(), `dsh-tui-export-${Date.now()}.md`);
|
|
107
|
+
writeFileSync(target, parts.join('\n'), 'utf8');
|
|
108
|
+
return current(capture) ? target : null;
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const initWorkspace = () => {
|
|
115
|
+
const capture = deps.capture();
|
|
116
|
+
const target = join(deps.cwd(), 'AGENTS.md');
|
|
117
|
+
if (!current(capture))
|
|
118
|
+
return null;
|
|
119
|
+
if (existsSync(target))
|
|
120
|
+
return 'exists';
|
|
121
|
+
const template = ['# AGENTS.md', '', t('agentsmd-project'), '', t('agentsmd-project-body'), '', t('agentsmd-conventions'), '', t('agentsmd-convention-read'), t('agentsmd-convention-style'), ''].join('\n');
|
|
122
|
+
try {
|
|
123
|
+
writeFileSync(target, template, 'utf8');
|
|
124
|
+
return current(capture) ? target : null;
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
const doctorInfo = () => {
|
|
131
|
+
const lines = [
|
|
132
|
+
`Node ${process.version} · ${process.platform} ${process.arch}`,
|
|
133
|
+
// Same predicate as the launcher's doctor (bin/dsh-tui.js): dsh resolves
|
|
134
|
+
// credential-store refs into the session at launch, so an environment-only
|
|
135
|
+
// check reports a working key as missing. The two doctors must not diverge.
|
|
136
|
+
t('doctor-api-key', {
|
|
137
|
+
state: process.env.DEEPSEEK_API_KEY
|
|
138
|
+
? t('doctor-key-configured-env')
|
|
139
|
+
: credentialRefDeclared('DEEPSEEK_API_KEY')
|
|
140
|
+
? t('doctor-key-configured-store')
|
|
141
|
+
: t('doctor-key-missing'),
|
|
142
|
+
}),
|
|
143
|
+
t('doctor-model', { model: deps.model(), provider: deps.provider() }),
|
|
144
|
+
t('doctor-cwd', { cwd: deps.cwd() }),
|
|
145
|
+
t('doctor-context-window', { window: deps.contextWindow() ?? t('doctor-unknown') }),
|
|
146
|
+
`${t('doctor-session', { id: deps.capture().agent.id })}${deps.sessionTitle() ? ` · ${deps.sessionTitle()}` : ''}`,
|
|
147
|
+
];
|
|
148
|
+
for (const candidate of [join(homeDir(), '.dsh-tui/cordis.yml'), join(homeDir(), '.dsh/profiles/dsh-tui/cordis.patch.yml')]) {
|
|
149
|
+
lines.push(t('doctor-config', { candidate, state: existsSync(candidate) ? '✓' : t('doctor-config-missing') }));
|
|
150
|
+
}
|
|
151
|
+
for (const dir of sessionsRoots())
|
|
152
|
+
lines.push(t('doctor-storage', { dir, state: existsSync(dir) ? '✓' : t('doctor-storage-uninit') }));
|
|
153
|
+
const pluginHost = ctx.get('tuiPluginHost');
|
|
154
|
+
lines.push(t('doctor-plugin-generation', { id: pluginHost?.generationId ?? t('doctor-plugin-host-missing') }));
|
|
155
|
+
const violations = pluginHost?.selfCheck();
|
|
156
|
+
lines.push(t('doctor-plugin-registry', { state: violations === undefined ? t('doctor-plugin-host-missing') : violations.length === 0 ? '✓' : `✗ ${violations.length}` }));
|
|
157
|
+
const facade = getHostFacade(pluginHost);
|
|
158
|
+
if (!facade)
|
|
159
|
+
lines.push('Adapter kernel (P2): HostFacade unavailable');
|
|
160
|
+
else {
|
|
161
|
+
const diagnostics = collectAdapterDiagnostics(deps.runtime, facade.descriptor.snapshot(), getHostGrantStore(pluginHost)?.knownPermissions() ?? []);
|
|
162
|
+
lines.push(`Adapter kernel (P2): mode=${diagnostics.runtime.mode} · contracts=${diagnostics.descriptor.contracts.length} · permissions=${diagnostics.permissions.length}`);
|
|
163
|
+
}
|
|
164
|
+
return lines;
|
|
165
|
+
};
|
|
166
|
+
const pluginsInfo = (args) => {
|
|
167
|
+
const host = ctx.get('tuiPluginHost');
|
|
168
|
+
return pluginsInfoLines(args, { grants: getHostGrantStore(host) ?? deps.grantStore(), host: host?.describe() });
|
|
169
|
+
};
|
|
170
|
+
return { balanceInfo, mcpStatus, exportSession, initWorkspace, doctorInfo, pluginsInfo };
|
|
171
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { TuiRewindMode } from '../extension-events.js';
|
|
3
|
+
import type { ChatRow, ChannelState } from './types.js';
|
|
4
|
+
/** Narrow decision-only session action; fork mechanics remain separate. */
|
|
5
|
+
export declare function createRewindPromptAction(ctx: Context, deps: {
|
|
6
|
+
agent(): object;
|
|
7
|
+
state(): Pick<ChannelState, 'agentId' | 'cwd'>;
|
|
8
|
+
withDecisionPending<T>(name: string, pending: Promise<T>): Promise<T>;
|
|
9
|
+
notify: ChannelState['notify'];
|
|
10
|
+
}): (row: ChatRow) => Promise<{
|
|
11
|
+
modes: readonly TuiRewindMode[];
|
|
12
|
+
} | "cancel" | null>;
|
|
13
|
+
//# sourceMappingURL=session-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEvD,2EAA2E;AAC3E,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE;IACJ,KAAK,IAAI,MAAM,CAAA;IACf,KAAK,IAAI,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,CAAC,CAAA;IAC9C,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACrE,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;CAC/B,IAEa,KAAK,OAAO,KAAG,OAAO,CAAC;IAAE,KAAK,EAAE,SAAS,aAAa,EAAE,CAAA;CAAE,GAAG,QAAQ,GAAG,IAAI,CAAC,CAqB5F"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { t } from '../../i18n.js';
|
|
2
|
+
import { dispatchTuiDecision } from '../extension-events.js';
|
|
3
|
+
import { normalizeRewindPromptDecision } from './decisions.js';
|
|
4
|
+
/** Narrow decision-only session action; fork mechanics remain separate. */
|
|
5
|
+
export function createRewindPromptAction(ctx, deps) {
|
|
6
|
+
return async (row) => {
|
|
7
|
+
if (row.seq === undefined)
|
|
8
|
+
return null;
|
|
9
|
+
const originAgent = deps.agent();
|
|
10
|
+
const state = deps.state();
|
|
11
|
+
const decision = await deps.withDecisionPending('tui/rewind-prompt', dispatchTuiDecision(ctx, 'tui/rewind-prompt', {
|
|
12
|
+
text: row.text,
|
|
13
|
+
seq: row.seq,
|
|
14
|
+
sessionId: state.agentId,
|
|
15
|
+
cwd: state.cwd,
|
|
16
|
+
}, normalizeRewindPromptDecision));
|
|
17
|
+
if (deps.agent() !== originAgent) {
|
|
18
|
+
deps.notify(t('ext-stale-dropped'), { color: 'warning', timeoutMs: 4000 });
|
|
19
|
+
return 'cancel';
|
|
20
|
+
}
|
|
21
|
+
if (decision === undefined)
|
|
22
|
+
return null;
|
|
23
|
+
if ('cancel' in decision) {
|
|
24
|
+
deps.notify(decision.reason ?? t('ext-action-cancelled'), { color: 'warning', timeoutMs: 4000 });
|
|
25
|
+
return 'cancel';
|
|
26
|
+
}
|
|
27
|
+
return { modes: decision.modes };
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AgentHandle } from '@deepseek-ai/dsh-agent';
|
|
2
|
+
import type { SessionEvent, SessionId } from '@deepseek-ai/dsh-session';
|
|
3
|
+
import type { ChannelState } from './types.js';
|
|
4
|
+
import type { createChannelBinding } from './binding.js';
|
|
5
|
+
import { resetSessionProjection } from './session-reset.js';
|
|
6
|
+
type Binding = ReturnType<typeof createChannelBinding>;
|
|
7
|
+
type AdoptionState = Pick<ChannelState, 'status' | 'agentId' | 'agentPreset' | 'working' | 'emit'>;
|
|
8
|
+
/**
|
|
9
|
+
* Binding-transaction tails shared by session actions. Construction is inert:
|
|
10
|
+
* callers install the returned operations only after their ChannelState exists.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createSessionAdoption(state: AdoptionState & Parameters<typeof resetSessionProjection>[0], deps: {
|
|
13
|
+
binding: Pick<Binding, 'adopt'>;
|
|
14
|
+
rowIds: {
|
|
15
|
+
value: number;
|
|
16
|
+
};
|
|
17
|
+
resetProjector(): void;
|
|
18
|
+
resetSubagents(): void;
|
|
19
|
+
resetJobs(): void;
|
|
20
|
+
replay(events: readonly SessionEvent[]): void;
|
|
21
|
+
settleReplay(): void;
|
|
22
|
+
bindAgent(): void;
|
|
23
|
+
refreshCommands(): void;
|
|
24
|
+
refreshLoadedContext(): Promise<void>;
|
|
25
|
+
refreshSkillCommands(): Promise<void>;
|
|
26
|
+
clearStagedImages(): void;
|
|
27
|
+
touchSession(sessionId: SessionId): void;
|
|
28
|
+
}): {
|
|
29
|
+
adoptForkedAgent: (handle: AgentHandle, capture: ReturnType<Binding["capture"]>, seed: readonly SessionEvent[], agentPreset: string | undefined, childId: SessionId) => string;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=session-adoption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-adoption.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-adoption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACtD,KAAK,aAAa,GAAG,IAAI,CACvB,YAAY,EACV,QAAQ,GACR,SAAS,GACT,aAAa,GACb,SAAS,GACT,MAAM,CACT,CAAA;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,EACnE,IAAI,EAAE;IACJ,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC/B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,cAAc,IAAI,IAAI,CAAA;IACtB,cAAc,IAAI,IAAI,CAAA;IACtB,SAAS,IAAI,IAAI,CAAA;IACjB,MAAM,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI,CAAA;IAC7C,YAAY,IAAI,IAAI,CAAA;IACpB,SAAS,IAAI,IAAI,CAAA;IACjB,eAAe,IAAI,IAAI,CAAA;IACvB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,iBAAiB,IAAI,IAAI,CAAA;IACzB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAA;CACzC;+BAQS,WAAW,WACV,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QACjC,SAAS,YAAY,EAAE,eAChB,MAAM,GAAG,SAAS,WACtB,SAAS,KACjB,MAAM;EAwBV"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { resetSessionProjection } from './session-reset.js';
|
|
2
|
+
/**
|
|
3
|
+
* Binding-transaction tails shared by session actions. Construction is inert:
|
|
4
|
+
* callers install the returned operations only after their ChannelState exists.
|
|
5
|
+
*/
|
|
6
|
+
export function createSessionAdoption(state, deps) {
|
|
7
|
+
/**
|
|
8
|
+
* Commit a prepared rewind/fork candidate through the sole binding writer.
|
|
9
|
+
* The transaction resets only after ownership is committed; setup remains
|
|
10
|
+
* synchronous so subscriptions cannot observe a half-reset projection.
|
|
11
|
+
*/
|
|
12
|
+
const adoptForkedAgent = (handle, capture, seed, agentPreset, childId) => deps.binding.adopt(handle, capture, (previous, disposePrevious) => {
|
|
13
|
+
const sourceSessionId = String(previous.agent.session.id);
|
|
14
|
+
resetSessionProjection(state, deps.rowIds, deps.resetProjector, deps.resetSubagents, deps.resetJobs);
|
|
15
|
+
state.status = handle.agent.status;
|
|
16
|
+
state.agentId = handle.agent.id;
|
|
17
|
+
state.agentPreset = agentPreset;
|
|
18
|
+
deps.replay(seed);
|
|
19
|
+
deps.settleReplay();
|
|
20
|
+
state.working = handle.agent.status === 'running';
|
|
21
|
+
// Reset the input FIFO and pending-decision indicators BEFORE the first
|
|
22
|
+
// emit: a submit from a session-changed subscriber must not chain onto the
|
|
23
|
+
// replaced session's parked promise (main's bind → clear → refresh order).
|
|
24
|
+
deps.clearStagedImages();
|
|
25
|
+
deps.bindAgent();
|
|
26
|
+
deps.refreshCommands();
|
|
27
|
+
void deps.refreshLoadedContext();
|
|
28
|
+
void deps.refreshSkillCommands();
|
|
29
|
+
deps.touchSession(childId);
|
|
30
|
+
state.emit();
|
|
31
|
+
disposePrevious('dispose');
|
|
32
|
+
return sourceSessionId;
|
|
33
|
+
});
|
|
34
|
+
return { adoptForkedAgent };
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AgentHandle } from '@deepseek-ai/dsh-agent';
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import { type Session } from '@deepseek-ai/dsh-session';
|
|
4
|
+
import type { ChannelOwner } from './owner.js';
|
|
5
|
+
import type { ChannelState } from './types.js';
|
|
6
|
+
type ForkState = Pick<ChannelState, 'working' | 'cwd' | 'provider' | 'model' | 'sessionTitle'>;
|
|
7
|
+
/** Create a detached `/fork` copy without adopting it into the foreground. */
|
|
8
|
+
export declare function createForkSessionAction(ctx: Context, state: ForkState, deps: {
|
|
9
|
+
owner: Pick<ChannelOwner, 'current'>;
|
|
10
|
+
settleCompaction(): Promise<void>;
|
|
11
|
+
notify: ChannelState['notify'];
|
|
12
|
+
source(): Session;
|
|
13
|
+
createDetachedHandle(create: () => Promise<AgentHandle>): Promise<{
|
|
14
|
+
handle: AgentHandle;
|
|
15
|
+
release(): Promise<void>;
|
|
16
|
+
}>;
|
|
17
|
+
}): () => Promise<boolean>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=session-fork.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-fork.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-fork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,wBAAwB,CAAA;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAa,KAAK,OAAO,EAAqB,MAAM,0BAA0B,CAAA;AAOrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,KAAK,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC,CAAA;AAE9F,8EAA8E;AAC9E,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,MAAM,IAAI,OAAO,CAAA;IACjB,oBAAoB,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,WAAW,CAAC;QAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,CAAC,CAAA;CACrH,SAEgB,OAAO,CAAC,OAAO,CAAC,CAmElC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { SessionId } from '@deepseek-ai/dsh-session';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import { t } from '../../i18n.js';
|
|
4
|
+
import { resolveDshProfileName } from '../../update.js';
|
|
5
|
+
import { appendSessionTitle, liveSessionCreateOptions, sliceLiveSessionSeed } from '../compat/index.js';
|
|
6
|
+
import { composePreset, runningPresetOf } from '../presets.js';
|
|
7
|
+
import { attachSessionToWorkspace } from '../workspace.js';
|
|
8
|
+
/** Create a detached `/fork` copy without adopting it into the foreground. */
|
|
9
|
+
export function createForkSessionAction(ctx, state, deps) {
|
|
10
|
+
return async () => {
|
|
11
|
+
const agents = ctx.get('agents');
|
|
12
|
+
if (!agents) {
|
|
13
|
+
deps.notify(t('fork-unavailable'), { color: 'error' });
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
if (state.working) {
|
|
17
|
+
deps.notify(t('fork-while-working'), { color: 'warning' });
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
await deps.settleCompaction();
|
|
21
|
+
const source = deps.source();
|
|
22
|
+
const childId = SessionId(randomUUID());
|
|
23
|
+
let seed;
|
|
24
|
+
try {
|
|
25
|
+
// No boundary: the whole (turn-closed) source log. Slice the SOURCE
|
|
26
|
+
// snapshot — sessions.fork() would register a child and append
|
|
27
|
+
// session/end-seed, so snapshot.length is not a lineage cut.
|
|
28
|
+
seed = sliceLiveSessionSeed(source);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
deps.notify(t('fork-failed', { err: error instanceof Error ? error.message : String(error) }), { color: 'error' });
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
const forkComposed = await composePreset(ctx, runningPresetOf(source));
|
|
35
|
+
let detached;
|
|
36
|
+
try {
|
|
37
|
+
detached = await deps.createDetachedHandle(() => agents.create(liveSessionCreateOptions({
|
|
38
|
+
sessionId: childId,
|
|
39
|
+
seed,
|
|
40
|
+
runtimeSession: source,
|
|
41
|
+
inheritedCount: seed.length,
|
|
42
|
+
cwd: state.cwd,
|
|
43
|
+
// NO parentSession: a /fork copy is an independent conversation
|
|
44
|
+
// (kimi-code semantics), not a rewind branch — recording lineage
|
|
45
|
+
// would fold it into the source's family in /resume.
|
|
46
|
+
agentPreset: forkComposed.agentPreset,
|
|
47
|
+
agentOptions: { provider: state.provider, model: state.model },
|
|
48
|
+
setup: forkComposed.setup,
|
|
49
|
+
})));
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
deps.notify(t('fork-create-failed'), { color: 'error' });
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
if (!deps.owner.current()) {
|
|
56
|
+
await detached.release();
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
await attachSessionToWorkspace(ctx, state.cwd, childId);
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
deps.notify(t('fork-attach-failed', { err: error instanceof Error ? error.message : String(error) }), { color: 'warning', timeoutMs: 8000 });
|
|
64
|
+
}
|
|
65
|
+
if (!deps.owner.current()) {
|
|
66
|
+
await detached.release();
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
await detached.release();
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
ctx.logger.warn('dsh-tui: forked session dispose failed: %o', error);
|
|
74
|
+
}
|
|
75
|
+
const sourceTitle = state.sessionTitle.trim();
|
|
76
|
+
appendSessionTitle(String(childId), `Fork: ${sourceTitle === '' ? String(source.id).slice(0, 8) : sourceTitle}`);
|
|
77
|
+
const profile = resolveDshProfileName();
|
|
78
|
+
const boot = profile === undefined ? 'dsh --config cordis.yml' : `dsh --profile ${profile}`;
|
|
79
|
+
const command = process.platform === 'win32'
|
|
80
|
+
? `dsh-tui --resume ${childId}`
|
|
81
|
+
: `DSH_TUI_RESUME_SESSION=${childId} ${boot}`;
|
|
82
|
+
deps.notify(t('fork-done', { id: String(childId), command }), { timeoutMs: 8000 });
|
|
83
|
+
return true;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Agent, AgentHandle } from '@deepseek-ai/dsh-agent';
|
|
2
|
+
import { resetSessionProjection } from './session-reset.js';
|
|
3
|
+
import type { createChannelBinding } from './binding.js';
|
|
4
|
+
import type { ChannelState, ResumeResult } from './types.js';
|
|
5
|
+
type Binding = ReturnType<typeof createChannelBinding>;
|
|
6
|
+
type LiveAdoptionState = Pick<ChannelState, 'status' | 'agentId' | 'cwd' | 'displayCwd' | 'agentPreset' | 'provider' | 'model' | 'loadedContext' | 'contextWindow' | 'effortLevels' | 'reasoningEffort' | 'tps' | 'tpsSamples' | 'lastUsage' | 'workingActivity' | 'working' | 'emit'> & Parameters<typeof resetSessionProjection>[0];
|
|
7
|
+
/** Adopt an already-live agent, preserving a meaningful previous handle in the background ledger. */
|
|
8
|
+
export declare function createLiveAgentAdoption(state: LiveAdoptionState, deps: {
|
|
9
|
+
binding: Pick<Binding, 'switchTo'>;
|
|
10
|
+
backgroundHandles: Map<string, AgentHandle>;
|
|
11
|
+
rowIds: {
|
|
12
|
+
value: number;
|
|
13
|
+
};
|
|
14
|
+
resetProjector(): void;
|
|
15
|
+
resetSubagents(): void;
|
|
16
|
+
resetJobs(): void;
|
|
17
|
+
replay(events: readonly import('@deepseek-ai/dsh-session').SessionEvent[]): void;
|
|
18
|
+
settleReplay(): void;
|
|
19
|
+
describeWorkspace(cwd: string): {
|
|
20
|
+
description?: string;
|
|
21
|
+
};
|
|
22
|
+
refreshGitBranch(): void;
|
|
23
|
+
bindAgent(): void;
|
|
24
|
+
refreshCommands(): void;
|
|
25
|
+
refreshLoadedContext(): Promise<void>;
|
|
26
|
+
refreshSkillCommands(): Promise<void>;
|
|
27
|
+
clearStagedImages(): void;
|
|
28
|
+
notifySessionSwitched(kind: 'agent-view', sessionId: string, previousSessionId: string): void;
|
|
29
|
+
notifyAgentView(): void;
|
|
30
|
+
}): (target: Agent) => Promise<ResumeResult>;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=session-live-adoption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-live-adoption.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-live-adoption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAMhE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE5D,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACtD,KAAK,iBAAiB,GAAG,IAAI,CAC3B,YAAY,EACV,QAAQ,GACR,SAAS,GACT,KAAK,GACL,YAAY,GACZ,aAAa,GACb,UAAU,GACV,OAAO,GACP,eAAe,GACf,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,KAAK,GACL,YAAY,GACZ,WAAW,GACX,iBAAiB,GACjB,SAAS,GACT,MAAM,CACT,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAA;AAEhD,qGAAqG;AACrG,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,EACxB,IAAI,EAAE;IACJ,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAClC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAC3C,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,cAAc,IAAI,IAAI,CAAA;IACtB,cAAc,IAAI,IAAI,CAAA;IACtB,SAAS,IAAI,IAAI,CAAA;IACjB,MAAM,CAAC,MAAM,EAAE,SAAS,OAAO,0BAA0B,EAAE,YAAY,EAAE,GAAG,IAAI,CAAA;IAChF,YAAY,IAAI,IAAI,CAAA;IACpB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACxD,gBAAgB,IAAI,IAAI,CAAA;IACxB,SAAS,IAAI,IAAI,CAAA;IACjB,eAAe,IAAI,IAAI,CAAA;IACvB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,iBAAiB,IAAI,IAAI,CAAA;IACzB,qBAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7F,eAAe,IAAI,IAAI,CAAA;CACxB,IAEa,QAAQ,KAAK,KAAG,OAAO,CAAC,YAAY,CAAC,CAwDpD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { recordedModelRoute } from '../../modelRoute.js';
|
|
2
|
+
import { touchAgentViewSession, touchSession, writeResumeTarget } from '../../sessionHistory.js';
|
|
3
|
+
import { agentViewHasTurns } from '../agent-view.js';
|
|
4
|
+
import { snapshotLiveSessionEvents } from '../compat/liveSession.js';
|
|
5
|
+
import { runningPresetOf } from '../presets.js';
|
|
6
|
+
import { resetSessionProjection } from './session-reset.js';
|
|
7
|
+
/** Adopt an already-live agent, preserving a meaningful previous handle in the background ledger. */
|
|
8
|
+
export function createLiveAgentAdoption(state, deps) {
|
|
9
|
+
return async (target) => deps.binding.switchTo(target, deps.backgroundHandles.get(String(target.id)), (committed, disposePrevious) => {
|
|
10
|
+
const previousHandle = committed.handle;
|
|
11
|
+
const previousSessionId = String(committed.agent.session.id);
|
|
12
|
+
deps.backgroundHandles.delete(String(target.id));
|
|
13
|
+
resetSessionProjection(state, deps.rowIds, deps.resetProjector, deps.resetSubagents, deps.resetJobs);
|
|
14
|
+
state.status = target.status;
|
|
15
|
+
state.agentId = target.id;
|
|
16
|
+
state.cwd = target.session.header.cwd ?? state.cwd;
|
|
17
|
+
state.displayCwd = deps.describeWorkspace(state.cwd).description ?? state.cwd;
|
|
18
|
+
deps.refreshGitBranch();
|
|
19
|
+
state.agentPreset = runningPresetOf(target.session);
|
|
20
|
+
const route = recordedModelRoute(snapshotLiveSessionEvents(target.session));
|
|
21
|
+
if (route !== undefined) {
|
|
22
|
+
state.provider = route.provider;
|
|
23
|
+
state.model = route.model;
|
|
24
|
+
}
|
|
25
|
+
state.loadedContext = undefined;
|
|
26
|
+
state.contextWindow = undefined;
|
|
27
|
+
state.effortLevels = undefined;
|
|
28
|
+
state.reasoningEffort = undefined;
|
|
29
|
+
deps.replay(snapshotLiveSessionEvents(target.session));
|
|
30
|
+
deps.settleReplay();
|
|
31
|
+
state.working = target.status === 'running';
|
|
32
|
+
// Reset the input FIFO and pending-decision indicators BEFORE the first
|
|
33
|
+
// emit: a submit from a session-changed subscriber must not chain onto
|
|
34
|
+
// the replaced session's parked promise (main's bind → clear → refresh
|
|
35
|
+
// order).
|
|
36
|
+
deps.clearStagedImages();
|
|
37
|
+
deps.bindAgent();
|
|
38
|
+
deps.refreshCommands();
|
|
39
|
+
void deps.refreshLoadedContext();
|
|
40
|
+
void deps.refreshSkillCommands();
|
|
41
|
+
writeResumeTarget(String(target.id));
|
|
42
|
+
touchSession(target.id);
|
|
43
|
+
state.emit();
|
|
44
|
+
const keepPrevious = previousHandle !== undefined
|
|
45
|
+
&& previousHandle.agent !== target
|
|
46
|
+
&& (previousHandle.agent.status === 'running' || agentViewHasTurns(snapshotLiveSessionEvents(previousHandle.agent.session)));
|
|
47
|
+
if (previousHandle !== undefined && previousHandle.agent !== target) {
|
|
48
|
+
if (keepPrevious) {
|
|
49
|
+
deps.backgroundHandles.set(previousSessionId, previousHandle);
|
|
50
|
+
disposePrevious('park');
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
disposePrevious('dispose');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
touchAgentViewSession(String(target.id));
|
|
57
|
+
touchAgentViewSession(previousSessionId);
|
|
58
|
+
deps.notifySessionSwitched('agent-view', String(target.id), previousSessionId);
|
|
59
|
+
deps.notifyAgentView();
|
|
60
|
+
return { ok: true };
|
|
61
|
+
});
|
|
62
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import { writeResumeTarget } from '../../sessionHistory.js';
|
|
4
|
+
import { type SessionSummary } from '../sessions/index.js';
|
|
5
|
+
import type { ChannelOwner } from './owner.js';
|
|
6
|
+
import type { CredentialStatus } from './types.js';
|
|
7
|
+
type Capture = {
|
|
8
|
+
readonly agent: Agent;
|
|
9
|
+
readonly generation: number;
|
|
10
|
+
};
|
|
11
|
+
type Binding = {
|
|
12
|
+
readonly agent: Agent;
|
|
13
|
+
capture(): Capture;
|
|
14
|
+
isCurrent(capture: Capture): boolean;
|
|
15
|
+
};
|
|
16
|
+
/** Session-scoped metadata, persistence queries, and tool-less LLM reads. */
|
|
17
|
+
export declare function createSessionMetadataActions(ctx: Context, deps: {
|
|
18
|
+
owner: Pick<ChannelOwner, 'current' | 'signal'>;
|
|
19
|
+
binding: Binding;
|
|
20
|
+
provider(): string;
|
|
21
|
+
model(): string;
|
|
22
|
+
emit(): void;
|
|
23
|
+
sessionTitle(): string;
|
|
24
|
+
setSessionTitle(title: string): void;
|
|
25
|
+
setSessionColor(color: string): void;
|
|
26
|
+
forgetAgentView(sessionId: string): void;
|
|
27
|
+
setPersistedSessions(rows: readonly SessionSummary[]): void;
|
|
28
|
+
skillRegistryFor(agent: Agent): {
|
|
29
|
+
snapshot(options: {
|
|
30
|
+
scope: Agent;
|
|
31
|
+
cwd: string;
|
|
32
|
+
}): Promise<{
|
|
33
|
+
skills: readonly {
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
source: string;
|
|
37
|
+
invocation: unknown;
|
|
38
|
+
}[];
|
|
39
|
+
complete: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
} | undefined;
|
|
42
|
+
skillViewOptions(agent: Agent): {
|
|
43
|
+
scope: Agent;
|
|
44
|
+
cwd: string;
|
|
45
|
+
};
|
|
46
|
+
}): {
|
|
47
|
+
listSessions: () => Promise<readonly SessionSummary[]>;
|
|
48
|
+
previewSession: (sessionId: string) => Promise<import("../sessions/types.js").PreviewEntry[]>;
|
|
49
|
+
listSkills: () => Promise<{
|
|
50
|
+
name: string;
|
|
51
|
+
description: string;
|
|
52
|
+
userInvocable: boolean;
|
|
53
|
+
source: string;
|
|
54
|
+
}[] | undefined>;
|
|
55
|
+
describeCredential: (ref: string) => Promise<CredentialStatus | undefined>;
|
|
56
|
+
sideQuestion: (question: string, options?: {
|
|
57
|
+
signal?: AbortSignal;
|
|
58
|
+
onText?: (delta: string) => void;
|
|
59
|
+
}) => Promise<import("../sideQuestion.js").SideQuestionOutcome>;
|
|
60
|
+
recapRecent: (options?: {
|
|
61
|
+
signal?: AbortSignal;
|
|
62
|
+
onText?: (delta: string) => void;
|
|
63
|
+
}) => Promise<{
|
|
64
|
+
error?: string | undefined;
|
|
65
|
+
summary: null;
|
|
66
|
+
title?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
summary: string;
|
|
69
|
+
title?: undefined;
|
|
70
|
+
} | {
|
|
71
|
+
summary: string;
|
|
72
|
+
title: string;
|
|
73
|
+
}>;
|
|
74
|
+
setResumeTarget: typeof writeResumeTarget;
|
|
75
|
+
renameSession: (title: string) => void;
|
|
76
|
+
setSessionColor: (color: string) => void;
|
|
77
|
+
deleteSession: (sessionId: string) => Promise<boolean>;
|
|
78
|
+
renameSessionTo: (sessionId: string, title: string) => Promise<boolean>;
|
|
79
|
+
};
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=session-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-metadata.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAoE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAK7H,OAAO,EAAoE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE5H,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,YAAY,CAAA;AAKnE,KAAK,OAAO,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAA;AACrE,KAAK,OAAO,GAAG;IACb,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;IACrB,OAAO,IAAI,OAAO,CAAA;IAClB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,6EAA6E;AAC7E,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IAC/D,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,CAAC,CAAA;IAC/C,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,IAAI,MAAM,CAAA;IAClB,KAAK,IAAI,MAAM,CAAA;IACf,IAAI,IAAI,IAAI,CAAA;IACZ,YAAY,IAAI,MAAM,CAAA;IACtB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxC,oBAAoB,CAAC,IAAI,EAAE,SAAS,cAAc,EAAE,GAAG,IAAI,CAAA;IAC3D,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG;QAAE,QAAQ,CAAC,OAAO,EAAE;YAAE,KAAK,EAAE,KAAK,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,GAAG,OAAO,CAAC;YAAE,MAAM,EAAE,SAAS;gBAAE,IAAI,EAAE,MAAM,CAAC;gBAAC,WAAW,EAAE,MAAM,CAAC;gBAAC,MAAM,EAAE,MAAM,CAAC;gBAAC,UAAU,EAAE,OAAO,CAAA;aAAE,EAAE,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAAE,GAAG,SAAS,CAAA;IAC/N,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9D;wBAMgC,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC;gCAa/B,MAAM;;;;;;;8BA6BD,MAAM,KAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;6BAsD/C,MAAM,YAAY;QAAE,MAAM,CAAC,EAAE,WAAW,CAAC;QAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE;4BAkB7E;QAAE,MAAM,CAAC,EAAE,WAAW,CAAC;QAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE;;;;;;;;;;;;2BAuBjE,MAAM,KAAG,IAAI;6BAOX,MAAM,KAAG,IAAI;+BAQL,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;iCASvB,MAAM,SAAS,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;EAcnF"}
|