@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,572 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal real Adapter Kernel runtime (P2).
|
|
3
|
+
*
|
|
4
|
+
* Responsibility:
|
|
5
|
+
* - register/mount upstream driver objects,
|
|
6
|
+
* - run structured detection and the `declared → staged → live` lifecycle,
|
|
7
|
+
* - run reversible live verification outside passive/replay production modes,
|
|
8
|
+
* - keep a unified evidence snapshot used by Host Descriptor / HostFacade /
|
|
9
|
+
* diagnostics,
|
|
10
|
+
* - support passive-shadow (read-only detect only) and replay-shadow
|
|
11
|
+
* (isolated mock/replay contexts; the harness calls refresh with
|
|
12
|
+
* `allowReplay` on mock data only).
|
|
13
|
+
*
|
|
14
|
+
* This is intentionally small: business translation, protocol semantics and
|
|
15
|
+
* plugin admission remain in upstream/standard layers. The Kernel only owns
|
|
16
|
+
* composition, lifecycle promotion and diagnostics.
|
|
17
|
+
*/
|
|
18
|
+
import { verifyAndPromote } from './lifecycle.js';
|
|
19
|
+
import { isReplayIsolationActive } from './replay-isolation.js';
|
|
20
|
+
import { normalizeAdapterSliceList, shadowPolicyAllowed, sliceForCapability } from './runtime.js';
|
|
21
|
+
import { buildHostDescriptorFromLifecycles } from '../standard/descriptor.js';
|
|
22
|
+
import { createShadowGuardedHostFacade } from './host-facade.js';
|
|
23
|
+
import { onTuiChannelRegistered } from '../channel/host-registry.js';
|
|
24
|
+
function deepFreeze(value, seen = new WeakSet()) {
|
|
25
|
+
if (value === null || typeof value !== 'object' || seen.has(value))
|
|
26
|
+
return value;
|
|
27
|
+
seen.add(value);
|
|
28
|
+
for (const child of Object.values(value))
|
|
29
|
+
deepFreeze(child, seen);
|
|
30
|
+
return Object.freeze(value);
|
|
31
|
+
}
|
|
32
|
+
export class KernelRuntime {
|
|
33
|
+
mode;
|
|
34
|
+
generationId;
|
|
35
|
+
context;
|
|
36
|
+
drivers;
|
|
37
|
+
kernelSlices;
|
|
38
|
+
slices;
|
|
39
|
+
hostId;
|
|
40
|
+
hostVersion;
|
|
41
|
+
headless;
|
|
42
|
+
lifecycles;
|
|
43
|
+
descriptorCache;
|
|
44
|
+
mountDisposers = new Map();
|
|
45
|
+
mountedPorts = new Map();
|
|
46
|
+
mountedDriverIds = new Set();
|
|
47
|
+
driverDetections = new Map();
|
|
48
|
+
liveVerifiedAt = new Map();
|
|
49
|
+
lastVerifiedLifecycles = new Map();
|
|
50
|
+
refreshTtlMs;
|
|
51
|
+
lastRefreshAt;
|
|
52
|
+
refreshState = 'pending';
|
|
53
|
+
refreshError;
|
|
54
|
+
refreshTimer;
|
|
55
|
+
refreshInFlight;
|
|
56
|
+
refreshRerunRequested = false;
|
|
57
|
+
mountPromise;
|
|
58
|
+
unsubscribeChannelListener;
|
|
59
|
+
disposed = false;
|
|
60
|
+
constructor(options) {
|
|
61
|
+
this.context = options.context;
|
|
62
|
+
this.mode = options.mode;
|
|
63
|
+
this.generationId = options.generationId;
|
|
64
|
+
this.kernelSlices = options.kernelSlices;
|
|
65
|
+
const selectedSlices = normalizeAdapterSliceList(options.slices ?? []);
|
|
66
|
+
this.slices = selectedSlices;
|
|
67
|
+
const requestedKernelSlices = selectedSlices.length === 0
|
|
68
|
+
? (options.kernelSlices ?? [])
|
|
69
|
+
: (options.kernelSlices ?? []).filter(slice => selectedSlices.includes(slice.id)
|
|
70
|
+
|| selectedSlices.includes(slice.capability)
|
|
71
|
+
|| slice.standardDeclarations.some(declaration => {
|
|
72
|
+
const mapped = sliceForCapability(declaration);
|
|
73
|
+
return mapped !== undefined && selectedSlices.includes(mapped);
|
|
74
|
+
}));
|
|
75
|
+
this.drivers = Object.freeze([
|
|
76
|
+
...requestedKernelSlices.map(slice => slice.driver),
|
|
77
|
+
...(options.drivers ?? []),
|
|
78
|
+
]);
|
|
79
|
+
this.hostId = options.hostId;
|
|
80
|
+
this.hostVersion = options.hostVersion;
|
|
81
|
+
this.headless = options.headless;
|
|
82
|
+
this.refreshTtlMs = options.refreshTtlMs ?? 30_000;
|
|
83
|
+
this.lifecycles = Object.freeze([]);
|
|
84
|
+
this.detect();
|
|
85
|
+
// The TUI plugin can create/register its live Channel after this Kernel has
|
|
86
|
+
// already started. Re-run refresh/mount on registration so a late Channel
|
|
87
|
+
// is picked up without requiring a host restart.
|
|
88
|
+
this.unsubscribeChannelListener = onTuiChannelRegistered(this.context, () => {
|
|
89
|
+
if (this.disposed)
|
|
90
|
+
return;
|
|
91
|
+
void this.refresh().catch(() => undefined);
|
|
92
|
+
void this.mount().catch(() => undefined);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/** Synchronous detection: never performs reversible/side-effectful probes.
|
|
96
|
+
* It consumes each driver's structured `detect()` for diagnostics and, for
|
|
97
|
+
* drivers with a lifecycle projection, builds the publication evidence. */
|
|
98
|
+
detect() {
|
|
99
|
+
const detected = [];
|
|
100
|
+
for (const driver of this.drivers) {
|
|
101
|
+
// Structured driver detection is consumed here (not in a parallel
|
|
102
|
+
// path); it feeds diagnostics and remains available for doctor output.
|
|
103
|
+
try {
|
|
104
|
+
this.driverDetections.set(driver.id, driver.detect(this.context));
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
this.driverDetections.set(driver.id, {
|
|
108
|
+
state: 'unsupported',
|
|
109
|
+
reason: `driver.detect() threw: ${error instanceof Error ? error.message : String(error)}`,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
if (driver.lifecycles !== undefined) {
|
|
113
|
+
const projected = driver.lifecycles(this.context);
|
|
114
|
+
detected.push(...projected.map(verifyAndPromote));
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
// P3 slices often expose only detect()/verifyLive(). Their cached
|
|
118
|
+
// verified features are only a *current* fact inside a fresh,
|
|
119
|
+
// successful verification window; outside that window (failed
|
|
120
|
+
// refresh, expired TTL, unsupported detect, or dispose) the cache must
|
|
121
|
+
// not be treated as live/detected state anymore.
|
|
122
|
+
const detection = this.driverDetections.get(driver.id);
|
|
123
|
+
if (this.hasFreshVerification()
|
|
124
|
+
&& detection?.state !== 'unsupported'
|
|
125
|
+
&& !this.disposed) {
|
|
126
|
+
const cached = this.lastVerifiedLifecycles.get(driver.id);
|
|
127
|
+
if (cached !== undefined)
|
|
128
|
+
detected.push(...cached);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// A driver without a lifecycle projection is not yet part of the P2
|
|
132
|
+
// publication path; it remains a diagnostic-only driver.
|
|
133
|
+
}
|
|
134
|
+
// Preserve a live capability only while its last successful reversible
|
|
135
|
+
// verification is still fresh. Detection alone is no longer a permanent
|
|
136
|
+
// live claim: when probe evidence is missing, refresh has failed, or the
|
|
137
|
+
// freshness TTL has expired, the lifecycle falls back to the current sync
|
|
138
|
+
// (staged/degraded) projection. DecisionEvents is deliberately re-derived
|
|
139
|
+
// on every detect so removing the dispatch marker removes publication
|
|
140
|
+
// immediately.
|
|
141
|
+
this.replaceLifecycles(this.preserveFreshVerifiedLifecycles(detected));
|
|
142
|
+
return this.lifecycles;
|
|
143
|
+
}
|
|
144
|
+
hasFreshVerification() {
|
|
145
|
+
return !this.disposed
|
|
146
|
+
&& this.refreshState === 'completed'
|
|
147
|
+
&& this.lastRefreshAt !== undefined
|
|
148
|
+
&& (Date.now() - this.lastRefreshAt) <= this.refreshTtlMs;
|
|
149
|
+
}
|
|
150
|
+
preserveFreshVerifiedLifecycles(detected) {
|
|
151
|
+
const previous = new Map(this.lifecycles.map(lifecycle => [lifecycle.capability, lifecycle]));
|
|
152
|
+
const now = Date.now();
|
|
153
|
+
const next = [];
|
|
154
|
+
for (const lifecycle of detected) {
|
|
155
|
+
const prior = previous.get(lifecycle.capability);
|
|
156
|
+
const decisionLifecycle = lifecycle.capability.includes('#DecisionEvents')
|
|
157
|
+
|| lifecycle.coordinate?.kind === 'DecisionEvents';
|
|
158
|
+
const verifiedAt = this.liveVerifiedAt.get(lifecycle.capability);
|
|
159
|
+
const fresh = verifiedAt !== undefined && (now - verifiedAt) <= this.refreshTtlMs;
|
|
160
|
+
if (!decisionLifecycle && prior?.state === 'live'
|
|
161
|
+
&& this.refreshState === 'completed'
|
|
162
|
+
&& fresh
|
|
163
|
+
&& this.sameCriticalMethodEvidence(prior, lifecycle)) {
|
|
164
|
+
next.push(prior);
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
next.push(lifecycle);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return next;
|
|
171
|
+
}
|
|
172
|
+
lifecycleKey(lifecycles) {
|
|
173
|
+
return lifecycles
|
|
174
|
+
.map(lifecycle => [
|
|
175
|
+
lifecycle.capability,
|
|
176
|
+
lifecycle.state,
|
|
177
|
+
lifecycle.coordinate?.apiVersion ?? '',
|
|
178
|
+
lifecycle.coordinate?.kind ?? '',
|
|
179
|
+
JSON.stringify(lifecycle.detection),
|
|
180
|
+
JSON.stringify(lifecycle.liveFeatures ?? []),
|
|
181
|
+
].join('::'))
|
|
182
|
+
.sort()
|
|
183
|
+
.join('||');
|
|
184
|
+
}
|
|
185
|
+
replaceLifecycles(next) {
|
|
186
|
+
const previousKey = this.lifecycleKey(this.lifecycles);
|
|
187
|
+
this.lifecycles = Object.freeze(next.map(lifecycle => deepFreeze(lifecycle)));
|
|
188
|
+
if (this.lifecycleKey(this.lifecycles) !== previousKey) {
|
|
189
|
+
this.invalidateDescriptor();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
sameCriticalMethodEvidence(previous, current) {
|
|
193
|
+
if (current.detection.state === 'unsupported')
|
|
194
|
+
return false;
|
|
195
|
+
const priorMethods = new Set((previous.detection.state === 'supported' || previous.detection.state === 'degraded'
|
|
196
|
+
? (previous.detection.evidence ?? []).filter(item => item.kind === 'method').map(item => item.id)
|
|
197
|
+
: []));
|
|
198
|
+
if (priorMethods.size === 0)
|
|
199
|
+
return false;
|
|
200
|
+
const currentMethods = new Set((current.detection.state === 'supported' || current.detection.state === 'degraded'
|
|
201
|
+
? (current.detection.evidence ?? []).filter(item => item.kind === 'method').map(item => item.id)
|
|
202
|
+
: []));
|
|
203
|
+
for (const id of priorMethods) {
|
|
204
|
+
if (!currentMethods.has(id))
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Run reversible live verification.
|
|
211
|
+
*
|
|
212
|
+
* In passive-shadow production mode this is skipped (read-only only). In
|
|
213
|
+
* replay-shadow production mode this is also skipped unless the caller
|
|
214
|
+
* explicitly passes `allowReplay: true` for an isolated replay/mock context.
|
|
215
|
+
*/
|
|
216
|
+
async refresh(options = {}) {
|
|
217
|
+
if (this.refreshInFlight !== undefined) {
|
|
218
|
+
// A refresh is already running. If the live Channel registers (or any
|
|
219
|
+
// other state changes) while it is in flight, ask for a background rerun
|
|
220
|
+
// after the current pass completes so late registrations are not only
|
|
221
|
+
// observed on the next TTL.
|
|
222
|
+
this.refreshRerunRequested = true;
|
|
223
|
+
return this.refreshInFlight;
|
|
224
|
+
}
|
|
225
|
+
const run = this.refreshInternal(options);
|
|
226
|
+
this.refreshInFlight = run;
|
|
227
|
+
try {
|
|
228
|
+
return await run;
|
|
229
|
+
}
|
|
230
|
+
finally {
|
|
231
|
+
if (this.refreshInFlight === run)
|
|
232
|
+
this.refreshInFlight = undefined;
|
|
233
|
+
if (this.refreshRerunRequested && !this.disposed) {
|
|
234
|
+
this.refreshRerunRequested = false;
|
|
235
|
+
void this.refresh(options).catch(() => undefined);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
async refreshInternal(options = {}) {
|
|
240
|
+
if (this.disposed) {
|
|
241
|
+
this.refreshState = 'skipped';
|
|
242
|
+
this.refreshError = 'kernel disposed while refresh was in flight';
|
|
243
|
+
return this.lifecycles;
|
|
244
|
+
}
|
|
245
|
+
const isReplayIsolated = this.mode === 'replay-shadow'
|
|
246
|
+
&& options.allowReplay === true
|
|
247
|
+
&& isReplayIsolationActive();
|
|
248
|
+
if (this.mode === 'passive-shadow') {
|
|
249
|
+
this.refreshState = 'skipped';
|
|
250
|
+
this.refreshError = 'passive-shadow: reversible live probes are not run on a real host';
|
|
251
|
+
return this.lifecycles;
|
|
252
|
+
}
|
|
253
|
+
if (this.mode === 'replay-shadow' && !isReplayIsolated) {
|
|
254
|
+
this.refreshState = 'skipped';
|
|
255
|
+
this.refreshError = 'replay-shadow: run through the replay harness with an isolated replay context, not real-host live refresh';
|
|
256
|
+
return this.lifecycles;
|
|
257
|
+
}
|
|
258
|
+
try {
|
|
259
|
+
if (this.disposed) {
|
|
260
|
+
this.refreshState = 'skipped';
|
|
261
|
+
this.refreshError = 'kernel disposed while refresh was in flight';
|
|
262
|
+
return this.lifecycles;
|
|
263
|
+
}
|
|
264
|
+
const lifecycles = [];
|
|
265
|
+
for (const driver of this.drivers) {
|
|
266
|
+
if (this.disposed) {
|
|
267
|
+
this.refreshState = 'skipped';
|
|
268
|
+
this.refreshError = 'kernel disposed while refresh was in flight';
|
|
269
|
+
return this.lifecycles;
|
|
270
|
+
}
|
|
271
|
+
// Mutate-class drivers must never run their live verifier under a
|
|
272
|
+
// shadow/replay mode: their probes write real host state (status,
|
|
273
|
+
// toasts) even when the Kernel runs on an isolated replay context.
|
|
274
|
+
// In legacy/new modes the runtime is not a shadow, so the live path is
|
|
275
|
+
// allowed.
|
|
276
|
+
if (driver.mountEffectClass === 'mutate' && this.mode !== 'new' && this.mode !== 'legacy') {
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
let verified;
|
|
280
|
+
if (driver.verifyLive !== undefined) {
|
|
281
|
+
verified = (await driver.verifyLive(this.context)).map(verifyAndPromote);
|
|
282
|
+
if (this.disposed) {
|
|
283
|
+
this.refreshState = 'skipped';
|
|
284
|
+
this.refreshError = 'kernel disposed while refresh was in flight';
|
|
285
|
+
return this.lifecycles;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
// Keep the sync projection for drivers with no live verifier.
|
|
290
|
+
verified = (driver.lifecycles?.(this.context) ?? []).map(verifyAndPromote);
|
|
291
|
+
}
|
|
292
|
+
this.lastVerifiedLifecycles.set(driver.id, Object.freeze([...verified]));
|
|
293
|
+
lifecycles.push(...verified);
|
|
294
|
+
}
|
|
295
|
+
if (this.disposed) {
|
|
296
|
+
this.refreshState = 'skipped';
|
|
297
|
+
this.refreshError = 'kernel disposed while refresh was in flight';
|
|
298
|
+
return this.lifecycles;
|
|
299
|
+
}
|
|
300
|
+
this.replaceLifecycles(lifecycles);
|
|
301
|
+
this.refreshState = 'completed';
|
|
302
|
+
this.refreshError = undefined;
|
|
303
|
+
this.lastRefreshAt = Date.now();
|
|
304
|
+
this.liveVerifiedAt.clear();
|
|
305
|
+
for (const lifecycle of this.lifecycles) {
|
|
306
|
+
if (lifecycle.state === 'live')
|
|
307
|
+
this.liveVerifiedAt.set(lifecycle.capability, this.lastRefreshAt);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
catch (error) {
|
|
311
|
+
this.refreshState = 'failed';
|
|
312
|
+
this.refreshError = error instanceof Error ? error.message : String(error);
|
|
313
|
+
this.lastRefreshAt = Date.now();
|
|
314
|
+
// A failed refresh must not leave a stale live claim. Downgrade to the
|
|
315
|
+
// current synchronous detection (staged/degraded/unsupported).
|
|
316
|
+
this.liveVerifiedAt.clear();
|
|
317
|
+
try {
|
|
318
|
+
this.detect();
|
|
319
|
+
}
|
|
320
|
+
catch {
|
|
321
|
+
// Detection errors are diagnostics-only; keep this.lifecycles honest.
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return this.lifecycles;
|
|
325
|
+
}
|
|
326
|
+
currentLifecycles() {
|
|
327
|
+
return this.lifecycles;
|
|
328
|
+
}
|
|
329
|
+
/** Whether async live verification has completed successfully. */
|
|
330
|
+
isRefreshCompleted() {
|
|
331
|
+
return this.refreshState === 'completed';
|
|
332
|
+
}
|
|
333
|
+
/** Diagnostic refresh state. */
|
|
334
|
+
refreshStatus() {
|
|
335
|
+
return this.refreshState;
|
|
336
|
+
}
|
|
337
|
+
descriptorBuild() {
|
|
338
|
+
// Re-applying the synchronous projection before publication enforces live
|
|
339
|
+
// freshness: stale/failed live claims are downgraded before any host
|
|
340
|
+
// descriptor/hostDescriptor read returns. When the evidence is stale,
|
|
341
|
+
// kick a real refresh in the background so a long-running process can
|
|
342
|
+
// recover live support without a manual restart.
|
|
343
|
+
if (this.needsAutoRefresh()) {
|
|
344
|
+
this.startAutoRefreshTimer();
|
|
345
|
+
void this.refresh().catch(() => undefined);
|
|
346
|
+
}
|
|
347
|
+
this.detect();
|
|
348
|
+
if (this.descriptorCache === undefined) {
|
|
349
|
+
// P3 feature lifecycles are internal Host Port facts (e.g.
|
|
350
|
+
// `host.workspaces.list`) and intentionally have no protocol
|
|
351
|
+
// coordinate. Keep them for Kernel diagnostics, but do not pass them
|
|
352
|
+
// into the public Host Descriptor builder: they are not negotiated
|
|
353
|
+
// protocol contracts and must not appear as descriptor noise or
|
|
354
|
+
// publication claims.
|
|
355
|
+
const publicLifecycles = this.lifecycles.filter(lifecycle => {
|
|
356
|
+
if (lifecycle.coordinate !== undefined)
|
|
357
|
+
return true;
|
|
358
|
+
const hash = lifecycle.capability.indexOf('#');
|
|
359
|
+
return hash > 0 && hash < lifecycle.capability.length - 1;
|
|
360
|
+
});
|
|
361
|
+
this.descriptorCache = buildHostDescriptorFromLifecycles(publicLifecycles, {
|
|
362
|
+
generationId: this.generationId,
|
|
363
|
+
hostId: this.hostId,
|
|
364
|
+
hostVersion: this.hostVersion,
|
|
365
|
+
headless: this.headless,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
return this.descriptorCache;
|
|
369
|
+
}
|
|
370
|
+
descriptorPort() {
|
|
371
|
+
const runtime = this;
|
|
372
|
+
return Object.freeze({
|
|
373
|
+
get generationId() {
|
|
374
|
+
return runtime.generationId;
|
|
375
|
+
},
|
|
376
|
+
snapshot() {
|
|
377
|
+
const build = runtime.descriptorBuild();
|
|
378
|
+
return Object.freeze({
|
|
379
|
+
hostId: build.descriptor.hostId,
|
|
380
|
+
hostVersion: build.descriptor.hostVersion,
|
|
381
|
+
generationId: build.descriptor.runtime.generationId,
|
|
382
|
+
contracts: Object.freeze(build.descriptor.contracts.map(contract => `${contract.apiVersion}#${contract.kind}`)),
|
|
383
|
+
dropped: Object.freeze([...build.dropped]),
|
|
384
|
+
warnings: Object.freeze([...build.warnings]),
|
|
385
|
+
});
|
|
386
|
+
},
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
/** The internal thin HostFacade backed by this Kernel runtime's snapshot. */
|
|
390
|
+
facade() {
|
|
391
|
+
const mounted = {
|
|
392
|
+
descriptor: this.descriptorPort(),
|
|
393
|
+
};
|
|
394
|
+
for (const record of this.mountedPorts.values()) {
|
|
395
|
+
Object.assign(mounted, record);
|
|
396
|
+
}
|
|
397
|
+
return createShadowGuardedHostFacade(mounted, this.mode);
|
|
398
|
+
}
|
|
399
|
+
diagnosticSnapshot() {
|
|
400
|
+
const build = this.descriptorBuild();
|
|
401
|
+
return Object.freeze({
|
|
402
|
+
mode: this.mode,
|
|
403
|
+
generationId: this.generationId,
|
|
404
|
+
lifecycles: this.lifecycles,
|
|
405
|
+
drivers: Object.freeze(this.drivers.map(driver => Object.freeze({
|
|
406
|
+
id: driver.id,
|
|
407
|
+
capability: driver.capability,
|
|
408
|
+
mounted: this.mountedDriverIds.has(driver.id),
|
|
409
|
+
portMounted: this.mountedPorts.has(driver.id),
|
|
410
|
+
}))),
|
|
411
|
+
detections: Object.freeze(this.drivers.map(driver => Object.freeze({
|
|
412
|
+
id: driver.id,
|
|
413
|
+
detection: this.driverDetections.get(driver.id) ?? {
|
|
414
|
+
state: 'unsupported',
|
|
415
|
+
reason: 'driver.detect() was not consumed',
|
|
416
|
+
},
|
|
417
|
+
}))),
|
|
418
|
+
descriptor: this.descriptorPort().snapshot(),
|
|
419
|
+
lastRefresh: this.refreshState,
|
|
420
|
+
...(this.refreshError === undefined ? {} : { refreshError: this.refreshError }),
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
/** Mount all drivers that have not been mounted yet. */
|
|
424
|
+
async mount() {
|
|
425
|
+
if (this.disposed)
|
|
426
|
+
return;
|
|
427
|
+
if (this.mountPromise !== undefined)
|
|
428
|
+
return this.mountPromise;
|
|
429
|
+
const run = this.mountInternal();
|
|
430
|
+
this.mountPromise = run;
|
|
431
|
+
try {
|
|
432
|
+
await run;
|
|
433
|
+
}
|
|
434
|
+
finally {
|
|
435
|
+
if (this.mountPromise === run)
|
|
436
|
+
this.mountPromise = undefined;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
async mountInternal() {
|
|
440
|
+
const ports = Object.freeze({
|
|
441
|
+
descriptor: this.descriptorPort(),
|
|
442
|
+
});
|
|
443
|
+
const newlyMounted = [];
|
|
444
|
+
try {
|
|
445
|
+
for (const driver of this.drivers) {
|
|
446
|
+
if (this.disposed) {
|
|
447
|
+
this.rollbackNewMounts(newlyMounted);
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
if (this.mountedDriverIds.has(driver.id))
|
|
451
|
+
continue;
|
|
452
|
+
if (driver.mountEffectClass === undefined) {
|
|
453
|
+
throw new Error(`dsh-tui: driver "${driver.id}" must declare mountEffectClass`);
|
|
454
|
+
}
|
|
455
|
+
// Shadow modes must not abort the whole mount transaction because the
|
|
456
|
+
// first selected driver is non-read-only. Skip disallowed drivers and
|
|
457
|
+
// continue mounting the read-only/replay-safe slices that remain.
|
|
458
|
+
if (!shadowPolicyAllowed(driver.mountEffectClass, this.mode))
|
|
459
|
+
continue;
|
|
460
|
+
const mount = await driver.mount(this.context, ports);
|
|
461
|
+
if (this.disposed) {
|
|
462
|
+
// The whole runtime was disposed while this asynchronous mount was
|
|
463
|
+
// in flight. Dispose the mount that just completed and stop; any
|
|
464
|
+
// earlier mounts from this call were already removed by dispose().
|
|
465
|
+
try {
|
|
466
|
+
mount.disposer();
|
|
467
|
+
}
|
|
468
|
+
catch {
|
|
469
|
+
// Best-effort async teardown.
|
|
470
|
+
}
|
|
471
|
+
this.rollbackNewMounts(newlyMounted);
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
this.mountDisposers.set(driver.id, mount);
|
|
475
|
+
if (mount.ports !== undefined)
|
|
476
|
+
this.mountedPorts.set(driver.id, mount.ports);
|
|
477
|
+
this.mountedDriverIds.add(driver.id);
|
|
478
|
+
newlyMounted.push(driver.id);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
catch (error) {
|
|
482
|
+
// Transactional mount: if one driver fails, roll back every driver
|
|
483
|
+
// mounted by this call in reverse order before rethrow.
|
|
484
|
+
this.rollbackNewMounts(newlyMounted);
|
|
485
|
+
throw error;
|
|
486
|
+
}
|
|
487
|
+
this.detect();
|
|
488
|
+
this.startAutoRefreshTimer();
|
|
489
|
+
}
|
|
490
|
+
rollbackNewMounts(ids) {
|
|
491
|
+
for (const id of [...ids].reverse()) {
|
|
492
|
+
const mount = this.mountDisposers.get(id);
|
|
493
|
+
if (mount === undefined)
|
|
494
|
+
continue;
|
|
495
|
+
try {
|
|
496
|
+
mount.disposer();
|
|
497
|
+
}
|
|
498
|
+
catch {
|
|
499
|
+
// Best-effort rollback; each driver owns its own fault isolation.
|
|
500
|
+
}
|
|
501
|
+
this.mountDisposers.delete(id);
|
|
502
|
+
this.mountedPorts.delete(id);
|
|
503
|
+
this.mountedDriverIds.delete(id);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
needsAutoRefresh() {
|
|
507
|
+
if (this.disposed || this.mode !== 'new')
|
|
508
|
+
return false;
|
|
509
|
+
if (this.refreshState === 'failed') {
|
|
510
|
+
return this.lastRefreshAt === undefined
|
|
511
|
+
|| (Date.now() - this.lastRefreshAt) >= this.refreshTtlMs;
|
|
512
|
+
}
|
|
513
|
+
return this.refreshState === 'completed'
|
|
514
|
+
&& this.lastRefreshAt !== undefined
|
|
515
|
+
&& (Date.now() - this.lastRefreshAt) >= this.refreshTtlMs;
|
|
516
|
+
}
|
|
517
|
+
startAutoRefreshTimer() {
|
|
518
|
+
if (this.disposed || this.mode !== 'new' || this.refreshTimer !== undefined)
|
|
519
|
+
return;
|
|
520
|
+
this.refreshTimer = setTimeout(() => {
|
|
521
|
+
this.refreshTimer = undefined;
|
|
522
|
+
if (this.disposed || this.mode !== 'new')
|
|
523
|
+
return;
|
|
524
|
+
void this.refresh()
|
|
525
|
+
.catch(() => undefined)
|
|
526
|
+
.finally(() => {
|
|
527
|
+
if (!this.disposed && this.mode === 'new')
|
|
528
|
+
this.startAutoRefreshTimer();
|
|
529
|
+
});
|
|
530
|
+
}, Math.max(this.refreshTtlMs, 1_000));
|
|
531
|
+
if (typeof this.refreshTimer.unref === 'function')
|
|
532
|
+
this.refreshTimer.unref();
|
|
533
|
+
}
|
|
534
|
+
dispose() {
|
|
535
|
+
this.disposed = true;
|
|
536
|
+
if (this.refreshTimer !== undefined) {
|
|
537
|
+
clearTimeout(this.refreshTimer);
|
|
538
|
+
this.refreshTimer = undefined;
|
|
539
|
+
}
|
|
540
|
+
if (this.unsubscribeChannelListener !== undefined) {
|
|
541
|
+
this.unsubscribeChannelListener();
|
|
542
|
+
this.unsubscribeChannelListener = undefined;
|
|
543
|
+
}
|
|
544
|
+
// A disposed Kernel must not continue to expose previously live P3
|
|
545
|
+
// feature facts.
|
|
546
|
+
this.lifecycles = Object.freeze([]);
|
|
547
|
+
this.lastVerifiedLifecycles.clear();
|
|
548
|
+
this.liveVerifiedAt.clear();
|
|
549
|
+
for (const driver of this.drivers) {
|
|
550
|
+
const mount = this.mountDisposers.get(driver.id);
|
|
551
|
+
if (mount === undefined)
|
|
552
|
+
continue;
|
|
553
|
+
try {
|
|
554
|
+
mount.disposer();
|
|
555
|
+
}
|
|
556
|
+
catch {
|
|
557
|
+
// Kernel teardown must be best-effort; every driver is responsible for
|
|
558
|
+
// its own fault isolation.
|
|
559
|
+
}
|
|
560
|
+
this.mountDisposers.delete(driver.id);
|
|
561
|
+
this.mountedPorts.delete(driver.id);
|
|
562
|
+
this.mountedDriverIds.delete(driver.id);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
invalidateDescriptor() {
|
|
566
|
+
this.descriptorCache = undefined;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
/** Convenience constructor. */
|
|
570
|
+
export function createKernelRuntime(options) {
|
|
571
|
+
return new KernelRuntime(options);
|
|
572
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kernel-internal effect ledger entry.
|
|
3
|
+
*
|
|
4
|
+
* This is the internal write channel for the legacy `ctx.tuiEffectLedger`
|
|
5
|
+
* after P1 wiring: `TuiEffectLedgerRuntime` routes every public write through
|
|
6
|
+
* `createKernelLedger()`, which enforces shadow policy and owner derivation
|
|
7
|
+
* before the existing JSONL writer serializes the record. It is NOT an
|
|
8
|
+
* unwired experimental block.
|
|
9
|
+
*
|
|
10
|
+
* The effect ledger is a Kernel cross-cutting concern. This module is NOT a
|
|
11
|
+
* Host Port: callers cannot pass a forged owner, and the Kernel recorder must
|
|
12
|
+
* derive ownership from the current Cordis activation before recording.
|
|
13
|
+
* Use this only inside Kernel/Standard internal services.
|
|
14
|
+
*
|
|
15
|
+
* The public record() method therefore accepts the current Context and lets an
|
|
16
|
+
* injected owner resolver map it to the verified HostOwnerRef. There is no
|
|
17
|
+
* caller-facing path that accepts an owner/principal/activationId.
|
|
18
|
+
*/
|
|
19
|
+
import type { HostOwnerRef } from '../ports/owner.js';
|
|
20
|
+
import { type AdapterMode } from './runtime.js';
|
|
21
|
+
export type KernelLedgerOperation = 'create' | 'bind' | 'replace' | 'release' | 'cleanup-failed';
|
|
22
|
+
export type KernelLedgerResult = 'applied' | 'pending' | 'failed';
|
|
23
|
+
export interface KernelLedgerEntry {
|
|
24
|
+
readonly operation: KernelLedgerOperation;
|
|
25
|
+
readonly resource: {
|
|
26
|
+
readonly kind: string;
|
|
27
|
+
readonly id: string;
|
|
28
|
+
};
|
|
29
|
+
readonly result: KernelLedgerResult;
|
|
30
|
+
readonly errorCode?: string;
|
|
31
|
+
readonly replaces?: {
|
|
32
|
+
readonly resourceId?: string;
|
|
33
|
+
readonly activationInstance?: string;
|
|
34
|
+
};
|
|
35
|
+
readonly valueDigest?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface KernelLedgerRecord {
|
|
38
|
+
readonly entry: KernelLedgerEntry;
|
|
39
|
+
/** Owner is assigned by the Kernel from the current Cordis activation. */
|
|
40
|
+
readonly owner: HostOwnerRef;
|
|
41
|
+
}
|
|
42
|
+
export type KernelLedgerSink = (record: KernelLedgerRecord) => void;
|
|
43
|
+
/** Maps a Cordis Context (or test stub) to a Kernel-owned HostOwnerRef. */
|
|
44
|
+
export type KernelOwnerResolver = (context: unknown) => HostOwnerRef;
|
|
45
|
+
/** Conservative fallback for contexts without a verified component identity. */
|
|
46
|
+
export declare const baseOwnerResolver: KernelOwnerResolver;
|
|
47
|
+
export interface KernelLedger {
|
|
48
|
+
readonly record: (entry: KernelLedgerEntry, context: unknown) => void;
|
|
49
|
+
}
|
|
50
|
+
/** Build an internal Kernel ledger recorder. The sink receives a complete
|
|
51
|
+
* owner-resolved record; no public Host Port can bypass owner derivation.
|
|
52
|
+
* Every write entry is guarded by the active shadow policy (mutate cannot run
|
|
53
|
+
* in passive or replay shadow). */
|
|
54
|
+
export declare function createKernelLedger(sink: KernelLedgerSink, mode?: AdapterMode, resolveOwner?: KernelOwnerResolver, slices?: readonly string[]): KernelLedger;
|
|
55
|
+
//# sourceMappingURL=ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger.d.ts","sourceRoot":"","sources":["../../../../src/adapter/kernel/ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAoD,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AAEjG,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,CAAA;AAChG,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;AAEjE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAA;IACzC,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IACjE,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1F,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;IACjC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAC7B;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;AAEnE,2EAA2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,YAAY,CAAA;AAEpE,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,EAAE,mBAAqD,CAAA;AAErF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CACtE;AAED;;;mCAGmC;AACnC,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,gBAAgB,EACtB,IAAI,GAAE,WAAmB,EACzB,YAAY,GAAE,mBAAuC,EACrD,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GACzB,YAAY,CAOd"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kernel-internal effect ledger entry.
|
|
3
|
+
*
|
|
4
|
+
* This is the internal write channel for the legacy `ctx.tuiEffectLedger`
|
|
5
|
+
* after P1 wiring: `TuiEffectLedgerRuntime` routes every public write through
|
|
6
|
+
* `createKernelLedger()`, which enforces shadow policy and owner derivation
|
|
7
|
+
* before the existing JSONL writer serializes the record. It is NOT an
|
|
8
|
+
* unwired experimental block.
|
|
9
|
+
*
|
|
10
|
+
* The effect ledger is a Kernel cross-cutting concern. This module is NOT a
|
|
11
|
+
* Host Port: callers cannot pass a forged owner, and the Kernel recorder must
|
|
12
|
+
* derive ownership from the current Cordis activation before recording.
|
|
13
|
+
* Use this only inside Kernel/Standard internal services.
|
|
14
|
+
*
|
|
15
|
+
* The public record() method therefore accepts the current Context and lets an
|
|
16
|
+
* injected owner resolver map it to the verified HostOwnerRef. There is no
|
|
17
|
+
* caller-facing path that accepts an owner/principal/activationId.
|
|
18
|
+
*/
|
|
19
|
+
import { assertCapabilityShadowPolicy } from './runtime.js';
|
|
20
|
+
/** Conservative fallback for contexts without a verified component identity. */
|
|
21
|
+
export const baseOwnerResolver = () => ({ componentId: 'host' });
|
|
22
|
+
/** Build an internal Kernel ledger recorder. The sink receives a complete
|
|
23
|
+
* owner-resolved record; no public Host Port can bypass owner derivation.
|
|
24
|
+
* Every write entry is guarded by the active shadow policy (mutate cannot run
|
|
25
|
+
* in passive or replay shadow). */
|
|
26
|
+
export function createKernelLedger(sink, mode = 'new', resolveOwner = baseOwnerResolver, slices) {
|
|
27
|
+
return Object.freeze({
|
|
28
|
+
record(entry, context) {
|
|
29
|
+
assertCapabilityShadowPolicy('host.ledger.record', mode, slices);
|
|
30
|
+
sink({ entry, owner: resolveOwner(context) });
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|