@deepseek-harness-tui/dsh-tui 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/bin/dsh-tui.js +99 -33
- package/cordis.patch.yml +25 -5
- package/lib/types/adapter/channel/actions.d.ts +17 -0
- package/lib/types/adapter/channel/actions.d.ts.map +1 -0
- package/lib/types/adapter/channel/actions.js +28 -0
- package/lib/types/adapter/channel/consumer.d.ts +34 -0
- package/lib/types/adapter/channel/consumer.d.ts.map +1 -0
- package/lib/types/adapter/channel/consumer.js +87 -0
- package/lib/types/adapter/channel/features.d.ts +12 -0
- package/lib/types/adapter/channel/features.d.ts.map +1 -0
- package/lib/types/adapter/channel/features.js +41 -0
- package/lib/types/adapter/channel/host-registry.d.ts +40 -0
- package/lib/types/adapter/channel/host-registry.d.ts.map +1 -0
- package/lib/types/adapter/channel/host-registry.js +120 -0
- package/lib/types/adapter/channel/index.d.ts +22 -0
- package/lib/types/adapter/channel/index.d.ts.map +1 -0
- package/lib/types/adapter/channel/index.js +21 -0
- package/lib/types/adapter/channel/internal-token.d.ts +12 -0
- package/lib/types/adapter/channel/internal-token.d.ts.map +1 -0
- package/lib/types/adapter/channel/internal-token.js +11 -0
- package/lib/types/adapter/channel/plugins.d.ts +17 -0
- package/lib/types/adapter/channel/plugins.d.ts.map +1 -0
- package/lib/types/adapter/channel/plugins.js +47 -0
- package/lib/types/adapter/channel/projection.d.ts +15 -0
- package/lib/types/adapter/channel/projection.d.ts.map +1 -0
- package/lib/types/adapter/channel/projection.js +59 -0
- package/lib/types/adapter/channel/provider.d.ts +52 -0
- package/lib/types/adapter/channel/provider.d.ts.map +1 -0
- package/lib/types/adapter/channel/provider.js +231 -0
- package/lib/types/adapter/channel/read-view.d.ts +4 -0
- package/lib/types/adapter/channel/read-view.d.ts.map +1 -0
- package/lib/types/adapter/channel/read-view.js +132 -0
- package/lib/types/adapter/channel/session-projection.d.ts +56 -0
- package/lib/types/adapter/channel/session-projection.d.ts.map +1 -0
- package/lib/types/adapter/channel/session-projection.js +247 -0
- package/lib/types/adapter/channel/state.d.ts +11 -0
- package/lib/types/adapter/channel/state.d.ts.map +1 -0
- package/lib/types/adapter/channel/state.js +55 -0
- package/lib/types/adapter/channel/transcript.d.ts +15 -0
- package/lib/types/adapter/channel/transcript.d.ts.map +1 -0
- package/lib/types/adapter/channel/transcript.js +22 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +106 -0
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -0
- package/lib/types/adapter/channel/ui-policy.js +166 -0
- package/lib/types/adapter/channel/ui.d.ts +16 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -0
- package/lib/types/adapter/channel/ui.js +168 -0
- package/lib/types/adapter/index.d.ts +20 -0
- package/lib/types/adapter/index.d.ts.map +1 -0
- package/lib/types/adapter/index.js +19 -0
- package/lib/types/adapter/kernel/contract-catalog.d.ts +12 -0
- package/lib/types/adapter/kernel/contract-catalog.d.ts.map +1 -0
- package/lib/types/adapter/kernel/contract-catalog.js +11 -0
- package/lib/types/adapter/kernel/diagnostics.d.ts +18 -0
- package/lib/types/adapter/kernel/diagnostics.d.ts.map +1 -0
- package/lib/types/adapter/kernel/diagnostics.js +16 -0
- package/lib/types/adapter/kernel/driver-types.d.ts +16 -0
- package/lib/types/adapter/kernel/driver-types.d.ts.map +1 -0
- package/lib/types/adapter/kernel/driver-types.js +8 -0
- package/lib/types/adapter/kernel/host-facade.d.ts +65 -0
- package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -0
- package/lib/types/adapter/kernel/host-facade.js +215 -0
- package/lib/types/adapter/kernel/host-probe-access.d.ts +71 -0
- package/lib/types/adapter/kernel/host-probe-access.d.ts.map +1 -0
- package/lib/types/adapter/kernel/host-probe-access.js +121 -0
- package/lib/types/adapter/kernel/index.d.ts +20 -0
- package/lib/types/adapter/kernel/index.d.ts.map +1 -0
- package/lib/types/adapter/kernel/index.js +19 -0
- package/lib/types/adapter/kernel/kernel-runtime.d.ts +138 -0
- package/lib/types/adapter/kernel/kernel-runtime.d.ts.map +1 -0
- package/lib/types/adapter/kernel/kernel-runtime.js +572 -0
- package/lib/types/adapter/kernel/ledger.d.ts +55 -0
- package/lib/types/adapter/kernel/ledger.d.ts.map +1 -0
- package/lib/types/adapter/kernel/ledger.js +33 -0
- package/lib/types/adapter/kernel/legacy-facade.d.ts +22 -0
- package/lib/types/adapter/kernel/legacy-facade.d.ts.map +1 -0
- package/lib/types/adapter/kernel/legacy-facade.js +34 -0
- package/lib/types/adapter/kernel/lifecycle.d.ts +38 -0
- package/lib/types/adapter/kernel/lifecycle.d.ts.map +1 -0
- package/lib/types/adapter/kernel/lifecycle.js +53 -0
- package/lib/types/adapter/kernel/replay-isolation.d.ts +27 -0
- package/lib/types/adapter/kernel/replay-isolation.d.ts.map +1 -0
- package/lib/types/adapter/kernel/replay-isolation.js +45 -0
- package/lib/types/adapter/kernel/replay.d.ts +132 -0
- package/lib/types/adapter/kernel/replay.d.ts.map +1 -0
- package/lib/types/adapter/kernel/replay.js +425 -0
- package/lib/types/adapter/kernel/runtime-context.d.ts +15 -0
- package/lib/types/adapter/kernel/runtime-context.d.ts.map +1 -0
- package/lib/types/adapter/kernel/runtime-context.js +24 -0
- package/lib/types/adapter/kernel/runtime.d.ts +70 -0
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -0
- package/lib/types/adapter/kernel/runtime.js +325 -0
- package/lib/types/adapter/kernel/slices/channel.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/channel.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/channel.js +8 -0
- package/lib/types/adapter/kernel/slices/decisions.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/decisions.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/decisions.js +10 -0
- package/lib/types/adapter/kernel/slices/extensions.d.ts +8 -0
- package/lib/types/adapter/kernel/slices/extensions.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/extensions.js +43 -0
- package/lib/types/adapter/kernel/slices/index.d.ts +19 -0
- package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/index.js +36 -0
- package/lib/types/adapter/kernel/slices/presentation.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/presentation.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/presentation.js +14 -0
- package/lib/types/adapter/kernel/slices/scenes.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/scenes.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/scenes.js +14 -0
- package/lib/types/adapter/kernel/slices/settings.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/settings.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/settings.js +12 -0
- package/lib/types/adapter/kernel/slices/types.d.ts +20 -0
- package/lib/types/adapter/kernel/slices/types.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/types.js +12 -0
- package/lib/types/adapter/kernel/slices/workspace.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/workspace.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/workspace.js +15 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +90 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-catalog.js +2 -0
- package/lib/types/adapter/ports/channel-display.d.ts +90 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-display.js +2 -0
- package/lib/types/adapter/ports/channel-session.d.ts +229 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-session.js +2 -0
- package/lib/types/adapter/ports/channel-settings.d.ts +273 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-settings.js +1 -0
- package/lib/types/adapter/ports/channel-ui.d.ts +569 -0
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-ui.js +1 -0
- package/lib/types/adapter/ports/channel-view.d.ts +609 -0
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-view.js +2 -0
- package/lib/types/adapter/ports/channel-workspace.d.ts +45 -0
- package/lib/types/adapter/ports/channel-workspace.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-workspace.js +2 -0
- package/lib/types/adapter/ports/channel.d.ts +145 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel.js +22 -0
- package/lib/types/adapter/ports/decisions.d.ts +18 -0
- package/lib/types/adapter/ports/decisions.d.ts.map +1 -0
- package/lib/types/adapter/ports/decisions.js +9 -0
- package/lib/types/adapter/ports/descriptor.d.ts +25 -0
- package/lib/types/adapter/ports/descriptor.d.ts.map +1 -0
- package/lib/types/adapter/ports/descriptor.js +11 -0
- package/lib/types/adapter/ports/extensions.d.ts +86 -0
- package/lib/types/adapter/ports/extensions.d.ts.map +1 -0
- package/lib/types/adapter/ports/extensions.js +9 -0
- package/lib/types/adapter/ports/index.d.ts +23 -0
- package/lib/types/adapter/ports/index.d.ts.map +1 -0
- package/lib/types/adapter/ports/index.js +14 -0
- package/lib/types/adapter/ports/owner.d.ts +19 -0
- package/lib/types/adapter/ports/owner.d.ts.map +1 -0
- package/lib/types/adapter/ports/owner.js +9 -0
- package/lib/types/adapter/ports/presentation.d.ts +81 -0
- package/lib/types/adapter/ports/presentation.d.ts.map +1 -0
- package/lib/types/adapter/ports/presentation.js +10 -0
- package/lib/types/adapter/ports/scenes.d.ts +24 -0
- package/lib/types/adapter/ports/scenes.d.ts.map +1 -0
- package/lib/types/adapter/ports/scenes.js +8 -0
- package/lib/types/adapter/ports/settings.d.ts +44 -0
- package/lib/types/adapter/ports/settings.d.ts.map +1 -0
- package/lib/types/adapter/ports/settings.js +9 -0
- package/lib/types/adapter/ports/workspace.d.ts +60 -0
- package/lib/types/adapter/ports/workspace.d.ts.map +1 -0
- package/lib/types/adapter/ports/workspace.js +8 -0
- package/lib/types/adapter/spec/index.d.ts +11 -0
- package/lib/types/adapter/spec/index.d.ts.map +1 -0
- package/lib/types/adapter/spec/index.js +10 -0
- package/lib/types/adapter/spec/profile.d.ts +10 -0
- package/lib/types/adapter/spec/profile.d.ts.map +1 -0
- package/lib/types/adapter/spec/profile.js +9 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts +60 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -0
- package/lib/types/adapter/spec/protocol-constants.js +129 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts +18 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -0
- package/lib/types/adapter/spec/tui-contributions.js +19 -0
- package/lib/types/adapter/standard/admission.d.ts +11 -0
- package/lib/types/adapter/standard/admission.d.ts.map +1 -0
- package/lib/types/adapter/standard/admission.js +10 -0
- package/lib/types/adapter/standard/descriptor.d.ts +74 -0
- package/lib/types/adapter/standard/descriptor.d.ts.map +1 -0
- package/lib/types/adapter/standard/descriptor.js +356 -0
- package/lib/types/{dsh-adapter → adapter/standard}/grants.d.ts +8 -3
- package/lib/types/adapter/standard/grants.d.ts.map +1 -0
- package/lib/types/{dsh-adapter → adapter/standard}/grants.js +14 -8
- package/lib/types/adapter/standard/index.d.ts +25 -0
- package/lib/types/adapter/standard/index.d.ts.map +1 -0
- package/lib/types/adapter/standard/index.js +24 -0
- package/lib/types/adapter/standard/negotiate.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/permission-scope.d.ts +3 -8
- package/lib/types/adapter/standard/permission-scope.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/permission-scope.js +4 -26
- package/lib/types/adapter/standard/protocols.d.ts +12 -0
- package/lib/types/adapter/standard/protocols.d.ts.map +1 -0
- package/lib/types/adapter/standard/protocols.js +11 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/registry.js +3 -15
- package/lib/types/adapter/standard/schema-check.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/schema-check.js +4 -2
- package/lib/types/adapter/standard/tui-extension.d.ts +25 -0
- package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -0
- package/lib/types/adapter/standard/tui-extension.js +45 -0
- package/lib/types/{plugin-spec → adapter/standard}/types.d.ts +3 -9
- package/lib/types/adapter/standard/types.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/validate.d.ts +3 -3
- package/lib/types/adapter/standard/validate.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/validate.js +14 -13
- package/lib/types/adapter/upstream/channel-driver.d.ts +22 -0
- package/lib/types/adapter/upstream/channel-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/channel-driver.js +424 -0
- package/lib/types/adapter/upstream/decisions-driver.d.ts +15 -0
- package/lib/types/adapter/upstream/decisions-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/decisions-driver.js +141 -0
- package/lib/types/adapter/upstream/detection.d.ts +26 -0
- package/lib/types/adapter/upstream/detection.d.ts.map +1 -0
- package/lib/types/adapter/upstream/detection.js +9 -0
- package/lib/types/adapter/upstream/driver.d.ts +50 -0
- package/lib/types/adapter/upstream/driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/driver.js +8 -0
- package/lib/types/adapter/upstream/extensions-driver.d.ts +24 -0
- package/lib/types/adapter/upstream/extensions-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/extensions-driver.js +697 -0
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts +45 -0
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/host-descriptor-driver.js +606 -0
- package/lib/types/adapter/upstream/index.d.ts +18 -0
- package/lib/types/adapter/upstream/index.d.ts.map +1 -0
- package/lib/types/adapter/upstream/index.js +15 -0
- package/lib/types/adapter/upstream/presentation-driver.d.ts +17 -0
- package/lib/types/adapter/upstream/presentation-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/presentation-driver.js +129 -0
- package/lib/types/adapter/upstream/scenes-driver.d.ts +18 -0
- package/lib/types/adapter/upstream/scenes-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/scenes-driver.js +170 -0
- package/lib/types/adapter/upstream/settings-driver.d.ts +20 -0
- package/lib/types/adapter/upstream/settings-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/settings-driver.js +173 -0
- package/lib/types/adapter/upstream/workspace-driver.d.ts +19 -0
- package/lib/types/adapter/upstream/workspace-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/workspace-driver.js +190 -0
- package/lib/types/api.d.ts +1 -1
- package/lib/types/api.d.ts.map +1 -1
- package/lib/types/commands.d.ts +2 -41
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +1 -1
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +8 -1
- package/lib/types/components/GoalTodoPanel.d.ts +2 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.js +7 -5
- package/lib/types/components/Markdown.d.ts +2 -2
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +28 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +46 -17
- package/lib/types/components/ModelPicker.d.ts +1 -1
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +8 -4
- package/lib/types/components/OverlayAbove.d.ts +22 -1
- package/lib/types/components/OverlayAbove.d.ts.map +1 -1
- package/lib/types/components/OverlayAbove.js +74 -5
- package/lib/types/components/PromptInput.d.ts +2 -1
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +14 -6
- package/lib/types/components/SkillsPicker.d.ts.map +1 -1
- package/lib/types/components/SkillsPicker.js +6 -4
- package/lib/types/components/Spinner/spinnerMode.d.ts +1 -5
- package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +61 -9
- package/lib/types/components/design-system/ThemedBox.d.ts +4 -2
- package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemedBox.js +2 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +69 -25
- package/lib/types/components/overlayBudget.d.ts +39 -0
- package/lib/types/components/overlayBudget.d.ts.map +1 -0
- package/lib/types/components/overlayBudget.js +43 -0
- package/lib/types/deepseekBalance.d.ts +2 -36
- package/lib/types/deepseekBalance.d.ts.map +1 -1
- package/lib/types/deepseekBalance.js +0 -14
- package/lib/types/deepseekPricing.d.ts +2 -1
- package/lib/types/deepseekPricing.d.ts.map +1 -1
- package/lib/types/deepseekPricing.js +8 -1
- package/lib/types/dsh-adapter/approvals.d.ts +11 -1
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +32 -12
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/action-readiness.js +83 -0
- package/lib/types/dsh-adapter/channel/activity.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/activity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/activity.js +113 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +64 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +295 -0
- package/lib/types/dsh-adapter/channel/background-action.d.ts +41 -0
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/background-action.js +86 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +65 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/binding-events.js +169 -0
- package/lib/types/dsh-adapter/channel/binding.d.ts +41 -0
- package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/binding.js +227 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +29 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/command-completions.js +94 -0
- package/lib/types/dsh-adapter/channel/commands.d.ts +8 -0
- package/lib/types/dsh-adapter/channel/commands.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/commands.js +9 -0
- package/lib/types/dsh-adapter/channel/compaction.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/compaction.js +116 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +57 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/composer-images.js +217 -0
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts +15 -0
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/composer-mentions.js +200 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +26 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +30 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/decisions.js +90 -0
- package/lib/types/dsh-adapter/channel/emitter.d.ts +10 -0
- package/lib/types/dsh-adapter/channel/emitter.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/emitter.js +71 -0
- package/lib/types/dsh-adapter/channel/external-commands.d.ts +31 -0
- package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/external-commands.js +187 -0
- package/lib/types/dsh-adapter/channel/file-actions.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/file-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/file-actions.js +45 -0
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/input-actions.js +135 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +37 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/input-delivery.js +305 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +28 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/job-projection.js +150 -0
- package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/lifetime-resources.js +33 -0
- package/lib/types/dsh-adapter/channel/loaded-context.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/loaded-context.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/loaded-context.js +62 -0
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +70 -0
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/local-actions.js +108 -0
- package/lib/types/dsh-adapter/channel/mentions.d.ts +29 -0
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mentions.js +235 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +30 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-actions.js +247 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +35 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +199 -0
- package/lib/types/dsh-adapter/channel/mode-permission.d.ts +58 -0
- package/lib/types/dsh-adapter/channel/mode-permission.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-permission.js +240 -0
- package/lib/types/dsh-adapter/channel/mode-roster.d.ts +51 -0
- package/lib/types/dsh-adapter/channel/mode-roster.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-roster.js +119 -0
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-actions.js +275 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-switch.js +98 -0
- package/lib/types/dsh-adapter/channel/notifications.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/notifications.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/notifications.js +24 -0
- package/lib/types/dsh-adapter/channel/owner.d.ts +18 -0
- package/lib/types/dsh-adapter/channel/owner.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/owner.js +73 -0
- package/lib/types/dsh-adapter/channel/paths.d.ts +31 -0
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/paths.js +147 -0
- package/lib/types/dsh-adapter/channel/permissions.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/permissions.js +187 -0
- package/lib/types/dsh-adapter/channel/preferences.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/preferences.js +103 -0
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/projection-helpers.js +63 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/projection.js +1021 -0
- package/lib/types/dsh-adapter/channel/reports.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/reports.js +171 -0
- package/lib/types/dsh-adapter/channel/session-actions.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/session-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-actions.js +29 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-adoption.js +35 -0
- package/lib/types/dsh-adapter/channel/session-fork.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-fork.js +85 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +62 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +81 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-metadata.js +209 -0
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +11 -0
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-reset.js +44 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +56 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-resume.js +240 -0
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-rewind.js +128 -0
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +138 -0
- package/lib/types/dsh-adapter/channel/session-tree.d.ts +10 -0
- package/lib/types/dsh-adapter/channel/session-tree.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-tree.js +503 -0
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/settings-host.js +256 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +33 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.js +215 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/state.js +31 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +47 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.js +140 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +73 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/transcript.js +312 -0
- package/lib/types/dsh-adapter/channel/types.d.ts +162 -0
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/types.js +1 -0
- package/lib/types/dsh-adapter/channel/usage.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/usage.js +48 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.js +56 -0
- package/lib/types/dsh-adapter/channel-facade-actions.d.ts +25 -0
- package/lib/types/dsh-adapter/channel-facade-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel-facade-actions.js +55 -0
- package/lib/types/dsh-adapter/channel-scene-outlet.d.ts +6 -0
- package/lib/types/dsh-adapter/channel-scene-outlet.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel-scene-outlet.js +13 -0
- package/lib/types/dsh-adapter/channel-ui.d.ts +9 -0
- package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel-ui.js +128 -0
- package/lib/types/dsh-adapter/channel.d.ts +9 -1525
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +753 -8145
- package/lib/types/dsh-adapter/command-trees.d.ts +1 -0
- package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -1
- package/lib/types/dsh-adapter/command-trees.js +20 -1
- package/lib/types/dsh-adapter/compat/liveSession.d.ts +8 -4
- package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/liveSession.js +28 -3
- package/lib/types/dsh-adapter/compat/persistence.d.ts +21 -0
- package/lib/types/dsh-adapter/compat/persistence.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/persistence.js +17 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +50 -11
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +325 -36
- package/lib/types/dsh-adapter/component-identity.d.ts +1 -1
- package/lib/types/dsh-adapter/component-identity.d.ts.map +1 -1
- package/lib/types/dsh-adapter/component-identity.js +1 -1
- package/lib/types/dsh-adapter/contract.d.ts +11 -9
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +19 -12
- package/lib/types/dsh-adapter/decision-guard.d.ts +56 -12
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/decision-guard.js +134 -22
- package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/dialogs.js +13 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts +5 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +53 -15
- package/lib/types/dsh-adapter/extension-events.d.ts +2 -9
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extension-events.js +0 -20
- package/lib/types/dsh-adapter/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extensions.js +3 -2
- package/lib/types/dsh-adapter/host-grants.d.ts +23 -0
- package/lib/types/dsh-adapter/host-grants.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-grants.js +45 -0
- package/lib/types/dsh-adapter/jobs.d.ts +2 -46
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +0 -25
- package/lib/types/dsh-adapter/message-observer.d.ts +15 -2
- package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -1
- package/lib/types/dsh-adapter/message-observer.js +157 -28
- package/lib/types/dsh-adapter/plugin-host.d.ts +80 -11
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-host.js +438 -41
- package/lib/types/dsh-adapter/plugin-storage.d.ts +11 -1
- package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-storage.js +150 -11
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +75 -34
- package/lib/types/dsh-adapter/plugins-info.d.ts +2 -2
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +11 -6
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +3 -2
- package/lib/types/dsh-adapter/providerWizard.d.ts +2 -159
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.d.ts +8 -0
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +18 -0
- package/lib/types/dsh-adapter/recap.d.ts +1 -9
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -1
- package/lib/types/dsh-adapter/recap.js +0 -14
- package/lib/types/dsh-adapter/renderers.d.ts +1 -0
- package/lib/types/dsh-adapter/renderers.d.ts.map +1 -1
- package/lib/types/dsh-adapter/renderers.js +26 -1
- package/lib/types/dsh-adapter/scenes.d.ts +3 -1
- package/lib/types/dsh-adapter/scenes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/scenes.js +31 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts +14 -95
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessionTree.js +51 -36
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +40 -19
- package/lib/types/dsh-adapter/sessions/frames.js +2 -0
- package/lib/types/dsh-adapter/sessions/index.d.ts +1 -1
- package/lib/types/dsh-adapter/sessions/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/index.js +1 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts +23 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +28 -17
- package/lib/types/dsh-adapter/sessions/store.d.ts +2 -2
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +12 -11
- package/lib/types/dsh-adapter/sessions/types.d.ts +4 -128
- package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/types.js +0 -13
- package/lib/types/dsh-adapter/settings-sections.d.ts +4 -95
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +50 -13
- package/lib/types/dsh-adapter/settingsEditor.d.ts +2 -36
- package/lib/types/dsh-adapter/settingsEditor.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settingsEditor.js +0 -18
- package/lib/types/dsh-adapter/shortcuts.d.ts +5 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -1
- package/lib/types/dsh-adapter/shortcuts.js +49 -0
- package/lib/types/dsh-adapter/status.d.ts +5 -0
- package/lib/types/dsh-adapter/status.d.ts.map +1 -1
- package/lib/types/dsh-adapter/status.js +29 -0
- package/lib/types/dsh-adapter/subagents.d.ts +9 -49
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +92 -1
- package/lib/types/dsh-adapter/themes.d.ts +1 -0
- package/lib/types/dsh-adapter/themes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/themes.js +29 -0
- package/lib/types/dsh-adapter/toast.d.ts +13 -0
- package/lib/types/dsh-adapter/toast.d.ts.map +1 -1
- package/lib/types/dsh-adapter/toast.js +31 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +2 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.js +2 -1
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +37 -18
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.js +43 -5
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +2 -2
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +31 -13
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.js +71 -14
- package/lib/types/dsh-adapter/trajectory/types.d.ts +1 -1
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/transcript-images.d.ts +2 -19
- package/lib/types/dsh-adapter/transcript-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.d.ts +2 -49
- package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.js +23 -3
- package/lib/types/i18n.d.ts +19 -7
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +8 -3
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +30 -33
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +32 -64
- package/lib/types/ink/get-max-width.d.ts +7 -15
- package/lib/types/ink/get-max-width.d.ts.map +1 -1
- package/lib/types/ink/get-max-width.js +7 -20
- package/lib/types/ink/ink.d.ts +1 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +22 -3
- package/lib/types/ink/layout/node.d.ts +2 -0
- package/lib/types/ink/layout/node.d.ts.map +1 -1
- package/lib/types/ink/layout/yoga.d.ts +1 -0
- package/lib/types/ink/layout/yoga.d.ts.map +1 -1
- package/lib/types/ink/layout/yoga.js +3 -0
- package/lib/types/ink/node-cache.d.ts +11 -0
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/node-cache.js +3 -0
- package/lib/types/ink/output.d.ts +6 -1
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +55 -65
- package/lib/types/ink/render-node-to-output.d.ts +24 -1
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +195 -71
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +14 -2
- package/lib/types/ink/styles.d.ts +12 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/tabstops.d.ts +3 -2
- package/lib/types/ink/tabstops.d.ts.map +1 -1
- package/lib/types/ink/tabstops.js +5 -4
- package/lib/types/ink/wrap-text.js +2 -2
- package/lib/types/modelGroups.d.ts +1 -1
- package/lib/types/modelGroups.d.ts.map +1 -1
- package/lib/types/modelRoute.js +1 -1
- package/lib/types/native-ts/yoga-layout/index.d.ts +8 -3
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +23 -8
- package/lib/types/plugin-host.d.ts +3 -4
- package/lib/types/plugin-host.d.ts.map +1 -1
- package/lib/types/plugin-host.js +8 -6
- package/lib/types/screens/AgentView.d.ts +1 -1
- package/lib/types/screens/AgentView.d.ts.map +1 -1
- package/lib/types/screens/Chat.d.ts +3 -2
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +91 -17
- package/lib/types/screens/SessionBrowser.d.ts +1 -1
- package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
- package/lib/types/screens/SessionTree.d.ts +1 -1
- package/lib/types/screens/SessionTree.d.ts.map +1 -1
- package/lib/types/screens/Settings.d.ts +1 -1
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.d.ts +1 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +40 -1
- package/lib/types/screens/TrajectoryScene.d.ts +1 -1
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/sessionModes.d.ts +11 -15
- package/lib/types/sessionModes.d.ts.map +1 -1
- package/lib/types/sessionModes.js +11 -0
- package/lib/types/tuiDisplayPrefs.d.ts +2 -68
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +5 -1
- package/lib/types/utils/credentials.d.ts +13 -0
- package/lib/types/utils/credentials.d.ts.map +1 -0
- package/lib/types/utils/credentials.js +41 -0
- package/lib/types/utils/fileSuggestions.d.ts +2 -9
- package/lib/types/utils/fileSuggestions.d.ts.map +1 -1
- package/lib/types/utils/fold-long-lines.d.ts +38 -0
- package/lib/types/utils/fold-long-lines.d.ts.map +1 -0
- package/lib/types/utils/fold-long-lines.js +91 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/pi-ai.d.ts +1 -1
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.js +4 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.js +15 -2
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +10 -10
- package/package.json +125 -81
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/agent.cordis.yml +20 -4
- package/presets/liangshen/compaction-epoch.mjs +3 -1
- package/presets/liangshen/instruction-hint.mjs +2 -1
- package/presets/liangshen/session-events.mjs +8 -0
- package/lib/types/dsh-adapter/grants.d.ts.map +0 -1
- package/lib/types/dsh-adapter/host-descriptor.d.ts +0 -24
- package/lib/types/dsh-adapter/host-descriptor.d.ts.map +0 -1
- package/lib/types/dsh-adapter/host-descriptor.js +0 -169
- package/lib/types/dsh-adapter/plugin-test-utils.d.ts +0 -62
- package/lib/types/dsh-adapter/plugin-test-utils.d.ts.map +0 -1
- package/lib/types/dsh-adapter/plugin-test-utils.js +0 -61
- package/lib/types/plugin-spec/negotiate.d.ts.map +0 -1
- package/lib/types/plugin-spec/permission-scope.d.ts.map +0 -1
- package/lib/types/plugin-spec/registry.d.ts.map +0 -1
- package/lib/types/plugin-spec/schema-check.d.ts.map +0 -1
- package/lib/types/plugin-spec/tui-extension.d.ts +0 -16
- package/lib/types/plugin-spec/tui-extension.d.ts.map +0 -1
- package/lib/types/plugin-spec/tui-extension.js +0 -79
- package/lib/types/plugin-spec/types.d.ts.map +0 -1
- package/lib/types/plugin-spec/validate.d.ts.map +0 -1
- package/lib/types/test-utils.d.ts +0 -2
- package/lib/types/test-utils.d.ts.map +0 -1
- package/lib/types/test-utils.js +0 -8
- /package/lib/types/{plugin-spec → adapter/standard}/negotiate.d.ts +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/negotiate.js +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/registry.d.ts +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/schema-check.d.ts +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/types.js +0 -0
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
import { sessionCwdMatches } from './paths.js';
|
|
2
|
+
import { SessionId } from '@deepseek-ai/dsh-session';
|
|
3
|
+
import { t } from '../../i18n.js';
|
|
4
|
+
import { defaultMaxScanned, liveSessionListingFields, readPhysicalHeaderSeedLength, readPhysicalHeaderSeedLengthForSession, readSessionEventsFromFile, readSessionEventsFromLog, } from '../compat/index.js';
|
|
5
|
+
import { snapshotLiveSessionEvents } from '../compat/liveSession.js';
|
|
6
|
+
import { readPersistedSession } from '../compat/persistence.js';
|
|
7
|
+
import { enumerateSessions, readInheritedCut } from '../sessions/index.js';
|
|
8
|
+
import { buildSessionTree, liveTailWindow } from '../sessionTree.js';
|
|
9
|
+
/** Bounded family-tree assembly owns budgets; binding remains the caller's authority. */
|
|
10
|
+
export function createSessionTreeReader(ctx, binding, cwd, notify, owner) {
|
|
11
|
+
async function readTree() {
|
|
12
|
+
const persistence = ctx.get('sessionPersistence');
|
|
13
|
+
if (!persistence) {
|
|
14
|
+
notify(t('tree-unavailable'), { color: 'error' });
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
// Pin the live session snapshot NOW: every await below (list/inspect)
|
|
18
|
+
// is a window in which a fire-and-forget switch (/new, /resume,
|
|
19
|
+
// /model) can swap `agent`. Reading agent.session piecemeal would
|
|
20
|
+
// stitch the NEW session's events under the OLD session's id — a
|
|
21
|
+
// confirm would then rewind from the wrong persisted log. Everything
|
|
22
|
+
// below reads this snapshot, and the result is discarded if the live
|
|
23
|
+
// session moved on before the build finished.
|
|
24
|
+
const liveSession = binding.agent.session;
|
|
25
|
+
const currentId = String(liveSession.id);
|
|
26
|
+
// Same enumerate as the /resume listing (snapshots when the backend
|
|
27
|
+
// offers revisions, plain list otherwise), each header narrowed through
|
|
28
|
+
// the sessions reader — one malformed header costs that session its
|
|
29
|
+
// metadata, never the whole tree. `raw` stays the backend's own header
|
|
30
|
+
// object for locate() below.
|
|
31
|
+
let listed = [];
|
|
32
|
+
try {
|
|
33
|
+
listed = await enumerateSessions(persistence);
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// A listing failure degrades the tree to the live session only.
|
|
37
|
+
}
|
|
38
|
+
// Same cwd scoping as /resume (the project dimension): forks
|
|
39
|
+
// inherit cwd, so the family never crosses projects — and the match is
|
|
40
|
+
// the project-aware one /resume uses, so a pre-upgrade subdirectory
|
|
41
|
+
// path, Windows separators, or a case variant on one header cannot
|
|
42
|
+
// quietly amputate the ancestors and siblings it records. Subagent
|
|
43
|
+
// child sessions carry parentSession too, but they are delegation
|
|
44
|
+
// artifacts, not rewind branches — exclude them from the family.
|
|
45
|
+
const local = listed.filter(entry => sessionCwdMatches(cwd(), entry.header.cwd ?? '') &&
|
|
46
|
+
entry.header.origin !== 'subagent' &&
|
|
47
|
+
(entry.header.delegationDepth ?? 0) === 0);
|
|
48
|
+
const headerById = new Map(local.map(entry => [entry.header.id, entry]));
|
|
49
|
+
// The live session's header may not be materialized in list() yet
|
|
50
|
+
// (the jsonl backend writes on first append) — overlay the in-memory
|
|
51
|
+
// header so the ancestor walk below still finds a fresh fork's parent.
|
|
52
|
+
const liveListed = liveSessionListingFields(liveSession);
|
|
53
|
+
const liveMeta = liveSession.header;
|
|
54
|
+
if (!headerById.has(currentId) && liveListed.id !== undefined) {
|
|
55
|
+
headerById.set(currentId, {
|
|
56
|
+
header: {
|
|
57
|
+
id: liveListed.id,
|
|
58
|
+
cwd: liveListed.cwd,
|
|
59
|
+
createdAt: liveListed.createdAt,
|
|
60
|
+
parentSession: liveListed.parentSession,
|
|
61
|
+
origin: liveListed.origin,
|
|
62
|
+
delegationDepth: liveListed.delegationDepth,
|
|
63
|
+
seedLength: liveListed.seedLength,
|
|
64
|
+
agentPreset: liveListed.agentPreset,
|
|
65
|
+
},
|
|
66
|
+
raw: liveMeta,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// Family = the live session's ancestor chain PLUS every descendant of
|
|
70
|
+
// its topmost known ancestor (siblings and cousins included).
|
|
71
|
+
const childrenByParent = new Map();
|
|
72
|
+
for (const entry of local) {
|
|
73
|
+
if (entry.header.parentSession === undefined)
|
|
74
|
+
continue;
|
|
75
|
+
const list = childrenByParent.get(entry.header.parentSession);
|
|
76
|
+
if (list === undefined)
|
|
77
|
+
childrenByParent.set(entry.header.parentSession, [entry.header.id]);
|
|
78
|
+
else
|
|
79
|
+
list.push(entry.header.id);
|
|
80
|
+
}
|
|
81
|
+
const ancestorIds = [];
|
|
82
|
+
{
|
|
83
|
+
const visited = new Set([currentId]);
|
|
84
|
+
let cursor = headerById.get(currentId);
|
|
85
|
+
while (cursor?.header.parentSession !== undefined) {
|
|
86
|
+
const parentId = cursor.header.parentSession;
|
|
87
|
+
if (visited.has(parentId))
|
|
88
|
+
break;
|
|
89
|
+
visited.add(parentId);
|
|
90
|
+
if (!headerById.has(parentId))
|
|
91
|
+
break;
|
|
92
|
+
ancestorIds.push(parentId);
|
|
93
|
+
cursor = headerById.get(parentId);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// BFS from the topmost ancestor. The scan must NOT be gated by family
|
|
97
|
+
// membership: ancestor-chain nodes are already in the family, and
|
|
98
|
+
// skipping them here would never enumerate their other children —
|
|
99
|
+
// siblings/cousins forking off a MIDDLE ancestor would be lost.
|
|
100
|
+
const family = new Set([currentId, ...ancestorIds]);
|
|
101
|
+
{
|
|
102
|
+
const scanned = new Set();
|
|
103
|
+
const queue = [ancestorIds.at(-1) ?? currentId];
|
|
104
|
+
while (queue.length > 0) {
|
|
105
|
+
const id = queue.shift();
|
|
106
|
+
if (scanned.has(id))
|
|
107
|
+
continue;
|
|
108
|
+
scanned.add(id);
|
|
109
|
+
family.add(id);
|
|
110
|
+
for (const child of childrenByParent.get(id) ?? []) {
|
|
111
|
+
queue.push(child);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Processing order is TOPOLOGICAL (a parent before its children): the
|
|
116
|
+
// coverage bookkeeping below — which seq range each chain already
|
|
117
|
+
// shows — feeds the next read's inherited-prefix skip, so a parent
|
|
118
|
+
// must be read before its forks. Within each sibling group the live
|
|
119
|
+
// chain wins, then newest first (the same priority the read budget
|
|
120
|
+
// always had).
|
|
121
|
+
const ancestorSet = new Set(ancestorIds);
|
|
122
|
+
const priorityOf = (a, b) => {
|
|
123
|
+
const aChain = a === currentId || ancestorSet.has(a);
|
|
124
|
+
const bChain = b === currentId || ancestorSet.has(b);
|
|
125
|
+
if (aChain !== bChain)
|
|
126
|
+
return aChain ? -1 : 1;
|
|
127
|
+
return (headerById.get(b)?.header.createdAt ?? 0) - (headerById.get(a)?.header.createdAt ?? 0);
|
|
128
|
+
};
|
|
129
|
+
const kidsOf = new Map();
|
|
130
|
+
const familyRoots = [];
|
|
131
|
+
for (const id of family) {
|
|
132
|
+
const parentId = headerById.get(id)?.header.parentSession;
|
|
133
|
+
if (parentId !== undefined && parentId !== id && family.has(parentId)) {
|
|
134
|
+
const list = kidsOf.get(parentId);
|
|
135
|
+
if (list === undefined)
|
|
136
|
+
kidsOf.set(parentId, [id]);
|
|
137
|
+
else
|
|
138
|
+
list.push(id);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
familyRoots.push(id);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
familyRoots.sort(priorityOf);
|
|
145
|
+
for (const list of kidsOf.values())
|
|
146
|
+
list.sort(priorityOf);
|
|
147
|
+
const ordered = [];
|
|
148
|
+
{
|
|
149
|
+
const seen = new Set();
|
|
150
|
+
const stack = [...familyRoots].reverse();
|
|
151
|
+
while (stack.length > 0) {
|
|
152
|
+
const id = stack.pop();
|
|
153
|
+
if (seen.has(id))
|
|
154
|
+
continue;
|
|
155
|
+
seen.add(id);
|
|
156
|
+
ordered.push(id);
|
|
157
|
+
const kids = kidsOf.get(id);
|
|
158
|
+
if (kids !== undefined) {
|
|
159
|
+
for (let i = kids.length - 1; i >= 0; i--)
|
|
160
|
+
stack.push(kids[i]);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// Cycle-broken leftovers (corrupt parent headers) — never drop one.
|
|
164
|
+
for (const id of [...family].sort(priorityOf)) {
|
|
165
|
+
if (!seen.has(id))
|
|
166
|
+
ordered.push(id);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// Caps: the ancestor chain + live session ALWAYS stay selected — the
|
|
170
|
+
// structural invariant (the live branch must reach the family root)
|
|
171
|
+
// outranks the session cap, which therefore evicts only non-ancestors.
|
|
172
|
+
// The event budget bounds the READ cost too: non-live logs decode
|
|
173
|
+
// lazily and stop at the remaining budget (see below), the live
|
|
174
|
+
// session keeps only its tail.
|
|
175
|
+
const MAX_TREE_SESSIONS = 24;
|
|
176
|
+
const MAX_TREE_EVENTS = 200_000;
|
|
177
|
+
// The event budget alone does NOT bound read cost: skipped envelopes
|
|
178
|
+
// (ignorable frames, headers) are paid for but never collected, so a
|
|
179
|
+
// noisy log can return ZERO events and leave the next log a full scan
|
|
180
|
+
// allowance — 23 logs × ~800k envelopes would block the TUI for
|
|
181
|
+
// seconds. scanBudget caps the TOTAL envelopes inspected across all
|
|
182
|
+
// logs (the reader reports its real scanned count); per-log caps
|
|
183
|
+
// derive from the event budget as before, and the smaller of the two
|
|
184
|
+
// applies, so one flood cannot starve every later sibling either.
|
|
185
|
+
const MAX_TREE_SCANNED = defaultMaxScanned(MAX_TREE_EVENTS);
|
|
186
|
+
let scanBudget = MAX_TREE_SCANNED;
|
|
187
|
+
const selected = new Set();
|
|
188
|
+
let slots = MAX_TREE_SESSIONS;
|
|
189
|
+
for (const id of ordered) {
|
|
190
|
+
const chain = id === currentId || ancestorSet.has(id);
|
|
191
|
+
if (chain || slots > 0) {
|
|
192
|
+
selected.add(id);
|
|
193
|
+
if (!chain)
|
|
194
|
+
slots -= 1;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// The live session's events come from memory (its header may not be
|
|
198
|
+
// materialized yet — the jsonl backend writes on first append).
|
|
199
|
+
const liveHeader = headerById.get(currentId);
|
|
200
|
+
const familySessions = [];
|
|
201
|
+
let truncated = selected.size < family.size;
|
|
202
|
+
let eventBudget = 0;
|
|
203
|
+
// Coverage bookkeeping: coveredThrough(S) = the highest K such that
|
|
204
|
+
// [0..K] is already displayed by S's chain or an ancestor's. A fork's
|
|
205
|
+
// inherited seed prefix duplicates that range, so non-live reads SKIP
|
|
206
|
+
// it (the reader's skipBelowSeq): the prefix still costs scan budget
|
|
207
|
+
// (its bytes are read and parsed) but NOT the event budget — a fork
|
|
208
|
+
// of a huge parent pays only for its OWN events, so two small forks
|
|
209
|
+
// of a 70k-event parent both stay visible. Unreadable/unloaded
|
|
210
|
+
// sessions are transparent: they claim nothing beyond what their own
|
|
211
|
+
// ancestors covered, so a fork of a dead branch dedups against the
|
|
212
|
+
// grandparent instead of hiding its self-contained history.
|
|
213
|
+
const coveredThrough = new Map();
|
|
214
|
+
for (const id of ordered) {
|
|
215
|
+
if (!selected.has(id))
|
|
216
|
+
continue;
|
|
217
|
+
const entry = headerById.get(id);
|
|
218
|
+
if (id === currentId) {
|
|
219
|
+
const liveParentId = liveHeader?.header.parentSession ?? liveListed.parentSession;
|
|
220
|
+
const liveParent = liveParentId !== undefined ? String(liveParentId) : undefined;
|
|
221
|
+
const liveEvents = snapshotLiveSessionEvents(liveSession);
|
|
222
|
+
const remaining = Math.max(0, MAX_TREE_EVENTS - eventBudget);
|
|
223
|
+
// The live session's in-memory log is SELF-CONTAINED: a fork's
|
|
224
|
+
// events still carry the inherited seed prefix, which the parent's
|
|
225
|
+
// chain already displays (and already charged to the budget).
|
|
226
|
+
// Skipping it exactly like the non-live reads do keeps a live fork
|
|
227
|
+
// of a huge parent from spending the whole family budget on
|
|
228
|
+
// duplicated history and evicting its own siblings.
|
|
229
|
+
const liveSeed = liveHeader?.header.seedLength ?? liveListed.seedLength;
|
|
230
|
+
// A recorded parent without an exact cut is not a usable coverage
|
|
231
|
+
// edge: the pure tree detaches it, so forwarding the parent's range
|
|
232
|
+
// here would let descendants skip history no root displays.
|
|
233
|
+
const parentCovered = liveParent !== undefined && liveSeed !== undefined
|
|
234
|
+
? (coveredThrough.get(liveParent) ?? -1)
|
|
235
|
+
: -1;
|
|
236
|
+
const skipBelow = liveParent !== undefined && liveSeed !== undefined
|
|
237
|
+
? Math.min(liveSeed, parentCovered + 1)
|
|
238
|
+
: 0;
|
|
239
|
+
const own = skipBelow > 0
|
|
240
|
+
? liveEvents.filter(event => event.seq >= skipBelow || event.type === 'session/title')
|
|
241
|
+
: liveEvents;
|
|
242
|
+
// A live session larger than the remaining budget keeps its TAIL,
|
|
243
|
+
// aligned to whole turns (sessionTree.liveTailWindow): leftover
|
|
244
|
+
// entries of a turn whose turn/start was cut away render as
|
|
245
|
+
// selectable rows that can never rewind; a window holding no
|
|
246
|
+
// turn/start at all (one oversized LAST turn spans the budget)
|
|
247
|
+
// retries over the earlier complete turns instead of blacking the
|
|
248
|
+
// session out. Rewind itself never reads this copy (rewindToNode
|
|
249
|
+
// forks the real session), so the slice only narrows what the tree
|
|
250
|
+
// can display.
|
|
251
|
+
const events = liveTailWindow(own, remaining);
|
|
252
|
+
// Charge the KEPT tail, not the in-memory length: extraction only
|
|
253
|
+
// ever touches `events`, and charging the full log would black out
|
|
254
|
+
// every other family member's budget behind a discarded prefix.
|
|
255
|
+
eventBudget += events.length;
|
|
256
|
+
if (events.length !== own.length)
|
|
257
|
+
truncated = true;
|
|
258
|
+
familySessions.push({
|
|
259
|
+
id,
|
|
260
|
+
createdAt: liveHeader?.header.createdAt ?? liveListed.createdAt ?? Date.now(),
|
|
261
|
+
...(liveParent !== undefined ? { parentSession: liveParent } : {}),
|
|
262
|
+
...(liveHeader?.header.seedLength !== undefined || liveListed.seedLength !== undefined
|
|
263
|
+
? { seedLength: liveHeader?.header.seedLength ?? liveListed.seedLength }
|
|
264
|
+
: {}),
|
|
265
|
+
events,
|
|
266
|
+
live: true,
|
|
267
|
+
// The in-memory log always reaches the tip (liveTailWindow trims
|
|
268
|
+
// the head only), so the adopt/warning UX facts are derivable.
|
|
269
|
+
tailComplete: true,
|
|
270
|
+
});
|
|
271
|
+
// A kept tail cut off the front connects to nothing — coverage
|
|
272
|
+
// stays at the parent's (a fork of the live session re-reads the
|
|
273
|
+
// hidden prefix from its own log).
|
|
274
|
+
const firstKept = events.length > 0 ? events[0].seq : Number.POSITIVE_INFINITY;
|
|
275
|
+
const lastKept = events.length > 0 ? events[events.length - 1].seq : -1;
|
|
276
|
+
coveredThrough.set(id, firstKept <= parentCovered + 1 ? Math.max(parentCovered, lastKept) : parentCovered);
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
const header = entry?.header;
|
|
280
|
+
const parentId = header?.parentSession;
|
|
281
|
+
const structuralParentCovered = parentId !== undefined ? (coveredThrough.get(parentId) ?? -1) : -1;
|
|
282
|
+
const locate = persistence.locate;
|
|
283
|
+
const hasLocate = typeof locate === 'function';
|
|
284
|
+
let locatedPath;
|
|
285
|
+
if (hasLocate && entry !== undefined) {
|
|
286
|
+
try {
|
|
287
|
+
const location = locate.call(persistence, entry.raw);
|
|
288
|
+
// Only the jsonl kind enters the compat file layer — a foreign
|
|
289
|
+
// kind's artifact is the backend's own format (inspect below).
|
|
290
|
+
if (location !== null && typeof location === 'object') {
|
|
291
|
+
const record = location;
|
|
292
|
+
if (record.kind === 'jsonl' && typeof record.path === 'string') {
|
|
293
|
+
locatedPath = record.path;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
catch {
|
|
298
|
+
// Best effort — a locate hiccup falls through to inspect.
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
// Alpha.4 deliberately omits the inherited cut from logical list
|
|
302
|
+
// headers. Resolve it only for the SELECTED family node currently
|
|
303
|
+
// being read: JSONL keeps the exact physical `seedLength`; non-file
|
|
304
|
+
// backends expose the cut on inspect below. Never scan every listed
|
|
305
|
+
// session and never infer it from an end-seed marker or log length.
|
|
306
|
+
let inheritedCut = parentId === undefined ? undefined : readInheritedCut(entry?.raw);
|
|
307
|
+
if (parentId !== undefined && inheritedCut === undefined) {
|
|
308
|
+
inheritedCut = locatedPath !== undefined
|
|
309
|
+
? readPhysicalHeaderSeedLength(locatedPath)
|
|
310
|
+
: !hasLocate
|
|
311
|
+
? readPhysicalHeaderSeedLengthForSession(id)
|
|
312
|
+
: undefined;
|
|
313
|
+
}
|
|
314
|
+
// Keep structural ancestry separate from proven dedup coverage. The
|
|
315
|
+
// model layer detaches a parent edge whose exact cut is unavailable;
|
|
316
|
+
// treating that edge as covered here would hide a child's prefix
|
|
317
|
+
// under a parent root that no longer owns it.
|
|
318
|
+
let parentCovered = parentId !== undefined && inheritedCut !== undefined
|
|
319
|
+
? structuralParentCovered
|
|
320
|
+
: -1;
|
|
321
|
+
// Never skip past the seed prefix: events beyond it are this
|
|
322
|
+
// session's OWN — no ancestor can show them. A parent that was never
|
|
323
|
+
// read (evicted, or outside the family) covers nothing (skip 0).
|
|
324
|
+
let skipBelow = parentId !== undefined && inheritedCut !== undefined
|
|
325
|
+
? Math.min(inheritedCut, parentCovered + 1)
|
|
326
|
+
: 0;
|
|
327
|
+
let facts = {
|
|
328
|
+
id,
|
|
329
|
+
createdAt: header?.createdAt ?? 0,
|
|
330
|
+
events: [],
|
|
331
|
+
live: false,
|
|
332
|
+
...(parentId !== undefined ? { parentSession: parentId } : {}),
|
|
333
|
+
...(inheritedCut !== undefined ? { seedLength: inheritedCut } : {}),
|
|
334
|
+
};
|
|
335
|
+
if (eventBudget >= MAX_TREE_EVENTS || scanBudget <= 0) {
|
|
336
|
+
// Budget spent: keep the STRUCTURE — the session degrades to an
|
|
337
|
+
// unloaded placeholder so its branch (and any ancestor chain
|
|
338
|
+
// through it) stays visible instead of vanishing from the tree.
|
|
339
|
+
truncated = true;
|
|
340
|
+
familySessions.push({ ...facts, events: [], live: false, unloaded: true });
|
|
341
|
+
coveredThrough.set(id, parentCovered);
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
// Read-only, tolerant, bounded: the compat reader decodes frames
|
|
345
|
+
// lazily and stops at the remaining event budget. Browsing the tree
|
|
346
|
+
// must never REWRITE history logs (the ignorable-marking repair
|
|
347
|
+
// stays on the explicit resume/rewind path), and the strict backend
|
|
348
|
+
// inspect would both reject third-party event types wholesale and
|
|
349
|
+
// parse chunk-heavy logs whole. Header facts come from list().
|
|
350
|
+
const remaining = MAX_TREE_EVENTS - eventBudget;
|
|
351
|
+
// Source precedence, all read-only:
|
|
352
|
+
// 1. persistence.locate — the backend's OWN artifact resolution is
|
|
353
|
+
// authoritative (custom root, workspace-key scheme). When it
|
|
354
|
+
// names a path, ONLY that file is read: falling back to a
|
|
355
|
+
// same-id copy under the stock root could surface a STALE log
|
|
356
|
+
// from another backend configuration. A locate miss or an ABSENT
|
|
357
|
+
// file falls through to inspect, never to the stock scan.
|
|
358
|
+
// 2. Stock root scan — only for backends WITHOUT locate (fakes,
|
|
359
|
+
// older custom implementations).
|
|
360
|
+
// 3. inspect — the backend's strict read (non-file backends), with
|
|
361
|
+
// the same budget enforced on what we keep — and ONLY when the
|
|
362
|
+
// file read found NOTHING (undefined). A read that failed on a
|
|
363
|
+
// safety cap or corruption (failed) must never escalate here:
|
|
364
|
+
// inspect parses the WHOLE log up front, so falling through
|
|
365
|
+
// would re-read unboundedly exactly the logs the caps exist to
|
|
366
|
+
// bound (64 MiB frames, decode bombs) — degrade to a placeholder
|
|
367
|
+
// instead.
|
|
368
|
+
let events;
|
|
369
|
+
let physicalVersion;
|
|
370
|
+
let complete = true;
|
|
371
|
+
let failed = false;
|
|
372
|
+
// First seq the chosen source actually covers: the file readers start
|
|
373
|
+
// at the inherited-prefix skip, inspect always hands the whole log.
|
|
374
|
+
let readFrom = 0;
|
|
375
|
+
// Per-log scan allowance: the usual 4×-of-remaining derivation,
|
|
376
|
+
// clamped to what the tree-level scan budget still has.
|
|
377
|
+
const scanAllowance = Math.min(defaultMaxScanned(remaining), scanBudget);
|
|
378
|
+
if (hasLocate) {
|
|
379
|
+
if (locatedPath !== undefined) {
|
|
380
|
+
const viaPath = readSessionEventsFromFile(locatedPath, remaining, scanAllowance, skipBelow);
|
|
381
|
+
if (viaPath !== undefined) {
|
|
382
|
+
physicalVersion = viaPath.formatVersion;
|
|
383
|
+
scanBudget -= viaPath.scanned;
|
|
384
|
+
if (viaPath.failed === true)
|
|
385
|
+
failed = true;
|
|
386
|
+
else {
|
|
387
|
+
events = viaPath.events;
|
|
388
|
+
complete = viaPath.complete;
|
|
389
|
+
readFrom = skipBelow;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
else if (!hasLocate) {
|
|
395
|
+
const read = readSessionEventsFromLog(id, remaining, scanAllowance, skipBelow);
|
|
396
|
+
if (read !== undefined) {
|
|
397
|
+
physicalVersion = read.formatVersion;
|
|
398
|
+
scanBudget -= read.scanned;
|
|
399
|
+
if (read.failed === true)
|
|
400
|
+
failed = true;
|
|
401
|
+
else {
|
|
402
|
+
events = read.events;
|
|
403
|
+
complete = read.complete;
|
|
404
|
+
readFrom = skipBelow;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
// Raw historical files use pre-migration seq coordinates. Normalize
|
|
409
|
+
// only a fully budget-checked file through the same read handle used
|
|
410
|
+
// by rewind/fork. Failed or truncated reads never escalate to a full
|
|
411
|
+
// backend parse, and cannot lend old coordinates to a V3 child.
|
|
412
|
+
const needsMigration = typeof persistence.open === 'function'
|
|
413
|
+
&& physicalVersion !== liveSession.header.version;
|
|
414
|
+
if (needsMigration && !complete) {
|
|
415
|
+
failed = true;
|
|
416
|
+
truncated = true;
|
|
417
|
+
}
|
|
418
|
+
if (!failed && typeof persistence.open === 'function' && (events === undefined || needsMigration)) {
|
|
419
|
+
try {
|
|
420
|
+
const inspection = await readPersistedSession(persistence, SessionId(id));
|
|
421
|
+
if (inspection.meta.version !== liveSession.header.version)
|
|
422
|
+
throw new Error('session tree generation mismatch');
|
|
423
|
+
inheritedCut = parentId === undefined ? undefined : readInheritedCut(inspection);
|
|
424
|
+
parentCovered = inheritedCut === undefined ? -1 : structuralParentCovered;
|
|
425
|
+
skipBelow = inheritedCut === undefined ? 0 : Math.min(inheritedCut, parentCovered + 1);
|
|
426
|
+
facts = { ...facts, seedLength: inheritedCut };
|
|
427
|
+
scanBudget -= inspection.events.length;
|
|
428
|
+
const all = inspection.events.filter(event => event.seq >= skipBelow || event.type === 'session/title');
|
|
429
|
+
events = all.slice(0, remaining);
|
|
430
|
+
complete = all.length <= remaining;
|
|
431
|
+
readFrom = skipBelow;
|
|
432
|
+
}
|
|
433
|
+
catch {
|
|
434
|
+
failed = true;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
if (needsMigration && failed) {
|
|
438
|
+
// Preserve the branch as a non-actionable placeholder. Its original
|
|
439
|
+
// inherited cut is not comparable to normalized family coordinates.
|
|
440
|
+
inheritedCut = undefined;
|
|
441
|
+
parentCovered = -1;
|
|
442
|
+
facts = { ...facts, seedLength: undefined };
|
|
443
|
+
}
|
|
444
|
+
if (!failed && events === undefined && typeof persistence.inspect === 'function') {
|
|
445
|
+
try {
|
|
446
|
+
const inspection = await persistence.inspect(SessionId(id));
|
|
447
|
+
const inspectedCut = readInheritedCut(inspection);
|
|
448
|
+
if (parentId !== undefined && inheritedCut === undefined && inspectedCut !== undefined) {
|
|
449
|
+
inheritedCut = inspectedCut;
|
|
450
|
+
parentCovered = structuralParentCovered;
|
|
451
|
+
skipBelow = parentId !== undefined
|
|
452
|
+
? Math.min(inheritedCut, parentCovered + 1)
|
|
453
|
+
: 0;
|
|
454
|
+
facts = { ...facts, seedLength: inheritedCut };
|
|
455
|
+
}
|
|
456
|
+
// inspect parses the WHOLE log up front: charge the full length
|
|
457
|
+
// to the scan budget (may overdraw; the next iterations skip).
|
|
458
|
+
scanBudget -= inspection.events.length;
|
|
459
|
+
// Non-file backends hand back the self-contained log from seq 0:
|
|
460
|
+
// the inherited-prefix skip the file readers got must apply here
|
|
461
|
+
// too, or a long prefix would fill the slice and the branch's OWN
|
|
462
|
+
// events — the only ones nobody else displays — would be cut.
|
|
463
|
+
const all = skipBelow > 0
|
|
464
|
+
? inspection.events.filter(event => event.seq >= skipBelow || event.type === 'session/title')
|
|
465
|
+
: inspection.events;
|
|
466
|
+
readFrom = skipBelow;
|
|
467
|
+
events = all;
|
|
468
|
+
if (events.length > remaining) {
|
|
469
|
+
events = events.slice(0, remaining);
|
|
470
|
+
complete = false;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
catch {
|
|
474
|
+
events = undefined;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
if (failed || events === undefined) {
|
|
478
|
+
// An unreadable log keeps the branch structure, no entries — and
|
|
479
|
+
// stays transparent for coverage, so a fork of this branch dedups
|
|
480
|
+
// against the grandparent instead of hiding its own history.
|
|
481
|
+
familySessions.push({ ...facts, events: [], live: false, unreadable: true });
|
|
482
|
+
coveredThrough.set(id, parentCovered);
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
eventBudget += events.length;
|
|
486
|
+
if (!complete)
|
|
487
|
+
truncated = true;
|
|
488
|
+
// tailComplete gates the branch-adopt target and the drop-turn
|
|
489
|
+
// warning: a budget-sliced read lost the tail, and a tip computed
|
|
490
|
+
// from it would fork mid-branch while claiming to keep everything.
|
|
491
|
+
familySessions.push({ ...facts, events, live: false, ...(complete ? { tailComplete: true } : {}) });
|
|
492
|
+
const lastRead = events.length > 0 ? events[events.length - 1].seq : -1;
|
|
493
|
+
coveredThrough.set(id, readFrom <= parentCovered + 1 ? Math.max(parentCovered, lastRead) : parentCovered);
|
|
494
|
+
}
|
|
495
|
+
// A session swap mid-build invalidates the whole assembly (it mixes
|
|
496
|
+
// the snapshot's lineage with headers listed for the OLD cwd state):
|
|
497
|
+
// drop it silently — the reopened tree rebuilds on the new session.
|
|
498
|
+
if (!owner.current() || binding.agent.session !== liveSession)
|
|
499
|
+
return null;
|
|
500
|
+
return buildSessionTree(familySessions, currentId, truncated);
|
|
501
|
+
}
|
|
502
|
+
return readTree;
|
|
503
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { ChannelState } from '../channel/types.js';
|
|
3
|
+
export declare function createSettingsHosts(ctx: Context, assertActive?: () => void): Pick<ChannelState, 'settingsHost' | 'providerSetup' | 'oauthProviderStatuses'>;
|
|
4
|
+
//# sourceMappingURL=settings-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-host.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/settings-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAKvD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,YAAY,GAAE,MAAM,IAAsB,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,eAAe,GAAG,uBAAuB,CAAC,CAqT5K"}
|