@askdkc/dsh-cli 0.11.3
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/LICENSE +21 -0
- package/README.md +321 -0
- package/bin/dsh-tui.js +1366 -0
- package/cordis.patch.yml +482 -0
- package/cordis.yml +250 -0
- package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -0
- package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -0
- package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -0
- package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -0
- package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -0
- package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -0
- package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -0
- package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -0
- package/dsh-ecosystem-spec/registry/README.md +14 -0
- package/dsh-ecosystem-spec/registry/contracts/decision-events-v1alpha1.json +13 -0
- package/dsh-ecosystem-spec/registry/contracts/scene-v1alpha1.json +13 -0
- package/dsh-ecosystem-spec/registry/contracts/settings-section-v1alpha1.json +13 -0
- package/dsh-ecosystem-spec/registry/contracts/tui-channel-v1alpha1.json +30 -0
- package/dsh-ecosystem-spec/registry/contracts/workspace-provider-v1alpha1.json +6 -0
- package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -0
- package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -0
- package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -0
- package/dsh-ecosystem-spec/schemas/conformance-claim.schema.json +15 -0
- package/dsh-ecosystem-spec/schemas/effect-ledger-record.schema.json +16 -0
- package/dsh-ecosystem-spec/schemas/host-descriptor.schema.json +26 -0
- package/lib/types/activityPrefs.d.ts +63 -0
- package/lib/types/activityPrefs.d.ts.map +1 -0
- package/lib/types/activityPrefs.js +126 -0
- 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 +249 -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 +57 -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 +109 -0
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -0
- package/lib/types/adapter/channel/ui-policy.js +170 -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 +173 -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 +216 -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 +428 -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 +327 -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 +16 -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 +279 -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 +593 -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 +663 -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 +68 -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 +148 -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 +62 -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/adapter/standard/grants.d.ts +30 -0
- package/lib/types/adapter/standard/grants.d.ts.map +1 -0
- package/lib/types/adapter/standard/grants.js +219 -0
- 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 +11 -0
- package/lib/types/adapter/standard/negotiate.d.ts.map +1 -0
- package/lib/types/adapter/standard/negotiate.js +97 -0
- package/lib/types/adapter/standard/permission-scope.d.ts +27 -0
- package/lib/types/adapter/standard/permission-scope.d.ts.map +1 -0
- package/lib/types/adapter/standard/permission-scope.js +68 -0
- 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 +23 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -0
- package/lib/types/adapter/standard/registry.js +240 -0
- package/lib/types/adapter/standard/schema-check.d.ts +17 -0
- package/lib/types/adapter/standard/schema-check.d.ts.map +1 -0
- package/lib/types/adapter/standard/schema-check.js +167 -0
- 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/adapter/standard/types.d.ts +108 -0
- package/lib/types/adapter/standard/types.d.ts.map +1 -0
- package/lib/types/adapter/standard/types.js +10 -0
- package/lib/types/adapter/standard/validate.d.ts +21 -0
- package/lib/types/adapter/standard/validate.d.ts.map +1 -0
- package/lib/types/adapter/standard/validate.js +139 -0
- 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 +198 -0
- package/lib/types/api.d.ts +7 -0
- package/lib/types/api.d.ts.map +1 -0
- package/lib/types/api.js +1 -0
- package/lib/types/bootstrap/state.d.ts +11 -0
- package/lib/types/bootstrap/state.d.ts.map +1 -0
- package/lib/types/bootstrap/state.js +10 -0
- package/lib/types/command-trees.d.ts +4 -0
- package/lib/types/command-trees.d.ts.map +1 -0
- package/lib/types/command-trees.js +4 -0
- package/lib/types/commands.d.ts +87 -0
- package/lib/types/commands.d.ts.map +1 -0
- package/lib/types/commands.js +218 -0
- package/lib/types/components/ActivityLine.d.ts +34 -0
- package/lib/types/components/ActivityLine.d.ts.map +1 -0
- package/lib/types/components/ActivityLine.js +39 -0
- package/lib/types/components/ActivityPicker.d.ts +16 -0
- package/lib/types/components/ActivityPicker.d.ts.map +1 -0
- package/lib/types/components/ActivityPicker.js +23 -0
- package/lib/types/components/AutoRecapRow.d.ts +23 -0
- package/lib/types/components/AutoRecapRow.d.ts.map +1 -0
- package/lib/types/components/AutoRecapRow.js +23 -0
- package/lib/types/components/BalanceReportRow.d.ts +24 -0
- package/lib/types/components/BalanceReportRow.d.ts.map +1 -0
- package/lib/types/components/BalanceReportRow.js +87 -0
- package/lib/types/components/BtwPanel.d.ts +16 -0
- package/lib/types/components/BtwPanel.d.ts.map +1 -0
- package/lib/types/components/BtwPanel.js +47 -0
- package/lib/types/components/Chat/JobCard.d.ts +23 -0
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -0
- package/lib/types/components/Chat/JobCard.js +93 -0
- package/lib/types/components/Chat/SubagentMessage.d.ts +20 -0
- package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -0
- package/lib/types/components/Chat/SubagentMessage.js +83 -0
- package/lib/types/components/ColorPicker.d.ts +17 -0
- package/lib/types/components/ColorPicker.d.ts.map +1 -0
- package/lib/types/components/ColorPicker.js +20 -0
- package/lib/types/components/CommandSuggestions.d.ts +34 -0
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -0
- package/lib/types/components/CommandSuggestions.js +61 -0
- package/lib/types/components/ContextBarView.d.ts +41 -0
- package/lib/types/components/ContextBarView.d.ts.map +1 -0
- package/lib/types/components/ContextBarView.js +50 -0
- package/lib/types/components/EffortChargeGlyph.d.ts +26 -0
- package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -0
- package/lib/types/components/EffortChargeGlyph.js +70 -0
- package/lib/types/components/EffortInputBorder.d.ts +47 -0
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -0
- package/lib/types/components/EffortInputBorder.js +90 -0
- package/lib/types/components/EffortSlider.d.ts +18 -0
- package/lib/types/components/EffortSlider.d.ts.map +1 -0
- package/lib/types/components/EffortSlider.js +19 -0
- package/lib/types/components/EffortTierBadge.d.ts +26 -0
- package/lib/types/components/EffortTierBadge.d.ts.map +1 -0
- package/lib/types/components/EffortTierBadge.js +97 -0
- package/lib/types/components/ExtensionDialog.d.ts +40 -0
- package/lib/types/components/ExtensionDialog.d.ts.map +1 -0
- package/lib/types/components/ExtensionDialog.js +253 -0
- package/lib/types/components/FileActionsPanel.d.ts +22 -0
- package/lib/types/components/FileActionsPanel.d.ts.map +1 -0
- package/lib/types/components/FileActionsPanel.js +28 -0
- package/lib/types/components/FileSuggestions.d.ts +18 -0
- package/lib/types/components/FileSuggestions.d.ts.map +1 -0
- package/lib/types/components/FileSuggestions.js +78 -0
- package/lib/types/components/GoalTodoPanel.d.ts +38 -0
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -0
- package/lib/types/components/GoalTodoPanel.js +131 -0
- package/lib/types/components/HelpMenu.d.ts +29 -0
- package/lib/types/components/HelpMenu.d.ts.map +1 -0
- package/lib/types/components/HelpMenu.js +39 -0
- package/lib/types/components/HistorySearchDialog.d.ts +18 -0
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -0
- package/lib/types/components/HistorySearchDialog.js +47 -0
- package/lib/types/components/ImagePreviewOverlay.d.ts +51 -0
- package/lib/types/components/ImagePreviewOverlay.d.ts.map +1 -0
- package/lib/types/components/ImagePreviewOverlay.js +269 -0
- package/lib/types/components/JobsPanel.d.ts +17 -0
- package/lib/types/components/JobsPanel.d.ts.map +1 -0
- package/lib/types/components/JobsPanel.js +111 -0
- package/lib/types/components/LangPicker.d.ts +14 -0
- package/lib/types/components/LangPicker.d.ts.map +1 -0
- package/lib/types/components/LangPicker.js +17 -0
- package/lib/types/components/LoadedContextPanel.d.ts +20 -0
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -0
- package/lib/types/components/LoadedContextPanel.js +32 -0
- package/lib/types/components/LogoV2.d.ts +48 -0
- package/lib/types/components/LogoV2.d.ts.map +1 -0
- package/lib/types/components/LogoV2.js +239 -0
- package/lib/types/components/Markdown.d.ts +46 -0
- package/lib/types/components/Markdown.d.ts.map +1 -0
- package/lib/types/components/Markdown.js +178 -0
- package/lib/types/components/MarkdownTable.d.ts +13 -0
- package/lib/types/components/MarkdownTable.d.ts.map +1 -0
- package/lib/types/components/MarkdownTable.js +155 -0
- package/lib/types/components/MermaidDiagram.d.ts +13 -0
- package/lib/types/components/MermaidDiagram.d.ts.map +1 -0
- package/lib/types/components/MermaidDiagram.js +61 -0
- package/lib/types/components/MessageList.d.ts +144 -0
- package/lib/types/components/MessageList.d.ts.map +1 -0
- package/lib/types/components/MessageList.js +1170 -0
- package/lib/types/components/MigratePicker.d.ts +30 -0
- package/lib/types/components/MigratePicker.d.ts.map +1 -0
- package/lib/types/components/MigratePicker.js +38 -0
- package/lib/types/components/ModelPicker.d.ts +42 -0
- package/lib/types/components/ModelPicker.d.ts.map +1 -0
- package/lib/types/components/ModelPicker.js +51 -0
- package/lib/types/components/OverlayAbove.d.ts +48 -0
- package/lib/types/components/OverlayAbove.d.ts.map +1 -0
- package/lib/types/components/OverlayAbove.js +98 -0
- package/lib/types/components/PageMargin.d.ts +58 -0
- package/lib/types/components/PageMargin.d.ts.map +1 -0
- package/lib/types/components/PageMargin.js +38 -0
- package/lib/types/components/PermissionsPicker.d.ts +20 -0
- package/lib/types/components/PermissionsPicker.d.ts.map +1 -0
- package/lib/types/components/PermissionsPicker.js +33 -0
- package/lib/types/components/PlanPicker.d.ts +15 -0
- package/lib/types/components/PlanPicker.d.ts.map +1 -0
- package/lib/types/components/PlanPicker.js +18 -0
- package/lib/types/components/PluginSceneBoundary.d.ts +31 -0
- package/lib/types/components/PluginSceneBoundary.d.ts.map +1 -0
- package/lib/types/components/PluginSceneBoundary.js +29 -0
- package/lib/types/components/PluginStatusViewBoundary.d.ts +26 -0
- package/lib/types/components/PluginStatusViewBoundary.d.ts.map +1 -0
- package/lib/types/components/PluginStatusViewBoundary.js +22 -0
- package/lib/types/components/PresetPicker.d.ts +20 -0
- package/lib/types/components/PresetPicker.d.ts.map +1 -0
- package/lib/types/components/PresetPicker.js +24 -0
- package/lib/types/components/PromptEditor.d.ts +48 -0
- package/lib/types/components/PromptEditor.d.ts.map +1 -0
- package/lib/types/components/PromptEditor.js +75 -0
- package/lib/types/components/PromptInput.d.ts +163 -0
- package/lib/types/components/PromptInput.d.ts.map +1 -0
- package/lib/types/components/PromptInput.js +3503 -0
- package/lib/types/components/RecapPanel.d.ts +25 -0
- package/lib/types/components/RecapPanel.d.ts.map +1 -0
- package/lib/types/components/RecapPanel.js +55 -0
- package/lib/types/components/RewindPicker.d.ts +37 -0
- package/lib/types/components/RewindPicker.d.ts.map +1 -0
- package/lib/types/components/RewindPicker.js +66 -0
- package/lib/types/components/ScrollbarGutter.d.ts +43 -0
- package/lib/types/components/ScrollbarGutter.d.ts.map +1 -0
- package/lib/types/components/ScrollbarGutter.js +197 -0
- package/lib/types/components/SearchBox.d.ts +24 -0
- package/lib/types/components/SearchBox.d.ts.map +1 -0
- package/lib/types/components/SearchBox.js +132 -0
- package/lib/types/components/Select.d.ts +29 -0
- package/lib/types/components/Select.d.ts.map +1 -0
- package/lib/types/components/Select.js +21 -0
- package/lib/types/components/SkillsPicker.d.ts +21 -0
- package/lib/types/components/SkillsPicker.d.ts.map +1 -0
- package/lib/types/components/SkillsPicker.js +52 -0
- package/lib/types/components/Spinner/GlimmerMessage.d.ts +16 -0
- package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -0
- package/lib/types/components/Spinner/GlimmerMessage.js +57 -0
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +33 -0
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts.map +1 -0
- package/lib/types/components/Spinner/SpinnerAnimationRow.js +168 -0
- package/lib/types/components/Spinner/SpinnerGlyph.d.ts +16 -0
- package/lib/types/components/Spinner/SpinnerGlyph.d.ts.map +1 -0
- package/lib/types/components/Spinner/SpinnerGlyph.js +36 -0
- package/lib/types/components/Spinner/spinnerMode.d.ts +2 -0
- package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -0
- package/lib/types/components/Spinner/spinnerMode.js +1 -0
- package/lib/types/components/Spinner/spinnerUtils.d.ts +36 -0
- package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -0
- package/lib/types/components/Spinner/spinnerUtils.js +94 -0
- package/lib/types/components/Spinner/useStalledAnimation.d.ts +16 -0
- package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -0
- package/lib/types/components/Spinner/useStalledAnimation.js +52 -0
- package/lib/types/components/SplitDiffView.d.ts +25 -0
- package/lib/types/components/SplitDiffView.d.ts.map +1 -0
- package/lib/types/components/SplitDiffView.js +279 -0
- package/lib/types/components/StreamingMarkdown.d.ts +6 -0
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -0
- package/lib/types/components/StreamingMarkdown.js +279 -0
- package/lib/types/components/SubagentCard.d.ts +10 -0
- package/lib/types/components/SubagentCard.d.ts.map +1 -0
- package/lib/types/components/SubagentCard.js +39 -0
- package/lib/types/components/SubagentDashboard.d.ts +17 -0
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -0
- package/lib/types/components/SubagentDashboard.js +58 -0
- package/lib/types/components/SubagentDetailScene.d.ts +16 -0
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -0
- package/lib/types/components/SubagentDetailScene.js +147 -0
- package/lib/types/components/SuggestionCard.d.ts +65 -0
- package/lib/types/components/SuggestionCard.d.ts.map +1 -0
- package/lib/types/components/SuggestionCard.js +77 -0
- package/lib/types/components/SyntaxText.d.ts +15 -0
- package/lib/types/components/SyntaxText.d.ts.map +1 -0
- package/lib/types/components/SyntaxText.js +34 -0
- package/lib/types/components/ThemePicker.d.ts +27 -0
- package/lib/types/components/ThemePicker.d.ts.map +1 -0
- package/lib/types/components/ThemePicker.js +55 -0
- package/lib/types/components/ThinkingToggle.d.ts +13 -0
- package/lib/types/components/ThinkingToggle.d.ts.map +1 -0
- package/lib/types/components/ThinkingToggle.js +25 -0
- package/lib/types/components/TimelineRail.d.ts +53 -0
- package/lib/types/components/TimelineRail.d.ts.map +1 -0
- package/lib/types/components/TimelineRail.js +197 -0
- package/lib/types/components/TipsPanel.d.ts +14 -0
- package/lib/types/components/TipsPanel.d.ts.map +1 -0
- package/lib/types/components/TipsPanel.js +37 -0
- package/lib/types/components/ToolUseLoader.d.ts +18 -0
- package/lib/types/components/ToolUseLoader.d.ts.map +1 -0
- package/lib/types/components/ToolUseLoader.js +51 -0
- package/lib/types/components/Tooltip.d.ts +67 -0
- package/lib/types/components/Tooltip.d.ts.map +1 -0
- package/lib/types/components/Tooltip.js +266 -0
- package/lib/types/components/TurnInterruptedRow.d.ts +6 -0
- package/lib/types/components/TurnInterruptedRow.d.ts.map +1 -0
- package/lib/types/components/TurnInterruptedRow.js +9 -0
- package/lib/types/components/Whale.d.ts +42 -0
- package/lib/types/components/Whale.d.ts.map +1 -0
- package/lib/types/components/Whale.js +108 -0
- package/lib/types/components/WorkingSpinner.d.ts +26 -0
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -0
- package/lib/types/components/WorkingSpinner.js +67 -0
- package/lib/types/components/WorkspaceFlowPicker.d.ts +20 -0
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -0
- package/lib/types/components/WorkspaceFlowPicker.js +21 -0
- package/lib/types/components/WorkspaceMenuPicker.d.ts +19 -0
- package/lib/types/components/WorkspaceMenuPicker.d.ts.map +1 -0
- package/lib/types/components/WorkspaceMenuPicker.js +19 -0
- package/lib/types/components/WorkspacePicker.d.ts +12 -0
- package/lib/types/components/WorkspacePicker.d.ts.map +1 -0
- package/lib/types/components/WorkspacePicker.js +13 -0
- package/lib/types/components/activityFrames.d.ts +23 -0
- package/lib/types/components/activityFrames.d.ts.map +1 -0
- package/lib/types/components/activityFrames.js +31 -0
- package/lib/types/components/approvals/ApprovalPanel.d.ts +24 -0
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -0
- package/lib/types/components/approvals/ApprovalPanel.js +53 -0
- package/lib/types/components/bigfont.d.ts +28 -0
- package/lib/types/components/bigfont.d.ts.map +1 -0
- package/lib/types/components/bigfont.js +91 -0
- package/lib/types/components/design-system/Byline.d.ts +14 -0
- package/lib/types/components/design-system/Byline.d.ts.map +1 -0
- package/lib/types/components/design-system/Byline.js +17 -0
- package/lib/types/components/design-system/Divider.d.ts +61 -0
- package/lib/types/components/design-system/Divider.d.ts.map +1 -0
- package/lib/types/components/design-system/Divider.js +115 -0
- package/lib/types/components/design-system/HintLine.d.ts +11 -0
- package/lib/types/components/design-system/HintLine.d.ts.map +1 -0
- package/lib/types/components/design-system/HintLine.js +14 -0
- package/lib/types/components/design-system/ListItem.d.ts +42 -0
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -0
- package/lib/types/components/design-system/ListItem.js +84 -0
- package/lib/types/components/design-system/LoadingState.d.ts +19 -0
- package/lib/types/components/design-system/LoadingState.d.ts.map +1 -0
- package/lib/types/components/design-system/LoadingState.js +22 -0
- package/lib/types/components/design-system/Pane.d.ts +17 -0
- package/lib/types/components/design-system/Pane.d.ts.map +1 -0
- package/lib/types/components/design-system/Pane.js +15 -0
- package/lib/types/components/design-system/ProgressBar.d.ts +21 -0
- package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -0
- package/lib/types/components/design-system/ProgressBar.js +26 -0
- package/lib/types/components/design-system/StatusIcon.d.ts +15 -0
- package/lib/types/components/design-system/StatusIcon.d.ts.map +1 -0
- package/lib/types/components/design-system/StatusIcon.js +20 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts +21 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -0
- package/lib/types/components/design-system/ThemeProvider.js +256 -0
- package/lib/types/components/design-system/ThemedBox.d.ts +60 -0
- package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -0
- package/lib/types/components/design-system/ThemedBox.js +29 -0
- package/lib/types/components/design-system/ThemedText.d.ts +61 -0
- package/lib/types/components/design-system/ThemedText.d.ts.map +1 -0
- package/lib/types/components/design-system/ThemedText.js +42 -0
- package/lib/types/components/listWindow.d.ts +26 -0
- package/lib/types/components/listWindow.d.ts.map +1 -0
- package/lib/types/components/listWindow.js +47 -0
- package/lib/types/components/messages/AssistantTextMessage.d.ts +20 -0
- package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -0
- package/lib/types/components/messages/AssistantTextMessage.js +18 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +40 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -0
- package/lib/types/components/messages/AssistantThinkingMessage.js +84 -0
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +72 -0
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -0
- package/lib/types/components/messages/AssistantToolUseMessage.js +517 -0
- package/lib/types/components/messages/MessageMetadata.d.ts +14 -0
- package/lib/types/components/messages/MessageMetadata.d.ts.map +1 -0
- package/lib/types/components/messages/MessageMetadata.js +19 -0
- package/lib/types/components/messages/TranscriptImages.d.ts +21 -0
- package/lib/types/components/messages/TranscriptImages.d.ts.map +1 -0
- package/lib/types/components/messages/TranscriptImages.js +83 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts +18 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -0
- package/lib/types/components/messages/UserPromptMessage.js +28 -0
- package/lib/types/components/messages/imageInspection.d.ts +33 -0
- package/lib/types/components/messages/imageInspection.d.ts.map +1 -0
- package/lib/types/components/messages/imageInspection.js +107 -0
- package/lib/types/components/messages/originalImage.d.ts +5 -0
- package/lib/types/components/messages/originalImage.d.ts.map +1 -0
- package/lib/types/components/messages/originalImage.js +56 -0
- package/lib/types/components/messages/transcriptImageDecode.d.ts +9 -0
- package/lib/types/components/messages/transcriptImageDecode.d.ts.map +1 -0
- package/lib/types/components/messages/transcriptImageDecode.js +144 -0
- package/lib/types/components/messages/useImageInspection.d.ts +10 -0
- package/lib/types/components/messages/useImageInspection.d.ts.map +1 -0
- package/lib/types/components/messages/useImageInspection.js +91 -0
- 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/components/promptDraftCache.d.ts +102 -0
- package/lib/types/components/promptDraftCache.d.ts.map +1 -0
- package/lib/types/components/promptDraftCache.js +76 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +94 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -0
- package/lib/types/components/questions/AskUserQuestionPanel.js +527 -0
- package/lib/types/components/questions/PlanReviewPanel.d.ts +55 -0
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -0
- package/lib/types/components/questions/PlanReviewPanel.js +351 -0
- package/lib/types/components/questions/QuestionMinimizedBar.d.ts +12 -0
- package/lib/types/components/questions/QuestionMinimizedBar.d.ts.map +1 -0
- package/lib/types/components/questions/QuestionMinimizedBar.js +43 -0
- package/lib/types/components/sessions/SessionListRow.d.ts +58 -0
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -0
- package/lib/types/components/sessions/SessionListRow.js +108 -0
- package/lib/types/components/sessions/SessionPreview.d.ts +25 -0
- package/lib/types/components/sessions/SessionPreview.d.ts.map +1 -0
- package/lib/types/components/sessions/SessionPreview.js +62 -0
- package/lib/types/components/sessions/WorkspaceListRow.d.ts +17 -0
- package/lib/types/components/sessions/WorkspaceListRow.d.ts.map +1 -0
- package/lib/types/components/sessions/WorkspaceListRow.js +27 -0
- package/lib/types/components/shimmer.d.ts +35 -0
- package/lib/types/components/shimmer.d.ts.map +1 -0
- package/lib/types/components/shimmer.js +43 -0
- package/lib/types/components/smoothReveal.d.ts +57 -0
- package/lib/types/components/smoothReveal.d.ts.map +1 -0
- package/lib/types/components/smoothReveal.js +305 -0
- package/lib/types/components/trajectory/HotspotView.d.ts +20 -0
- package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -0
- package/lib/types/components/trajectory/HotspotView.js +89 -0
- package/lib/types/components/trajectory/Inspector.d.ts +31 -0
- package/lib/types/components/trajectory/Inspector.d.ts.map +1 -0
- package/lib/types/components/trajectory/Inspector.js +67 -0
- package/lib/types/components/trajectory/Ledger.d.ts +28 -0
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -0
- package/lib/types/components/trajectory/Ledger.js +130 -0
- package/lib/types/components/trajectory/MiniWake.d.ts +24 -0
- package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -0
- package/lib/types/components/trajectory/MiniWake.js +99 -0
- package/lib/types/components/trajectory/WaveBand.d.ts +42 -0
- package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -0
- package/lib/types/components/trajectory/WaveBand.js +150 -0
- package/lib/types/components/whaleFrames.d.ts +81 -0
- package/lib/types/components/whaleFrames.d.ts.map +1 -0
- package/lib/types/components/whaleFrames.js +768 -0
- package/lib/types/components/whaleIdle.d.ts +66 -0
- package/lib/types/components/whaleIdle.d.ts.map +1 -0
- package/lib/types/components/whaleIdle.js +174 -0
- package/lib/types/components/whaleLayers.d.ts +28 -0
- package/lib/types/components/whaleLayers.d.ts.map +1 -0
- package/lib/types/components/whaleLayers.js +90 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +49 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +50 -0
- package/lib/types/customTheme.d.ts +108 -0
- package/lib/types/customTheme.d.ts.map +1 -0
- package/lib/types/customTheme.js +281 -0
- package/lib/types/deepseekBalance.d.ts +19 -0
- package/lib/types/deepseekBalance.d.ts.map +1 -0
- package/lib/types/deepseekBalance.js +72 -0
- package/lib/types/deepseekPricing.d.ts +83 -0
- package/lib/types/deepseekPricing.d.ts.map +1 -0
- package/lib/types/deepseekPricing.js +140 -0
- package/lib/types/dsh-adapter/activity-store.d.ts +221 -0
- package/lib/types/dsh-adapter/activity-store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/activity-store.js +359 -0
- package/lib/types/dsh-adapter/agent-view.d.ts +66 -0
- package/lib/types/dsh-adapter/agent-view.d.ts.map +1 -0
- package/lib/types/dsh-adapter/agent-view.js +153 -0
- package/lib/types/dsh-adapter/approvals.d.ts +225 -0
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -0
- package/lib/types/dsh-adapter/approvals.js +465 -0
- package/lib/types/dsh-adapter/bundled-presets.d.ts +10 -0
- package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -0
- package/lib/types/dsh-adapter/bundled-presets.js +80 -0
- 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 +86 -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 +312 -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 +110 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +67 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/binding-events.js +170 -0
- package/lib/types/dsh-adapter/channel/binding.d.ts +58 -0
- package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/binding.js +287 -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 +18 -0
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/compaction.js +114 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +62 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/composer-images.js +316 -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 +34 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +31 -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/ide-selection.d.ts +58 -0
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/ide-selection.js +226 -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 +42 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/input-delivery.js +313 -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 +54 -0
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/local-actions.js +109 -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 +49 -0
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-actions.js +351 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +31 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-switch.js +116 -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 +44 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/projection.js +1031 -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 +163 -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 +36 -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 +109 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +35 -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 +64 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +91 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-metadata.js +220 -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 +43 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +65 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-resume.js +438 -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 +146 -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 +154 -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 +257 -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 +51 -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 +67 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.js +307 -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 +306 -0
- package/lib/types/dsh-adapter/channel/types.d.ts +167 -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 +23 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.js +96 -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 +23 -0
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel.js +999 -0
- package/lib/types/dsh-adapter/childStderr.d.ts +63 -0
- package/lib/types/dsh-adapter/childStderr.d.ts.map +1 -0
- package/lib/types/dsh-adapter/childStderr.js +180 -0
- package/lib/types/dsh-adapter/command-attribution.d.ts +51 -0
- package/lib/types/dsh-adapter/command-attribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/command-attribution.js +93 -0
- package/lib/types/dsh-adapter/command-errors.d.ts +42 -0
- package/lib/types/dsh-adapter/command-errors.d.ts.map +1 -0
- package/lib/types/dsh-adapter/command-errors.js +63 -0
- package/lib/types/dsh-adapter/command-trees.d.ts +34 -0
- package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -0
- package/lib/types/dsh-adapter/command-trees.js +111 -0
- package/lib/types/dsh-adapter/compat/index.d.ts +29 -0
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/index.js +28 -0
- package/lib/types/dsh-adapter/compat/liveSession.d.ts +79 -0
- package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/liveSession.js +223 -0
- package/lib/types/dsh-adapter/compat/messages.d.ts +15 -0
- package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/messages.js +15 -0
- 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 +309 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/sessionLog.js +1177 -0
- package/lib/types/dsh-adapter/compat/settings.d.ts +35 -0
- package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/settings.js +57 -0
- package/lib/types/dsh-adapter/compat/shell.d.ts +25 -0
- package/lib/types/dsh-adapter/compat/shell.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/shell.js +11 -0
- package/lib/types/dsh-adapter/component-identity.d.ts +33 -0
- package/lib/types/dsh-adapter/component-identity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/component-identity.js +108 -0
- package/lib/types/dsh-adapter/contract.d.ts +91 -0
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -0
- package/lib/types/dsh-adapter/contract.js +276 -0
- package/lib/types/dsh-adapter/credentialRefGuard.d.ts +40 -0
- package/lib/types/dsh-adapter/credentialRefGuard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/credentialRefGuard.js +43 -0
- package/lib/types/dsh-adapter/decision-guard.d.ts +128 -0
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/decision-guard.js +460 -0
- package/lib/types/dsh-adapter/dialogs.d.ts +145 -0
- package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/dialogs.js +329 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts +96 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -0
- package/lib/types/dsh-adapter/effect-ledger.js +290 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +186 -0
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -0
- package/lib/types/dsh-adapter/extension-events.js +187 -0
- package/lib/types/dsh-adapter/extensions.d.ts +36 -0
- package/lib/types/dsh-adapter/extensions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/extensions.js +51 -0
- package/lib/types/dsh-adapter/host-access.d.ts +37 -0
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-access.js +652 -0
- 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/ide-channel.d.ts +224 -0
- package/lib/types/dsh-adapter/ide-channel.d.ts.map +1 -0
- package/lib/types/dsh-adapter/ide-channel.js +556 -0
- package/lib/types/dsh-adapter/index.d.ts +151 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/index.js +119 -0
- package/lib/types/dsh-adapter/inject-channel.d.ts +108 -0
- package/lib/types/dsh-adapter/inject-channel.d.ts.map +1 -0
- package/lib/types/dsh-adapter/inject-channel.js +247 -0
- package/lib/types/dsh-adapter/invariant.d.ts +20 -0
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -0
- package/lib/types/dsh-adapter/invariant.js +26 -0
- package/lib/types/dsh-adapter/jobs.d.ts +101 -0
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/jobs.js +177 -0
- package/lib/types/dsh-adapter/message-observer.d.ts +186 -0
- package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -0
- package/lib/types/dsh-adapter/message-observer.js +682 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.js +191 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.js +133 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.js +175 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.js +132 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts +6 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.js +38 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.js +107 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts +6 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/bin-path.js +30 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts +9 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/cli.js +105 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts +29 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/index.js +108 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts +64 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/picker.js +86 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts +40 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.js +100 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts +19 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/sessionize.js +101 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts +52 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/types.js +11 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts +7 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/uuid.js +25 -0
- package/lib/types/dsh-adapter/packaged-presets.d.ts +22 -0
- package/lib/types/dsh-adapter/packaged-presets.d.ts.map +1 -0
- package/lib/types/dsh-adapter/packaged-presets.js +94 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +205 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-host.js +762 -0
- package/lib/types/dsh-adapter/plugin-storage.d.ts +118 -0
- package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-storage.js +536 -0
- package/lib/types/dsh-adapter/plugin.d.ts +70 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin.js +2140 -0
- package/lib/types/dsh-adapter/plugins-info.d.ts +43 -0
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugins-info.js +293 -0
- package/lib/types/dsh-adapter/preset-resolution.d.ts +57 -0
- package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/preset-resolution.js +52 -0
- package/lib/types/dsh-adapter/presets.d.ts +110 -0
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -0
- package/lib/types/dsh-adapter/presets.js +161 -0
- package/lib/types/dsh-adapter/promptDebug.d.ts +4 -0
- package/lib/types/dsh-adapter/promptDebug.d.ts.map +1 -0
- package/lib/types/dsh-adapter/promptDebug.js +163 -0
- package/lib/types/dsh-adapter/providerGuard.d.ts +75 -0
- package/lib/types/dsh-adapter/providerGuard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/providerGuard.js +104 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +42 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/providerWizard.js +921 -0
- package/lib/types/dsh-adapter/questions-answerer.d.ts +51 -0
- package/lib/types/dsh-adapter/questions-answerer.d.ts.map +1 -0
- package/lib/types/dsh-adapter/questions-answerer.js +64 -0
- package/lib/types/dsh-adapter/questions.d.ts +130 -0
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/questions.js +282 -0
- package/lib/types/dsh-adapter/recap.d.ts +41 -0
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -0
- package/lib/types/dsh-adapter/recap.js +111 -0
- package/lib/types/dsh-adapter/renderers.d.ts +58 -0
- package/lib/types/dsh-adapter/renderers.d.ts.map +1 -0
- package/lib/types/dsh-adapter/renderers.js +198 -0
- package/lib/types/dsh-adapter/sanitize.d.ts +45 -0
- package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sanitize.js +84 -0
- package/lib/types/dsh-adapter/scenes.d.ts +87 -0
- package/lib/types/dsh-adapter/scenes.d.ts.map +1 -0
- package/lib/types/dsh-adapter/scenes.js +223 -0
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +53 -0
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-mount-heartbeat.js +100 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts +232 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessionTree.js +984 -0
- package/lib/types/dsh-adapter/sessions/digest.d.ts +54 -0
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/digest.js +478 -0
- package/lib/types/dsh-adapter/sessions/frames.d.ts +103 -0
- package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/frames.js +263 -0
- package/lib/types/dsh-adapter/sessions/header.d.ts +56 -0
- package/lib/types/dsh-adapter/sessions/header.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/header.js +85 -0
- package/lib/types/dsh-adapter/sessions/index.d.ts +17 -0
- package/lib/types/dsh-adapter/sessions/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/index.js +15 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts +64 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/list.js +331 -0
- package/lib/types/dsh-adapter/sessions/recovery.d.ts +17 -0
- package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/recovery.js +109 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts +60 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/store.js +221 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts +21 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/types.js +1 -0
- package/lib/types/dsh-adapter/settings-sections.d.ts +48 -0
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -0
- package/lib/types/dsh-adapter/settings-sections.js +253 -0
- package/lib/types/dsh-adapter/settingsEditor.d.ts +100 -0
- package/lib/types/dsh-adapter/settingsEditor.d.ts.map +1 -0
- package/lib/types/dsh-adapter/settingsEditor.js +238 -0
- package/lib/types/dsh-adapter/sharp.d.ts +10 -0
- package/lib/types/dsh-adapter/sharp.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sharp.js +59 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts +82 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -0
- package/lib/types/dsh-adapter/shortcuts.js +252 -0
- package/lib/types/dsh-adapter/sideQuestion.d.ts +36 -0
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sideQuestion.js +59 -0
- package/lib/types/dsh-adapter/status.d.ts +148 -0
- package/lib/types/dsh-adapter/status.d.ts.map +1 -0
- package/lib/types/dsh-adapter/status.js +435 -0
- package/lib/types/dsh-adapter/subagents.d.ts +64 -0
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -0
- package/lib/types/dsh-adapter/subagents.js +366 -0
- package/lib/types/dsh-adapter/themes.d.ts +52 -0
- package/lib/types/dsh-adapter/themes.d.ts.map +1 -0
- package/lib/types/dsh-adapter/themes.js +307 -0
- package/lib/types/dsh-adapter/toast.d.ts +80 -0
- package/lib/types/dsh-adapter/toast.d.ts.map +1 -0
- package/lib/types/dsh-adapter/toast.js +171 -0
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +47 -0
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/aggregate.js +208 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +196 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/guards.js +273 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts +16 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/index.js +15 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +40 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/inspect.js +160 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +146 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/projection.js +710 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts +232 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/types.js +70 -0
- package/lib/types/dsh-adapter/trajectory/wave.d.ts +45 -0
- package/lib/types/dsh-adapter/trajectory/wave.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/wave.js +210 -0
- package/lib/types/dsh-adapter/transcript-images.d.ts +17 -0
- package/lib/types/dsh-adapter/transcript-images.d.ts.map +1 -0
- package/lib/types/dsh-adapter/transcript-images.js +96 -0
- package/lib/types/dsh-adapter/types.d.ts +23 -0
- package/lib/types/dsh-adapter/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/types.js +1 -0
- package/lib/types/dsh-adapter/workspace.d.ts +22 -0
- package/lib/types/dsh-adapter/workspace.d.ts.map +1 -0
- package/lib/types/dsh-adapter/workspace.js +16 -0
- package/lib/types/dsh-adapter/workspaces.d.ts +125 -0
- package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -0
- package/lib/types/dsh-adapter/workspaces.js +543 -0
- package/lib/types/effortPrefs.d.ts +48 -0
- package/lib/types/effortPrefs.d.ts.map +1 -0
- package/lib/types/effortPrefs.js +95 -0
- package/lib/types/extensions.d.ts +18 -0
- package/lib/types/extensions.d.ts.map +1 -0
- package/lib/types/extensions.js +27 -0
- package/lib/types/force-production-react.d.ts +1 -0
- package/lib/types/force-production-react.d.ts.map +1 -0
- package/lib/types/force-production-react.js +12 -0
- package/lib/types/herdr.d.ts +28 -0
- package/lib/types/herdr.d.ts.map +1 -0
- package/lib/types/herdr.js +133 -0
- package/lib/types/history.d.ts +39 -0
- package/lib/types/history.d.ts.map +1 -0
- package/lib/types/history.js +177 -0
- package/lib/types/homePrefs.d.ts +15 -0
- package/lib/types/homePrefs.d.ts.map +1 -0
- package/lib/types/homePrefs.js +53 -0
- package/lib/types/hooks/useBlink.d.ts +10 -0
- package/lib/types/hooks/useBlink.d.ts.map +1 -0
- package/lib/types/hooks/useBlink.js +19 -0
- package/lib/types/hooks/useExternalVersion.d.ts +32 -0
- package/lib/types/hooks/useExternalVersion.d.ts.map +1 -0
- package/lib/types/hooks/useExternalVersion.js +53 -0
- package/lib/types/hooks/useRevealVersion.d.ts +21 -0
- package/lib/types/hooks/useRevealVersion.d.ts.map +1 -0
- package/lib/types/hooks/useRevealVersion.js +33 -0
- package/lib/types/hooks/useRuntimeThemeSnapshot.d.ts +10 -0
- package/lib/types/hooks/useRuntimeThemeSnapshot.d.ts.map +1 -0
- package/lib/types/hooks/useRuntimeThemeSnapshot.js +32 -0
- package/lib/types/i18n.d.ts +4433 -0
- package/lib/types/i18n.d.ts.map +1 -0
- package/lib/types/i18n.js +1493 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +4 -0
- package/lib/types/ink/Ansi.d.ts +9 -0
- package/lib/types/ink/Ansi.d.ts.map +1 -0
- package/lib/types/ink/Ansi.js +45 -0
- package/lib/types/ink/bidi.d.ts +18 -0
- package/lib/types/ink/bidi.d.ts.map +1 -0
- package/lib/types/ink/bidi.js +119 -0
- package/lib/types/ink/clearTerminal.d.ts +22 -0
- package/lib/types/ink/clearTerminal.d.ts.map +1 -0
- package/lib/types/ink/clearTerminal.js +72 -0
- package/lib/types/ink/colorize.d.ts +43 -0
- package/lib/types/ink/colorize.d.ts.map +1 -0
- package/lib/types/ink/colorize.js +233 -0
- package/lib/types/ink/components/AlternateScreen.d.ts +8 -0
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -0
- package/lib/types/ink/components/AlternateScreen.js +29 -0
- package/lib/types/ink/components/App.d.ts +149 -0
- package/lib/types/ink/components/App.d.ts.map +1 -0
- package/lib/types/ink/components/App.js +1027 -0
- package/lib/types/ink/components/AppContext.d.ts +17 -0
- package/lib/types/ink/components/AppContext.d.ts.map +1 -0
- package/lib/types/ink/components/AppContext.js +12 -0
- package/lib/types/ink/components/Box.d.ts +85 -0
- package/lib/types/ink/components/Box.d.ts.map +1 -0
- package/lib/types/ink/components/Box.js +22 -0
- package/lib/types/ink/components/Button.d.ts +37 -0
- package/lib/types/ink/components/Button.d.ts.map +1 -0
- package/lib/types/ink/components/Button.js +23 -0
- package/lib/types/ink/components/ClockContext.d.ts +17 -0
- package/lib/types/ink/components/ClockContext.d.ts.map +1 -0
- package/lib/types/ink/components/ClockContext.js +99 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts +30 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -0
- package/lib/types/ink/components/CursorDeclarationContext.js +6 -0
- package/lib/types/ink/components/ErrorOverview.d.ts +7 -0
- package/lib/types/ink/components/ErrorOverview.d.ts.map +1 -0
- package/lib/types/ink/components/ErrorOverview.js +49 -0
- package/lib/types/ink/components/Image.d.ts +28 -0
- package/lib/types/ink/components/Image.d.ts.map +1 -0
- package/lib/types/ink/components/Image.js +44 -0
- package/lib/types/ink/components/Link.d.ts +8 -0
- package/lib/types/ink/components/Link.d.ts.map +1 -0
- package/lib/types/ink/components/Link.js +7 -0
- package/lib/types/ink/components/Newline.d.ts +7 -0
- package/lib/types/ink/components/Newline.d.ts.map +1 -0
- package/lib/types/ink/components/Newline.js +5 -0
- package/lib/types/ink/components/NoSelect.d.ts +9 -0
- package/lib/types/ink/components/NoSelect.d.ts.map +1 -0
- package/lib/types/ink/components/NoSelect.js +6 -0
- package/lib/types/ink/components/RawAnsi.d.ts +9 -0
- package/lib/types/ink/components/RawAnsi.d.ts.map +1 -0
- package/lib/types/ink/components/RawAnsi.js +7 -0
- package/lib/types/ink/components/ScrollBox.d.ts +78 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -0
- package/lib/types/ink/components/ScrollBox.js +309 -0
- package/lib/types/ink/components/Spacer.d.ts +4 -0
- package/lib/types/ink/components/Spacer.d.ts.map +1 -0
- package/lib/types/ink/components/Spacer.js +6 -0
- package/lib/types/ink/components/StdinContext.d.ts +32 -0
- package/lib/types/ink/components/StdinContext.d.ts.map +1 -0
- package/lib/types/ink/components/StdinContext.js +16 -0
- package/lib/types/ink/components/TerminalFocusContext.d.ts +11 -0
- package/lib/types/ink/components/TerminalFocusContext.d.ts.map +1 -0
- package/lib/types/ink/components/TerminalFocusContext.js +11 -0
- package/lib/types/ink/components/TerminalSizeContext.d.ts +6 -0
- package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -0
- package/lib/types/ink/components/TerminalSizeContext.js +2 -0
- package/lib/types/ink/components/Text.d.ts +64 -0
- package/lib/types/ink/components/Text.d.ts.map +1 -0
- package/lib/types/ink/components/Text.js +19 -0
- package/lib/types/ink/constants.d.ts +12 -0
- package/lib/types/ink/constants.d.ts.map +1 -0
- package/lib/types/ink/constants.js +11 -0
- package/lib/types/ink/cursor.d.ts +11 -0
- package/lib/types/ink/cursor.d.ts.map +1 -0
- package/lib/types/ink/cursor.js +1 -0
- package/lib/types/ink/devtools.d.ts +7 -0
- package/lib/types/ink/devtools.d.ts.map +1 -0
- package/lib/types/ink/devtools.js +1 -0
- package/lib/types/ink/dom.d.ts +194 -0
- package/lib/types/ink/dom.d.ts.map +1 -0
- package/lib/types/ink/dom.js +424 -0
- package/lib/types/ink/events/click-event.d.ts +23 -0
- package/lib/types/ink/events/click-event.d.ts.map +1 -0
- package/lib/types/ink/events/click-event.js +33 -0
- package/lib/types/ink/events/context-menu-event.d.ts +19 -0
- package/lib/types/ink/events/context-menu-event.d.ts.map +1 -0
- package/lib/types/ink/events/context-menu-event.js +20 -0
- package/lib/types/ink/events/dispatcher.d.ts +63 -0
- package/lib/types/ink/events/dispatcher.d.ts.map +1 -0
- package/lib/types/ink/events/dispatcher.js +194 -0
- package/lib/types/ink/events/drag-event.d.ts +44 -0
- package/lib/types/ink/events/drag-event.d.ts.map +1 -0
- package/lib/types/ink/events/drag-event.js +39 -0
- package/lib/types/ink/events/emitter.d.ts +20 -0
- package/lib/types/ink/events/emitter.d.ts.map +1 -0
- package/lib/types/ink/events/emitter.js +43 -0
- package/lib/types/ink/events/event-handlers.d.ts +65 -0
- package/lib/types/ink/events/event-handlers.d.ts.map +1 -0
- package/lib/types/ink/events/event-handlers.js +40 -0
- package/lib/types/ink/events/event.d.ts +19 -0
- package/lib/types/ink/events/event.d.ts.map +1 -0
- package/lib/types/ink/events/event.js +22 -0
- package/lib/types/ink/events/focus-event.d.ts +19 -0
- package/lib/types/ink/events/focus-event.d.ts.map +1 -0
- package/lib/types/ink/events/focus-event.js +21 -0
- package/lib/types/ink/events/input-event.d.ts +72 -0
- package/lib/types/ink/events/input-event.d.ts.map +1 -0
- package/lib/types/ink/events/input-event.js +185 -0
- package/lib/types/ink/events/keyboard-event.d.ts +40 -0
- package/lib/types/ink/events/keyboard-event.d.ts.map +1 -0
- package/lib/types/ink/events/keyboard-event.js +65 -0
- package/lib/types/ink/events/paste-event.d.ts +11 -0
- package/lib/types/ink/events/paste-event.d.ts.map +1 -0
- package/lib/types/ink/events/paste-event.js +13 -0
- package/lib/types/ink/events/pointer-event.d.ts +61 -0
- package/lib/types/ink/events/pointer-event.d.ts.map +1 -0
- package/lib/types/ink/events/pointer-event.js +61 -0
- package/lib/types/ink/events/resize-event.d.ts +13 -0
- package/lib/types/ink/events/resize-event.d.ts.map +1 -0
- package/lib/types/ink/events/resize-event.js +16 -0
- package/lib/types/ink/events/terminal-event.d.ts +112 -0
- package/lib/types/ink/events/terminal-event.d.ts.map +1 -0
- package/lib/types/ink/events/terminal-event.js +131 -0
- package/lib/types/ink/events/terminal-focus-event.d.ts +21 -0
- package/lib/types/ink/events/terminal-focus-event.d.ts.map +1 -0
- package/lib/types/ink/events/terminal-focus-event.js +18 -0
- package/lib/types/ink/events/wheel-event.d.ts +17 -0
- package/lib/types/ink/events/wheel-event.d.ts.map +1 -0
- package/lib/types/ink/events/wheel-event.js +20 -0
- package/lib/types/ink/flush-tick.d.ts +26 -0
- package/lib/types/ink/flush-tick.d.ts.map +1 -0
- package/lib/types/ink/flush-tick.js +31 -0
- package/lib/types/ink/focus.d.ts +74 -0
- package/lib/types/ink/focus.d.ts.map +1 -0
- package/lib/types/ink/focus.js +188 -0
- package/lib/types/ink/frame.d.ts +128 -0
- package/lib/types/ink/frame.d.ts.map +1 -0
- package/lib/types/ink/frame.js +43 -0
- package/lib/types/ink/geometry-trace.d.ts +51 -0
- package/lib/types/ink/geometry-trace.d.ts.map +1 -0
- package/lib/types/ink/geometry-trace.js +83 -0
- package/lib/types/ink/get-max-width.d.ts +12 -0
- package/lib/types/ink/get-max-width.d.ts.map +1 -0
- package/lib/types/ink/get-max-width.js +12 -0
- package/lib/types/ink/hit-test.d.ts +181 -0
- package/lib/types/ink/hit-test.d.ts.map +1 -0
- package/lib/types/ink/hit-test.js +540 -0
- package/lib/types/ink/hooks/use-animation-frame.d.ts +27 -0
- package/lib/types/ink/hooks/use-animation-frame.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-animation-frame.js +48 -0
- package/lib/types/ink/hooks/use-app.d.ts +7 -0
- package/lib/types/ink/hooks/use-app.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-app.js +7 -0
- package/lib/types/ink/hooks/use-copy-on-select.d.ts +26 -0
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-copy-on-select.js +54 -0
- package/lib/types/ink/hooks/use-declared-cursor.d.ts +31 -0
- package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-declared-cursor.js +65 -0
- package/lib/types/ink/hooks/use-input.d.ts +41 -0
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-input.js +81 -0
- package/lib/types/ink/hooks/use-interval.d.ts +23 -0
- package/lib/types/ink/hooks/use-interval.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-interval.js +58 -0
- package/lib/types/ink/hooks/use-search-highlight.d.ts +34 -0
- package/lib/types/ink/hooks/use-search-highlight.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-search-highlight.js +35 -0
- package/lib/types/ink/hooks/use-selection.d.ts +44 -0
- package/lib/types/ink/hooks/use-selection.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-selection.js +64 -0
- package/lib/types/ink/hooks/use-stdin.d.ts +8 -0
- package/lib/types/ink/hooks/use-stdin.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-stdin.js +8 -0
- package/lib/types/ink/hooks/use-tab-status.d.ts +18 -0
- package/lib/types/ink/hooks/use-tab-status.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-tab-status.js +58 -0
- package/lib/types/ink/hooks/use-terminal-focus.d.ts +11 -0
- package/lib/types/ink/hooks/use-terminal-focus.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-focus.js +15 -0
- package/lib/types/ink/hooks/use-terminal-images.d.ts +14 -0
- package/lib/types/ink/hooks/use-terminal-images.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-images.js +22 -0
- package/lib/types/ink/hooks/use-terminal-size.d.ts +6 -0
- package/lib/types/ink/hooks/use-terminal-size.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-size.js +12 -0
- package/lib/types/ink/hooks/use-terminal-title.d.ts +14 -0
- package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-title.js +30 -0
- package/lib/types/ink/hooks/use-terminal-viewport.d.ts +32 -0
- package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-viewport.js +79 -0
- package/lib/types/ink/ink.d.ts +571 -0
- package/lib/types/ink/ink.d.ts.map +1 -0
- package/lib/types/ink/ink.js +2818 -0
- package/lib/types/ink/input-suppression.d.ts +20 -0
- package/lib/types/ink/input-suppression.d.ts.map +1 -0
- package/lib/types/ink/input-suppression.js +26 -0
- package/lib/types/ink/instances.d.ts +10 -0
- package/lib/types/ink/instances.d.ts.map +1 -0
- package/lib/types/ink/instances.js +13 -0
- package/lib/types/ink/kitty-graphics.d.ts +41 -0
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -0
- package/lib/types/ink/kitty-graphics.js +229 -0
- package/lib/types/ink/layout/engine.d.ts +7 -0
- package/lib/types/ink/layout/engine.d.ts.map +1 -0
- package/lib/types/ink/layout/engine.js +8 -0
- package/lib/types/ink/layout/geometry.d.ts +86 -0
- package/lib/types/ink/layout/geometry.d.ts.map +1 -0
- package/lib/types/ink/layout/geometry.js +95 -0
- package/lib/types/ink/layout/node.d.ts +153 -0
- package/lib/types/ink/layout/node.d.ts.map +1 -0
- package/lib/types/ink/layout/node.js +72 -0
- package/lib/types/ink/layout/yoga.d.ts +70 -0
- package/lib/types/ink/layout/yoga.d.ts.map +1 -0
- package/lib/types/ink/layout/yoga.js +252 -0
- package/lib/types/ink/line-width-cache.d.ts +9 -0
- package/lib/types/ink/line-width-cache.d.ts.map +1 -0
- package/lib/types/ink/line-width-cache.js +45 -0
- package/lib/types/ink/log-update.d.ts +57 -0
- package/lib/types/ink/log-update.d.ts.map +1 -0
- package/lib/types/ink/log-update.js +1000 -0
- package/lib/types/ink/measure-element.d.ts +19 -0
- package/lib/types/ink/measure-element.d.ts.map +1 -0
- package/lib/types/ink/measure-element.js +10 -0
- package/lib/types/ink/measure-text.d.ts +13 -0
- package/lib/types/ink/measure-text.d.ts.map +1 -0
- package/lib/types/ink/measure-text.js +38 -0
- package/lib/types/ink/node-cache.d.ts +54 -0
- package/lib/types/ink/node-cache.d.ts.map +1 -0
- package/lib/types/ink/node-cache.js +45 -0
- package/lib/types/ink/optimizer.d.ts +18 -0
- package/lib/types/ink/optimizer.d.ts.map +1 -0
- package/lib/types/ink/optimizer.js +83 -0
- package/lib/types/ink/output.d.ts +300 -0
- package/lib/types/ink/output.d.ts.map +1 -0
- package/lib/types/ink/output.js +1205 -0
- package/lib/types/ink/parse-keypress.d.ts +217 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -0
- package/lib/types/ink/parse-keypress.js +1550 -0
- package/lib/types/ink/reconciler.d.ts +43 -0
- package/lib/types/ink/reconciler.d.ts.map +1 -0
- package/lib/types/ink/reconciler.js +414 -0
- package/lib/types/ink/render-border.d.ts +41 -0
- package/lib/types/ink/render-border.d.ts.map +1 -0
- package/lib/types/ink/render-border.js +159 -0
- package/lib/types/ink/render-node-to-output.d.ts +199 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -0
- package/lib/types/ink/render-node-to-output.js +1758 -0
- package/lib/types/ink/render-to-screen.d.ts +65 -0
- package/lib/types/ink/render-to-screen.d.ts.map +1 -0
- package/lib/types/ink/render-to-screen.js +189 -0
- package/lib/types/ink/renderer.d.ts +34 -0
- package/lib/types/ink/renderer.d.ts.map +1 -0
- package/lib/types/ink/renderer.js +181 -0
- package/lib/types/ink/root.d.ts +109 -0
- package/lib/types/ink/root.d.ts.map +1 -0
- package/lib/types/ink/root.js +96 -0
- package/lib/types/ink/screen.d.ts +545 -0
- package/lib/types/ink/screen.d.ts.map +1 -0
- package/lib/types/ink/screen.js +1607 -0
- package/lib/types/ink/selection.d.ts +529 -0
- package/lib/types/ink/selection.d.ts.map +1 -0
- package/lib/types/ink/selection.js +1292 -0
- package/lib/types/ink/sixel-codec.d.ts +41 -0
- package/lib/types/ink/sixel-codec.d.ts.map +1 -0
- package/lib/types/ink/sixel-codec.js +128 -0
- package/lib/types/ink/sixel-graphics.d.ts +74 -0
- package/lib/types/ink/sixel-graphics.d.ts.map +1 -0
- package/lib/types/ink/sixel-graphics.js +498 -0
- package/lib/types/ink/sixel-worker.d.ts +2 -0
- package/lib/types/ink/sixel-worker.d.ts.map +1 -0
- package/lib/types/ink/sixel-worker.js +12 -0
- package/lib/types/ink/squash-text-nodes.d.ts +30 -0
- package/lib/types/ink/squash-text-nodes.d.ts.map +1 -0
- package/lib/types/ink/squash-text-nodes.js +63 -0
- package/lib/types/ink/stringWidth.d.ts +3 -0
- package/lib/types/ink/stringWidth.d.ts.map +1 -0
- package/lib/types/ink/stringWidth.js +248 -0
- package/lib/types/ink/styles.d.ts +346 -0
- package/lib/types/ink/styles.d.ts.map +1 -0
- package/lib/types/ink/styles.js +307 -0
- package/lib/types/ink/supports-hyperlinks.d.ts +20 -0
- package/lib/types/ink/supports-hyperlinks.d.ts.map +1 -0
- package/lib/types/ink/supports-hyperlinks.js +44 -0
- package/lib/types/ink/tabstops.d.ts +10 -0
- package/lib/types/ink/tabstops.d.ts.map +1 -0
- package/lib/types/ink/tabstops.js +47 -0
- package/lib/types/ink/terminal-focus-state.d.ts +35 -0
- package/lib/types/ink/terminal-focus-state.d.ts.map +1 -0
- package/lib/types/ink/terminal-focus-state.js +57 -0
- package/lib/types/ink/terminal-image-protocol.d.ts +4 -0
- package/lib/types/ink/terminal-image-protocol.d.ts.map +1 -0
- package/lib/types/ink/terminal-image-protocol.js +8 -0
- package/lib/types/ink/terminal-image.d.ts +102 -0
- package/lib/types/ink/terminal-image.d.ts.map +1 -0
- package/lib/types/ink/terminal-image.js +223 -0
- package/lib/types/ink/terminal-querier.d.ts +203 -0
- package/lib/types/ink/terminal-querier.d.ts.map +1 -0
- package/lib/types/ink/terminal-querier.js +286 -0
- package/lib/types/ink/terminal.d.ts +192 -0
- package/lib/types/ink/terminal.d.ts.map +1 -0
- package/lib/types/ink/terminal.js +436 -0
- package/lib/types/ink/termio/ansi.d.ts +75 -0
- package/lib/types/ink/termio/ansi.d.ts.map +1 -0
- package/lib/types/ink/termio/ansi.js +79 -0
- package/lib/types/ink/termio/csi.d.ts +263 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -0
- package/lib/types/ink/termio/csi.js +367 -0
- package/lib/types/ink/termio/dec.d.ts +61 -0
- package/lib/types/ink/termio/dec.d.ts.map +1 -0
- package/lib/types/ink/termio/dec.js +76 -0
- package/lib/types/ink/termio/esc.d.ts +15 -0
- package/lib/types/ink/termio/esc.d.ts.map +1 -0
- package/lib/types/ink/termio/esc.js +57 -0
- package/lib/types/ink/termio/osc.d.ts +198 -0
- package/lib/types/ink/termio/osc.d.ts.map +1 -0
- package/lib/types/ink/termio/osc.js +475 -0
- package/lib/types/ink/termio/parser.d.ts +46 -0
- package/lib/types/ink/termio/parser.d.ts.map +1 -0
- package/lib/types/ink/termio/parser.js +366 -0
- package/lib/types/ink/termio/sgr.d.ts +17 -0
- package/lib/types/ink/termio/sgr.d.ts.map +1 -0
- package/lib/types/ink/termio/sgr.js +300 -0
- package/lib/types/ink/termio/tokenize.d.ts +56 -0
- package/lib/types/ink/termio/tokenize.d.ts.map +1 -0
- package/lib/types/ink/termio/tokenize.js +290 -0
- package/lib/types/ink/termio/types.d.ts +211 -0
- package/lib/types/ink/termio/types.d.ts.map +1 -0
- package/lib/types/ink/termio/types.js +68 -0
- package/lib/types/ink/termio.d.ts +25 -0
- package/lib/types/ink/termio.d.ts.map +1 -0
- package/lib/types/ink/termio.js +24 -0
- package/lib/types/ink/timeline-rail.d.ts +134 -0
- package/lib/types/ink/timeline-rail.d.ts.map +1 -0
- package/lib/types/ink/timeline-rail.js +175 -0
- package/lib/types/ink/transcript-highlight.d.ts +25 -0
- package/lib/types/ink/transcript-highlight.d.ts.map +1 -0
- package/lib/types/ink/transcript-highlight.js +82 -0
- package/lib/types/ink/truncateToWidth.d.ts +7 -0
- package/lib/types/ink/truncateToWidth.d.ts.map +1 -0
- package/lib/types/ink/truncateToWidth.js +18 -0
- package/lib/types/ink/update-overflow-guard.d.ts +62 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -0
- package/lib/types/ink/update-overflow-guard.js +164 -0
- package/lib/types/ink/useTerminalNotification.d.ts +45 -0
- package/lib/types/ink/useTerminalNotification.d.ts.map +1 -0
- package/lib/types/ink/useTerminalNotification.js +70 -0
- package/lib/types/ink/warn.d.ts +7 -0
- package/lib/types/ink/warn.d.ts.map +1 -0
- package/lib/types/ink/warn.js +15 -0
- package/lib/types/ink/widest-line.d.ts +7 -0
- package/lib/types/ink/widest-line.d.ts.map +1 -0
- package/lib/types/ink/widest-line.js +19 -0
- package/lib/types/ink/wrap-text.d.ts +10 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -0
- package/lib/types/ink/wrap-text.js +103 -0
- package/lib/types/ink/wrapAnsi.d.ts +17 -0
- package/lib/types/ink/wrapAnsi.d.ts.map +1 -0
- package/lib/types/ink/wrapAnsi.js +38 -0
- package/lib/types/jsx-runtime.d.ts +2 -0
- package/lib/types/jsx-runtime.d.ts.map +1 -0
- package/lib/types/jsx-runtime.js +13 -0
- package/lib/types/migrationPrefs.d.ts +60 -0
- package/lib/types/migrationPrefs.d.ts.map +1 -0
- package/lib/types/migrationPrefs.js +97 -0
- package/lib/types/minimalMode.d.ts +13 -0
- package/lib/types/minimalMode.d.ts.map +1 -0
- package/lib/types/minimalMode.js +17 -0
- package/lib/types/modelGroups.d.ts +72 -0
- package/lib/types/modelGroups.d.ts.map +1 -0
- package/lib/types/modelGroups.js +97 -0
- package/lib/types/modelPrefs.d.ts +37 -0
- package/lib/types/modelPrefs.d.ts.map +1 -0
- package/lib/types/modelPrefs.js +66 -0
- package/lib/types/modelRecents.d.ts +39 -0
- package/lib/types/modelRecents.d.ts.map +1 -0
- package/lib/types/modelRecents.js +97 -0
- package/lib/types/modelRoute.d.ts +87 -0
- package/lib/types/modelRoute.d.ts.map +1 -0
- package/lib/types/modelRoute.js +125 -0
- package/lib/types/native-ts/yoga-layout/enums.d.ts +183 -0
- package/lib/types/native-ts/yoga-layout/enums.d.ts.map +1 -0
- package/lib/types/native-ts/yoga-layout/enums.js +150 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts +804 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -0
- package/lib/types/native-ts/yoga-layout/index.js +2614 -0
- package/lib/types/oauth.d.ts +15 -0
- package/lib/types/oauth.d.ts.map +1 -0
- package/lib/types/oauth.js +14 -0
- package/lib/types/plugin-host.d.ts +14 -0
- package/lib/types/plugin-host.d.ts.map +1 -0
- package/lib/types/plugin-host.js +19 -0
- package/lib/types/presetPrefs.d.ts +30 -0
- package/lib/types/presetPrefs.d.ts.map +1 -0
- package/lib/types/presetPrefs.js +66 -0
- package/lib/types/reload.d.ts +109 -0
- package/lib/types/reload.d.ts.map +1 -0
- package/lib/types/reload.js +118 -0
- package/lib/types/scenes.d.ts +4 -0
- package/lib/types/scenes.d.ts.map +1 -0
- package/lib/types/scenes.js +4 -0
- package/lib/types/screens/Chat.d.ts +82 -0
- package/lib/types/screens/Chat.d.ts.map +1 -0
- package/lib/types/screens/Chat.js +4299 -0
- package/lib/types/screens/SessionSupervisor.d.ts +84 -0
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -0
- package/lib/types/screens/SessionSupervisor.js +350 -0
- package/lib/types/screens/SessionTree.d.ts +27 -0
- package/lib/types/screens/SessionTree.d.ts.map +1 -0
- package/lib/types/screens/SessionTree.js +583 -0
- package/lib/types/screens/Settings.d.ts +22 -0
- package/lib/types/screens/Settings.d.ts.map +1 -0
- package/lib/types/screens/Settings.js +592 -0
- package/lib/types/screens/StatusLine.d.ts +48 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -0
- package/lib/types/screens/StatusLine.js +453 -0
- package/lib/types/screens/StatusMetrics.d.ts +176 -0
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -0
- package/lib/types/screens/StatusMetrics.js +372 -0
- package/lib/types/screens/TrajectoryScene.d.ts +16 -0
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -0
- package/lib/types/screens/TrajectoryScene.js +374 -0
- package/lib/types/screens/chatOverlay.d.ts +267 -0
- package/lib/types/screens/chatOverlay.d.ts.map +1 -0
- package/lib/types/screens/chatOverlay.js +132 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts +83 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/model.js +69 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +120 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +639 -0
- package/lib/types/sessionHistory.d.ts +59 -0
- package/lib/types/sessionHistory.d.ts.map +1 -0
- package/lib/types/sessionHistory.js +223 -0
- package/lib/types/sessionModes.d.ts +83 -0
- package/lib/types/sessionModes.d.ts.map +1 -0
- package/lib/types/sessionModes.js +141 -0
- package/lib/types/sessionMounts.d.ts +272 -0
- package/lib/types/sessionMounts.d.ts.map +1 -0
- package/lib/types/sessionMounts.js +706 -0
- package/lib/types/sessionPins.d.ts +33 -0
- package/lib/types/sessionPins.d.ts.map +1 -0
- package/lib/types/sessionPins.js +181 -0
- package/lib/types/sessions/format.d.ts +125 -0
- package/lib/types/sessions/format.d.ts.map +1 -0
- package/lib/types/sessions/format.js +276 -0
- package/lib/types/sessions/resumeFailure.d.ts +38 -0
- package/lib/types/sessions/resumeFailure.d.ts.map +1 -0
- package/lib/types/sessions/resumeFailure.js +58 -0
- package/lib/types/sessions/view.d.ts +162 -0
- package/lib/types/sessions/view.d.ts.map +1 -0
- package/lib/types/sessions/view.js +350 -0
- package/lib/types/settings-sections.d.ts +4 -0
- package/lib/types/settings-sections.d.ts.map +1 -0
- package/lib/types/settings-sections.js +4 -0
- package/lib/types/terminal-utils/cliHighlight.d.ts +20 -0
- package/lib/types/terminal-utils/cliHighlight.d.ts.map +1 -0
- package/lib/types/terminal-utils/cliHighlight.js +53 -0
- package/lib/types/terminal-utils/figures.d.ts +26 -0
- package/lib/types/terminal-utils/figures.d.ts.map +1 -0
- package/lib/types/terminal-utils/figures.js +36 -0
- package/lib/types/terminal-utils/format.d.ts +35 -0
- package/lib/types/terminal-utils/format.d.ts.map +1 -0
- package/lib/types/terminal-utils/format.js +63 -0
- package/lib/types/terminal-utils/hash.d.ts +25 -0
- package/lib/types/terminal-utils/hash.d.ts.map +1 -0
- package/lib/types/terminal-utils/hash.js +41 -0
- package/lib/types/terminal-utils/hyperlink.d.ts +27 -0
- package/lib/types/terminal-utils/hyperlink.d.ts.map +1 -0
- package/lib/types/terminal-utils/hyperlink.js +70 -0
- package/lib/types/terminal-utils/markdown.d.ts +58 -0
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -0
- package/lib/types/terminal-utils/markdown.js +441 -0
- package/lib/types/terminal-utils/mermaid.d.ts +44 -0
- package/lib/types/terminal-utils/mermaid.d.ts.map +1 -0
- package/lib/types/terminal-utils/mermaid.js +83 -0
- package/lib/types/terminal-utils/sessionColors.d.ts +27 -0
- package/lib/types/terminal-utils/sessionColors.d.ts.map +1 -0
- package/lib/types/terminal-utils/sessionColors.js +39 -0
- package/lib/types/terminal-utils/spinnerVerbs.d.ts +3 -0
- package/lib/types/terminal-utils/spinnerVerbs.d.ts.map +1 -0
- package/lib/types/terminal-utils/spinnerVerbs.js +21 -0
- package/lib/types/terminal-utils/syntaxRuns.d.ts +16 -0
- package/lib/types/terminal-utils/syntaxRuns.d.ts.map +1 -0
- package/lib/types/terminal-utils/syntaxRuns.js +79 -0
- package/lib/types/terminal-utils/syntaxTheme.d.ts +12 -0
- package/lib/types/terminal-utils/syntaxTheme.d.ts.map +1 -0
- package/lib/types/terminal-utils/syntaxTheme.js +76 -0
- package/lib/types/theme.d.ts +201 -0
- package/lib/types/theme.d.ts.map +1 -0
- package/lib/types/theme.js +525 -0
- package/lib/types/themeCatalog.d.ts +36 -0
- package/lib/types/themeCatalog.d.ts.map +1 -0
- package/lib/types/themeCatalog.js +159 -0
- package/lib/types/themePrefs.d.ts +28 -0
- package/lib/types/themePrefs.d.ts.map +1 -0
- package/lib/types/themePrefs.js +59 -0
- package/lib/types/tips.d.ts +30 -0
- package/lib/types/tips.d.ts.map +1 -0
- package/lib/types/tips.js +899 -0
- package/lib/types/trajectory/effortIgnition.d.ts +66 -0
- package/lib/types/trajectory/effortIgnition.d.ts.map +1 -0
- package/lib/types/trajectory/effortIgnition.js +142 -0
- package/lib/types/trajectory/format.d.ts +100 -0
- package/lib/types/trajectory/format.d.ts.map +1 -0
- package/lib/types/trajectory/format.js +213 -0
- package/lib/types/trajectory/motion.d.ts +99 -0
- package/lib/types/trajectory/motion.d.ts.map +1 -0
- package/lib/types/trajectory/motion.js +143 -0
- package/lib/types/trajectory/query.d.ts +83 -0
- package/lib/types/trajectory/query.d.ts.map +1 -0
- package/lib/types/trajectory/query.js +187 -0
- package/lib/types/trajectoryPrefs.d.ts +36 -0
- package/lib/types/trajectoryPrefs.d.ts.map +1 -0
- package/lib/types/trajectoryPrefs.js +65 -0
- package/lib/types/tuiDisplayPrefs.d.ts +49 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -0
- package/lib/types/tuiDisplayPrefs.js +168 -0
- package/lib/types/ui.d.ts +29 -0
- package/lib/types/ui.d.ts.map +1 -0
- package/lib/types/ui.js +25 -0
- package/lib/types/update.d.ts +550 -0
- package/lib/types/update.d.ts.map +1 -0
- package/lib/types/update.js +1751 -0
- package/lib/types/utils/clipboard.d.ts +122 -0
- package/lib/types/utils/clipboard.d.ts.map +1 -0
- package/lib/types/utils/clipboard.js +577 -0
- 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/debug.d.ts +18 -0
- package/lib/types/utils/debug.d.ts.map +1 -0
- package/lib/types/utils/debug.js +37 -0
- package/lib/types/utils/earlyInput.d.ts +6 -0
- package/lib/types/utils/earlyInput.d.ts.map +1 -0
- package/lib/types/utils/earlyInput.js +5 -0
- package/lib/types/utils/env.d.ts +8 -0
- package/lib/types/utils/env.d.ts.map +1 -0
- package/lib/types/utils/env.js +7 -0
- package/lib/types/utils/envUtils.d.ts +8 -0
- package/lib/types/utils/envUtils.d.ts.map +1 -0
- package/lib/types/utils/envUtils.js +13 -0
- package/lib/types/utils/execFileNoThrow.d.ts +17 -0
- package/lib/types/utils/execFileNoThrow.d.ts.map +1 -0
- package/lib/types/utils/execFileNoThrow.js +65 -0
- package/lib/types/utils/externalEditor.d.ts +116 -0
- package/lib/types/utils/externalEditor.d.ts.map +1 -0
- package/lib/types/utils/externalEditor.js +270 -0
- package/lib/types/utils/fileSuggestions.d.ts +12 -0
- package/lib/types/utils/fileSuggestions.d.ts.map +1 -0
- package/lib/types/utils/fileSuggestions.js +40 -0
- package/lib/types/utils/fileTarget.d.ts +46 -0
- package/lib/types/utils/fileTarget.d.ts.map +1 -0
- package/lib/types/utils/fileTarget.js +178 -0
- 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/lib/types/utils/fullscreen.d.ts +7 -0
- package/lib/types/utils/fullscreen.d.ts.map +1 -0
- package/lib/types/utils/fullscreen.js +9 -0
- package/lib/types/utils/imageResize.d.ts +90 -0
- package/lib/types/utils/imageResize.d.ts.map +1 -0
- package/lib/types/utils/imageResize.js +272 -0
- package/lib/types/utils/intl.d.ts +7 -0
- package/lib/types/utils/intl.d.ts.map +1 -0
- package/lib/types/utils/intl.js +9 -0
- package/lib/types/utils/keymap.d.ts +138 -0
- package/lib/types/utils/keymap.d.ts.map +1 -0
- package/lib/types/utils/keymap.js +351 -0
- package/lib/types/utils/loaded-context.d.ts +25 -0
- package/lib/types/utils/loaded-context.d.ts.map +1 -0
- package/lib/types/utils/loaded-context.js +72 -0
- package/lib/types/utils/log.d.ts +7 -0
- package/lib/types/utils/log.d.ts.map +1 -0
- package/lib/types/utils/log.js +9 -0
- package/lib/types/utils/mentions.d.ts +53 -0
- package/lib/types/utils/mentions.d.ts.map +1 -0
- package/lib/types/utils/mentions.js +133 -0
- package/lib/types/utils/modifiers.d.ts +43 -0
- package/lib/types/utils/modifiers.d.ts.map +1 -0
- package/lib/types/utils/modifiers.js +45 -0
- package/lib/types/utils/narration.d.ts +11 -0
- package/lib/types/utils/narration.d.ts.map +1 -0
- package/lib/types/utils/narration.js +16 -0
- package/lib/types/utils/openExternal.d.ts +50 -0
- package/lib/types/utils/openExternal.d.ts.map +1 -0
- package/lib/types/utils/openExternal.js +170 -0
- package/lib/types/utils/pastedImagePath.d.ts +51 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -0
- package/lib/types/utils/pastedImagePath.js +194 -0
- package/lib/types/utils/paths.d.ts +16 -0
- package/lib/types/utils/paths.d.ts.map +1 -0
- package/lib/types/utils/paths.js +19 -0
- package/lib/types/utils/semver.d.ts +9 -0
- package/lib/types/utils/semver.d.ts.map +1 -0
- package/lib/types/utils/semver.js +24 -0
- package/lib/types/utils/shellQuote.d.ts +14 -0
- package/lib/types/utils/shellQuote.d.ts.map +1 -0
- package/lib/types/utils/shellQuote.js +39 -0
- package/lib/types/utils/sliceAnsi.d.ts +12 -0
- package/lib/types/utils/sliceAnsi.d.ts.map +1 -0
- package/lib/types/utils/sliceAnsi.js +79 -0
- package/lib/types/utils/truncateMiddle.d.ts +9 -0
- package/lib/types/utils/truncateMiddle.d.ts.map +1 -0
- package/lib/types/utils/truncateMiddle.js +28 -0
- package/lib/types/utils/urlGuard.d.ts +28 -0
- package/lib/types/utils/urlGuard.d.ts.map +1 -0
- package/lib/types/utils/urlGuard.js +21 -0
- package/lib/types/utils/workspaceRoot.d.ts +21 -0
- package/lib/types/utils/workspaceRoot.d.ts.map +1 -0
- package/lib/types/utils/workspaceRoot.js +47 -0
- package/lib/types/working-activity.d.ts +32 -0
- package/lib/types/working-activity.d.ts.map +1 -0
- package/lib/types/working-activity.js +38 -0
- package/lib/types/workspaces.d.ts +5 -0
- package/lib/types/workspaces.d.ts.map +1 -0
- package/lib/types/workspaces.js +4 -0
- package/node_modules/@askdkc/dsh-auth/LICENSE +21 -0
- package/node_modules/@askdkc/dsh-auth/README.ja.md +164 -0
- package/node_modules/@askdkc/dsh-auth/README.md +163 -0
- package/node_modules/@askdkc/dsh-auth/cordis.patch.yml +11 -0
- package/node_modules/@askdkc/dsh-auth/dsh-plugin.json +44 -0
- package/node_modules/@askdkc/dsh-auth/lib/command.d.ts +14 -0
- package/node_modules/@askdkc/dsh-auth/lib/command.js +70 -0
- package/node_modules/@askdkc/dsh-auth/lib/credentials.d.ts +63 -0
- package/node_modules/@askdkc/dsh-auth/lib/credentials.js +204 -0
- package/node_modules/@askdkc/dsh-auth/lib/custom-profiles.d.ts +26 -0
- package/node_modules/@askdkc/dsh-auth/lib/custom-profiles.js +142 -0
- package/node_modules/@askdkc/dsh-auth/lib/index.d.ts +96 -0
- package/node_modules/@askdkc/dsh-auth/lib/index.js +263 -0
- package/node_modules/@askdkc/dsh-auth/lib/interaction.d.ts +68 -0
- package/node_modules/@askdkc/dsh-auth/lib/interaction.js +193 -0
- package/node_modules/@askdkc/dsh-auth/lib/nous-oauth.d.ts +5 -0
- package/node_modules/@askdkc/dsh-auth/lib/nous-oauth.js +112 -0
- package/node_modules/@askdkc/dsh-auth/lib/opener.d.ts +32 -0
- package/node_modules/@askdkc/dsh-auth/lib/opener.js +101 -0
- package/node_modules/@askdkc/dsh-auth/lib/pi-ai.d.ts +23 -0
- package/node_modules/@askdkc/dsh-auth/lib/pi-ai.js +27 -0
- package/node_modules/@askdkc/dsh-auth/lib/profiles.d.ts +45 -0
- package/node_modules/@askdkc/dsh-auth/lib/profiles.js +110 -0
- package/node_modules/@askdkc/dsh-auth/lib/service.d.ts +80 -0
- package/node_modules/@askdkc/dsh-auth/lib/service.js +224 -0
- package/node_modules/@askdkc/dsh-auth/package.json +70 -0
- package/node_modules/@dsh-std/command/CHANGELOG.md +8 -0
- package/node_modules/@dsh-std/command/LICENSE +21 -0
- package/node_modules/@dsh-std/command/README.md +26 -0
- package/node_modules/@dsh-std/command/README.zh.md +28 -0
- package/node_modules/@dsh-std/command/lib/index.d.ts +144 -0
- package/node_modules/@dsh-std/command/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/command/lib/index.js +252 -0
- package/node_modules/@dsh-std/command/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/command/package.json +22 -0
- package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
- package/node_modules/@dsh-std/connection/LICENSE +21 -0
- package/node_modules/@dsh-std/connection/README.md +42 -0
- package/node_modules/@dsh-std/connection/README.zh.md +42 -0
- package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
- package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
- package/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
- package/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/connection/lib/index.js +158 -0
- package/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
- package/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
- package/node_modules/@dsh-std/connection/lib/memory.js +258 -0
- package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
- package/node_modules/@dsh-std/connection/package.json +20 -0
- package/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
- package/node_modules/@dsh-std/core/LICENSE +21 -0
- package/node_modules/@dsh-std/core/README.md +13 -0
- package/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/core/package.json +21 -0
- package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -0
- package/node_modules/@dsh-std/manifest/LICENSE +21 -0
- package/node_modules/@dsh-std/manifest/README.md +5 -0
- package/node_modules/@dsh-std/manifest/README.zh.md +5 -0
- package/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
- package/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/manifest/lib/index.js +625 -0
- package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/manifest/package.json +20 -0
- package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
- package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -0
- package/node_modules/@dsh-std/messages/LICENSE +21 -0
- package/node_modules/@dsh-std/messages/README.md +5 -0
- package/node_modules/@dsh-std/messages/README.zh.md +7 -0
- package/node_modules/@dsh-std/messages/lib/index.d.ts +50 -0
- package/node_modules/@dsh-std/messages/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/messages/lib/index.js +151 -0
- package/node_modules/@dsh-std/messages/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/messages/package.json +20 -0
- package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -0
- package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -0
- package/node_modules/@dsh-std/presentation/LICENSE +21 -0
- package/node_modules/@dsh-std/presentation/README.md +27 -0
- package/node_modules/@dsh-std/presentation/README.zh.md +29 -0
- package/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
- package/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
- package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
- package/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -0
- package/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/presentation/lib/index.js +550 -0
- package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
- package/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
- package/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
- package/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
- package/node_modules/@dsh-std/presentation/package.json +25 -0
- package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -0
- package/node_modules/@dsh-std/storage/LICENSE +21 -0
- package/node_modules/@dsh-std/storage/README.md +5 -0
- package/node_modules/@dsh-std/storage/README.zh.md +7 -0
- package/node_modules/@dsh-std/storage/lib/index.d.ts +48 -0
- package/node_modules/@dsh-std/storage/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/storage/lib/index.js +104 -0
- package/node_modules/@dsh-std/storage/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/storage/package.json +20 -0
- package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -0
- package/package.json +492 -0
- package/presets/liangshen/.dsh-tui-managed.json +5 -0
- package/presets/liangshen/agent.cordis.yml +425 -0
- package/presets/liangshen/compaction-epoch.mjs +83 -0
- package/presets/liangshen/custom-bash.mjs +301 -0
- package/presets/liangshen/instruction-hint.mjs +190 -0
- package/presets/liangshen/preset.yml +3 -0
- package/presets/liangshen/session-events.mjs +8 -0
- package/presets/liangshen/skill-search.mjs +141 -0
- package/presets/liangshen/tool-bootstrap.mjs +300 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js +158 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js +258 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js +625 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js +550 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js +158 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js +258 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -0
|
@@ -0,0 +1,2140 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SessionId } from '@deepseek-ai/dsh-session';
|
|
4
|
+
import UserQuestionService from '@deepseek-ai/dsh-user-questions';
|
|
5
|
+
import * as toolAskUser from '@deepseek-ai/dsh-tool-ask-user';
|
|
6
|
+
import Schema from '@deepseek-ai/schemastery';
|
|
7
|
+
import { Config } from './index.js';
|
|
8
|
+
import { configValues, createSettingsScope, resolveSettingsNamespace } from './compat/settings.js';
|
|
9
|
+
import { createChannel } from './channel.js';
|
|
10
|
+
import { createChannelSceneOutlet } from './channel-scene-outlet.js';
|
|
11
|
+
import { mountChannelUi } from './channel-ui.js';
|
|
12
|
+
import { bindChannelCommands } from './channel/commands.js';
|
|
13
|
+
import { registerTuiChannel } from '../adapter/channel/host-registry.js';
|
|
14
|
+
import { createChildStderrReporter, installChildStderrGuard } from './childStderr.js';
|
|
15
|
+
import { removeClipboardImageDir } from '../utils/clipboard.js';
|
|
16
|
+
import { logForDebugging } from '../utils/debug.js';
|
|
17
|
+
import { isEnvTruthy } from '../utils/envUtils.js';
|
|
18
|
+
import { QuestionStore, bindQuestionStore } from './questions.js';
|
|
19
|
+
import { prepareQuestionAnswerer } from './questions-answerer.js';
|
|
20
|
+
import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
|
|
21
|
+
import { ApprovalStore, bindApprovalStore } from './approvals.js';
|
|
22
|
+
import { registerPromptDebug } from './promptDebug.js';
|
|
23
|
+
import { readActivityFrames } from '../activityPrefs.js';
|
|
24
|
+
import { commitFullscreenFactoryMigration, planFullscreenFactoryMigration, readAppliedMigrations } from '../migrationPrefs.js';
|
|
25
|
+
import { readModelPref } from '../modelPrefs.js';
|
|
26
|
+
import { explicitModelRoute, recordedModelRoute, resolveModelRoute, validateModelRoute } from '../modelRoute.js';
|
|
27
|
+
import { migratePresetPref, readPresetPref } from '../presetPrefs.js';
|
|
28
|
+
import { readEffortPref } from '../effortPrefs.js';
|
|
29
|
+
import { composePreset, filterMinimalPresetTools, resolvePersistedPreset, resolvePersistedRoute, runningPresetOf } from './presets.js';
|
|
30
|
+
import { ensurePackagedPresets } from './packaged-presets.js';
|
|
31
|
+
import { registerBundledPresets } from './bundled-presets.js';
|
|
32
|
+
import { ensureLegacySessionEventTypes, snapshotLiveSessionEvents } from './compat/index.js';
|
|
33
|
+
import { clearResumeTarget, resumeTargetFromArgv, writeResumeTarget } from '../sessionHistory.js';
|
|
34
|
+
import { readHomePrefs } from '../homePrefs.js';
|
|
35
|
+
import { resolveSessionCwd } from '../utils/workspaceRoot.js';
|
|
36
|
+
import { beginRestartAttempt, checkForTuiUpdate, installedTuiVersion, isBootDeadlockTarget, isStandaloneRuntime, isVersionNewer, logRestartEvent, resolveDshProfileName, resolveTuiUpdateTarget, restartTui, updateTuiAndRestart, writeHandoffNotice } from '../update.js';
|
|
37
|
+
import { getLang, isLang, resolveStartupLang, setLang, t, writeLangPref } from '../i18n.js';
|
|
38
|
+
import { DEFAULT_PAGE_MARGIN, DEFAULT_STATUS_BAR, applyMermaidDiagrams, applyPageMargin, isPageMarginMode, normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground, parsePageMarginSpec } from '../tuiDisplayPrefs.js';
|
|
39
|
+
import { draftComboConflicts, effectiveComboString, parseComboDraft, setKeymapOverrides, SHORTCUT_ACTIONS, } from '../utils/keymap.js';
|
|
40
|
+
import { attachHerdrIntegration } from '../herdr.js';
|
|
41
|
+
import { logMouseDebug } from '../utils/debug.js';
|
|
42
|
+
import { Chat } from '../screens/Chat.js';
|
|
43
|
+
import { openInjectChannel } from './inject-channel.js';
|
|
44
|
+
import { startSessionMountHeartbeat } from './session-mount-heartbeat.js';
|
|
45
|
+
import { reserveMount } from '../sessionMounts.js';
|
|
46
|
+
import { getHostDialogStore } from './dialogs.js';
|
|
47
|
+
import { getHostStatusStore } from './status.js';
|
|
48
|
+
import { createActivityStore } from './activity-store.js';
|
|
49
|
+
import { getHostToastStore } from './toast.js';
|
|
50
|
+
import { getHostShortcuts } from './shortcuts.js';
|
|
51
|
+
import { getHostThemes } from './themes.js';
|
|
52
|
+
import { attachSessionToWorkspace } from './workspace.js';
|
|
53
|
+
import { createLocalWorkspaceRuntime, getHostWorkspaceRuntime } from './workspaces.js';
|
|
54
|
+
import { getHostSettingsSections, getLocalSettingsSectionsHost } from './settings-sections.js';
|
|
55
|
+
import { compositionRoot, withHostRootCapability } from './host-access.js';
|
|
56
|
+
import { render, ThemeProvider, AlternateScreen } from '../ui.js';
|
|
57
|
+
import { PageMargin } from '../components/PageMargin.js';
|
|
58
|
+
import instances from '../ink/instances.js';
|
|
59
|
+
import { cursorMove, DISABLE_KITTY_KEYBOARD, DISABLE_MODIFY_OTHER_KEYS, DISABLE_WIN32_INPUT_MODE } from '../ink/termio/csi.js';
|
|
60
|
+
import { DBP, DFE, DISABLE_MOUSE_TRACKING, EXIT_ALT_SCREEN, SHOW_CURSOR } from '../ink/termio/dec.js';
|
|
61
|
+
import { CLEAR_ITERM2_PROGRESS, CLEAR_TAB_STATUS, supportsTabStatus, wrapForMultiplexer } from '../ink/termio/osc.js';
|
|
62
|
+
/**
|
|
63
|
+
* Interactive TUI front door for DeepSeek Harness agents.
|
|
64
|
+
*
|
|
65
|
+
* The plugin attaches to (or creates) one agent, renders a chat transcript
|
|
66
|
+
* from the agent's session log and live `session/event` records, and submits
|
|
67
|
+
* user turns through `Agent.followup`. It is a client-driver front door like
|
|
68
|
+
* `dsh-jsonrpc`: the surrounding `cordis.yml` supplies the agent spine, the
|
|
69
|
+
* LLM adapter, and the tool plugins.
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* Fullscreen decision latched across host recomposes. The launcher disposes
|
|
73
|
+
* and re-mounts the plugin tree (teardown → apply() runs again) — a fresh
|
|
74
|
+
* apply() re-resolves `bootedFullscreen` from cordis config, and the
|
|
75
|
+
* settings user layer (settings.yaml) can arrive after the 300ms
|
|
76
|
+
* `settingsReady` bound when the recompose is also re-mounting the settings
|
|
77
|
+
* service. The tree would then mount INLINE and `rendererSettingsFrozen` would
|
|
78
|
+
* swallow the late application — the app lands on the main screen
|
|
79
|
+
* ("exited fullscreen", dead mouse, unpinned input) until restart. A
|
|
80
|
+
* session that already mounted fullscreen must never regress on a
|
|
81
|
+
* recompose: latch the decision.
|
|
82
|
+
*/
|
|
83
|
+
let lastBootedFullscreen;
|
|
84
|
+
// Image preferences also stay fixed across host recomposes until /restart.
|
|
85
|
+
let lastBootedTerminalImages;
|
|
86
|
+
/**
|
|
87
|
+
* Extract the startup prompt from raw app argv. `--resume <session>` selects
|
|
88
|
+
* a persisted session and must not leak its id into the conversation.
|
|
89
|
+
*/
|
|
90
|
+
export function initialPromptFromCmdlineArgs(args) {
|
|
91
|
+
if (args === undefined)
|
|
92
|
+
return '';
|
|
93
|
+
const promptArgs = [];
|
|
94
|
+
for (let i = 0; i < args.length; i += 1) {
|
|
95
|
+
const arg = args[i];
|
|
96
|
+
if (arg === '--resume') {
|
|
97
|
+
if (args[i + 1] !== undefined && !args[i + 1].startsWith('-'))
|
|
98
|
+
i += 1;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (arg.startsWith('--resume='))
|
|
102
|
+
continue;
|
|
103
|
+
if (arg.startsWith('-'))
|
|
104
|
+
continue;
|
|
105
|
+
promptArgs.push(arg);
|
|
106
|
+
}
|
|
107
|
+
return promptArgs.join(' ').trim();
|
|
108
|
+
}
|
|
109
|
+
export function resolveTuiHostMode(stdoutIsTTY = process.stdout.isTTY === true, env = process.env) {
|
|
110
|
+
if (stdoutIsTTY) {
|
|
111
|
+
return 'interactive';
|
|
112
|
+
}
|
|
113
|
+
const explicitTuiLaunch = env.DSH_TUI_LAUNCHER_VERSION !== undefined || isStandaloneRuntime();
|
|
114
|
+
return explicitTuiLaunch ? 'invalid-explicit-launch' : 'headless-host';
|
|
115
|
+
}
|
|
116
|
+
export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
117
|
+
const config = configValues(runtimeConfig);
|
|
118
|
+
// /restart handoff diagnosis: the replacement process is marked by env and
|
|
119
|
+
// logs its boot progress to ~/.dsh-tui/restart.log (ordinary launches stay
|
|
120
|
+
// silent). First line lands before anything in this function can throw.
|
|
121
|
+
if (process.env.DSH_TUI_RESTART_CHILD === '1') {
|
|
122
|
+
logRestartEvent('boot: plugin apply', {
|
|
123
|
+
stdoutTty: process.stdout.isTTY === true,
|
|
124
|
+
stdinTty: process.stdin.isTTY === true,
|
|
125
|
+
stderrTty: process.stderr.isTTY === true,
|
|
126
|
+
});
|
|
127
|
+
// Field evidence (2026-08-24): the restarted TUI mounts but takes no
|
|
128
|
+
// input, and the terminal's DA reply surfaced on PS's prompt line in an
|
|
129
|
+
// earlier attempt — meaning NO process was reading console input. Probe
|
|
130
|
+
// whether THIS process's stdin pump ever sees bytes: wrap read()
|
|
131
|
+
// transparently (delegates; purely observational) and sample the pump
|
|
132
|
+
// state, so the log distinguishes "bytes never arrive" (console-level
|
|
133
|
+
// theft/mode) from "bytes arrive but the UI ignores them".
|
|
134
|
+
const probedStdin = process.stdin;
|
|
135
|
+
const originalRead = probedStdin.read.bind(probedStdin);
|
|
136
|
+
let loggedChunks = 0;
|
|
137
|
+
probedStdin.read = ((...args) => {
|
|
138
|
+
const chunk = originalRead(...args);
|
|
139
|
+
if (chunk !== null && chunk !== '' && loggedChunks < 12) {
|
|
140
|
+
loggedChunks += 1;
|
|
141
|
+
const text = String(chunk);
|
|
142
|
+
logRestartEvent('boot: stdin chunk arrived', {
|
|
143
|
+
bytes: text.length,
|
|
144
|
+
preview: text.slice(0, 24).replace(/[^\x20-\x7e]/g, '.'),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return chunk;
|
|
148
|
+
});
|
|
149
|
+
const sampleStdinState = (label) => {
|
|
150
|
+
logRestartEvent(`boot: ${label}`, {
|
|
151
|
+
isRaw: probedStdin.isRaw === true,
|
|
152
|
+
readableListeners: probedStdin.listenerCount('readable'),
|
|
153
|
+
dataListeners: probedStdin.listenerCount('data'),
|
|
154
|
+
paused: probedStdin.isPaused,
|
|
155
|
+
buffered: probedStdin.readableLength,
|
|
156
|
+
chunksSeen: loggedChunks,
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
sampleStdinState('stdin state at plugin apply');
|
|
160
|
+
let pendingSamples = 0;
|
|
161
|
+
const sampleAt = (delayMs, label) => {
|
|
162
|
+
pendingSamples += 1;
|
|
163
|
+
const timer = setTimeout(() => {
|
|
164
|
+
pendingSamples -= 1;
|
|
165
|
+
sampleStdinState(label);
|
|
166
|
+
}, delayMs);
|
|
167
|
+
timer.unref?.();
|
|
168
|
+
};
|
|
169
|
+
sampleAt(2000, 'stdin state +2s');
|
|
170
|
+
sampleAt(5000, 'stdin state +5s');
|
|
171
|
+
sampleAt(12000, 'stdin state +12s');
|
|
172
|
+
}
|
|
173
|
+
const hostMode = resolveTuiHostMode();
|
|
174
|
+
if (hostMode === 'invalid-explicit-launch') {
|
|
175
|
+
if (process.env.DSH_TUI_RESTART_CHILD === '1') {
|
|
176
|
+
logRestartEvent('boot: TTY gate failed - stdout is not a TTY');
|
|
177
|
+
}
|
|
178
|
+
throw new Error('dsh-tui requires an interactive terminal (stdout must be a TTY).');
|
|
179
|
+
}
|
|
180
|
+
if (hostMode === 'headless-host') {
|
|
181
|
+
// Web / Tauri / GUI hosts load the plugin from the profile without being
|
|
182
|
+
// a dsh-tui frontend (stdout is a pipe or null). Mounting a TUI there
|
|
183
|
+
// would fail the whole composition, so skip quietly and let the host
|
|
184
|
+
// boot. The launcher marker above keeps explicit `dsh-tui` launches
|
|
185
|
+
// failing loudly instead of silently producing no UI.
|
|
186
|
+
ctx.logger.info('dsh-tui: non-interactive host detected (stdout is not a TTY); skipping the TUI frontend');
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
// Validate settings before creating an agent or taking over the terminal.
|
|
190
|
+
const tuiSettingsNs = resolveSettingsNamespace(configOwner, Config);
|
|
191
|
+
// Modern hosts own a declarative registry; old hosts discover directories.
|
|
192
|
+
// A modern bundle failure must not silently fall back to obsolete files.
|
|
193
|
+
if (!await registerBundledPresets(ctx))
|
|
194
|
+
try {
|
|
195
|
+
for (const result of ensurePackagedPresets()) {
|
|
196
|
+
if (result.status === 'conflict') {
|
|
197
|
+
ctx.logger.warn(`dsh-tui: packaged preset "${result.id}" was not installed because an unmanaged preset already uses that id`);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
// A read-only home must not make the whole terminal unusable; the other
|
|
203
|
+
// official and user presets remain available.
|
|
204
|
+
ctx.logger.warn(`dsh-tui: unable to install packaged presets (${error instanceof Error ? error.message : String(error)})`);
|
|
205
|
+
}
|
|
206
|
+
// UI language resolution: DSH_TUI_LANG env var wins, then the
|
|
207
|
+
// settings.yaml `dsh-tui.lang` user layer (applied once the settings
|
|
208
|
+
// namespace registers below), then cordis.yml `lang`, then the
|
|
209
|
+
// persisted `/lang` choice, then `zh`. Must settle before the first
|
|
210
|
+
// render so every module resolves strings in the same language.
|
|
211
|
+
const envLang = process.env.DSH_TUI_LANG;
|
|
212
|
+
setLang(isLang(envLang) ? envLang : isLang(config.lang) ? config.lang : resolveStartupLang());
|
|
213
|
+
// /update restart verification: the pre-update process stamps the version
|
|
214
|
+
// it was leaving behind; if the freshly loaded one is not newer, the
|
|
215
|
+
// package manager "succeeded" without actually moving the version (mirror
|
|
216
|
+
// lag, cached manifest, wrong profile). Say so instead of silently
|
|
217
|
+
// pretending the update landed.
|
|
218
|
+
{
|
|
219
|
+
const updatedFrom = process.env.DSH_TUI_UPDATED_FROM;
|
|
220
|
+
if (updatedFrom !== undefined) {
|
|
221
|
+
// Assigning undefined would stringify to "undefined" and leak the
|
|
222
|
+
// marker into every child process; remove it for real.
|
|
223
|
+
delete process.env.DSH_TUI_UPDATED_FROM;
|
|
224
|
+
const now = installedTuiVersion();
|
|
225
|
+
if (now === undefined || !isVersionNewer(now, updatedFrom)) {
|
|
226
|
+
ctx.logger.warn(`dsh-tui: /update restarted but the version did not advance (still ${now ?? 'unknown'}, was ${updatedFrom})`);
|
|
227
|
+
if (process.stderr.isTTY) {
|
|
228
|
+
process.stderr.write(`\ndsh-tui: 更新后版本未变化(仍为 ${now ?? 'unknown'},原为 ${updatedFrom});` +
|
|
229
|
+
`可能是镜像 registry 未同步,请稍后重试或检查 registry 配置。\n`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
else if (process.stderr.isTTY) {
|
|
233
|
+
// Launcher alignment bridge (0.8.3): /update only replaces the
|
|
234
|
+
// package inside the DSH profile; a globally installed `dsh-tui`
|
|
235
|
+
// launcher is a separate copy that keeps its old version. Launchers
|
|
236
|
+
// >=0.8.3 export DSH_TUI_LAUNCHER_VERSION so we can tell whether
|
|
237
|
+
// the outer launcher lags the freshly installed profile. Launchers
|
|
238
|
+
// <=0.8.2 never set the marker — the generic branch below is
|
|
239
|
+
// intentionally one-shot: DSH_TUI_UPDATED_FROM exists only on the
|
|
240
|
+
// replacement process immediately after /update.
|
|
241
|
+
const launcherVersion = process.env.DSH_TUI_LAUNCHER_VERSION;
|
|
242
|
+
if (launcherVersion === undefined) {
|
|
243
|
+
process.stderr.write(`\n[dsh-tui] ${t('update-launcher-align-unknown', { version: now })}\n`);
|
|
244
|
+
}
|
|
245
|
+
else if (isVersionNewer(now, launcherVersion)) {
|
|
246
|
+
process.stderr.write(`\n[dsh-tui] ${t('update-launcher-outdated', { profile: now, launcher: launcherVersion })}\n`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// DSH user-interaction seam: the model's ask_user_question tool parks on
|
|
252
|
+
// the userQuestions service until a UI answerer responds. Mount the
|
|
253
|
+
// service when the composition doesn't (the official dsh-base
|
|
254
|
+
// user-interaction config row does; a bare plugin mount creates it on
|
|
255
|
+
// this context), then expose the model-facing tool before resolving the
|
|
256
|
+
// agent so per-step assembly includes ask_user_question. rc.2's provider
|
|
257
|
+
// seat is registered below; the 0.1.2 line's agent-aware waterfall needs the
|
|
258
|
+
// channel owner and is therefore registered immediately after the channel
|
|
259
|
+
// is created. Optional-service access goes through `ctx.get`, not the
|
|
260
|
+
// inject proxy.
|
|
261
|
+
const userQuestions = ctx.get('userQuestions') ?? new UserQuestionService(ctx);
|
|
262
|
+
ctx.plugin(toolAskUser);
|
|
263
|
+
// The host-level tool mount above is intentional for the TUI and for user
|
|
264
|
+
// presets, but the official Minimal preset is a strict two-tool trajectory
|
|
265
|
+
// (persistent bash + str_replace_editor). Filter only that preset at the
|
|
266
|
+
// final assembly boundary. Reading the session on every assembly also makes
|
|
267
|
+
// blank-session /preset switches and resumed sessions behave correctly.
|
|
268
|
+
ctx.on('system-prompt/assemble', async (_assembly, context, next) => {
|
|
269
|
+
const assembled = await next();
|
|
270
|
+
const presetId = context.agent === undefined ? undefined : runningPresetOf(context.agent.session);
|
|
271
|
+
return filterMinimalPresetTools(assembled, presetId);
|
|
272
|
+
});
|
|
273
|
+
const questionStore = new QuestionStore(adapterRuntimeFor(ctx));
|
|
274
|
+
bindQuestionStore(ctx, questionStore);
|
|
275
|
+
// One store, one teardown effect on both API lines. The compatibility
|
|
276
|
+
// adapter binds either registration to this Cordis fiber; this separate
|
|
277
|
+
// effect rejects asks still parked in the UI during teardown.
|
|
278
|
+
ctx.effect(() => () => questionStore.rejectAll());
|
|
279
|
+
// `/debug-prompt` snapshots the final provider-neutral request at the
|
|
280
|
+
// llm/stream boundary, after every prompt and tool contributor has run.
|
|
281
|
+
registerPromptDebug(ctx);
|
|
282
|
+
// API selection and registration live behind one adapter boundary. The UI
|
|
283
|
+
// bootstrap only translates a legacy seat conflict into its visible notice.
|
|
284
|
+
const questionAnswererRegistration = prepareQuestionAnswerer(ctx, userQuestions, questionStore);
|
|
285
|
+
const questionSeatDecision = questionAnswererRegistration.kind === 'legacy'
|
|
286
|
+
? questionAnswererRegistration.yieldDecision
|
|
287
|
+
: undefined;
|
|
288
|
+
let questionSeatNotice;
|
|
289
|
+
if (questionSeatDecision?.action === 'alert-unverified') {
|
|
290
|
+
ctx.logger.error(`dsh-tui: user-questions provider seat is held by a component self-reporting as ${questionSeatDecision.incumbentId} ` +
|
|
291
|
+
'(identity not host-verified); this TUI will not register its questionnaire and model questions may be answered by it');
|
|
292
|
+
questionSeatNotice = t('question-provider-occupied-unverified', { id: questionSeatDecision.incumbentId ?? '' });
|
|
293
|
+
}
|
|
294
|
+
else if (questionSeatDecision?.action === 'alert') {
|
|
295
|
+
const displayId = questionSeatDecision.incumbentId ?? t('question-provider-occupied-unknown');
|
|
296
|
+
ctx.logger.error(`dsh-tui: user-questions provider seat is held by a non-host component (${displayId}); ` +
|
|
297
|
+
'this TUI will not register its questionnaire and model questions may be answered by it');
|
|
298
|
+
questionSeatNotice = t('question-provider-occupied', { id: displayId });
|
|
299
|
+
}
|
|
300
|
+
// Child-process stderr guard (issue #17): MCP servers spawned with an
|
|
301
|
+
// inherited stderr (the MCP SDK's stdio default) write straight to the
|
|
302
|
+
// terminal device from the child process, bypassing the renderer's own
|
|
303
|
+
// stderr patch and corrupting the alt-screen. Take over those spawns and
|
|
304
|
+
// surface their stderr as deduplicated notifications instead. Installed
|
|
305
|
+
// before agent resolution so servers spawned during startup are covered;
|
|
306
|
+
// notices posted before the channel exists are buffered and flushed then.
|
|
307
|
+
const stderrBacklog = [];
|
|
308
|
+
let notifyStderr;
|
|
309
|
+
const stderrReporter = createChildStderrReporter((text, options) => {
|
|
310
|
+
if (notifyStderr !== undefined)
|
|
311
|
+
notifyStderr(text, options);
|
|
312
|
+
else
|
|
313
|
+
stderrBacklog.push([text, options]);
|
|
314
|
+
});
|
|
315
|
+
ctx.effect(() => {
|
|
316
|
+
const restoreSpawn = installChildStderrGuard(line => {
|
|
317
|
+
logForDebugging(`[child-stderr] ${line}`);
|
|
318
|
+
stderrReporter.push(line);
|
|
319
|
+
});
|
|
320
|
+
return () => {
|
|
321
|
+
restoreSpawn();
|
|
322
|
+
stderrReporter.dispose();
|
|
323
|
+
};
|
|
324
|
+
});
|
|
325
|
+
// Config-only route: resolveAgent applies the persisted `/model`
|
|
326
|
+
// preference on CREATE only — a resumed session keeps the route its own
|
|
327
|
+
// log records (last request/header), matching the preset rule.
|
|
328
|
+
const configuredRoute = {
|
|
329
|
+
provider: config.provider,
|
|
330
|
+
model: config.model,
|
|
331
|
+
};
|
|
332
|
+
// Atomic route resolution (issue #67): a complete cordis.yml route wins
|
|
333
|
+
// whole, else the persisted `/model` choice wins whole, else Harness's
|
|
334
|
+
// provider-neutral agent-default-model selection. The local DeepSeek pair
|
|
335
|
+
// remains the final fallback for bare embedders without that service. This
|
|
336
|
+
// lets optional provider bundles supply the same default to Web and TUI
|
|
337
|
+
// without patching this front door by name.
|
|
338
|
+
const configuredDefault = ctx.get('agentDefaultModel')?.currentSelection?.();
|
|
339
|
+
const harnessDefault = typeof configuredDefault?.provider === 'string'
|
|
340
|
+
&& configuredDefault.provider.length > 0
|
|
341
|
+
&& typeof configuredDefault.model === 'string'
|
|
342
|
+
&& configuredDefault.model.length > 0
|
|
343
|
+
? { provider: configuredDefault.provider, model: configuredDefault.model }
|
|
344
|
+
: undefined;
|
|
345
|
+
const startupRoute = resolveModelRoute(configuredRoute, readModelPref(), harnessDefault);
|
|
346
|
+
// Session cwd (issue #96): explicit cordis.yml `cwd` wins; otherwise the
|
|
347
|
+
// git worktree root containing the launch directory (the launch directory
|
|
348
|
+
// itself outside any worktree), so `@` completion and mention expansion
|
|
349
|
+
// see the repository, not an arbitrary launch subdirectory. Resolved ONCE
|
|
350
|
+
// here — the agent meta and the channel must agree.
|
|
351
|
+
const requestedWorkspace = config.workspace ?? process.env.DSH_TUI_WORKSPACE_TARGET;
|
|
352
|
+
// Degraded boot (issue #183): a stale bundle patch without the
|
|
353
|
+
// dsh-tui-workspaces row leaves the service unmounted; resolve startup
|
|
354
|
+
// targets through the local-only runtime (provider URIs then fail loud
|
|
355
|
+
// below instead of crashing on an undefined service). A profile launch
|
|
356
|
+
// without the service means the patch came from an older dsh-tui copy
|
|
357
|
+
// than the running code — warn once so the skew is diagnosable. Bare
|
|
358
|
+
// embedders (no --profile) take the same fallback by design, silently.
|
|
359
|
+
const mountedWorkspaceService = getHostWorkspaceRuntime(ctx.get('tuiWorkspaces'));
|
|
360
|
+
if (mountedWorkspaceService === undefined && resolveDshProfileName() !== undefined) {
|
|
361
|
+
ctx.logger.warn('dsh-tui: tuiWorkspaces service is not mounted; /workspace runs with the local-only fallback. ' +
|
|
362
|
+
'The bundle patch is older than the installed dsh-tui package — update the globally installed dsh-tui launcher to match the profile (issue #183).');
|
|
363
|
+
}
|
|
364
|
+
const workspaceService = mountedWorkspaceService ?? createLocalWorkspaceRuntime();
|
|
365
|
+
// Same skew guard for the plugin-scene registry (dsh-tui-scenes row): the
|
|
366
|
+
// channel degrades to never opening scenes when the service is absent, so
|
|
367
|
+
// say why on profile launches — a plugin's open() otherwise fails with only
|
|
368
|
+
// its own warn to go on.
|
|
369
|
+
if (ctx.get('tuiScenes') === undefined && resolveDshProfileName() !== undefined) {
|
|
370
|
+
ctx.logger.warn('dsh-tui: tuiScenes service is not mounted; plugin scenes will never open. ' +
|
|
371
|
+
'The bundle patch is older than the installed dsh-tui package — update the globally installed dsh-tui launcher to match the profile (issue #183).');
|
|
372
|
+
}
|
|
373
|
+
// Same skew guard for the plugin-UI services (dsh-tui-extensions row):
|
|
374
|
+
// managed dialogs park unanswered, status contributions never render,
|
|
375
|
+
// shortcuts never match, custom-entry renderers stay invisible, and runtime
|
|
376
|
+
// themes stay out of the picker when the row is absent — say why on profile
|
|
377
|
+
// launches. The static JSON theme path remains available without this row.
|
|
378
|
+
const themeHost = getHostThemes(ctx.get('tuiThemes'));
|
|
379
|
+
if ((ctx.get('tuiDialogs') === undefined || themeHost === undefined) && resolveDshProfileName() !== undefined) {
|
|
380
|
+
ctx.logger.warn('dsh-tui: tuiDialogs/tuiStatus/tuiShortcuts/tuiRenderers/tuiThemes services are not mounted; plugin dialogs, status contributions, shortcuts, custom-entry renderers and runtime themes are off. ' +
|
|
381
|
+
'Static ~/.dsh-tui/themes JSON remains available. The bundle patch is older than the installed dsh-tui package — update the globally installed dsh-tui launcher to match the profile (issue #183).');
|
|
382
|
+
}
|
|
383
|
+
// Same skew guard for the plugin-host row (dsh-tui-plugin-host): without
|
|
384
|
+
// it there is no runtime generation id, no unified grant store service,
|
|
385
|
+
// and no Host Descriptor — plugin interop surfaces degrade silently
|
|
386
|
+
// otherwise. The D-7 decision gate does NOT depend on this row (the
|
|
387
|
+
// channel installs its own), so interception gating stays intact either
|
|
388
|
+
// way — what breaks is everything that rides on tuiPluginHost.
|
|
389
|
+
if (ctx.get('tuiPluginHost') === undefined && resolveDshProfileName() !== undefined) {
|
|
390
|
+
ctx.logger.warn('dsh-tui: tuiPluginHost service is not mounted; plugin grant store, runtime generation and Host Descriptor are unavailable. ' +
|
|
391
|
+
'The bundle patch is older than the installed dsh-tui package — update the globally installed dsh-tui launcher to match the profile (issue #183).');
|
|
392
|
+
}
|
|
393
|
+
const initialWorkspace = requestedWorkspace === undefined
|
|
394
|
+
? undefined
|
|
395
|
+
: await workspaceService.resolve(requestedWorkspace);
|
|
396
|
+
if (requestedWorkspace !== undefined && initialWorkspace === undefined) {
|
|
397
|
+
throw new Error(`dsh-tui: unsupported or unavailable workspace target: ${requestedWorkspace}`);
|
|
398
|
+
}
|
|
399
|
+
const sessionCwd = initialWorkspace?.cwd ?? resolveSessionCwd(config.cwd);
|
|
400
|
+
const meta = { cwd: sessionCwd };
|
|
401
|
+
// Launch-time resume target: the env handoff (launchers like naive-dsh) wins;
|
|
402
|
+
// `dsh --profile tui` forwards `--resume` verbatim instead, so fall back to
|
|
403
|
+
// parsing the forwarded app args (matching the standalone bin).
|
|
404
|
+
const launchSessionId = config.sessionId ?? resumeTargetFromArgv(process.argv.slice(2));
|
|
405
|
+
const { agent, handle, agentPreset, route: createdRoute } = await resolveAgent(ctx, launchSessionId, configuredRoute, startupRoute, meta, config.preset);
|
|
406
|
+
try {
|
|
407
|
+
// Opening a persisted TUI session is an explicit ownership action too.
|
|
408
|
+
// Older TUI versions only wrote the Session log, so attaching on every
|
|
409
|
+
// startup repairs those durable-but-ungrouped sessions idempotently.
|
|
410
|
+
//
|
|
411
|
+
// This is ALSO how a workspace enters the rail: `resolveByPath(cwd) ??
|
|
412
|
+
// create(cwd)` mints the durable record for the directory this terminal
|
|
413
|
+
// was launched in, so the session screen lists every directory a TUI has
|
|
414
|
+
// ever started in. The ledger is DSH's own workspace store, so the Web UI
|
|
415
|
+
// reads the same records. There is deliberately no rail-side "add a
|
|
416
|
+
// workspace" control any more: a terminal's launch directory is the whole
|
|
417
|
+
// registration story.
|
|
418
|
+
const attached = await attachSessionToWorkspace(ctx, meta.cwd, agent.session.id);
|
|
419
|
+
if (!attached) {
|
|
420
|
+
ctx.logger.warn(`dsh-tui: session "${agent.session.id}" has no workspace ownership because workspaceRegistry is not mounted`);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
catch (error) {
|
|
424
|
+
// The Session is already published and durable, matching Web's partial
|
|
425
|
+
// failure contract. Keep the TUI usable but make the missing ownership
|
|
426
|
+
// loud instead of silently leaving the conversation Ungrouped.
|
|
427
|
+
ctx.logger.warn(`dsh-tui: session "${agent.session.id}" workspace attachment failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
428
|
+
}
|
|
429
|
+
// Status-line route: the exact route the agent runs with — on create the
|
|
430
|
+
// validated startup resolution, on resume the route the target session's
|
|
431
|
+
// own records carry (a complete cordis.yml pin wins over them).
|
|
432
|
+
const displayRoute = createdRoute ?? startupRoute;
|
|
433
|
+
// Read side of the activity projection: filled by the working-activity
|
|
434
|
+
// plugin's unit, read by the status line. Created BEFORE the channel on
|
|
435
|
+
// purpose — `createChannel` binds its agent synchronously while it is still
|
|
436
|
+
// being constructed, and that bind seeds this store (see `seedActivity`
|
|
437
|
+
// below), so a store declared after the channel is still in its temporal
|
|
438
|
+
// dead zone when the first seed arrives and takes the whole boot down with
|
|
439
|
+
// it. One store per process; a composition without the projection service
|
|
440
|
+
// simply leaves it empty. `activity: false` is a static config-time switch
|
|
441
|
+
// (the runtime `/activity` command only changes the preset), so a hidden
|
|
442
|
+
// line attaches nothing at all — no feed, no 500ms tick.
|
|
443
|
+
const activityStore = createActivityStore(ctx, config.activity !== false);
|
|
444
|
+
const rawChannel = createChannel(ctx, agent, {
|
|
445
|
+
model: displayRoute.model,
|
|
446
|
+
// The activity projection only pushes on change; read the current value as
|
|
447
|
+
// soon as this session binds so a resumed or reattached session renders its
|
|
448
|
+
// line immediately instead of waiting for the next event.
|
|
449
|
+
seedActivity: session => activityStore.seed(session),
|
|
450
|
+
// A RESUMED session keeps its persisted header cwd (issue #96 review):
|
|
451
|
+
// pre-upgrade sessions recorded the launch directory, and re-resolving
|
|
452
|
+
// from the current launch directory would split @ expansion / file
|
|
453
|
+
// completion (state.cwd) from the agent's own workspace record. Fresh
|
|
454
|
+
// sessions record sessionCwd at creation, so both agree there.
|
|
455
|
+
cwd: agent.session.header.cwd ?? sessionCwd,
|
|
456
|
+
provider: displayRoute.provider,
|
|
457
|
+
// Raw cordis.yml route (undefined when unset): the channel's
|
|
458
|
+
// new-session path re-resolves prefs against these, and resume passes
|
|
459
|
+
// only explicit values so the target session's own record wins.
|
|
460
|
+
configuredModel: config.model,
|
|
461
|
+
configuredProvider: config.provider,
|
|
462
|
+
// Raw cordis.yml `lang` / `activityFrames`: /reload must not override a
|
|
463
|
+
// static deployment choice with the persisted preference.
|
|
464
|
+
configuredLang: config.lang,
|
|
465
|
+
configuredActivityFrames: config.activityFrames,
|
|
466
|
+
effort: config.effort,
|
|
467
|
+
activity: config.activity,
|
|
468
|
+
// Explicit cordis.yml value (static deployment choice) wins over the
|
|
469
|
+
// runtime `/activity` preference, which wins over the default.
|
|
470
|
+
activityFrames: config.activityFrames ?? readActivityFrames() ?? 'moon8',
|
|
471
|
+
// Static footer preference: cordis.yml `contextBar` (schema default on).
|
|
472
|
+
contextBar: config.contextBar,
|
|
473
|
+
// Same precedence for the agent preset: cordis.yml `preset` over the
|
|
474
|
+
// persisted `/preset` choice; undefined adopts the roster default.
|
|
475
|
+
configuredPreset: config.preset,
|
|
476
|
+
agentPreset,
|
|
477
|
+
// Shift+Tab session-mode cycle (undefined → the built-in default/
|
|
478
|
+
// plan/full cycle in sessionModes.ts).
|
|
479
|
+
modes: config.modes,
|
|
480
|
+
// Edit/Write diff presentation (schema default 'auto'); the /settings
|
|
481
|
+
// screen edits this key live through the dsh-tui namespace.
|
|
482
|
+
diffLayout: config.diffLayout,
|
|
483
|
+
thinkingFold: config.thinkingFold,
|
|
484
|
+
toolBackground: config.toolBackground,
|
|
485
|
+
scrollGutter: config.scrollGutter,
|
|
486
|
+
pageMargin: config.pageMargin,
|
|
487
|
+
foldTerminalCommand: config.foldTerminalCommand,
|
|
488
|
+
promptSessionLabel: config.promptSessionLabel,
|
|
489
|
+
expandEditor: config.expandEditor,
|
|
490
|
+
smoothStreaming: config.smoothStreaming,
|
|
491
|
+
statusBar: config.statusBar,
|
|
492
|
+
handle,
|
|
493
|
+
});
|
|
494
|
+
// Register the live Channel for the adapter Kernel. The Channel driver
|
|
495
|
+
// resolves it lazily from the composition root, so this can be called after
|
|
496
|
+
// the plugin-host Kernel started without requiring a re-mount.
|
|
497
|
+
// Normalize to the composition root: the Kernel and its Channel driver
|
|
498
|
+
// query the registry through the root context, never through this plugin's
|
|
499
|
+
// child activation context.
|
|
500
|
+
const unregisterTuiChannel = registerTuiChannel(compositionRoot(ctx), rawChannel);
|
|
501
|
+
ctx.effect(() => () => { unregisterTuiChannel(); });
|
|
502
|
+
const pluginHost = ctx.get('tuiPluginHost');
|
|
503
|
+
const adapterRuntime = adapterRuntimeFor(ctx);
|
|
504
|
+
const uiMount = mountChannelUi(ctx, rawChannel, pluginHost, adapterRuntime.mode);
|
|
505
|
+
const channel = uiMount.channel;
|
|
506
|
+
bindChannelCommands(rawChannel, channel);
|
|
507
|
+
const shadow = adapterRuntime.mode === 'passive-shadow' || adapterRuntime.mode === 'replay-shadow';
|
|
508
|
+
// Bootstrap notices/prompts are deliberately dropped in observational mode;
|
|
509
|
+
// interactive commands retain rejection semantics through the UI capability.
|
|
510
|
+
const notifyChannel = (text, options) => {
|
|
511
|
+
if (shadow)
|
|
512
|
+
return () => undefined;
|
|
513
|
+
return channel.notify(text, options);
|
|
514
|
+
};
|
|
515
|
+
const submitChannel = text => {
|
|
516
|
+
if (!shadow)
|
|
517
|
+
channel.submit(text);
|
|
518
|
+
};
|
|
519
|
+
ctx.effect(() => () => { uiMount.dispose(); });
|
|
520
|
+
// Root page-margin store: the PageMargin inset box sits ABOVE Chat, so
|
|
521
|
+
// the channel version bump (which re-renders everything below Chat)
|
|
522
|
+
// cannot drive it. Seed the store from config before the tree mounts;
|
|
523
|
+
// applyDisplay below mirrors every settings change into it live. The
|
|
524
|
+
// mermaid switch rides the same kind of store (Markdown is memoized by
|
|
525
|
+
// content, so no prop reaches the diagram component).
|
|
526
|
+
applyPageMargin(config.pageMargin);
|
|
527
|
+
applyMermaidDiagrams(config.mermaidDiagrams);
|
|
528
|
+
// Plugin toasts ride the channel's own notification surface: the runtime
|
|
529
|
+
// already sanitized/rate-limited the delivery, the sink only forwards.
|
|
530
|
+
// Without the extensions row (tuiToast absent) plugin toasts are dropped
|
|
531
|
+
// by the runtime itself — same soft-degrade contract as the other seams.
|
|
532
|
+
// Delivery uses the same owner-bound UI capability as all renderer actions.
|
|
533
|
+
const toastStore = getHostToastStore(ctx.get('tuiToast'));
|
|
534
|
+
toastStore?.setSink(delivery => {
|
|
535
|
+
notifyChannel(delivery.text, { color: delivery.color, timeoutMs: delivery.timeoutMs });
|
|
536
|
+
});
|
|
537
|
+
if (questionAnswererRegistration.kind === 'waterfall') {
|
|
538
|
+
// Ownership follows the mutable channel; registration cleanup belongs to
|
|
539
|
+
// this Cordis fiber.
|
|
540
|
+
questionAnswererRegistration.register(channel);
|
|
541
|
+
}
|
|
542
|
+
// Fullscreen layout decision: the settings user layer (edited through the
|
|
543
|
+
// /settings screen) overrides cordis.yml when set. The settings injection
|
|
544
|
+
// below resolves it synchronously when the host settings service is up —
|
|
545
|
+
// i.e. before the tree mounts. `rendererSettingsFrozen` latches at mount: the
|
|
546
|
+
// exit funnel and the AlternateScreen wrap must keep reading the mode this
|
|
547
|
+
// session ACTUALLY runs, never a mid-session edit meant for the next boot
|
|
548
|
+
// (swapping layouts requires re-mounting the whole tree).
|
|
549
|
+
let bootedFullscreen = config.fullscreen === true;
|
|
550
|
+
let bootedTerminalImages = lastBootedTerminalImages ?? config.terminalImages ?? true;
|
|
551
|
+
let rendererSettingsFrozen = false;
|
|
552
|
+
const terminalImagesDisabledByEnv = isEnvTruthy(process.env.DSH_TUI_DISABLE_TERMINAL_IMAGES);
|
|
553
|
+
// The settings service may come up AFTER this plugin's apply: the cordis
|
|
554
|
+
// inject callback defers until the service registers, so the first
|
|
555
|
+
// `apply(scope.get())` below can land after the mount (field report: the
|
|
556
|
+
// /settings fullscreen toggle never took effect — the frozen latch below
|
|
557
|
+
// swallowed the late callback and bootedFullscreen stayed false). The
|
|
558
|
+
// mount must therefore WAIT for the first settings application (bounded —
|
|
559
|
+
// a bare embedder without a settings service must not deadlock).
|
|
560
|
+
let resolveSettingsReady;
|
|
561
|
+
const settingsReady = new Promise(resolve => {
|
|
562
|
+
resolveSettingsReady = () => resolve();
|
|
563
|
+
setTimeout(resolve, 300);
|
|
564
|
+
});
|
|
565
|
+
// Old hosts register a settings.yaml scope. 0.1.7 projects the plugin's
|
|
566
|
+
// volatile Config fields instead; both paths apply edits without remounting.
|
|
567
|
+
ctx.inject(['settings'], (settingsCtx) => {
|
|
568
|
+
// Loader targets the Config owner's fiber, not the injected child fiber.
|
|
569
|
+
const scope = createSettingsScope(configOwner, settingsCtx.settings, tuiSettingsNs, Schema.object({
|
|
570
|
+
diffLayout: Schema.union(['auto', 'split', 'unified']).default('auto'),
|
|
571
|
+
thinkingFold: Schema.union(['preview', 'full']).default('preview'),
|
|
572
|
+
toolBackground: Schema.union(['none', 'subtle', 'strong']).default('none'),
|
|
573
|
+
scrollGutter: Schema.union(['timeline', 'scrollbar', 'hidden']).default('timeline'),
|
|
574
|
+
// Preset names AND custom `NxM` specs (the settings field's parse
|
|
575
|
+
// gate keeps junk out of the user layer; the transform normalizes
|
|
576
|
+
// whatever survives — cordis.yml junk included).
|
|
577
|
+
pageMargin: Schema.transform(Schema.string().default('normal'), value => normalizePageMargin(value)),
|
|
578
|
+
// No default on purpose (same rule as `fullscreen` below): a schema
|
|
579
|
+
// default here would come back from scope.get()/watch() and shadow
|
|
580
|
+
// an explicit cordis.yml `foldTerminalCommand: true` while the
|
|
581
|
+
// settings user layer is unset — applyDisplay's
|
|
582
|
+
// `?? config.foldTerminalCommand ?? false` already supplies the
|
|
583
|
+
// default and keeps cordis.yml decisive.
|
|
584
|
+
foldTerminalCommand: Schema.boolean(),
|
|
585
|
+
promptSessionLabel: Schema.boolean().default(false),
|
|
586
|
+
// No schema default (same rule as foldTerminalCommand): applyDisplay
|
|
587
|
+
// resolves `?? config.expandEditor ?? true` so cordis.yml stays
|
|
588
|
+
// decisive while the user layer is unset.
|
|
589
|
+
expandEditor: Schema.boolean(),
|
|
590
|
+
// Same no-default rule: applyDisplay resolves `?? config.smoothStreaming ?? true`.
|
|
591
|
+
smoothStreaming: Schema.boolean(),
|
|
592
|
+
// Same no-default rule: applyDisplay resolves `?? config.mermaidDiagrams ?? true`.
|
|
593
|
+
mermaidDiagrams: Schema.boolean(),
|
|
594
|
+
// No default on purpose: unset keeps the boot chain decisive
|
|
595
|
+
// (applyEffortDefault hands `undefined` to channel.setDefaultEffort,
|
|
596
|
+
// which resolves cordis.yml `effort` → effort.json → adapter default).
|
|
597
|
+
effortDefault: Schema.string(),
|
|
598
|
+
statusBar: Schema.object({
|
|
599
|
+
compact: Schema.boolean().default(DEFAULT_STATUS_BAR.compact),
|
|
600
|
+
model: Schema.boolean().default(DEFAULT_STATUS_BAR.model),
|
|
601
|
+
thinking: Schema.boolean().default(DEFAULT_STATUS_BAR.thinking),
|
|
602
|
+
cwd: Schema.boolean().default(DEFAULT_STATUS_BAR.cwd),
|
|
603
|
+
contextUsage: Schema.boolean().default(DEFAULT_STATUS_BAR.contextUsage),
|
|
604
|
+
cache: Schema.boolean().default(DEFAULT_STATUS_BAR.cache),
|
|
605
|
+
tokens: Schema.boolean().default(DEFAULT_STATUS_BAR.tokens),
|
|
606
|
+
tps: Schema.boolean().default(DEFAULT_STATUS_BAR.tps),
|
|
607
|
+
gitBranch: Schema.boolean().default(DEFAULT_STATUS_BAR.gitBranch),
|
|
608
|
+
sessionTitle: Schema.boolean().default(DEFAULT_STATUS_BAR.sessionTitle),
|
|
609
|
+
sessionId: Schema.boolean().default(DEFAULT_STATUS_BAR.sessionId),
|
|
610
|
+
goal: Schema.boolean().default(DEFAULT_STATUS_BAR.goal),
|
|
611
|
+
mode: Schema.boolean().default(DEFAULT_STATUS_BAR.mode),
|
|
612
|
+
contextBar: Schema.boolean().default(DEFAULT_STATUS_BAR.contextBar),
|
|
613
|
+
activity: Schema.boolean().default(DEFAULT_STATUS_BAR.activity),
|
|
614
|
+
trajectory: Schema.boolean().default(DEFAULT_STATUS_BAR.trajectory),
|
|
615
|
+
shortcutHint: Schema.boolean().default(DEFAULT_STATUS_BAR.shortcutHint),
|
|
616
|
+
}).default({ ...DEFAULT_STATUS_BAR }),
|
|
617
|
+
// Header pixel whale art; on unless settings.yaml says otherwise.
|
|
618
|
+
whale: Schema.boolean().default(true),
|
|
619
|
+
// Idle whale behaviors after the intro settles; on by default —
|
|
620
|
+
// the idle-wakeup gate stays: an explicit `false` keeps the settled
|
|
621
|
+
// header timer-free.
|
|
622
|
+
whaleIdle: Schema.boolean().default(true),
|
|
623
|
+
// Minimal mode: strips the header splash, emoji glyphs, and
|
|
624
|
+
// decorative colors; code highlight and tool colors stay.
|
|
625
|
+
minimal: Schema.boolean().default(false),
|
|
626
|
+
// No default on purpose: an unset `lang` keeps the field showing
|
|
627
|
+
// the effective language (see the section's format below) and lets
|
|
628
|
+
// cordis.yml / lang.json keep their precedence.
|
|
629
|
+
lang: Schema.union(['zh', 'en']),
|
|
630
|
+
// Same no-default rule: unset keeps cordis.yml's `fullscreen`
|
|
631
|
+
// decisive; set overrides it from the next boot on.
|
|
632
|
+
fullscreen: Schema.boolean(),
|
|
633
|
+
// Unset inherits cordis.yml; a saved choice takes effect after restart.
|
|
634
|
+
terminalImages: Schema.boolean(),
|
|
635
|
+
// Built-in action-shortcut overrides, one optional combo string per
|
|
636
|
+
// action (see the keymap utility). Unset keeps the default binding
|
|
637
|
+
// and the section's format() shows the effective combos.
|
|
638
|
+
shortcuts: Schema.object(Object.fromEntries(SHORTCUT_ACTIONS.map(action => [action.id, Schema.string().required(false)]))).required(false),
|
|
639
|
+
}), () => {
|
|
640
|
+
const current = configValues(runtimeConfig);
|
|
641
|
+
return { ...current, lang: isLang(current.lang) ? current.lang : undefined };
|
|
642
|
+
});
|
|
643
|
+
const applyLayout = (value) => {
|
|
644
|
+
if (!shadow)
|
|
645
|
+
channel.setDiffLayout(value.diffLayout ?? config.diffLayout ?? 'auto');
|
|
646
|
+
};
|
|
647
|
+
const applyWhale = (value) => {
|
|
648
|
+
if (shadow)
|
|
649
|
+
return;
|
|
650
|
+
channel.setWhale(value.whale ?? true);
|
|
651
|
+
};
|
|
652
|
+
/** Apply the idle-whale-behavior setting: live-toggle the channel flag. */
|
|
653
|
+
const applyWhaleIdle = (value) => {
|
|
654
|
+
channel.setWhaleIdle(value.whaleIdle ?? true);
|
|
655
|
+
};
|
|
656
|
+
const applyMinimal = (value) => {
|
|
657
|
+
if (shadow)
|
|
658
|
+
return;
|
|
659
|
+
channel.setMinimal(value.minimal ?? false);
|
|
660
|
+
};
|
|
661
|
+
// Renderer settings are resolved before mount; later edits wait for restart.
|
|
662
|
+
const applyRendererSettings = (value) => {
|
|
663
|
+
if (rendererSettingsFrozen)
|
|
664
|
+
return;
|
|
665
|
+
if (typeof value.fullscreen === 'boolean') {
|
|
666
|
+
bootedFullscreen = value.fullscreen;
|
|
667
|
+
}
|
|
668
|
+
bootedTerminalImages = lastBootedTerminalImages ?? value.terminalImages ?? config.terminalImages ?? true;
|
|
669
|
+
};
|
|
670
|
+
// The /settings language field writes `lang` through the settings
|
|
671
|
+
// service (user layer): apply it live and mirror it to lang.json so
|
|
672
|
+
// the /lang command and next-boot resolution agree. DSH_TUI_LANG
|
|
673
|
+
// stays the top precedence — a pinned env is never overridden by the
|
|
674
|
+
// document.
|
|
675
|
+
const applyLang = (value) => {
|
|
676
|
+
if (!isLang(process.env.DSH_TUI_LANG) && isLang(value.lang)) {
|
|
677
|
+
setLang(value.lang);
|
|
678
|
+
writeLangPref(value.lang);
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
// Display preferences ride the same namespace: /settings writes them
|
|
682
|
+
// live and future render consumers observe the channel version bump.
|
|
683
|
+
const applyDisplay = (value) => {
|
|
684
|
+
if (shadow)
|
|
685
|
+
return;
|
|
686
|
+
channel.setThinkingFold(value.thinkingFold ?? config.thinkingFold ?? 'preview');
|
|
687
|
+
channel.setToolBackground(normalizeToolBackground(value.toolBackground ?? config.toolBackground));
|
|
688
|
+
channel.setScrollGutter(normalizeScrollGutter(value.scrollGutter ?? config.scrollGutter));
|
|
689
|
+
// Page margin: the channel carries the mode (tests observe it), the
|
|
690
|
+
// module store drives the actual inset box above Chat — keep both in
|
|
691
|
+
// lockstep so a live /settings edit re-lays out immediately.
|
|
692
|
+
const pageMargin = normalizePageMargin(value.pageMargin ?? config.pageMargin);
|
|
693
|
+
channel.setPageMargin(pageMargin);
|
|
694
|
+
applyPageMargin(pageMargin);
|
|
695
|
+
channel.setFoldTerminalCommand(value.foldTerminalCommand ?? config.foldTerminalCommand ?? false);
|
|
696
|
+
channel.setPromptSessionLabel(value.promptSessionLabel ?? config.promptSessionLabel ?? false);
|
|
697
|
+
channel.setExpandEditor(value.expandEditor ?? config.expandEditor ?? true);
|
|
698
|
+
channel.setSmoothStreaming(value.smoothStreaming ?? config.smoothStreaming ?? true);
|
|
699
|
+
applyMermaidDiagrams(value.mermaidDiagrams ?? config.mermaidDiagrams);
|
|
700
|
+
channel.setStatusBar(normalizeStatusBar(value.statusBar ?? config.statusBar));
|
|
701
|
+
};
|
|
702
|
+
// Legacy user scopes layer over cordis.yml. Modern Config is already
|
|
703
|
+
// resolved: an unset action must not revive its startup override.
|
|
704
|
+
// Applied live so the very next keypress matches the new combos.
|
|
705
|
+
const applyShortcuts = (value) => {
|
|
706
|
+
const userLayer = value.shortcuts ?? {};
|
|
707
|
+
const configLayer = scope.legacy ? config.shortcuts ?? {} : {};
|
|
708
|
+
const merged = {};
|
|
709
|
+
for (const action of SHORTCUT_ACTIONS) {
|
|
710
|
+
const user = userLayer[action.id];
|
|
711
|
+
const pinned = configLayer[action.id];
|
|
712
|
+
const chosen = typeof user === 'string' && user.trim() !== ''
|
|
713
|
+
? user
|
|
714
|
+
: (typeof pinned === 'string' && pinned.trim() !== '' ? pinned : undefined);
|
|
715
|
+
if (chosen !== undefined)
|
|
716
|
+
merged[action.id] = chosen;
|
|
717
|
+
}
|
|
718
|
+
setKeymapOverrides(merged);
|
|
719
|
+
};
|
|
720
|
+
// The /settings default-reasoning-effort field (effortDefault): re-seat
|
|
721
|
+
// the channel's future-sessions default without touching effort.json
|
|
722
|
+
// (the user layer outranks that file). Only the field's own changes
|
|
723
|
+
// re-apply — unrelated settings edits must not disturb a live /effort
|
|
724
|
+
// choice mid-session.
|
|
725
|
+
let lastEffortDefault = undefined;
|
|
726
|
+
const applyEffortDefault = (value) => {
|
|
727
|
+
const next = value.effortDefault ?? null;
|
|
728
|
+
if (next === lastEffortDefault)
|
|
729
|
+
return;
|
|
730
|
+
lastEffortDefault = next;
|
|
731
|
+
const level = next === null || next === 'auto' ? undefined : next;
|
|
732
|
+
channel.setDefaultEffort(level);
|
|
733
|
+
};
|
|
734
|
+
const apply = (next) => {
|
|
735
|
+
applyLayout(next);
|
|
736
|
+
applyWhale(next);
|
|
737
|
+
applyWhaleIdle(next);
|
|
738
|
+
applyMinimal(next);
|
|
739
|
+
applyLang(next);
|
|
740
|
+
applyDisplay(next);
|
|
741
|
+
applyEffortDefault(next);
|
|
742
|
+
applyShortcuts(next);
|
|
743
|
+
applyRendererSettings(next);
|
|
744
|
+
};
|
|
745
|
+
// One-time fullscreen factory-default migration (companion to the
|
|
746
|
+
// schema + cordis.patch.yml flip false→true): a `fullscreen: false`
|
|
747
|
+
// pinned in the settings user layer BEFORE the flip keeps overriding
|
|
748
|
+
// the new default on every boot. The first boot past this code clears
|
|
749
|
+
// that stale explicit choice; the migrations.json marker makes it
|
|
750
|
+
// strictly once, so a `false` re-pinned afterwards always stands. The
|
|
751
|
+
// boot decision cannot wait for the async doc write — the stale value
|
|
752
|
+
// is shadowed out of the first apply below (destructuring omission,
|
|
753
|
+
// not an explicit undefined), and the later watch commit (fullscreen
|
|
754
|
+
// back to undefined) leaves the fullscreen decision unchanged.
|
|
755
|
+
const bootSettings = scope.get();
|
|
756
|
+
// The old migration applies only to the separate user layer. A modern
|
|
757
|
+
// profile's explicit inline Config must never be mistaken for that layer.
|
|
758
|
+
const fullscreenMigration = scope.legacy
|
|
759
|
+
? planFullscreenFactoryMigration(bootSettings.fullscreen, readAppliedMigrations())
|
|
760
|
+
: 'done';
|
|
761
|
+
void commitFullscreenFactoryMigration(fullscreenMigration, {
|
|
762
|
+
unset: () => settingsCtx.settings.mutate(tuiSettingsNs, [{ op: 'unset', path: ['fullscreen'] }]),
|
|
763
|
+
});
|
|
764
|
+
if (fullscreenMigration === 'unset') {
|
|
765
|
+
notifyChannel(t('settings-fullscreen-migrated'), { color: 'warning' });
|
|
766
|
+
}
|
|
767
|
+
const { fullscreen: staleFullscreen, ...migratedSettings } = bootSettings;
|
|
768
|
+
apply(fullscreenMigration === 'unset' ? migratedSettings : bootSettings);
|
|
769
|
+
let lastTerminalImages = bootSettings.terminalImages ?? config.terminalImages ?? true;
|
|
770
|
+
settingsCtx.effect(() => scope.watch(next => {
|
|
771
|
+
apply(next);
|
|
772
|
+
if (typeof next.fullscreen === 'boolean' && next.fullscreen !== bootedFullscreen) {
|
|
773
|
+
notifyChannel(t('settings-fullscreen-restart'), { color: 'warning' });
|
|
774
|
+
}
|
|
775
|
+
const terminalImages = next.terminalImages ?? config.terminalImages ?? true;
|
|
776
|
+
if (terminalImages !== lastTerminalImages && terminalImages !== bootedTerminalImages) {
|
|
777
|
+
channel.notify(t('settings-terminal-images-restart'), { color: 'warning' });
|
|
778
|
+
}
|
|
779
|
+
lastTerminalImages = terminalImages;
|
|
780
|
+
}));
|
|
781
|
+
resolveSettingsReady?.();
|
|
782
|
+
});
|
|
783
|
+
// The /settings screen's own section: the dsh-tui namespace comes from
|
|
784
|
+
// the settings registration above, and the declared selects write `lang`
|
|
785
|
+
// and `diffLayout` back through the settings service's revision-fenced
|
|
786
|
+
// mutate (the watch applies both live).
|
|
787
|
+
//
|
|
788
|
+
// Shortcut fields: one text field per customizable action. The draft is
|
|
789
|
+
// one or more ctrl+/alt+ combos (comma-separated); blank restores the
|
|
790
|
+
// default, and a combo another action or a fixed editor binding already
|
|
791
|
+
// owns is refused as invalid so remaps can never silently shadow.
|
|
792
|
+
const shortcutFieldMeta = {
|
|
793
|
+
paste: {
|
|
794
|
+
label: 'Paste shortcut',
|
|
795
|
+
zh: '粘贴快捷键',
|
|
796
|
+
hintEn: d => `Clipboard paste (text, file paths, images). Default: ${d}. Alt+V works where the terminal eats Ctrl+V.`,
|
|
797
|
+
hintZh: d => `剪贴板粘贴(文本、文件路径、图片)。默认 ${d}。终端吞掉 Ctrl+V 时可用 Alt+V。`,
|
|
798
|
+
},
|
|
799
|
+
history: {
|
|
800
|
+
label: 'History search shortcut',
|
|
801
|
+
zh: '历史搜索快捷键',
|
|
802
|
+
hintEn: d => `Open the prompt-history search. Default: ${d}.`,
|
|
803
|
+
hintZh: d => `打开输入历史搜索。默认 ${d}。`,
|
|
804
|
+
},
|
|
805
|
+
editor: {
|
|
806
|
+
label: 'External editor shortcut',
|
|
807
|
+
zh: '外部编辑器快捷键',
|
|
808
|
+
hintEn: d => `Edit the draft in $VISUAL/$EDITOR. Default: ${d}.`,
|
|
809
|
+
hintZh: d => `在 $VISUAL/$EDITOR 外部编辑器中编辑草稿。默认 ${d}。`,
|
|
810
|
+
},
|
|
811
|
+
transcript: {
|
|
812
|
+
label: 'Transcript mode shortcut',
|
|
813
|
+
zh: '转录模式快捷键',
|
|
814
|
+
hintEn: d => `Toggle expanded transcript mode. Default: ${d}.`,
|
|
815
|
+
hintZh: d => `切换展开转录模式。默认 ${d}。`,
|
|
816
|
+
},
|
|
817
|
+
trajectory: {
|
|
818
|
+
label: 'Trajectory scene shortcut',
|
|
819
|
+
zh: '轨迹场景快捷键',
|
|
820
|
+
hintEn: d => `Open the trajectory scene. Default: ${d}.`,
|
|
821
|
+
hintZh: d => `打开轨迹场景。默认 ${d}。`,
|
|
822
|
+
},
|
|
823
|
+
dashboard: {
|
|
824
|
+
label: 'Subagent dashboard shortcut',
|
|
825
|
+
zh: '子代理面板快捷键',
|
|
826
|
+
hintEn: d => `Open the subagent dashboard. Default: ${d}.`,
|
|
827
|
+
hintZh: d => `打开子代理面板。默认 ${d}。`,
|
|
828
|
+
},
|
|
829
|
+
contextPanel: {
|
|
830
|
+
label: 'Loaded-context panel shortcut',
|
|
831
|
+
zh: '加载上下文面板快捷键',
|
|
832
|
+
hintEn: d => `Toggle the startup loaded-context panel. Default: ${d}.`,
|
|
833
|
+
hintZh: d => `切换启动时的已加载上下文面板。默认 ${d}。`,
|
|
834
|
+
},
|
|
835
|
+
showAll: {
|
|
836
|
+
label: 'Show-all shortcut',
|
|
837
|
+
zh: '显示全部消息快捷键',
|
|
838
|
+
hintEn: d => `Toggle show-all-messages. Default: ${d}.`,
|
|
839
|
+
hintZh: d => `切换显示全部消息。默认 ${d}。`,
|
|
840
|
+
},
|
|
841
|
+
redraw: {
|
|
842
|
+
label: 'Redraw shortcut',
|
|
843
|
+
zh: '终端重绘快捷键',
|
|
844
|
+
hintEn: d => `Clear and repaint the terminal. Default: ${d}.`,
|
|
845
|
+
hintZh: d => `清空并重绘终端。默认 ${d}。`,
|
|
846
|
+
},
|
|
847
|
+
todoFold: {
|
|
848
|
+
label: 'Todo fold shortcut',
|
|
849
|
+
zh: '待办折叠快捷键',
|
|
850
|
+
hintEn: d => `Fold/unfold the goal/todo panel. Default: ${d}.`,
|
|
851
|
+
hintZh: d => `折叠/展开目标与待办面板。默认 ${d}。`,
|
|
852
|
+
},
|
|
853
|
+
questionFold: {
|
|
854
|
+
label: 'Question panel fold shortcut',
|
|
855
|
+
zh: '提问面板折叠快捷键',
|
|
856
|
+
hintEn: d => `Fold/unfold the pending question panel. Default: ${d}.`,
|
|
857
|
+
hintZh: d => `折叠/展开等待回答的提问面板。默认 ${d}。`,
|
|
858
|
+
},
|
|
859
|
+
expandEditor: {
|
|
860
|
+
label: 'Fullscreen editor shortcut',
|
|
861
|
+
zh: '全屏草稿编辑快捷键',
|
|
862
|
+
hintEn: d => `Toggle the fullscreen draft editor (Enter inserts a newline, Ctrl+Enter sends). Default: ${d}.`,
|
|
863
|
+
hintZh: d => `切换全屏草稿编辑器(Enter 换行、Ctrl+Enter 发送)。默认 ${d}。`,
|
|
864
|
+
},
|
|
865
|
+
};
|
|
866
|
+
const shortcutFields = SHORTCUT_ACTIONS.map(action => {
|
|
867
|
+
const meta = shortcutFieldMeta[action.id];
|
|
868
|
+
const defaults = action.defaults.join(', ');
|
|
869
|
+
return {
|
|
870
|
+
path: ['shortcuts', action.id],
|
|
871
|
+
label: meta.label,
|
|
872
|
+
descriptions: { zh: meta.zh },
|
|
873
|
+
hint: meta.hintEn(defaults),
|
|
874
|
+
hintDescriptions: { zh: meta.hintZh(defaults) },
|
|
875
|
+
group: 'shortcuts',
|
|
876
|
+
kind: 'text',
|
|
877
|
+
format(value) {
|
|
878
|
+
return typeof value === 'string' && value.trim() !== '' ? value : effectiveComboString(action.id);
|
|
879
|
+
},
|
|
880
|
+
parse(text) {
|
|
881
|
+
const draft = parseComboDraft(text);
|
|
882
|
+
if (draft === undefined)
|
|
883
|
+
return undefined;
|
|
884
|
+
if (draft.combos.length === 0)
|
|
885
|
+
return { kind: 'clear' };
|
|
886
|
+
if (draftComboConflicts(action.id, draft.combos))
|
|
887
|
+
return undefined;
|
|
888
|
+
return { kind: 'set', value: draft.combos.join(', ') };
|
|
889
|
+
},
|
|
890
|
+
};
|
|
891
|
+
});
|
|
892
|
+
// Prefer the composition's sections service; fall back to the in-package
|
|
893
|
+
// local host. Real compositions have been observed disposing the whole
|
|
894
|
+
// dsh-tui-* host-seam insert list right after load (issue #557), which
|
|
895
|
+
// left this registration silently skipped and /settings read-only.
|
|
896
|
+
// channel.ts reads through the same fallback, so both sides meet in the
|
|
897
|
+
// same registry either way.
|
|
898
|
+
{
|
|
899
|
+
const settingsSections = getHostSettingsSections(ctx.get('tuiSettingsSections')) ?? getLocalSettingsSectionsHost(ctx);
|
|
900
|
+
const unregister = settingsSections.register({
|
|
901
|
+
ns: tuiSettingsNs,
|
|
902
|
+
title: 'dsh-tui',
|
|
903
|
+
groups: [
|
|
904
|
+
{ id: 'status-bar', title: 'Status bar', descriptions: { zh: '底栏设置' } },
|
|
905
|
+
{ id: 'shortcuts', title: 'Shortcuts', descriptions: { zh: '快捷键' } },
|
|
906
|
+
{ id: 'session', title: 'Session', descriptions: { zh: '会话' } },
|
|
907
|
+
],
|
|
908
|
+
fields: [
|
|
909
|
+
{
|
|
910
|
+
path: ['lang'],
|
|
911
|
+
label: 'Language',
|
|
912
|
+
descriptions: { zh: '界面语言' },
|
|
913
|
+
hint: 'UI language for the whole interface — applies immediately and is saved.',
|
|
914
|
+
hintDescriptions: { zh: '整个界面的显示语言——立即生效并保存。' },
|
|
915
|
+
kind: 'select',
|
|
916
|
+
options: [
|
|
917
|
+
{ value: 'zh', label: '中文', descriptions: { zh: '中文' } },
|
|
918
|
+
{ value: 'en', label: 'English', descriptions: { zh: '英文' } },
|
|
919
|
+
],
|
|
920
|
+
format(value) {
|
|
921
|
+
// Unset in settings.yaml: show the effective UI language
|
|
922
|
+
// (env / cordis.yml / lang.json resolution) instead of a
|
|
923
|
+
// blank "unset" that hides the current choice.
|
|
924
|
+
return value === undefined || value === null ? getLang() : String(value);
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
path: ['fullscreen'],
|
|
929
|
+
label: 'Fullscreen mode',
|
|
930
|
+
descriptions: { zh: '全屏模式' },
|
|
931
|
+
// 故意不用 "alt-screen" 这类终端术语:读者要的是行为差异。鼠标
|
|
932
|
+
// 两种模式都可用(整屏页面自带鼠标跟踪),别让描述暗示关掉就
|
|
933
|
+
// 没有鼠标——最常见的误解。长度对齐既有最长 hint(单行假设)。
|
|
934
|
+
hint: 'On: app takes the whole screen (vim/less style), in-app mouse. Off: native scrollback; full-page screens keep the mouse. Restart to apply.',
|
|
935
|
+
hintDescriptions: { zh: '开启:接管整个终端(同 vim/less),应用内鼠标;关闭:终端原生滚动选择;整屏页两种模式都有鼠标。重启生效。' },
|
|
936
|
+
kind: 'boolean',
|
|
937
|
+
format(value) {
|
|
938
|
+
// Unset in settings.yaml: show what THIS session booted with
|
|
939
|
+
// (the cordis.yml resolution) instead of a misleading false.
|
|
940
|
+
return value === undefined || value === null ? String(bootedFullscreen) : String(value);
|
|
941
|
+
},
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
path: ['terminalImages'],
|
|
945
|
+
label: terminalImagesDisabledByEnv ? 'Image previews (forced off)' : 'Terminal image previews',
|
|
946
|
+
descriptions: { zh: terminalImagesDisabledByEnv ? '图片预览(环境强制关闭)' : '终端图片预览' },
|
|
947
|
+
hint: terminalImagesDisabledByEnv
|
|
948
|
+
? 'Checkbox saves your preference. Relaunch without DSH_TUI_DISABLE_TERMINAL_IMAGES to enable previews.'
|
|
949
|
+
: 'Preview images in supported terminals. Use /restart to apply. Sending images is unaffected.',
|
|
950
|
+
hintDescriptions: {
|
|
951
|
+
zh: terminalImagesDisabledByEnv
|
|
952
|
+
? '勾选框保存预览偏好;移除 DSH_TUI_DISABLE_TERMINAL_IMAGES 后重新启动才能显示图片。'
|
|
953
|
+
: '在支持的终端中预览图片。修改后用 /restart 生效;不影响向模型发送图片。',
|
|
954
|
+
},
|
|
955
|
+
kind: 'boolean',
|
|
956
|
+
format(value) {
|
|
957
|
+
// The editor toggles this value; runtime overrides must not replace the preference.
|
|
958
|
+
return String(value ?? config.terminalImages ?? true);
|
|
959
|
+
},
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
path: ['diffLayout'],
|
|
963
|
+
label: 'Diff layout',
|
|
964
|
+
descriptions: { zh: 'diff 布局' },
|
|
965
|
+
hint: 'Edit/Write tool cards: auto picks by terminal width, or force one layout.',
|
|
966
|
+
hintDescriptions: { zh: 'Edit/Write 工具卡的 diff 呈现:auto 按终端宽度选择,或强制一种布局。' },
|
|
967
|
+
kind: 'select',
|
|
968
|
+
options: [
|
|
969
|
+
{ value: 'auto', label: 'Auto (by width)', descriptions: { zh: '自动(按宽度)' } },
|
|
970
|
+
{ value: 'split', label: 'Side-by-side', descriptions: { zh: '双栏对照' } },
|
|
971
|
+
{ value: 'unified', label: 'Unified', descriptions: { zh: '统一式' } },
|
|
972
|
+
],
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
path: ['thinkingFold'],
|
|
976
|
+
label: 'Thinking display',
|
|
977
|
+
descriptions: { zh: '思考块展示' },
|
|
978
|
+
hint: 'Preview shows 2-3 live lines; Full stays expanded until turn end. Click a streaming block to switch between preview and full.',
|
|
979
|
+
hintDescriptions: { zh: '预览模式显示 2-3 行动态思考;展开模式保持至轮末。点击流式思考块可在预览与全文间切换。' },
|
|
980
|
+
kind: 'select',
|
|
981
|
+
options: [
|
|
982
|
+
{ value: 'preview', label: 'Preview (2-3 lines)', descriptions: { zh: '预览(2-3 行)' } },
|
|
983
|
+
{ value: 'full', label: 'Full until turn end', descriptions: { zh: '展开至轮末' } },
|
|
984
|
+
],
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
path: ['toolBackground'],
|
|
988
|
+
label: 'Tool background',
|
|
989
|
+
descriptions: { zh: '工具卡背景' },
|
|
990
|
+
hint: 'Choose whether tool-call cards add no, subtle, or strong background emphasis.',
|
|
991
|
+
hintDescriptions: { zh: '选择工具调用卡片不添加、轻微或明显的背景强调。' },
|
|
992
|
+
kind: 'select',
|
|
993
|
+
options: [
|
|
994
|
+
{ value: 'none', label: 'None', descriptions: { zh: '无' } },
|
|
995
|
+
{ value: 'subtle', label: 'Subtle', descriptions: { zh: '轻微' } },
|
|
996
|
+
{ value: 'strong', label: 'Strong', descriptions: { zh: '明显' } },
|
|
997
|
+
],
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
path: ['scrollGutter'],
|
|
1001
|
+
label: 'Transcript gutter',
|
|
1002
|
+
descriptions: { zh: '转录边栏' },
|
|
1003
|
+
hint: 'Right gutter of the fullscreen transcript: per-turn timeline ticks, a proportional scrollbar, or nothing.',
|
|
1004
|
+
hintDescriptions: { zh: '全屏转录区右侧边栏:按轮次的时间线节点、比例滚动条,或留空。' },
|
|
1005
|
+
kind: 'select',
|
|
1006
|
+
options: [
|
|
1007
|
+
{ value: 'timeline', label: 'Turn timeline', descriptions: { zh: '轮次时间线' } },
|
|
1008
|
+
{ value: 'scrollbar', label: 'Scrollbar', descriptions: { zh: '滚动条' } },
|
|
1009
|
+
{ value: 'hidden', label: 'Hidden', descriptions: { zh: '隐藏' } },
|
|
1010
|
+
],
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
path: ['pageMargin'],
|
|
1014
|
+
label: 'Page margin',
|
|
1015
|
+
descriptions: { zh: '页边距' },
|
|
1016
|
+
hint: 'Inset the whole UI from the terminal edges. ←/→ cycles presets (none / slim / normal / roomy); Enter types a custom spec `NxM`: N columns per side, M rows top/bottom (e.g. 3x1, max 8x4; a bare `N` keeps rows at 1). Empty resets to the default `normal`. Applies immediately.',
|
|
1017
|
+
hintDescriptions: { zh: '让整个界面相对终端四边内缩。←/→ 循环预设(none / slim / normal / roomy);Enter 输入自定义 `NxM`:左右各 N 列、上下各 M 行(如 3x1,上限 8x4;只填 N 则上下保持 1 行)。清空恢复默认 normal。立即生效。' },
|
|
1018
|
+
kind: 'text',
|
|
1019
|
+
placeholder: 'normal',
|
|
1020
|
+
options: [
|
|
1021
|
+
{ value: 'none', label: 'None', descriptions: { zh: '无' } },
|
|
1022
|
+
{ value: 'slim', label: 'Slim', descriptions: { zh: '窄' } },
|
|
1023
|
+
{ value: 'normal', label: 'Normal', descriptions: { zh: '常规' } },
|
|
1024
|
+
{ value: 'roomy', label: 'Roomy', descriptions: { zh: '宽' } },
|
|
1025
|
+
],
|
|
1026
|
+
format(value) {
|
|
1027
|
+
return String(value ?? config.pageMargin ?? DEFAULT_PAGE_MARGIN);
|
|
1028
|
+
},
|
|
1029
|
+
parse(text) {
|
|
1030
|
+
const draft = text.trim().toLowerCase();
|
|
1031
|
+
if (draft === '')
|
|
1032
|
+
return { kind: 'clear' };
|
|
1033
|
+
if (isPageMarginMode(draft))
|
|
1034
|
+
return { kind: 'set', value: draft };
|
|
1035
|
+
const spec = parsePageMarginSpec(draft);
|
|
1036
|
+
return spec === undefined ? undefined : { kind: 'set', value: spec };
|
|
1037
|
+
},
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
path: ['foldTerminalCommand'],
|
|
1041
|
+
label: 'Fold terminal command',
|
|
1042
|
+
descriptions: { zh: '折叠终端命令' },
|
|
1043
|
+
hint: 'Terminal cards (Bash/PowerShell): collapse a multi-line command header to its first line + count; Ctrl+O or a click expands it.',
|
|
1044
|
+
hintDescriptions: { zh: '终端卡(Bash/PowerShell):多行命令头部折叠为首行 + 计数;Ctrl+O 或点击卡片展开。' },
|
|
1045
|
+
kind: 'boolean',
|
|
1046
|
+
format(value) {
|
|
1047
|
+
// Unset in settings.yaml: show the effective resolution (cordis.yml
|
|
1048
|
+
// → off) instead of a blank — same rule as `fullscreen`'s field.
|
|
1049
|
+
return String(typeof value === 'boolean' ? value : config.foldTerminalCommand === true);
|
|
1050
|
+
},
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
path: ['promptSessionLabel'],
|
|
1054
|
+
label: 'Session name chip',
|
|
1055
|
+
descriptions: { zh: '会话名标签' },
|
|
1056
|
+
hint: 'Show the session name on the prompt top border, right corner. Off by default.',
|
|
1057
|
+
hintDescriptions: { zh: '在输入框顶边框右上角显示会话名。默认关闭。' },
|
|
1058
|
+
kind: 'boolean',
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
path: ['expandEditor'],
|
|
1062
|
+
label: 'Fullscreen draft editor',
|
|
1063
|
+
descriptions: { zh: '全屏草稿编辑' },
|
|
1064
|
+
hint: 'On: the ⛶ affordance in the input row and the expand-editor shortcut (default Ctrl+Shift+E) expand the draft into a whole-screen editor (Enter = newline, Ctrl+Enter = send). Off: both entry points disappear. On by default.',
|
|
1065
|
+
hintDescriptions: { zh: '开启:输入行尾 ⛶ 按钮与全屏编辑快捷键(默认 Ctrl+Shift+E)把草稿展开成整屏编辑器(Enter 换行、Ctrl+Enter 发送)。关闭:两个入口都不显示。默认开启。' },
|
|
1066
|
+
kind: 'boolean',
|
|
1067
|
+
format(value) {
|
|
1068
|
+
// Unset in settings.yaml: the effective default is on.
|
|
1069
|
+
return String(typeof value === 'boolean' ? value : config.expandEditor !== false);
|
|
1070
|
+
},
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
path: ['smoothStreaming'],
|
|
1074
|
+
label: 'Smooth streaming',
|
|
1075
|
+
descriptions: { zh: '流式平滑输出' },
|
|
1076
|
+
hint: 'Reveal live replies, expanded thinking, and tool-call bodies through an even ~30fps flow instead of per-burst jumps; one-shot non-streaming replies paint as a flow too. Replay/history always paints complete. On by default.',
|
|
1077
|
+
hintDescriptions: { zh: '把实时回复、展开的思考与工具卡正文按 ~30fps 匀速揭示,不再随供应商突发一跳一跳;一次性到达的非流式回复也会平滑打出。回放/历史内容始终完整直出。默认开启。' },
|
|
1078
|
+
kind: 'boolean',
|
|
1079
|
+
format(value) {
|
|
1080
|
+
// Unset in settings.yaml: the effective default is on.
|
|
1081
|
+
return String(typeof value === 'boolean' ? value : config.smoothStreaming !== false);
|
|
1082
|
+
},
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
path: ['mermaidDiagrams'],
|
|
1086
|
+
label: 'Mermaid diagrams',
|
|
1087
|
+
descriptions: { zh: 'Mermaid 图表' },
|
|
1088
|
+
hint: 'Render ```mermaid fences in replies as box-drawing diagrams (flowchart, sequence, state, class, ER, pie, mindmap, timeline, gitGraph). Diagrams wider than the terminal, or of an unsupported type, keep the fenced source. Applies immediately. On by default.',
|
|
1089
|
+
hintDescriptions: { zh: '把回复中的 ```mermaid 代码块画成字符图(flowchart、sequence、state、class、ER、pie、mindmap、timeline、gitGraph)。比终端宽或类型不支持的图保留源码。立即生效。默认开启。' },
|
|
1090
|
+
kind: 'boolean',
|
|
1091
|
+
format(value) {
|
|
1092
|
+
// Unset in settings.yaml: the effective default is on.
|
|
1093
|
+
return String(typeof value === 'boolean' ? value : config.mermaidDiagrams !== false);
|
|
1094
|
+
},
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
path: ['recapOnOpen'],
|
|
1098
|
+
label: 'Auto recap on open',
|
|
1099
|
+
descriptions: { zh: '打开会话时自动总结' },
|
|
1100
|
+
hint: 'On: opening/resuming a session automatically summarizes its recent activity into a dim line at the bottom of the transcript (hover/click to view or apply the suggested title). Off: use /recap manually.',
|
|
1101
|
+
hintDescriptions: { zh: '开启:打开/恢复会话时自动把最近活动总结成一行灰字显示在会话底部(可悬停/点击查看或应用建议标题);关闭:手动使用 /recap。' },
|
|
1102
|
+
kind: 'boolean',
|
|
1103
|
+
format(value) {
|
|
1104
|
+
// Unset in settings.yaml: the default is on.
|
|
1105
|
+
return value === undefined || value === null ? 'true' : String(value);
|
|
1106
|
+
},
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
path: ['effortDefault'],
|
|
1110
|
+
label: 'Default reasoning effort',
|
|
1111
|
+
descriptions: { zh: '默认推理强度' },
|
|
1112
|
+
hint: 'Reasoning-effort level new sessions start on; the current session applies it to its next request too, when the model offers the tier (an unlisted level falls back to the model default). Auto = follow the cordis.yml `effort` pin, then the persisted /effort choice, then the model default.',
|
|
1113
|
+
hintDescriptions: { zh: '新会话起始的推理强度档位;模型提供该档位时,当前会话的下一请求也会应用(模型不提供的档位会静默回落到模型默认)。自动 = 依次跟随 cordis.yml 的 effort 配置、持久化的 /effort 选择、模型默认档。' },
|
|
1114
|
+
kind: 'select',
|
|
1115
|
+
options: [
|
|
1116
|
+
{ value: 'auto', label: 'Auto (model default)', descriptions: { zh: '自动(模型默认)' } },
|
|
1117
|
+
{ value: 'off', label: 'Off', descriptions: { zh: '关闭' } },
|
|
1118
|
+
{ value: 'low', label: 'Low', descriptions: { zh: '低' } },
|
|
1119
|
+
{ value: 'high', label: 'High', descriptions: { zh: '高' } },
|
|
1120
|
+
{ value: 'max', label: 'Max', descriptions: { zh: '最高' } },
|
|
1121
|
+
],
|
|
1122
|
+
format(value) {
|
|
1123
|
+
// Unset in settings.yaml: show what a boot would actually start
|
|
1124
|
+
// on (the cordis effort pin → the persisted /effort choice)
|
|
1125
|
+
// instead of a misleading blank.
|
|
1126
|
+
if (value === undefined || value === null || value === 'auto') {
|
|
1127
|
+
return config.effort ?? readEffortPref() ?? 'auto';
|
|
1128
|
+
}
|
|
1129
|
+
return String(value);
|
|
1130
|
+
},
|
|
1131
|
+
},
|
|
1132
|
+
...shortcutFields,
|
|
1133
|
+
{
|
|
1134
|
+
path: ['statusBar', 'compact'],
|
|
1135
|
+
label: 'Compact status bar',
|
|
1136
|
+
descriptions: { zh: '紧凑状态栏' },
|
|
1137
|
+
hint: 'Prefer the compact status presentation when terminal space allows.',
|
|
1138
|
+
hintDescriptions: { zh: '终端空间允许时优先使用紧凑状态栏布局。' },
|
|
1139
|
+
group: 'status-bar',
|
|
1140
|
+
kind: 'boolean',
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
path: ['statusBar', 'model'],
|
|
1144
|
+
label: 'Show model',
|
|
1145
|
+
descriptions: { zh: '显示模型' },
|
|
1146
|
+
hint: 'Show the live model id in the status bar.',
|
|
1147
|
+
hintDescriptions: { zh: '在状态栏显示当前模型标识。' },
|
|
1148
|
+
group: 'status-bar',
|
|
1149
|
+
kind: 'boolean',
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
path: ['statusBar', 'thinking'],
|
|
1153
|
+
label: 'Show thinking',
|
|
1154
|
+
descriptions: { zh: '显示思考' },
|
|
1155
|
+
hint: 'Show the live reasoning effort or thinking mode.',
|
|
1156
|
+
hintDescriptions: { zh: '显示当前推理强度或思考模式。' },
|
|
1157
|
+
group: 'status-bar',
|
|
1158
|
+
kind: 'boolean',
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
path: ['statusBar', 'cwd'],
|
|
1162
|
+
label: 'Show working directory',
|
|
1163
|
+
descriptions: { zh: '显示工作目录' },
|
|
1164
|
+
hint: 'Show the session working directory.',
|
|
1165
|
+
hintDescriptions: { zh: '显示当前会话的工作目录。' },
|
|
1166
|
+
group: 'status-bar',
|
|
1167
|
+
kind: 'boolean',
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
path: ['statusBar', 'contextUsage'],
|
|
1171
|
+
label: 'Show context usage',
|
|
1172
|
+
descriptions: { zh: '显示上下文用量' },
|
|
1173
|
+
hint: 'Show current context-window consumption.',
|
|
1174
|
+
hintDescriptions: { zh: '显示当前上下文窗口占用情况。' },
|
|
1175
|
+
group: 'status-bar',
|
|
1176
|
+
kind: 'boolean',
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
path: ['statusBar', 'cache'],
|
|
1180
|
+
label: 'Show cache',
|
|
1181
|
+
descriptions: { zh: '显示缓存' },
|
|
1182
|
+
hint: 'Show prompt-cache hit information.',
|
|
1183
|
+
hintDescriptions: { zh: '显示提示词缓存命中信息。' },
|
|
1184
|
+
group: 'status-bar',
|
|
1185
|
+
kind: 'boolean',
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
path: ['statusBar', 'tokens'],
|
|
1189
|
+
label: 'Show token totals',
|
|
1190
|
+
descriptions: { zh: '显示 Token 总量' },
|
|
1191
|
+
hint: 'Show running input and output token totals.',
|
|
1192
|
+
hintDescriptions: { zh: '显示累计输入与输出 Token。' },
|
|
1193
|
+
group: 'status-bar',
|
|
1194
|
+
kind: 'boolean',
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
path: ['statusBar', 'cost'],
|
|
1198
|
+
label: 'Show session cost estimate',
|
|
1199
|
+
descriptions: { zh: '显示本会话花费估算' },
|
|
1200
|
+
hint: 'Show the estimated session spend (≈¥) next to the token totals. Only appears for official DeepSeek providers whose model has a known price; the estimate follows the official per-million-token rates (peak/idle hours) and is not a bill.',
|
|
1201
|
+
hintDescriptions: { zh: '在 Token 总量旁显示本会话花费估算(≈¥)。仅在使用 DeepSeek 官方 API key 且模型有已知单价时显示;按官方每百万 token 单价(高峰/空闲时段)估算,非账单。' },
|
|
1202
|
+
group: 'status-bar',
|
|
1203
|
+
kind: 'boolean',
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
path: ['statusBar', 'tps'],
|
|
1207
|
+
label: 'Show output speed',
|
|
1208
|
+
descriptions: { zh: '显示输出速度' },
|
|
1209
|
+
hint: 'Show live and recent tokens-per-second metrics.',
|
|
1210
|
+
hintDescriptions: { zh: '显示实时及近期每秒 Token 指标。' },
|
|
1211
|
+
group: 'status-bar',
|
|
1212
|
+
kind: 'boolean',
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
path: ['statusBar', 'gitBranch'],
|
|
1216
|
+
label: 'Show git branch',
|
|
1217
|
+
descriptions: { zh: '显示 Git 分支' },
|
|
1218
|
+
hint: 'Show the current git branch when available.',
|
|
1219
|
+
hintDescriptions: { zh: '可用时显示当前 Git 分支。' },
|
|
1220
|
+
group: 'status-bar',
|
|
1221
|
+
kind: 'boolean',
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
path: ['statusBar', 'sessionTitle'],
|
|
1225
|
+
label: 'Show session title',
|
|
1226
|
+
descriptions: { zh: '显示会话标题' },
|
|
1227
|
+
hint: 'Show the current session title.',
|
|
1228
|
+
hintDescriptions: { zh: '显示当前会话标题。' },
|
|
1229
|
+
group: 'status-bar',
|
|
1230
|
+
kind: 'boolean',
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
path: ['statusBar', 'sessionId'],
|
|
1234
|
+
label: 'Show session id',
|
|
1235
|
+
descriptions: { zh: '显示会话 ID' },
|
|
1236
|
+
hint: 'Show the short session id (# + first 8 chars) — it matches the session log filename for --resume.',
|
|
1237
|
+
hintDescriptions: { zh: '显示短会话 ID(# + 前 8 位)——与日志文件名对应,方便 --resume 定位。' },
|
|
1238
|
+
group: 'status-bar',
|
|
1239
|
+
kind: 'boolean',
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
path: ['statusBar', 'goal'],
|
|
1243
|
+
label: 'Show goal status',
|
|
1244
|
+
descriptions: { zh: '显示 Goal 状态' },
|
|
1245
|
+
hint: 'Show a compact goal chip (phase glyph + rounds) in the status footer while a goal exists.',
|
|
1246
|
+
hintDescriptions: { zh: '存在 Goal 时,在底部状态栏显示紧凑的 Goal 状态(阶段符号与轮次)。' },
|
|
1247
|
+
group: 'status-bar',
|
|
1248
|
+
kind: 'boolean',
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
path: ['statusBar', 'mode'],
|
|
1252
|
+
label: 'Show session mode',
|
|
1253
|
+
descriptions: { zh: '显示会话模式' },
|
|
1254
|
+
hint: 'Show the active non-default session mode.',
|
|
1255
|
+
hintDescriptions: { zh: '显示当前启用的非默认会话模式。' },
|
|
1256
|
+
group: 'status-bar',
|
|
1257
|
+
kind: 'boolean',
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
path: ['statusBar', 'contextBar'],
|
|
1261
|
+
label: 'Show context progress bar',
|
|
1262
|
+
descriptions: { zh: '显示上下文进度条' },
|
|
1263
|
+
hint: 'Show the segmented context progress bar on its own footer row.',
|
|
1264
|
+
hintDescriptions: { zh: '在底部单独一行显示分段上下文进度条。' },
|
|
1265
|
+
group: 'status-bar',
|
|
1266
|
+
kind: 'boolean',
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
path: ['statusBar', 'activity'],
|
|
1270
|
+
label: 'Show activity summary',
|
|
1271
|
+
descriptions: { zh: '显示活动摘要' },
|
|
1272
|
+
hint: 'Show the idle working-activity summary.',
|
|
1273
|
+
hintDescriptions: { zh: '显示空闲时的工作活动摘要。' },
|
|
1274
|
+
group: 'status-bar',
|
|
1275
|
+
kind: 'boolean',
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
path: ['statusBar', 'trajectory'],
|
|
1279
|
+
label: 'Show trajectory strip',
|
|
1280
|
+
descriptions: { zh: '显示轨迹条' },
|
|
1281
|
+
hint: 'Show the animated mini trajectory strip at the footer edge.',
|
|
1282
|
+
hintDescriptions: { zh: '在状态栏边缘显示动态迷你轨迹条。' },
|
|
1283
|
+
group: 'status-bar',
|
|
1284
|
+
kind: 'boolean',
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
path: ['statusBar', 'shortcutHint'],
|
|
1288
|
+
label: 'Show shortcut reminder',
|
|
1289
|
+
descriptions: { zh: '显示快捷键提示' },
|
|
1290
|
+
hint: 'Control only the idle `? for shortcuts` reminder; pressing ? and the Esc shortcut hints are unaffected.',
|
|
1291
|
+
hintDescriptions: { zh: '仅控制空闲时的 `? for shortcuts` 提示;按 ? 打开快捷键以及 Esc 快捷提示均不受影响。' },
|
|
1292
|
+
group: 'status-bar',
|
|
1293
|
+
kind: 'boolean',
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
path: ['whale'],
|
|
1297
|
+
label: 'Whale art',
|
|
1298
|
+
descriptions: { zh: '鲸鱼娘' },
|
|
1299
|
+
hint: 'Show the pixel whale in the header splash.',
|
|
1300
|
+
hintDescriptions: { zh: '开屏头部显示像素鲸鱼娘。' },
|
|
1301
|
+
kind: 'boolean',
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
path: ['whaleIdle'],
|
|
1305
|
+
label: 'Welcome whale idle',
|
|
1306
|
+
descriptions: { zh: '鲸鱼娘闲置动画(欢迎期)' },
|
|
1307
|
+
hint: 'Welcome-phase idle behaviors: after the intro the whale flutters its fins, thumps its tail, and dozes off when idle; clicking wakes a dozing whale and pops a heart. The first agent turn freezes it to the static standard frame.',
|
|
1308
|
+
hintDescriptions: { zh: '欢迎期闲置行为:开屏后鲸鱼娘摆鱼鳍、偶尔拍尾巴,空闲会睡着冒 Z;点击唤醒睡着的鲸鱼娘并冒爱心。开始第一个任务后定格为静态标准帧。' },
|
|
1309
|
+
kind: 'boolean',
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
path: ['minimal'],
|
|
1313
|
+
label: 'Minimal mode',
|
|
1314
|
+
descriptions: { zh: '极简模式' },
|
|
1315
|
+
hint: 'Hide the header splash, emoji glyphs, and decorative colors; code highlight and tool colors stay. Trims the status bar to model + cwd.',
|
|
1316
|
+
hintDescriptions: { zh: '隐藏开屏头部、emoji 状态符与装饰性配色;代码高亮与工具配色保留,底栏只留模型与目录。' },
|
|
1317
|
+
kind: 'boolean',
|
|
1318
|
+
},
|
|
1319
|
+
],
|
|
1320
|
+
});
|
|
1321
|
+
ctx.effect(() => unregister);
|
|
1322
|
+
}
|
|
1323
|
+
// DSH approval seam: the permission layer asks ApprovalService.request(),
|
|
1324
|
+
// which dispatches an `approval/request` waterfall. With no answerer the
|
|
1325
|
+
// chain falls through to the fail-closed 'unavailable', so register this
|
|
1326
|
+
// TUI as the interactive answerer for the agent it owns; requests for
|
|
1327
|
+
// other agents delegate down the chain (next()). Guarded on the service
|
|
1328
|
+
// being mounted — a bare composition without the dsh-base approval row
|
|
1329
|
+
// has nothing to answer into. channel.agentId tracks agent swaps
|
|
1330
|
+
// (/new, /resume, rewind), so ownership is re-evaluated per request.
|
|
1331
|
+
const approvalStore = new ApprovalStore(adapterRuntimeFor(ctx));
|
|
1332
|
+
bindApprovalStore(ctx, approvalStore);
|
|
1333
|
+
if (ctx.get('approval') !== undefined) {
|
|
1334
|
+
ctx.on('approval/request', (req, next) => approvalStore.park(req).catch(() => next()));
|
|
1335
|
+
// Badge-flip push (P-4): React does not know the session log appended —
|
|
1336
|
+
// a source-badge verdict that only flips inside getSnapshot() surfaces
|
|
1337
|
+
// solely when something else re-renders. Feed the session firehose to
|
|
1338
|
+
// the store: it reacts only to tool/result (the sole verdict-flipping
|
|
1339
|
+
// event type), and its internal log-length memo skips appends from any
|
|
1340
|
+
// session other than the active ask's, so no agent filtering is needed
|
|
1341
|
+
// here. The firehose fires post-commit, after the event entered
|
|
1342
|
+
// session.events, so the recheck sees the settled result.
|
|
1343
|
+
ctx.on('session/event', (session, event) => approvalStore.noteSessionEvent(session.id, event));
|
|
1344
|
+
ctx.effect(() => () => approvalStore.settleAll('cancelled'));
|
|
1345
|
+
}
|
|
1346
|
+
// The agent view reads parked ask ids for its "needs input" state.
|
|
1347
|
+
rawChannel.bindApprovalStore(approvalStore);
|
|
1348
|
+
const herdr = attachHerdrIntegration({
|
|
1349
|
+
channel,
|
|
1350
|
+
questions: questionStore,
|
|
1351
|
+
approvals: approvalStore,
|
|
1352
|
+
});
|
|
1353
|
+
if (herdr !== undefined) {
|
|
1354
|
+
ctx.effect(() => () => herdr.dispose());
|
|
1355
|
+
}
|
|
1356
|
+
// Positional command-line arguments are the initial prompt (issue #53):
|
|
1357
|
+
// `dsh-tui "run the tests"` forwards positionals through the dsh CLI,
|
|
1358
|
+
// which mounts them as ctx.cmdlineArgs. The service shape drifted across
|
|
1359
|
+
// dsh-cmdline builds — `{ get() }` is the current contract, older builds
|
|
1360
|
+
// exposed `{ args }` — so read both. Submit once the channel exists;
|
|
1361
|
+
// delivery goes through the normal pending/inbox chain, so no special
|
|
1362
|
+
// timing is needed; flag-shaped leftovers are not prompt text.
|
|
1363
|
+
const cmdline = ctx.cmdlineArgs;
|
|
1364
|
+
const cmdlineArgs = cmdline?.get?.() ?? cmdline?.args;
|
|
1365
|
+
const initialPrompt = initialPromptFromCmdlineArgs(cmdlineArgs);
|
|
1366
|
+
if (initialPrompt)
|
|
1367
|
+
submitChannel(initialPrompt);
|
|
1368
|
+
// Attach the stderr reporter to the live channel and flush anything a
|
|
1369
|
+
// startup-spawned server produced while the channel didn't exist yet.
|
|
1370
|
+
notifyStderr = (text, options) => notifyChannel(text, options);
|
|
1371
|
+
// The question-seat alert was raised before the channel existed; flush it
|
|
1372
|
+
// now so it lands as an in-UI notice, not only in the log file.
|
|
1373
|
+
if (questionSeatNotice !== undefined) {
|
|
1374
|
+
notifyChannel(questionSeatNotice, { color: 'error' });
|
|
1375
|
+
questionSeatNotice = undefined;
|
|
1376
|
+
}
|
|
1377
|
+
for (const [text, options] of stderrBacklog.splice(0)) {
|
|
1378
|
+
notifyStderr(text, options);
|
|
1379
|
+
}
|
|
1380
|
+
// Single exit funnel: `/exit` and double Ctrl+C land here, and so does
|
|
1381
|
+
// the unmount triggered by a cordis context teardown — but the two must
|
|
1382
|
+
// not share a fate (issue #12). The DSH launcher's boot-time recompose
|
|
1383
|
+
// disposes every entry once; treating that teardown as a user exit killed
|
|
1384
|
+
// the process before the recomposed tree could re-mount the TUI (the
|
|
1385
|
+
// "flash back to bash with no error" symptom). Teardown only unmounts the
|
|
1386
|
+
// UI; user exit runs the full leave sequence: unmount() restores the
|
|
1387
|
+
// terminal (cursor, raw mode, mouse tracking) and the explicit newlines
|
|
1388
|
+
// keep the shell prompt from overlapping the TUI's last line.
|
|
1389
|
+
let instance;
|
|
1390
|
+
let exited = false;
|
|
1391
|
+
let updateRequested = false;
|
|
1392
|
+
let updateTargetVersion;
|
|
1393
|
+
// `/restart` flag: same exit funnel as `/update` minus the pnpm step —
|
|
1394
|
+
// write the resume target, restore the terminal, respawn the process with
|
|
1395
|
+
// the original argv, and let the fresh boot attach the same session.
|
|
1396
|
+
let restartRequested = false;
|
|
1397
|
+
// The profile this process was booted with (`dsh --profile <name>`); dsh
|
|
1398
|
+
// exposes it nowhere else, and /update must update the installation the
|
|
1399
|
+
// user is actually running, not a hard-coded one.
|
|
1400
|
+
const profile = resolveDshProfileName();
|
|
1401
|
+
// Single exit funnel: `/exit` and double Ctrl+C land here, and so does
|
|
1402
|
+
// the unmount triggered by a cordis context teardown — but the two must
|
|
1403
|
+
// not share a fate (issue #12). Teardown only unmounts the UI; user exit
|
|
1404
|
+
// runs the full leave sequence below (resume marker, terminal restore,
|
|
1405
|
+
// update handoff or resume hint).
|
|
1406
|
+
const funnel = createExitFunnel({
|
|
1407
|
+
onUserExit: error => {
|
|
1408
|
+
// Mirror the funnel's internal exited flag for the /update and
|
|
1409
|
+
// background-check guards that still read the outer one.
|
|
1410
|
+
exited = true;
|
|
1411
|
+
if (error !== undefined) {
|
|
1412
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1413
|
+
ctx.logger.error(`dsh-tui: exit after error: ${message}`);
|
|
1414
|
+
void finishExit(ctx, instance, bootedFullscreen, undefined, `dsh-tui crashed: ${message}`, () => disposeRootAndExit(ctx, 1));
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1417
|
+
if (updateRequested) {
|
|
1418
|
+
try {
|
|
1419
|
+
writeResumeTarget(channel.agentId);
|
|
1420
|
+
}
|
|
1421
|
+
catch {
|
|
1422
|
+
// Resume persistence is best effort and must never block an update.
|
|
1423
|
+
}
|
|
1424
|
+
const hintText = isStandaloneRuntime()
|
|
1425
|
+
? t('update-standalone-starting')
|
|
1426
|
+
: t('update-starting');
|
|
1427
|
+
void finishExit(ctx, instance, bootedFullscreen, hintText, undefined, () => runUpdate(ctx, profile, channel.agentId, updateTargetVersion));
|
|
1428
|
+
return;
|
|
1429
|
+
}
|
|
1430
|
+
// `/restart`: same handoff as the update path, no installation step.
|
|
1431
|
+
// The resume target is written unconditionally — the user asked to
|
|
1432
|
+
// restart THIS session, blank or not (mirrors the update contract).
|
|
1433
|
+
if (restartRequested) {
|
|
1434
|
+
beginRestartAttempt(channel.agentId);
|
|
1435
|
+
logRestartEvent('funnel: /restart branch entered');
|
|
1436
|
+
try {
|
|
1437
|
+
writeResumeTarget(channel.agentId);
|
|
1438
|
+
logRestartEvent('funnel: resume target written');
|
|
1439
|
+
}
|
|
1440
|
+
catch (error) {
|
|
1441
|
+
// Resume persistence is best effort and must never block a restart.
|
|
1442
|
+
logRestartEvent('funnel: resume target write failed', {
|
|
1443
|
+
message: error instanceof Error ? error.message : String(error),
|
|
1444
|
+
});
|
|
1445
|
+
}
|
|
1446
|
+
void finishExit(ctx, instance, bootedFullscreen, t('restart-starting'), undefined, () => runRestart(ctx, profile, channel.agentId));
|
|
1447
|
+
return;
|
|
1448
|
+
}
|
|
1449
|
+
// Judge against the live session behind the channel (channel.agentId),
|
|
1450
|
+
// not the boot-time agent captured above: /resume, /new and /model swap
|
|
1451
|
+
// the active agent, so the captured reference can go stale (see
|
|
1452
|
+
// isExitResumable).
|
|
1453
|
+
const resumable = isExitResumable({
|
|
1454
|
+
pendingCount: channel.pending.length,
|
|
1455
|
+
liveAgent: ctx.agents.get(SessionId(channel.agentId)),
|
|
1456
|
+
startupAgent: agent,
|
|
1457
|
+
});
|
|
1458
|
+
try {
|
|
1459
|
+
if (resumable)
|
|
1460
|
+
writeResumeTarget(channel.agentId);
|
|
1461
|
+
else
|
|
1462
|
+
clearResumeTarget();
|
|
1463
|
+
}
|
|
1464
|
+
catch {
|
|
1465
|
+
// Resume persistence is best effort and must never block shutdown.
|
|
1466
|
+
}
|
|
1467
|
+
const hint = resumable
|
|
1468
|
+
? `Resume with the command below:\n${resumeCommand(profile, channel.agentId)}`
|
|
1469
|
+
: undefined;
|
|
1470
|
+
void finishExit(ctx, instance, bootedFullscreen, hint, undefined, () => disposeRootAndExit(ctx, 0));
|
|
1471
|
+
},
|
|
1472
|
+
});
|
|
1473
|
+
const handleExit = funnel.handleExit;
|
|
1474
|
+
// External injection controller: Chat fills it with `{ append, submit }`
|
|
1475
|
+
// every render; the injection socket (opened below) drives it. A ref rather
|
|
1476
|
+
// than a prop callback so the socket handler always reaches the live Chat.
|
|
1477
|
+
const injectControllerRef = React.createRef();
|
|
1478
|
+
// Chat's `fullscreen` prop must match the root wrap below, or the
|
|
1479
|
+
// full-screen surfaces inside Chat (session browser, settings, trajectory,
|
|
1480
|
+
// subagent pages) would nest a SECOND <AlternateScreen> — whose unmount
|
|
1481
|
+
// writes DEC 1049 exit and drops the whole app back to the main screen
|
|
1482
|
+
// (the stable /resume→Esc "exited fullscreen" repro). The prop is captured
|
|
1483
|
+
// when the element is created, so wait for the settings first-application
|
|
1484
|
+
// BEFORE creating Chat: the element must see the same bootedFullscreen the
|
|
1485
|
+
// root tree resolves after settingsReady below.
|
|
1486
|
+
await settingsReady;
|
|
1487
|
+
/**
|
|
1488
|
+
* One-shot workspace-home landing.
|
|
1489
|
+
*
|
|
1490
|
+
* Only an ORDINARY launch is eligible: an explicit resume (`--resume` /
|
|
1491
|
+
* `-c` / the launcher's remembered target), an explicit workspace target, and
|
|
1492
|
+
* a first prompt all mean the user already said where they want to be, and
|
|
1493
|
+
* covering that with a browser would be the TUI second-guessing them. The
|
|
1494
|
+
* `seen` marker is written when the screen is dismissed (see `closeHome`),
|
|
1495
|
+
* so a process that dies before the first frame does not consume it.
|
|
1496
|
+
*/
|
|
1497
|
+
const homeSeen = readHomePrefs().seen === true;
|
|
1498
|
+
const openHomeOnBoot = !homeSeen
|
|
1499
|
+
&& launchSessionId === undefined
|
|
1500
|
+
&& requestedWorkspace === undefined
|
|
1501
|
+
&& initialPromptFromCmdlineArgs(process.argv.slice(2)) === '';
|
|
1502
|
+
const chat = React.createElement(Chat, {
|
|
1503
|
+
channel,
|
|
1504
|
+
renderScene: createChannelSceneOutlet(() => rawChannel.pluginScene),
|
|
1505
|
+
questionStore,
|
|
1506
|
+
approvalStore,
|
|
1507
|
+
injectControllerRef,
|
|
1508
|
+
openHomeOnBoot,
|
|
1509
|
+
// The dsh-tui-extensions row's services (managed dialogs, status line,
|
|
1510
|
+
// shortcuts). Soft-consumed: absent the row (stale patch, bare embed),
|
|
1511
|
+
// Chat falls back to inert stores and no shortcut registry.
|
|
1512
|
+
extensionDialogs: getHostDialogStore(ctx.get('tuiDialogs')),
|
|
1513
|
+
extensionStatus: getHostStatusStore(ctx.get('tuiStatus')),
|
|
1514
|
+
// The working line's semantics belong to the dsh-working-activity plugin's
|
|
1515
|
+
// session projection; this store is the read side of that seam, so the TUI
|
|
1516
|
+
// no longer runs a second activity tracker of its own.
|
|
1517
|
+
activityStore,
|
|
1518
|
+
extensionShortcuts: getHostShortcuts(ctx.get('tuiShortcuts')),
|
|
1519
|
+
themeHost,
|
|
1520
|
+
// Full-screen surfaces inside Chat — the trajectory scene and the session
|
|
1521
|
+
// browser — enter the alt screen themselves in inline mode; in fullscreen
|
|
1522
|
+
// the tree is already wrapped below, so they must not nest.
|
|
1523
|
+
fullscreen: bootedFullscreen,
|
|
1524
|
+
onExit: () => handleExit(),
|
|
1525
|
+
// `/restart`: respawn this process and resume the session, no update.
|
|
1526
|
+
onRestart: () => {
|
|
1527
|
+
if (exited || restartRequested)
|
|
1528
|
+
return;
|
|
1529
|
+
restartRequested = true;
|
|
1530
|
+
logRestartEvent('command: /restart accepted');
|
|
1531
|
+
notifyChannel(t('restart-starting'));
|
|
1532
|
+
handleExit();
|
|
1533
|
+
},
|
|
1534
|
+
// Only a `dsh --profile <name>` launch has a profile installation for
|
|
1535
|
+
// `/update` to act on; source checkouts and `--config` overlays get the
|
|
1536
|
+
// unavailable notice instead.
|
|
1537
|
+
onUpdate: profile === undefined ? undefined : () => {
|
|
1538
|
+
if (exited || updateRequested)
|
|
1539
|
+
return;
|
|
1540
|
+
// Confirm the target version before tearing the TUI down: on an
|
|
1541
|
+
// already-latest install, an unconditional update+restart would churn
|
|
1542
|
+
// the process and then trip the "version did not advance" warning.
|
|
1543
|
+
void resolveTuiUpdateTarget().then((target) => {
|
|
1544
|
+
if (exited || updateRequested)
|
|
1545
|
+
return;
|
|
1546
|
+
if (target.kind === 'latest') {
|
|
1547
|
+
notifyChannel(t('update-already-latest', { current: target.current }), { color: 'warning' });
|
|
1548
|
+
return;
|
|
1549
|
+
}
|
|
1550
|
+
if (target.kind === 'unknown') {
|
|
1551
|
+
notifyChannel(t('update-check-failed'));
|
|
1552
|
+
}
|
|
1553
|
+
else {
|
|
1554
|
+
// 0.7.0/0.7.1 hard-inject tuiWorkspaces at the code level; under
|
|
1555
|
+
// an older global launcher patch (no service row) that is a
|
|
1556
|
+
// permanent boot deadlock (issues #183/#307, the exact report
|
|
1557
|
+
// "pending (waiting for service: tuiWorkspaces)"). A stale mirror
|
|
1558
|
+
// pinning /update onto that range must be refused, not installed.
|
|
1559
|
+
if (isBootDeadlockTarget(target.latest)) {
|
|
1560
|
+
notifyChannel(t('update-refused-deadlock', {
|
|
1561
|
+
latest: target.latest,
|
|
1562
|
+
authoritative: target.authoritative ?? target.latest,
|
|
1563
|
+
}), { color: 'warning' });
|
|
1564
|
+
return;
|
|
1565
|
+
}
|
|
1566
|
+
if (target.authoritative !== undefined) {
|
|
1567
|
+
notifyChannel(t('update-mirror-lag', { latest: target.latest, authoritative: target.authoritative }));
|
|
1568
|
+
}
|
|
1569
|
+
updateTargetVersion = target.latest;
|
|
1570
|
+
}
|
|
1571
|
+
if (isStandaloneRuntime()) {
|
|
1572
|
+
notifyChannel(t('update-standalone-starting'));
|
|
1573
|
+
}
|
|
1574
|
+
else {
|
|
1575
|
+
notifyChannel(t('update-starting'));
|
|
1576
|
+
}
|
|
1577
|
+
updateRequested = true;
|
|
1578
|
+
handleExit();
|
|
1579
|
+
});
|
|
1580
|
+
},
|
|
1581
|
+
});
|
|
1582
|
+
// Freeze the fullscreen decision only NOW, right before the tree mounts:
|
|
1583
|
+
// Chat above was created after the same settingsReady await, so the root
|
|
1584
|
+
// wrap and the `fullscreen` prop share one value; a mid-session /settings
|
|
1585
|
+
// edit from here on is persisted for the next boot (the watch notifies),
|
|
1586
|
+
// never applied live (swapping layouts requires re-mounting the tree).
|
|
1587
|
+
// Host recompose hardening: never regress a fullscreen session to inline
|
|
1588
|
+
// on a re-mount whose settings application arrived late (see the module
|
|
1589
|
+
// latch note). A fresh process still resolves from config + settings
|
|
1590
|
+
// normally — the latch is undefined there.
|
|
1591
|
+
if (bootedFullscreen === false && lastBootedFullscreen === true) {
|
|
1592
|
+
bootedFullscreen = true;
|
|
1593
|
+
}
|
|
1594
|
+
rendererSettingsFrozen = true;
|
|
1595
|
+
// fullscreen: wrap the tree in <AlternateScreen> (DEC 1049 + SGR mouse
|
|
1596
|
+
// tracking), which turns on in-app text selection (copy-on-select via
|
|
1597
|
+
// useCopyOnSelect), wheel scroll, and click/hover hit-testing. Inline
|
|
1598
|
+
// mode leaves the mouse to the terminal emulator's native selection.
|
|
1599
|
+
// PageMargin keeps the whole UI inset from the terminal edges (some
|
|
1600
|
+
// terminals — bare WSL/tmux/SSH — have no own padding, so text touches
|
|
1601
|
+
// the screen border). It must sit INSIDE AlternateScreen: the alt-screen
|
|
1602
|
+
// box sizes itself to the real terminal rows, while PageMargin reports
|
|
1603
|
+
// content-box dimensions to everything below it.
|
|
1604
|
+
const marginChildren = bootedFullscreen
|
|
1605
|
+
? React.createElement(AlternateScreen, null, React.createElement(PageMargin, null, chat))
|
|
1606
|
+
: React.createElement(PageMargin, null, chat);
|
|
1607
|
+
const tree = React.createElement(ThemeProvider, {
|
|
1608
|
+
themeHost,
|
|
1609
|
+
children: marginChildren,
|
|
1610
|
+
});
|
|
1611
|
+
instance = await render(tree, { exitOnCtrlC: false, terminalImages: bootedTerminalImages });
|
|
1612
|
+
const isRecompose = lastBootedFullscreen !== undefined;
|
|
1613
|
+
lastBootedFullscreen = bootedFullscreen;
|
|
1614
|
+
lastBootedTerminalImages = bootedTerminalImages;
|
|
1615
|
+
logMouseDebug('apply mount', { bootedFullscreen, isRecompose });
|
|
1616
|
+
// /restart handoff diagnosis: the replacement got all the way to a mounted
|
|
1617
|
+
// UI, so any later death is post-boot (and its stderr keeps flowing to the
|
|
1618
|
+
// parent only within the survival window — this line is the durable mark).
|
|
1619
|
+
if (process.env.DSH_TUI_RESTART_CHILD === '1') {
|
|
1620
|
+
logRestartEvent('boot: UI mounted', { fullscreen: bootedFullscreen, isRecompose });
|
|
1621
|
+
}
|
|
1622
|
+
// External injection channel (dsh.nvim etc.): expose a per-session local
|
|
1623
|
+
// socket that appends text into the prompt input and submits it. Optional
|
|
1624
|
+
// integration — a bind failure degrades to "no channel" and never fails the
|
|
1625
|
+
// session. Closed on teardown so the socket and discovery record do not leak.
|
|
1626
|
+
const injectChannel = openInjectChannel(agent.session.id, channel.cwd, {
|
|
1627
|
+
append: (text) => injectControllerRef.current?.append(text),
|
|
1628
|
+
submit: () => injectControllerRef.current?.submit(),
|
|
1629
|
+
}, (message) => ctx.logger.warn(`dsh-tui: ${message}`));
|
|
1630
|
+
if (injectChannel) {
|
|
1631
|
+
ctx.effect(() => () => injectChannel.close());
|
|
1632
|
+
}
|
|
1633
|
+
// Cross-process session mounting: publish the sessions this process has
|
|
1634
|
+
// mounted so another TUI (a different terminal process on the same machine)
|
|
1635
|
+
// can see them as occupied and refuse to mount the same log. Two processes
|
|
1636
|
+
// driving one session would interleave writes into a single append-only
|
|
1637
|
+
// transcript, so this is the guard that makes multi-process TUI use safe.
|
|
1638
|
+
// Registered on the same teardown funnel as everything else: the disposer
|
|
1639
|
+
// stops the heartbeat and removes the claim, so a clean exit frees its
|
|
1640
|
+
// sessions at once while a killed process is reclaimed by liveness.
|
|
1641
|
+
ctx.effect(() => startSessionMountHeartbeat(ctx));
|
|
1642
|
+
// Check in the background so registry latency never delays the first frame.
|
|
1643
|
+
// A failed/offline check is intentionally silent; the manual `/update`
|
|
1644
|
+
// command remains available regardless of network access.
|
|
1645
|
+
void checkForTuiUpdate().then((update) => {
|
|
1646
|
+
if (update === undefined || exited || updateRequested)
|
|
1647
|
+
return;
|
|
1648
|
+
const key = update.isStandalone ? 'update-standalone-available' : 'update-available';
|
|
1649
|
+
// A standalone release without a SHA256SUMS asset (published before the
|
|
1650
|
+
// checksum workflow landed) still updates, but the notice must say the
|
|
1651
|
+
// package's integrity cannot be verified — silent degradation is exactly
|
|
1652
|
+
// how the unverified-download window went unnoticed.
|
|
1653
|
+
const suffix = update.isStandalone && update.checksumUrl === undefined
|
|
1654
|
+
? ` ${t('update-standalone-no-checksum')}`
|
|
1655
|
+
: '';
|
|
1656
|
+
notifyChannel(`${t(key, { current: update.current, latest: update.latest })}${suffix}`, { color: 'warning', timeoutMs: 12000 });
|
|
1657
|
+
});
|
|
1658
|
+
// If the surrounding tree goes down (reload, teardown), unmount the UI —
|
|
1659
|
+
// but flag it as teardown first so the settling waitUntilExit does not
|
|
1660
|
+
// run the user-exit sequence: no resume marker, no disposeRootAndExit,
|
|
1661
|
+
// the process stays alive and the recomposed tree re-mounts the TUI.
|
|
1662
|
+
// Hand back what the channel contributed to host registries on the way out:
|
|
1663
|
+
// the command registry scopes a registration to ITS own context, so the
|
|
1664
|
+
// skill commands (issue #86) would survive this exact recompose and the
|
|
1665
|
+
// re-mounted channel would find the names taken, freezing its menu.
|
|
1666
|
+
ctx.effect(() => () => {
|
|
1667
|
+
logMouseDebug('apply teardown');
|
|
1668
|
+
funnel.markTeardown();
|
|
1669
|
+
rawChannel.releaseContributions();
|
|
1670
|
+
instance?.unmount();
|
|
1671
|
+
});
|
|
1672
|
+
// The TUI is the front door: when the user unmounts it (Ctrl+C), dispose
|
|
1673
|
+
// the app tree and exit the process. The rejection handler covers
|
|
1674
|
+
// error-driven unmounts — without it a rejected exitPromise became an
|
|
1675
|
+
// unhandled rejection instead of a clean exit. A teardown-driven settle
|
|
1676
|
+
// is swallowed by the funnel (issue #12).
|
|
1677
|
+
void instance.waitUntilExit().then(handleExit, handleExit);
|
|
1678
|
+
}
|
|
1679
|
+
/**
|
|
1680
|
+
* Attach to an existing agent, resume a persisted session (`dsh-tui --resume`
|
|
1681
|
+
* feeds the id through `config.sessionId`), or create a fresh one. Resume
|
|
1682
|
+
* goes through the DSH persistence seam (`ctx.agents.resume` reads the
|
|
1683
|
+
* session log written by dsh-session-persistence-jsonl); a missing artifact
|
|
1684
|
+
* or unmounted backend falls back to a fresh session, as does a plain boot
|
|
1685
|
+
* without a session id.
|
|
1686
|
+
*
|
|
1687
|
+
* Preset composition (issue #8): a create resolves the requested preset
|
|
1688
|
+
* (cordis.yml `preset` over the persisted `/preset` choice over the roster
|
|
1689
|
+
* default) and mounts it in the factory's setup hook; a resume re-mounts the
|
|
1690
|
+
* preset the session's own log records. Without the roster both paths behave
|
|
1691
|
+
* as before presets existed.
|
|
1692
|
+
*
|
|
1693
|
+
* Model route (issues #14/#30/#67): a create adopts the caller's atomically
|
|
1694
|
+
* resolved route (validated against the adapter catalog below); a resume
|
|
1695
|
+
* passes only a COMPLETE cordis.yml route through — a provider-only pin must
|
|
1696
|
+
* not half-override the route the target session's own records carry.
|
|
1697
|
+
*/
|
|
1698
|
+
async function resolveAgent(ctx, requestedSessionId, configuredRoute, startupRoute, meta, configuredPreset) {
|
|
1699
|
+
// Resume override (issue #67): cordis.yml overrides the target session's
|
|
1700
|
+
// recorded route only when it pins BOTH halves; undefined halves let the
|
|
1701
|
+
// session's own request/header records win (issue #30). The recorded route
|
|
1702
|
+
// is ALSO fed back into agentOptions (not just the status line): a resume
|
|
1703
|
+
// whose cordis.yml pins only `provider` would otherwise leave
|
|
1704
|
+
// agentOptions.model undefined, which breaks the `{{model}}` persona
|
|
1705
|
+
// variable for the resumed agent's own assembly and for every subagent it
|
|
1706
|
+
// spawns (dsh-subagent inherits `parent.options.model`).
|
|
1707
|
+
const resumeRoute = explicitModelRoute(configuredRoute);
|
|
1708
|
+
if (requestedSessionId !== undefined) {
|
|
1709
|
+
const resumeId = SessionId(requestedSessionId);
|
|
1710
|
+
const existing = ctx.agents.get(resumeId);
|
|
1711
|
+
if (existing !== undefined) {
|
|
1712
|
+
return { agent: existing, agentPreset: runningPresetOf(existing.session) };
|
|
1713
|
+
}
|
|
1714
|
+
// The launch-time counterpart of the in-session `/resume` claim
|
|
1715
|
+
// (`channel/session-resume.ts`), and it has to happen before ANY await:
|
|
1716
|
+
// without it `dsh-tui --resume <id>` mounts the log purely because the user
|
|
1717
|
+
// asked for it, so a second terminal doing the same joins the first and
|
|
1718
|
+
// both interleave writes into one append-only transcript. The mount
|
|
1719
|
+
// publisher cannot cover this — it publishes the set, it never refuses a
|
|
1720
|
+
// mount — so the claim is the only place the refusal can come from.
|
|
1721
|
+
//
|
|
1722
|
+
// Every failure refuses. "The ledger was busy" and "the ledger could not be
|
|
1723
|
+
// read" are not evidence that the session is free, and a boot that guesses
|
|
1724
|
+
// the wrong way here interleaves two writers into one append-only log —
|
|
1725
|
+
// the one outcome nothing downstream can repair. A genuinely read-only home
|
|
1726
|
+
// therefore costs a `--resume` refusal, which is loud and fixable, instead
|
|
1727
|
+
// of silent corruption.
|
|
1728
|
+
const reserved = await reserveMount(requestedSessionId);
|
|
1729
|
+
if (!reserved.ok) {
|
|
1730
|
+
if (reserved.reason === 'occupied') {
|
|
1731
|
+
throw new Error(`dsh-tui: cannot resume session "${requestedSessionId}": it is mounted by another TUI terminal ` +
|
|
1732
|
+
`(pid ${reserved.holders[0] ?? 0}) — two processes driving one session log would corrupt it. ` +
|
|
1733
|
+
'Close that terminal, or drop --resume to start a fresh session.');
|
|
1734
|
+
}
|
|
1735
|
+
if (reserved.reason === 'busy') {
|
|
1736
|
+
throw new Error(`dsh-tui: cannot resume session "${requestedSessionId}": another process is holding the ` +
|
|
1737
|
+
'session mount ledger right now, so its occupancy could not be checked. Retry in a moment.');
|
|
1738
|
+
}
|
|
1739
|
+
throw new Error(`dsh-tui: cannot resume session "${requestedSessionId}": its occupancy could not be verified ` +
|
|
1740
|
+
`(${reserved.detail}). Refusing rather than risk two processes writing one session log. ` +
|
|
1741
|
+
'If that file is damaged, remove it (and the matching .lock) while no other TUI is running, ' +
|
|
1742
|
+
'or drop --resume to start a fresh session.');
|
|
1743
|
+
}
|
|
1744
|
+
// The reservation spans the awaits below: the agent only appears in the
|
|
1745
|
+
// registry once `agents.resume` returns, and a publisher beat landing in
|
|
1746
|
+
// between would otherwise drop the claim this boot just committed.
|
|
1747
|
+
const reservation = reserved.reservation;
|
|
1748
|
+
try {
|
|
1749
|
+
// Compat boundary: register vouched-for legacy event types before the
|
|
1750
|
+
// strict read path (issue #153) — same seam as the /resume picker,
|
|
1751
|
+
// here for the launch-time --resume flow. In-process only.
|
|
1752
|
+
ensureLegacySessionEventTypes();
|
|
1753
|
+
// The resumed session keeps the preset its log records (last
|
|
1754
|
+
// `agent-preset/selected` wins over the creation header), never the
|
|
1755
|
+
// caller's current preference.
|
|
1756
|
+
const persisted = await resolvePersistedPreset(ctx, resumeId);
|
|
1757
|
+
const composed = await composePreset(ctx, persisted);
|
|
1758
|
+
const recorded = await resolvePersistedRoute(ctx, resumeId);
|
|
1759
|
+
const resumeOptions = {
|
|
1760
|
+
provider: resumeRoute?.provider ?? recorded?.provider,
|
|
1761
|
+
model: resumeRoute?.model ?? recorded?.model,
|
|
1762
|
+
};
|
|
1763
|
+
const resumed = await ctx.agents.resume({
|
|
1764
|
+
resumeSessionId: resumeId,
|
|
1765
|
+
agentOptions: resumeOptions,
|
|
1766
|
+
...(composed.setup === undefined ? {} : { setup: composed.setup }),
|
|
1767
|
+
});
|
|
1768
|
+
// Status-line route on resume: the route the session actually
|
|
1769
|
+
// continues on — a complete cordis.yml pin, else the route its own
|
|
1770
|
+
// request/header records carry (a bare log yields undefined and the
|
|
1771
|
+
// caller falls back to the startup resolution, best effort).
|
|
1772
|
+
return {
|
|
1773
|
+
agent: resumed.agent,
|
|
1774
|
+
handle: resumed,
|
|
1775
|
+
agentPreset: composed.agentPreset,
|
|
1776
|
+
route: resumeRoute ?? recordedModelRoute(snapshotLiveSessionEvents(resumed.agent.session)),
|
|
1777
|
+
};
|
|
1778
|
+
}
|
|
1779
|
+
catch (error) {
|
|
1780
|
+
// A claim says "this process is driving the log". A resume that never
|
|
1781
|
+
// mounted must not leave one behind for a peer to see and refuse.
|
|
1782
|
+
reservation.abandon();
|
|
1783
|
+
// A launch-time --resume is an explicit request: silently substituting a
|
|
1784
|
+
// fresh session presents a cold conversation as the resumed one (the
|
|
1785
|
+
// "resume did nothing" failure mode — the warn below never reached a
|
|
1786
|
+
// terminal). Fail the boot loudly instead; the loader surfaces this to
|
|
1787
|
+
// stderr. The in-session /resume picker has its own error path.
|
|
1788
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
1789
|
+
throw new Error(`dsh-tui: cannot resume session "${requestedSessionId}": ${reason} — ` +
|
|
1790
|
+
'the stored log is unreadable or corrupt; no fresh session was started instead. ' +
|
|
1791
|
+
'Drop --resume to start fresh, or repair the session log first.', { cause: error });
|
|
1792
|
+
}
|
|
1793
|
+
finally {
|
|
1794
|
+
// The reservation only has to outlive the mount. From here the agent is
|
|
1795
|
+
// in the registry, which is what the publisher derives the set from.
|
|
1796
|
+
reservation.settle();
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
const sessionId = SessionId(randomUUID());
|
|
1800
|
+
const presetPref = configuredPreset === undefined ? readPresetPref() : undefined;
|
|
1801
|
+
const composed = await composePreset(ctx, configuredPreset ?? presetPref);
|
|
1802
|
+
if (!migratePresetPref(presetPref, composed.agentPreset)) {
|
|
1803
|
+
ctx.logger.warn(`dsh-tui: resolved preset preference "${presetPref}" as "${composed.agentPreset}" but could not persist the migrated id`);
|
|
1804
|
+
}
|
|
1805
|
+
// Fresh-session route precedence (issues #14/#30/#67): resolved atomically
|
|
1806
|
+
// by the caller (complete cordis.yml route > the persisted `/model` choice
|
|
1807
|
+
// > the harness default), then validated against the adapter catalog — a
|
|
1808
|
+
// stale persisted choice falls back to the default route wholesale instead
|
|
1809
|
+
// of reaching the server as an unknown model name.
|
|
1810
|
+
const llm = ctx.get('llm');
|
|
1811
|
+
const { route, rejected } = await validateModelRoute(llm, startupRoute);
|
|
1812
|
+
if (rejected !== undefined) {
|
|
1813
|
+
ctx.logger.warn(`dsh-tui: model route ${rejected.provider}/${rejected.model} is not advertised by provider "${rejected.provider}"; falling back to ${route.provider}/${route.model}`);
|
|
1814
|
+
}
|
|
1815
|
+
// Reserve the fresh id before the factory, exactly like the in-session
|
|
1816
|
+
// creates: from the moment `agents.create` returns this process holds the
|
|
1817
|
+
// only write handle on a log the publisher has not named yet. A brand-new id
|
|
1818
|
+
// cannot conflict, so a refusal is only warned about — it costs
|
|
1819
|
+
// announcement, not correctness — but the reservation is what keeps the gap
|
|
1820
|
+
// between the create and the next beat from being open.
|
|
1821
|
+
const bootReserved = await reserveMount(String(sessionId));
|
|
1822
|
+
if (!bootReserved.ok && bootReserved.reason !== 'occupied') {
|
|
1823
|
+
ctx.logger.warn(`dsh-tui: could not announce the new session in the mount ledger: ${bootReserved.reason}`);
|
|
1824
|
+
}
|
|
1825
|
+
const bootReservation = bootReserved.ok ? bootReserved.reservation : undefined;
|
|
1826
|
+
let created;
|
|
1827
|
+
try {
|
|
1828
|
+
created = await ctx.agents.create({
|
|
1829
|
+
sessionId,
|
|
1830
|
+
meta: {
|
|
1831
|
+
...meta,
|
|
1832
|
+
// Durable header value: a later resume re-mounts exactly this preset.
|
|
1833
|
+
...(composed.agentPreset === undefined ? {} : { agentPreset: composed.agentPreset }),
|
|
1834
|
+
},
|
|
1835
|
+
agentOptions: route,
|
|
1836
|
+
...(composed.setup === undefined ? {} : { setup: composed.setup }),
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
catch (error) {
|
|
1840
|
+
bootReservation?.abandon();
|
|
1841
|
+
// Fail loud with the reason on stderr — a dead TUI with no message is
|
|
1842
|
+
// the worst outcome for a misconfigured leaf (unknown provider/model).
|
|
1843
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1844
|
+
throw new Error(`dsh-tui: failed to create agent (provider=${route.provider}, model=${route.model}): ${message}`, { cause: error });
|
|
1845
|
+
}
|
|
1846
|
+
bootReservation?.settle();
|
|
1847
|
+
return { agent: created.agent, handle: created, agentPreset: composed.agentPreset, route };
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* Distinguish a user-driven exit from a cordis context teardown (issue #12).
|
|
1851
|
+
*
|
|
1852
|
+
* Both paths settle the Ink instance's exit promise, but only a user exit
|
|
1853
|
+
* (`/exit`, double Ctrl+C, render crash) may leave the process. A teardown —
|
|
1854
|
+
* the DSH launcher's boot-time recompose disposes every entry once — must
|
|
1855
|
+
* only unmount the UI: the recomposed tree re-runs `apply` and mounts a
|
|
1856
|
+
* fresh instance, so exiting here would kill the process mid-recompose
|
|
1857
|
+
* (the "flash back to bash with no error" symptom).
|
|
1858
|
+
*
|
|
1859
|
+
* `markTeardown` must run before the unmount that settles the exit promise
|
|
1860
|
+
* (the settle reaches `handleExit` through a microtask, so a same-tick flag
|
|
1861
|
+
* is always observed). Exported for scripts/verify-teardown-exit.tsx.
|
|
1862
|
+
*/
|
|
1863
|
+
export function createExitFunnel(deps) {
|
|
1864
|
+
let exited = false;
|
|
1865
|
+
let teardown = false;
|
|
1866
|
+
return {
|
|
1867
|
+
markTeardown: () => {
|
|
1868
|
+
teardown = true;
|
|
1869
|
+
},
|
|
1870
|
+
handleExit: (error) => {
|
|
1871
|
+
if (teardown)
|
|
1872
|
+
return;
|
|
1873
|
+
if (exited)
|
|
1874
|
+
return;
|
|
1875
|
+
exited = true;
|
|
1876
|
+
deps.onUserExit(error);
|
|
1877
|
+
},
|
|
1878
|
+
};
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* Whether a user exit should leave the resume marker (and print the resume
|
|
1882
|
+
* hint). Must be judged against the LIVE session behind the channel, not the
|
|
1883
|
+
* boot-time agent apply() captured: /resume, /new and /model swap the active
|
|
1884
|
+
* agent (channel.agentId follows, the old handle is disposed), so the
|
|
1885
|
+
* captured reference can point at a stale session — wiping a marker the
|
|
1886
|
+
* resume path just wrote (boot empty → /resume into history) or rewriting it
|
|
1887
|
+
* to a fresh empty session (boot with history → /new). `liveAgent` is the
|
|
1888
|
+
* registry lookup of channel.agentId; it falls back to the captured agent
|
|
1889
|
+
* when the lookup misses. Exported for scripts/verify-exit-resume-marker.
|
|
1890
|
+
*/
|
|
1891
|
+
export function isExitResumable(deps) {
|
|
1892
|
+
const agent = deps.liveAgent ?? deps.startupAgent;
|
|
1893
|
+
return (deps.pendingCount > 0 ||
|
|
1894
|
+
snapshotLiveSessionEvents(agent.session).some(event => event.type === 'user/message' && event.data.source.kind === 'user'));
|
|
1895
|
+
}
|
|
1896
|
+
/**
|
|
1897
|
+
* Finish terminal I/O before handing control to a process-level exit action.
|
|
1898
|
+
* Exported for scripts/verify-shutdown-fallback.
|
|
1899
|
+
*/
|
|
1900
|
+
export async function finishExit(ctx, instance, fullscreen, notice, stderrNotice, done) {
|
|
1901
|
+
try {
|
|
1902
|
+
// Resolve the Ink runtime twice: the instances map is keyed by stdout
|
|
1903
|
+
// identity, so a replaced/overridden stdout misses it; the render()
|
|
1904
|
+
// handle is the caller's own instance and always matches (issue #522 —
|
|
1905
|
+
// a missed lookup skipped detachForShutdown, leaving the stdin pump,
|
|
1906
|
+
// TTY handlers and querier alive so the self-heal probe re-wrote
|
|
1907
|
+
// ENABLE_MOUSE_TRACKING after DISABLE_MOUSE_TRACKING had been sent).
|
|
1908
|
+
const fromMap = readInkShutdownState(instances.get(process.stdout));
|
|
1909
|
+
const fromHandle = instance === undefined ? undefined : readInkShutdownState(instance);
|
|
1910
|
+
// A handle that exposes neither detach hook is not an Ink runtime we can
|
|
1911
|
+
// latch (e.g. the fake render handles in shutdown regressions) — treat it
|
|
1912
|
+
// as a lookup miss so the full-unmount fallback below can still run.
|
|
1913
|
+
const runtime = fromMap ?? (fromHandle?.detachForShutdown === undefined && fromHandle?.detachStdinForHandoff === undefined
|
|
1914
|
+
? undefined
|
|
1915
|
+
: fromHandle);
|
|
1916
|
+
if (runtime === undefined) {
|
|
1917
|
+
ctx.logger.debug('dsh-tui: Ink runtime unavailable during shutdown; using generic terminal cleanup');
|
|
1918
|
+
if (instance !== undefined) {
|
|
1919
|
+
ctx.logger.debug('dsh-tui: Ink shutdown using full unmount as the terminal-restore fallback');
|
|
1920
|
+
// Lookup-miss (custom stdout embedders / detach-less handles): the
|
|
1921
|
+
// registry cannot hand us the detach hooks, so run the full Ink
|
|
1922
|
+
// unmount first. It restores raw mode, alt screen and listeners
|
|
1923
|
+
// synchronously before the notice below is written — the process
|
|
1924
|
+
// must never hand a broken terminal back to the shell.
|
|
1925
|
+
try {
|
|
1926
|
+
instance.unmount();
|
|
1927
|
+
}
|
|
1928
|
+
catch {
|
|
1929
|
+
ctx.logger.debug('dsh-tui: Ink shutdown unmount fallback failed; continuing with generic terminal cleanup');
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
else if (fromMap === undefined) {
|
|
1934
|
+
ctx.logger.debug('dsh-tui: Ink runtime resolved from the render handle (instances map missed); detaching');
|
|
1935
|
+
}
|
|
1936
|
+
const cursor = fullscreen ? '' : cursorMoveToFrameEnd(runtime);
|
|
1937
|
+
try {
|
|
1938
|
+
runtime?.detachForShutdown?.();
|
|
1939
|
+
// The /update continuation spawns children that inherit this stdin;
|
|
1940
|
+
// strip the readable pump so the parent cannot swallow their input
|
|
1941
|
+
// (issues #284/#307). Harmless on plain exits — the process exits
|
|
1942
|
+
// right after this cleanup anyway.
|
|
1943
|
+
runtime?.detachStdinForHandoff?.();
|
|
1944
|
+
}
|
|
1945
|
+
catch {
|
|
1946
|
+
ctx.logger.debug('dsh-tui: Ink shutdown detach failed; continuing with generic terminal cleanup');
|
|
1947
|
+
}
|
|
1948
|
+
const cleanup = [
|
|
1949
|
+
fullscreen ? EXIT_ALT_SCREEN : '',
|
|
1950
|
+
cursor,
|
|
1951
|
+
DISABLE_MOUSE_TRACKING,
|
|
1952
|
+
DISABLE_MODIFY_OTHER_KEYS,
|
|
1953
|
+
DISABLE_KITTY_KEYBOARD,
|
|
1954
|
+
DISABLE_WIN32_INPUT_MODE,
|
|
1955
|
+
DFE,
|
|
1956
|
+
DBP,
|
|
1957
|
+
SHOW_CURSOR,
|
|
1958
|
+
CLEAR_ITERM2_PROGRESS,
|
|
1959
|
+
supportsTabStatus() ? wrapForMultiplexer(CLEAR_TAB_STATUS) : '',
|
|
1960
|
+
].join('');
|
|
1961
|
+
const suffix = notice === undefined ? '' : `${notice}\n`;
|
|
1962
|
+
await writeStream(process.stdout, `${cleanup}\r\n${suffix}`);
|
|
1963
|
+
// Re-drain AFTER the cleanup sequences have landed (#507): terminal
|
|
1964
|
+
// replies and mouse packets already in flight when the exit started
|
|
1965
|
+
// keep arriving while cleanup is being written — the detach-time drain
|
|
1966
|
+
// cannot see them. Unconsumed at process exit they land in the shell's
|
|
1967
|
+
// input queue (DECRPM/DA1/XTVERSION garbage pasted into the prompt).
|
|
1968
|
+
// 150ms settle covers reply RTT on slow links (ssh/ghostty is #522's
|
|
1969
|
+
// environment; 50ms proved too tight there) while staying well inside
|
|
1970
|
+
// the exit window the user already waits through.
|
|
1971
|
+
await new Promise(resolve => setTimeout(resolve, 150));
|
|
1972
|
+
runtime?.drainStdin?.();
|
|
1973
|
+
if (stderrNotice !== undefined) {
|
|
1974
|
+
await writeStream(process.stderr, `\n${stderrNotice}\n`);
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
catch {
|
|
1978
|
+
ctx.logger.debug('dsh-tui: terminal cleanup failed; continuing with process shutdown');
|
|
1979
|
+
}
|
|
1980
|
+
// Filesystem-only: the exported clipboard images live in a per-process
|
|
1981
|
+
// temp directory that nothing else removes.
|
|
1982
|
+
removeClipboardImageDir();
|
|
1983
|
+
done();
|
|
1984
|
+
}
|
|
1985
|
+
function readInkShutdownState(value) {
|
|
1986
|
+
if (value === null || typeof value !== 'object')
|
|
1987
|
+
return undefined;
|
|
1988
|
+
const candidate = value;
|
|
1989
|
+
if (candidate.detachForShutdown !== undefined && typeof candidate.detachForShutdown !== 'function')
|
|
1990
|
+
return undefined;
|
|
1991
|
+
if (candidate.detachStdinForHandoff !== undefined && typeof candidate.detachStdinForHandoff !== 'function')
|
|
1992
|
+
return undefined;
|
|
1993
|
+
if (candidate.drainStdin !== undefined && typeof candidate.drainStdin !== 'function')
|
|
1994
|
+
return undefined;
|
|
1995
|
+
if (candidate.frontFrame !== undefined && !isFrameState(candidate.frontFrame))
|
|
1996
|
+
return undefined;
|
|
1997
|
+
if (candidate.displayCursor !== undefined && candidate.displayCursor !== null && !isCursorState(candidate.displayCursor))
|
|
1998
|
+
return undefined;
|
|
1999
|
+
return value;
|
|
2000
|
+
}
|
|
2001
|
+
function isFrameState(value) {
|
|
2002
|
+
if (value === null || typeof value !== 'object')
|
|
2003
|
+
return false;
|
|
2004
|
+
const cursor = value.cursor;
|
|
2005
|
+
return cursor === undefined || isCursorState(cursor);
|
|
2006
|
+
}
|
|
2007
|
+
function isCursorState(value) {
|
|
2008
|
+
if (value === null || typeof value !== 'object')
|
|
2009
|
+
return false;
|
|
2010
|
+
const cursor = value;
|
|
2011
|
+
return typeof cursor.x === 'number' && typeof cursor.y === 'number';
|
|
2012
|
+
}
|
|
2013
|
+
function cursorMoveToFrameEnd(runtime) {
|
|
2014
|
+
const frame = runtime?.frontFrame?.cursor;
|
|
2015
|
+
if (frame === undefined)
|
|
2016
|
+
return '';
|
|
2017
|
+
const parked = runtime?.displayCursor ?? frame;
|
|
2018
|
+
return cursorMove(frame.x - parked.x, frame.y - parked.y);
|
|
2019
|
+
}
|
|
2020
|
+
function writeStream(stream, data) {
|
|
2021
|
+
if (data.length === 0)
|
|
2022
|
+
return Promise.resolve();
|
|
2023
|
+
return new Promise(resolve => {
|
|
2024
|
+
let settled = false;
|
|
2025
|
+
const finish = () => {
|
|
2026
|
+
if (settled)
|
|
2027
|
+
return;
|
|
2028
|
+
settled = true;
|
|
2029
|
+
resolve();
|
|
2030
|
+
};
|
|
2031
|
+
const timer = setTimeout(finish, 1000);
|
|
2032
|
+
timer.unref();
|
|
2033
|
+
try {
|
|
2034
|
+
stream.write(data, () => {
|
|
2035
|
+
clearTimeout(timer);
|
|
2036
|
+
finish();
|
|
2037
|
+
});
|
|
2038
|
+
}
|
|
2039
|
+
catch {
|
|
2040
|
+
clearTimeout(timer);
|
|
2041
|
+
finish();
|
|
2042
|
+
}
|
|
2043
|
+
});
|
|
2044
|
+
}
|
|
2045
|
+
/**
|
|
2046
|
+
* Restart the TUI in place and resume the same session — the `/restart`
|
|
2047
|
+
* tail of `/reload`: the soft reload cannot re-read boot-time-only state
|
|
2048
|
+
* (cordis.yml root config, frozen fullscreen layout, newly built code), so
|
|
2049
|
+
* /restart respawns the process with the original argv through the same
|
|
2050
|
+
* terminal handoff the /update path uses, minus the installation step.
|
|
2051
|
+
* The resume contract is dual-written (env + resume.txt) before this runs.
|
|
2052
|
+
*/
|
|
2053
|
+
function runRestart(ctx, profile, sessionId) {
|
|
2054
|
+
logRestartEvent('runRestart: entered, disposing cordis root');
|
|
2055
|
+
disposeRootAndThen(ctx, () => {
|
|
2056
|
+
logRestartEvent('runRestart: root disposed, starting restartTui');
|
|
2057
|
+
void restartTui(sessionId).then(restartCode => {
|
|
2058
|
+
logRestartEvent('runRestart: restartTui resolved', { restartCode });
|
|
2059
|
+
if (restartCode !== 0) {
|
|
2060
|
+
writeHandoffNotice(`\ndsh-tui restart failed to spawn (exit ${restartCode}). Your session is preserved — resume with:\n` +
|
|
2061
|
+
`${resumeCommand(profile, sessionId)}\n\n`);
|
|
2062
|
+
}
|
|
2063
|
+
process.exit(restartCode);
|
|
2064
|
+
}, restartError => {
|
|
2065
|
+
const message = restartError instanceof Error ? restartError.message : String(restartError);
|
|
2066
|
+
logRestartEvent('runRestart: restartTui rejected', { message });
|
|
2067
|
+
writeHandoffNotice(`\ndsh-tui restart failed: ${message}. Your session is preserved — resume with:\n` +
|
|
2068
|
+
`${resumeCommand(profile, sessionId)}\n\n`);
|
|
2069
|
+
process.exit(1);
|
|
2070
|
+
});
|
|
2071
|
+
});
|
|
2072
|
+
}
|
|
2073
|
+
function runUpdate(ctx, profile, sessionId, targetVersion) {
|
|
2074
|
+
disposeRootAndThen(ctx, () => {
|
|
2075
|
+
if (profile === undefined) {
|
|
2076
|
+
process.stderr.write(`\n${t('update-aborted-no-profile')}\n`);
|
|
2077
|
+
process.exit(1);
|
|
2078
|
+
}
|
|
2079
|
+
void updateTuiAndRestart(sessionId, profile, targetVersion).then(({ updateCode, restartCode }) => {
|
|
2080
|
+
if (updateCode !== 0) {
|
|
2081
|
+
process.stderr.write(`\ndsh-tui update failed (exit ${updateCode}). Your session is preserved — resume with:\n` +
|
|
2082
|
+
`${resumeCommand(profile, sessionId)}\n\n`);
|
|
2083
|
+
}
|
|
2084
|
+
process.exit(restartCode);
|
|
2085
|
+
}, updateError => {
|
|
2086
|
+
const message = updateError instanceof Error ? updateError.message : String(updateError);
|
|
2087
|
+
process.stderr.write(`\ndsh-tui update failed: ${message}. Your session is preserved — resume with:\n` +
|
|
2088
|
+
`${resumeCommand(profile, sessionId)}\n\n`);
|
|
2089
|
+
process.exit(1);
|
|
2090
|
+
});
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
/** Deferred runtime failures must restore the terminal and fail the process. */
|
|
2094
|
+
export function handleStartupError(ctx, error) {
|
|
2095
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2096
|
+
void finishExit(ctx, undefined, lastBootedFullscreen ?? true, undefined, `dsh-tui startup failed: ${message}`, () => disposeRootAndExit(ctx, 1));
|
|
2097
|
+
}
|
|
2098
|
+
/**
|
|
2099
|
+
* Dispose the whole application before process exit, with a bounded fallback.
|
|
2100
|
+
* Mirrors the deleted dsh-tui front-door exit semantics.
|
|
2101
|
+
*/
|
|
2102
|
+
function disposeRootAndExit(ctx, code) {
|
|
2103
|
+
disposeRootAndThen(ctx, () => process.exit(code), code);
|
|
2104
|
+
}
|
|
2105
|
+
/**
|
|
2106
|
+
* The real way back into a session after the TUI process is gone. The
|
|
2107
|
+
* package ships no `dsh-tui` bin — resuming means feeding the session id
|
|
2108
|
+
* through `DSH_TUI_RESUME_SESSION` (what cordis.patch.yml's `sessionId`
|
|
2109
|
+
* reads) and
|
|
2110
|
+
* booting the same profile; on Windows the repo's dsh-tui.cmd wrapper
|
|
2111
|
+
* does this via --resume + ~/.dsh-tui/resume.txt.
|
|
2112
|
+
*/
|
|
2113
|
+
function resumeCommand(profile, sessionId) {
|
|
2114
|
+
const boot = profile === undefined ? 'dsh --config cordis.yml' : `dsh --profile ${profile}`;
|
|
2115
|
+
return process.platform === 'win32'
|
|
2116
|
+
? `dsh-tui --resume ${sessionId}`
|
|
2117
|
+
: `DSH_TUI_RESUME_SESSION=${sessionId} ${boot}`;
|
|
2118
|
+
}
|
|
2119
|
+
/**
|
|
2120
|
+
* Dispose the Cordis tree, then run a process-level handoff action. The
|
|
2121
|
+
* fallback exit keeps the caller's intended code when disposal stalls — the
|
|
2122
|
+
* handoff (update/restart) may legitimately take longer than the bound, and
|
|
2123
|
+
* reporting failure on a clean exit would mislead wrapper scripts.
|
|
2124
|
+
*/
|
|
2125
|
+
function disposeRootAndThen(ctx, done, fallbackCode = 1) {
|
|
2126
|
+
const timer = setTimeout(() => {
|
|
2127
|
+
// Diagnosis for a stalled disposal: without this line the fallback exit
|
|
2128
|
+
// is indistinguishable from a successful handoff in the field.
|
|
2129
|
+
logRestartEvent('dispose: timeout, taking fallback exit', { fallbackCode });
|
|
2130
|
+
process.exit(fallbackCode);
|
|
2131
|
+
}, 5000);
|
|
2132
|
+
timer.unref();
|
|
2133
|
+
void withHostRootCapability(() => ctx.root.fiber.dispose()).then(() => {
|
|
2134
|
+
clearTimeout(timer);
|
|
2135
|
+
done();
|
|
2136
|
+
}, () => {
|
|
2137
|
+
clearTimeout(timer);
|
|
2138
|
+
done();
|
|
2139
|
+
});
|
|
2140
|
+
}
|