@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,425 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passive / Replay shadow harness (P2 minimal).
|
|
3
|
+
*
|
|
4
|
+
* - Passive Shadow: `KernelRuntime.detect()` + `descriptorBuild()` already
|
|
5
|
+
* produce a read-only diagnostic snapshot without registering, subscribing,
|
|
6
|
+
* or writing. This module does not add a second passive path.
|
|
7
|
+
* - Replay Shadow: this module defines a JSON-friendly replay input and a real
|
|
8
|
+
* runnable path that feeds isolated mock upstream services into the same
|
|
9
|
+
* KernelRuntime/driver used by production. It never connects to a real DSH
|
|
10
|
+
* host and never writes real plugin state.
|
|
11
|
+
*
|
|
12
|
+
* The replay input is intentionally small and line-protocol-free. It records
|
|
13
|
+
* the minimal host facts needed to exercise the new driver: command catalog,
|
|
14
|
+
* service availability, and DecisionEvents vocabulary.
|
|
15
|
+
*/
|
|
16
|
+
import { KernelRuntime } from './kernel-runtime.js';
|
|
17
|
+
import { hostDescriptorDriver } from '../upstream/host-descriptor-driver.js';
|
|
18
|
+
import { registerCommandLiveProbe, registerMessageLiveProbe, registerStorageLiveProbe, } from './host-probe-access.js';
|
|
19
|
+
import { withReplayIsolation } from './replay-isolation.js';
|
|
20
|
+
import { createReplayChannelProvider, createChannelConsumer, } from '../channel/index.js';
|
|
21
|
+
import { TUI_CHANNEL_FEATURES, TUI_CHANNEL_WIRE_REVISION, } from '../standard/tui-extension.js';
|
|
22
|
+
import { validateTuiChannelRequirement, validateTuiChannelSupport, } from '../spec/index.js';
|
|
23
|
+
import { projectDshSessionEventsToSnapshots, } from '../channel/session-projection.js';
|
|
24
|
+
export const REPLAY_SCHEMA_VERSION = 'tui-adapter-replay/v1';
|
|
25
|
+
export const REPLAY_CHANNEL_SCHEMA_VERSION = 'tui-adapter-channel-replay/v1';
|
|
26
|
+
/**
|
|
27
|
+
* Replay method → feature mapping used by the conformance harness.
|
|
28
|
+
*
|
|
29
|
+
* The DSH Channel RFC requires `invoke.method` to correspond to a feature
|
|
30
|
+
* the provider declared. This is the harness-side recognized map for the live
|
|
31
|
+
* channel methods; unknown method names are rejected instead of pretending
|
|
32
|
+
* success.
|
|
33
|
+
*/
|
|
34
|
+
export const CHANNEL_METHOD_FEATURES = Object.freeze({
|
|
35
|
+
commandCompletions: 'commands',
|
|
36
|
+
runExternalCommand: 'commands',
|
|
37
|
+
runWorkspaceCommand: 'workspaces',
|
|
38
|
+
listWorkspaces: 'workspaces',
|
|
39
|
+
resolveWorkspace: 'workspaces',
|
|
40
|
+
switchWorkspace: 'workspaces',
|
|
41
|
+
workspaceCommands: 'workspaces',
|
|
42
|
+
listModels: 'models',
|
|
43
|
+
switchModel: 'models',
|
|
44
|
+
listEfforts: 'models',
|
|
45
|
+
setEffort: 'models',
|
|
46
|
+
listProviders: 'provider-setup',
|
|
47
|
+
providerSetup: 'provider-setup',
|
|
48
|
+
describeCredential: 'credentials',
|
|
49
|
+
oauthProviderStatuses: 'credentials',
|
|
50
|
+
listPresets: 'presets',
|
|
51
|
+
switchPreset: 'presets',
|
|
52
|
+
listSkills: 'skills',
|
|
53
|
+
listSessions: 'session-history',
|
|
54
|
+
previewSession: 'session-history',
|
|
55
|
+
deleteSession: 'session-history',
|
|
56
|
+
renameSession: 'session-history',
|
|
57
|
+
forkSession: 'session-history',
|
|
58
|
+
resumeTo: 'session-history',
|
|
59
|
+
newSession: 'session-lifecycle',
|
|
60
|
+
compact: 'session-lifecycle',
|
|
61
|
+
submit: 'session-input',
|
|
62
|
+
steer: 'session-input',
|
|
63
|
+
cancel: 'session-input',
|
|
64
|
+
interruptAndDeliver: 'session-input',
|
|
65
|
+
clear: 'session-input',
|
|
66
|
+
loadOlder: 'session-input',
|
|
67
|
+
rewindTo: 'session-input',
|
|
68
|
+
promptRewind: 'session-input',
|
|
69
|
+
openPluginScene: 'scenes',
|
|
70
|
+
closePluginScene: 'scenes',
|
|
71
|
+
settingsSections: 'settings',
|
|
72
|
+
subscribeSettingsSections: 'settings',
|
|
73
|
+
traceEvents: 'trace',
|
|
74
|
+
notify: 'presentation',
|
|
75
|
+
doctorInfo: 'diagnostics',
|
|
76
|
+
mcpStatus: 'diagnostics',
|
|
77
|
+
pluginsInfo: 'diagnostics',
|
|
78
|
+
listFileCandidates: 'files',
|
|
79
|
+
listFiles: 'files',
|
|
80
|
+
listSubagents: 'subagents',
|
|
81
|
+
balanceInfo: 'credentials',
|
|
82
|
+
});
|
|
83
|
+
/**
|
|
84
|
+
* Per-feature state evidence keys.
|
|
85
|
+
*
|
|
86
|
+
* A declared Channel feature must be backed by an observable state field or
|
|
87
|
+
* a declared method handler; otherwise the replay is only an empty protocol
|
|
88
|
+
* envelope and must not be reported `ok`.
|
|
89
|
+
*/
|
|
90
|
+
const CHANNEL_FEATURE_STATE_EVIDENCE_KEYS = Object.freeze({
|
|
91
|
+
'session-state': ['status', 'sessionTitle', 'homeDir', 'pathCaseInsensitive', 'model', 'mode', 'agentId'],
|
|
92
|
+
'session-input': ['transcript', 'pending', 'lastUserText'],
|
|
93
|
+
'commands': ['commandCatalog'],
|
|
94
|
+
'models': ['model'],
|
|
95
|
+
'modes': ['mode'],
|
|
96
|
+
'presets': ['agentPreset'],
|
|
97
|
+
'presentation': ['notification', 'toast'],
|
|
98
|
+
'provider-setup': ['provider'],
|
|
99
|
+
'credentials': ['credential', 'credentials', 'oauthProviderStatuses'],
|
|
100
|
+
'diagnostics': ['diagnostic', 'diagnostics'],
|
|
101
|
+
'files': ['files', 'fileCandidates'],
|
|
102
|
+
'scenes': ['pluginScene', 'scene'],
|
|
103
|
+
'settings': ['settingsSections'],
|
|
104
|
+
'skills': ['skills'],
|
|
105
|
+
'subagents': ['subagents'],
|
|
106
|
+
'workspaces': ['workspace', 'workspaces'],
|
|
107
|
+
'session-history': ['sessions', 'sessionHistory'],
|
|
108
|
+
'session-lifecycle': ['sessionLifecycle'],
|
|
109
|
+
'trace': ['traceEvents', 'traceData'],
|
|
110
|
+
});
|
|
111
|
+
function hasMeaningfulEvidenceValue(value) {
|
|
112
|
+
if (Array.isArray(value))
|
|
113
|
+
return value.length > 0;
|
|
114
|
+
if (value !== null && typeof value === 'object')
|
|
115
|
+
return Object.keys(value).length > 0;
|
|
116
|
+
if (typeof value === 'string')
|
|
117
|
+
return value.trim() !== '';
|
|
118
|
+
return value !== undefined;
|
|
119
|
+
}
|
|
120
|
+
function featureHasEvidence(feature, snapshots, verifiedMethods) {
|
|
121
|
+
const state = snapshots.at(-1)?.state ?? {};
|
|
122
|
+
const keys = CHANNEL_FEATURE_STATE_EVIDENCE_KEYS[feature] ?? [];
|
|
123
|
+
for (const key of keys) {
|
|
124
|
+
if (hasMeaningfulEvidenceValue(state[key]))
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
// A declared method handler is NOT evidence by itself: the method must have
|
|
128
|
+
// been successfully invoked through `invokeMethod` during this replay.
|
|
129
|
+
return [...verifiedMethods].some(method => CHANNEL_METHOD_FEATURES[method] === feature);
|
|
130
|
+
}
|
|
131
|
+
export class ReplayHarnessError extends Error {
|
|
132
|
+
constructor(message) {
|
|
133
|
+
super(message);
|
|
134
|
+
this.name = 'ReplayHarnessError';
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/** Isolated host-context stub backed entirely by the replay input. */
|
|
138
|
+
export function createReplayContext(input) {
|
|
139
|
+
const commandRegistry = new Map();
|
|
140
|
+
const commands = Object.freeze({
|
|
141
|
+
register(definition) {
|
|
142
|
+
if (commandRegistry.has(definition.name)) {
|
|
143
|
+
throw new Error(`replay command already registered: ${definition.name}`);
|
|
144
|
+
}
|
|
145
|
+
commandRegistry.set(definition.name, {
|
|
146
|
+
name: definition.name,
|
|
147
|
+
description: definition.description,
|
|
148
|
+
handler: definition.handler,
|
|
149
|
+
});
|
|
150
|
+
return () => {
|
|
151
|
+
commandRegistry.delete(definition.name);
|
|
152
|
+
};
|
|
153
|
+
},
|
|
154
|
+
list() {
|
|
155
|
+
return Object.freeze([...commandRegistry.values()].map(command => Object.freeze({
|
|
156
|
+
name: command.name,
|
|
157
|
+
description: command.description,
|
|
158
|
+
})));
|
|
159
|
+
},
|
|
160
|
+
find(_agent, name) {
|
|
161
|
+
return commandRegistry.get(name);
|
|
162
|
+
},
|
|
163
|
+
async execute(_agent, line, _images, signal) {
|
|
164
|
+
const match = /^\/([a-z][a-z0-9_-]*)(?=$|[\t\n\r ])/u.exec(line);
|
|
165
|
+
if (match === null)
|
|
166
|
+
return undefined;
|
|
167
|
+
const command = commandRegistry.get(match[1]);
|
|
168
|
+
if (command === undefined)
|
|
169
|
+
return undefined;
|
|
170
|
+
if (signal.aborted)
|
|
171
|
+
throw new Error('replay command aborted');
|
|
172
|
+
const result = await command.handler();
|
|
173
|
+
if (result === null || typeof result !== 'object' || result.kind !== 'success') {
|
|
174
|
+
throw new Error('replay command handler did not return success');
|
|
175
|
+
}
|
|
176
|
+
return { commandId: 'replay', result: result };
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
const storage = Object.freeze({
|
|
180
|
+
open: () => Object.freeze({}),
|
|
181
|
+
probeDiagnostic: () => Object.freeze({ service: 'tuiPluginStorage', ok: true, dir: 'replay' }),
|
|
182
|
+
});
|
|
183
|
+
registerStorageLiveProbe(storage, async () => Object.freeze({
|
|
184
|
+
service: 'tuiPluginStorage',
|
|
185
|
+
ok: true,
|
|
186
|
+
operations: Object.freeze(['write', 'read', 'delete']),
|
|
187
|
+
tempNamespace: 'replay-temp',
|
|
188
|
+
}));
|
|
189
|
+
const messages = Object.freeze({
|
|
190
|
+
subscribe: () => () => undefined,
|
|
191
|
+
probeDiagnostic: () => Object.freeze({ service: 'tuiMessageObserver', ok: true, subscriptions: 0 }),
|
|
192
|
+
});
|
|
193
|
+
registerMessageLiveProbe(messages, async () => Object.freeze({
|
|
194
|
+
service: 'tuiMessageObserver',
|
|
195
|
+
ok: true,
|
|
196
|
+
before: 0,
|
|
197
|
+
during: 1,
|
|
198
|
+
after: 0,
|
|
199
|
+
delivered: 1,
|
|
200
|
+
}));
|
|
201
|
+
const host = Object.freeze({
|
|
202
|
+
hostDescriptor: () => Object.freeze({ descriptor: Object.freeze({ contracts: [] }), dropped: [], warnings: [] }),
|
|
203
|
+
describe: () => Object.freeze({ descriptor: Object.freeze({ contracts: [] }), dropped: [], warnings: [] }),
|
|
204
|
+
subscribeDecision: () => () => undefined,
|
|
205
|
+
probeDecisionEvents: () => Object.freeze([...(input.decisionEvents ?? [])]),
|
|
206
|
+
});
|
|
207
|
+
registerCommandLiveProbe(host, async () => Object.freeze({
|
|
208
|
+
ok: true,
|
|
209
|
+
name: 'replay-command-probe',
|
|
210
|
+
lifecycleAppends: 0,
|
|
211
|
+
}));
|
|
212
|
+
return Object.freeze({
|
|
213
|
+
get(name) {
|
|
214
|
+
switch (name) {
|
|
215
|
+
case 'commands': return input.commands === undefined ? undefined : commands;
|
|
216
|
+
case 'tuiPluginStorage': return input.storage === true ? storage : undefined;
|
|
217
|
+
case 'tuiMessageObserver': return input.messages === true ? messages : undefined;
|
|
218
|
+
case 'tuiPluginHost': return host;
|
|
219
|
+
default: return undefined;
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Run a real DSH session snapshot/transcript Channel replay through the
|
|
226
|
+
* protocol Provider/Consumer pair.
|
|
227
|
+
*
|
|
228
|
+
* This path validates the full `tui.dsh/v1alpha1#Channel` envelope:
|
|
229
|
+
* - `open` returns a validated complete snapshot;
|
|
230
|
+
* - `subscribe` streams every recorded snapshot (> afterVersion) in order;
|
|
231
|
+
* - `invoke` accepts JSON arguments, returns a JSON result and always
|
|
232
|
+
* includes the latest validated snapshot;
|
|
233
|
+
* - `close` acknowledges closure;
|
|
234
|
+
* - monotonic version/wire-revision continuity is checked by the consumer.
|
|
235
|
+
*/
|
|
236
|
+
export async function runChannelReplay(input) {
|
|
237
|
+
if (input === null || typeof input !== 'object') {
|
|
238
|
+
throw new ReplayHarnessError('channel replay input must be an object');
|
|
239
|
+
}
|
|
240
|
+
const hasSessionEvents = Array.isArray(input.sessionEvents);
|
|
241
|
+
const snapshots = input.snapshots ?? (hasSessionEvents
|
|
242
|
+
? projectDshSessionEventsToSnapshots(input.sessionEvents, input.sessionMeta ?? {
|
|
243
|
+
channelId: 'dsh-session-replay',
|
|
244
|
+
})
|
|
245
|
+
: []);
|
|
246
|
+
if (!Array.isArray(snapshots) || snapshots.length === 0) {
|
|
247
|
+
throw new ReplayHarnessError('channel replay input must contain snapshots or DSH sessionEvents');
|
|
248
|
+
}
|
|
249
|
+
const source = input.snapshots !== undefined ? 'snapshots' : 'dsh-session-events';
|
|
250
|
+
return await withReplayIsolation(async () => {
|
|
251
|
+
const replaySource = { ...input, snapshots };
|
|
252
|
+
const provider = createReplayChannelProvider(replaySource);
|
|
253
|
+
const versions = [];
|
|
254
|
+
const subscriptionSnapshots = [];
|
|
255
|
+
const subscriptionConsumer = createChannelConsumer(provider, { failClosed: false });
|
|
256
|
+
const first = snapshots[0];
|
|
257
|
+
// Subscribe first on an independent consumer so version continuity is
|
|
258
|
+
// observed over the recorded stream without conflating it with `open`
|
|
259
|
+
// returning the latest current snapshot.
|
|
260
|
+
await subscriptionConsumer.subscribe(first.channelId, 0, snapshot => {
|
|
261
|
+
subscriptionSnapshots.push(snapshot);
|
|
262
|
+
versions.push(snapshot.version);
|
|
263
|
+
});
|
|
264
|
+
const featureErrors = [];
|
|
265
|
+
const rawFeatures = input.features;
|
|
266
|
+
if (rawFeatures === undefined) {
|
|
267
|
+
featureErrors.push('features must be explicitly declared by the replay input');
|
|
268
|
+
}
|
|
269
|
+
const seenFeatures = new Set();
|
|
270
|
+
for (const feature of rawFeatures ?? []) {
|
|
271
|
+
if (seenFeatures.has(feature)) {
|
|
272
|
+
featureErrors.push(`duplicate Channel feature: ${feature}`);
|
|
273
|
+
}
|
|
274
|
+
seenFeatures.add(feature);
|
|
275
|
+
}
|
|
276
|
+
const features = [...new Set(rawFeatures ?? [])];
|
|
277
|
+
const allowedFeatures = new Set(TUI_CHANNEL_FEATURES);
|
|
278
|
+
for (const feature of features) {
|
|
279
|
+
if (!allowedFeatures.has(feature))
|
|
280
|
+
featureErrors.push(`unknown Channel feature: ${feature}`);
|
|
281
|
+
}
|
|
282
|
+
try {
|
|
283
|
+
validateTuiChannelRequirement({ wireRevision: TUI_CHANNEL_WIRE_REVISION, features });
|
|
284
|
+
validateTuiChannelSupport({ wireRevision: TUI_CHANNEL_WIRE_REVISION, features });
|
|
285
|
+
}
|
|
286
|
+
catch (error) {
|
|
287
|
+
featureErrors.push(error instanceof Error ? error.message : String(error));
|
|
288
|
+
}
|
|
289
|
+
const verifiedMethods = new Set();
|
|
290
|
+
const methodErrors = [];
|
|
291
|
+
for (const [method, feature] of Object.entries(CHANNEL_METHOD_FEATURES)) {
|
|
292
|
+
if (input.methods?.[method] === undefined)
|
|
293
|
+
continue;
|
|
294
|
+
if (!features.includes(feature)) {
|
|
295
|
+
methodErrors.push(`method ${method} requires feature ${feature}, which is not declared`);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (input.methods !== undefined) {
|
|
299
|
+
for (const method of Object.keys(input.methods)) {
|
|
300
|
+
if (CHANNEL_METHOD_FEATURES[method] === undefined) {
|
|
301
|
+
methodErrors.push(`method ${method} is not in the recognized method->feature map`);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
const consumer = createChannelConsumer(provider, { failClosed: false });
|
|
306
|
+
const opened = await consumer.open({});
|
|
307
|
+
let invokeValueDefined = false;
|
|
308
|
+
if (input.invokeMethod !== undefined) {
|
|
309
|
+
if (input.methods?.[input.invokeMethod] === undefined) {
|
|
310
|
+
methodErrors.push(`invokeMethod ${input.invokeMethod} is not provided by replay methods`);
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
try {
|
|
314
|
+
const invoke = await consumer.invoke(opened.channelId, input.invokeMethod, []);
|
|
315
|
+
invokeValueDefined = invoke.valueDefined === true;
|
|
316
|
+
// Only a method that actually executed successfully can back a
|
|
317
|
+
// method-backed feature claim.
|
|
318
|
+
verifiedMethods.add(input.invokeMethod);
|
|
319
|
+
}
|
|
320
|
+
catch (error) {
|
|
321
|
+
methodErrors.push(error instanceof Error ? error.message : String(error));
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
for (const feature of features) {
|
|
326
|
+
if (!featureHasEvidence(feature, snapshots, verifiedMethods)) {
|
|
327
|
+
featureErrors.push(`Channel feature ${feature} has no observable evidence in state or successfully invoked methods`);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
const closed = await consumer.close(opened.channelId);
|
|
331
|
+
const continuityErrors = [
|
|
332
|
+
...subscriptionConsumer.continuityErrors(),
|
|
333
|
+
...consumer.continuityErrors(),
|
|
334
|
+
];
|
|
335
|
+
const ok = continuityErrors.length === 0
|
|
336
|
+
&& featureErrors.length === 0
|
|
337
|
+
&& methodErrors.length === 0
|
|
338
|
+
&& opened.wireRevision === TUI_CHANNEL_WIRE_REVISION
|
|
339
|
+
&& opened.channelId === first.channelId
|
|
340
|
+
&& closed.closed === true;
|
|
341
|
+
return Object.freeze({
|
|
342
|
+
ok,
|
|
343
|
+
schemaVersion: REPLAY_CHANNEL_SCHEMA_VERSION,
|
|
344
|
+
channelId: opened.channelId,
|
|
345
|
+
wireRevision: opened.wireRevision,
|
|
346
|
+
versions: Object.freeze(versions),
|
|
347
|
+
features: Object.freeze(features),
|
|
348
|
+
transcriptCount: input.transcript?.length ?? 0,
|
|
349
|
+
continuityErrors: Object.freeze(continuityErrors),
|
|
350
|
+
openVersion: opened.version,
|
|
351
|
+
invokeValueDefined,
|
|
352
|
+
closed: closed.closed,
|
|
353
|
+
source,
|
|
354
|
+
sessionEventCount: input.sessionEvents?.length ?? 0,
|
|
355
|
+
featureErrors: Object.freeze(featureErrors),
|
|
356
|
+
methodErrors: Object.freeze(methodErrors),
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Run an isolated replay-shadow comparison through the production KernelRuntime
|
|
362
|
+
* and host-descriptor driver.
|
|
363
|
+
*
|
|
364
|
+
* This is fail-closed: malformed replay input or an unavailable schema aborts
|
|
365
|
+
* with `ReplayHarnessError` rather than silently falling back to a legacy view.
|
|
366
|
+
*/
|
|
367
|
+
export async function runReplayShadow(input) {
|
|
368
|
+
if (input === null || typeof input !== 'object') {
|
|
369
|
+
throw new ReplayHarnessError('replay input must be an object');
|
|
370
|
+
}
|
|
371
|
+
if (input.schemaVersion !== REPLAY_SCHEMA_VERSION) {
|
|
372
|
+
throw new ReplayHarnessError(`unsupported replay schema ${String(input.schemaVersion)}; expected ${REPLAY_SCHEMA_VERSION}`);
|
|
373
|
+
}
|
|
374
|
+
const generationId = input.generationId ?? 'replay-shadow';
|
|
375
|
+
const context = createReplayContext(input);
|
|
376
|
+
return await withReplayIsolation(async () => {
|
|
377
|
+
const kernel = new KernelRuntime({
|
|
378
|
+
context,
|
|
379
|
+
mode: 'replay-shadow',
|
|
380
|
+
generationId,
|
|
381
|
+
hostId: input.host?.id,
|
|
382
|
+
hostVersion: input.host?.version,
|
|
383
|
+
drivers: [hostDescriptorDriver],
|
|
384
|
+
});
|
|
385
|
+
try {
|
|
386
|
+
await kernel.refresh({ allowReplay: true });
|
|
387
|
+
const build = kernel.descriptorBuild();
|
|
388
|
+
const kernelContracts = build.descriptor.contracts.map(contract => `${contract.apiVersion}#${contract.kind}`).sort();
|
|
389
|
+
const legacyContracts = [...(input.host?.legacyContracts ?? [])]
|
|
390
|
+
.map(contract => `${contract.apiVersion}#${contract.kind}`)
|
|
391
|
+
.sort();
|
|
392
|
+
const kernelSet = new Set(kernelContracts);
|
|
393
|
+
const legacySet = new Set(legacyContracts);
|
|
394
|
+
const matched = kernelContracts.filter(key => legacySet.has(key));
|
|
395
|
+
const missing = legacyContracts.filter(key => !kernelSet.has(key));
|
|
396
|
+
const extra = kernelContracts.filter(key => !legacySet.has(key));
|
|
397
|
+
const channel = input.channel === undefined
|
|
398
|
+
? undefined
|
|
399
|
+
: await runChannelReplay(input.channel);
|
|
400
|
+
return Object.freeze({
|
|
401
|
+
ok: missing.length === 0 && extra.length === 0 && (channel?.ok ?? true),
|
|
402
|
+
schemaVersion: REPLAY_SCHEMA_VERSION,
|
|
403
|
+
generationId,
|
|
404
|
+
mode: 'replay-shadow',
|
|
405
|
+
kernelContracts: Object.freeze(kernelContracts),
|
|
406
|
+
legacyContracts: Object.freeze(legacyContracts),
|
|
407
|
+
missing: Object.freeze(missing),
|
|
408
|
+
extra: Object.freeze(extra),
|
|
409
|
+
matched: Object.freeze(matched),
|
|
410
|
+
lifecycles: kernel.currentLifecycles(),
|
|
411
|
+
dropped: Object.freeze([...build.dropped]),
|
|
412
|
+
warnings: Object.freeze([...build.warnings]),
|
|
413
|
+
...(channel === undefined ? {} : { channel }),
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
finally {
|
|
417
|
+
kernel.dispose();
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
/** Convenience for the production fail-closed check: a real host cannot run
|
|
422
|
+
* replay-shadow without an explicit isolated replay input. */
|
|
423
|
+
export function assertReplayShadowProductionUnavailable() {
|
|
424
|
+
throw new ReplayHarnessError('replay-shadow on a real production host is not available without an isolated replay input; use scripts/verify-adapter-replay-harness.ts or the replay module');
|
|
425
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Immutable adapter runtime snapshot bound to one Cordis composition. */
|
|
2
|
+
import { compositionRoot } from '../../dsh-adapter/host-access.js';
|
|
3
|
+
import { type AdapterRuntimeOptions } from './runtime.js';
|
|
4
|
+
type AdapterContext = Parameters<typeof compositionRoot>[0];
|
|
5
|
+
/**
|
|
6
|
+
* Capture adapter mode and slice selection once for a composition. Runtime
|
|
7
|
+
* policy must not be re-read from process.env by individual services: doing
|
|
8
|
+
* so lets an in-process caller change shadow policy after mount.
|
|
9
|
+
*/
|
|
10
|
+
export declare function adapterRuntimeFor(ctx: AdapterContext): AdapterRuntimeOptions;
|
|
11
|
+
/** Test/embedding hook: explicit env input remains available without making
|
|
12
|
+
* production services depend on mutable process state after construction. */
|
|
13
|
+
export declare function snapshotAdapterRuntime(env: NodeJS.ProcessEnv): AdapterRuntimeOptions;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=runtime-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-context.d.ts","sourceRoot":"","sources":["../../../../src/adapter/kernel/runtime-context.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,cAAc,CAAA;AAErB,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAA;AAI3D;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,qBAAqB,CAQ5E;AAED;6EAC6E;AAC7E,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,qBAAqB,CAEpF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Immutable adapter runtime snapshot bound to one Cordis composition. */
|
|
2
|
+
import { compositionRoot } from '../../dsh-adapter/host-access.js';
|
|
3
|
+
import { parseAdapterRuntime, } from './runtime.js';
|
|
4
|
+
const snapshots = new WeakMap();
|
|
5
|
+
/**
|
|
6
|
+
* Capture adapter mode and slice selection once for a composition. Runtime
|
|
7
|
+
* policy must not be re-read from process.env by individual services: doing
|
|
8
|
+
* so lets an in-process caller change shadow policy after mount.
|
|
9
|
+
*/
|
|
10
|
+
export function adapterRuntimeFor(ctx) {
|
|
11
|
+
const root = compositionRoot(ctx);
|
|
12
|
+
const key = root;
|
|
13
|
+
const existing = snapshots.get(key);
|
|
14
|
+
if (existing !== undefined)
|
|
15
|
+
return existing;
|
|
16
|
+
const snapshot = parseAdapterRuntime();
|
|
17
|
+
snapshots.set(key, snapshot);
|
|
18
|
+
return snapshot;
|
|
19
|
+
}
|
|
20
|
+
/** Test/embedding hook: explicit env input remains available without making
|
|
21
|
+
* production services depend on mutable process state after construction. */
|
|
22
|
+
export function snapshotAdapterRuntime(env) {
|
|
23
|
+
return parseAdapterRuntime(env);
|
|
24
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapter runtime / shadow-mode switch and effect-class enforcement.
|
|
3
|
+
*
|
|
4
|
+
* This is the Kernel's incremental-migration control surface. It does not load
|
|
5
|
+
* drivers or perform business translation; it selects and records shadow
|
|
6
|
+
* policy per capability, and provides the unified assertion every
|
|
7
|
+
* effect-producing Port/slice entry must call.
|
|
8
|
+
*/
|
|
9
|
+
import type { HostEffectClass } from '../ports/owner.js';
|
|
10
|
+
export type AdapterMode = 'legacy' | 'passive-shadow' | 'replay-shadow' | 'new';
|
|
11
|
+
export type AdapterSliceName = string;
|
|
12
|
+
export interface AdapterRuntimeOptions {
|
|
13
|
+
readonly mode: AdapterMode;
|
|
14
|
+
readonly slices: readonly AdapterSliceName[];
|
|
15
|
+
}
|
|
16
|
+
export declare const DEFAULT_ADAPTER_MODE: AdapterMode;
|
|
17
|
+
/**
|
|
18
|
+
* Effect classification per adapter capability.
|
|
19
|
+
*
|
|
20
|
+
* Every capability that can produce an effect must be registered here so the
|
|
21
|
+
* runtime can enforce shadow policy uniformly instead of relying on ad-hoc
|
|
22
|
+
* call-site checks.
|
|
23
|
+
*/
|
|
24
|
+
export declare const ADAPTER_CAPABILITY_EFFECT_CLASSES: Readonly<Record<string, HostEffectClass>>;
|
|
25
|
+
/** Map a capability to its incremental migration slice. */
|
|
26
|
+
export declare const ADAPTER_CAPABILITY_SLICES: Readonly<Record<string, string>>;
|
|
27
|
+
export declare function sliceForCapability(capability: string): string | undefined;
|
|
28
|
+
export declare function effectClassFor(capability: string): HostEffectClass | undefined;
|
|
29
|
+
export declare function parseAdapterMode(value: string | undefined): AdapterMode;
|
|
30
|
+
export declare const ADAPTER_SLICE_ALIASES: Readonly<Record<string, string>>;
|
|
31
|
+
/**
|
|
32
|
+
* Normalize an explicit adapter-slice allowlist.
|
|
33
|
+
*
|
|
34
|
+
* Slice ids are case-insensitive and surrounding whitespace is ignored.
|
|
35
|
+
* Known aliases are mapped to their canonical slice id. Unknown ids are
|
|
36
|
+
* rejected loudly (fail-closed) instead of being silently ignored: a typo in
|
|
37
|
+
* `DSH_TUI_ADAPTER_SLICES` must never accidentally broaden or narrow the
|
|
38
|
+
* governed adapter surface without the operator noticing.
|
|
39
|
+
*/
|
|
40
|
+
export declare function normalizeAdapterSliceList(slices: readonly string[]): readonly string[];
|
|
41
|
+
export declare function parseAdapterRuntime(env?: NodeJS.ProcessEnv): AdapterRuntimeOptions;
|
|
42
|
+
/**
|
|
43
|
+
* Immutable fallback snapshot factory for objects that are not bound to a
|
|
44
|
+
* Cordis composition (standalone stores, in-package local registries, unbound
|
|
45
|
+
* grant stores). Each object captures the process environment at construction
|
|
46
|
+
* time; once captured, that object never re-reads mutable process state.
|
|
47
|
+
* Production composition-bound services must use `adapterRuntimeFor(ctx)`
|
|
48
|
+
* instead so each composition root gets its own stable snapshot.
|
|
49
|
+
*/
|
|
50
|
+
export declare function defaultAdapterRuntime(): AdapterRuntimeOptions;
|
|
51
|
+
/**
|
|
52
|
+
* Effect classification determines which shadow modes are allowed:
|
|
53
|
+
* - read-only may run as passive shadow and replay shadow;
|
|
54
|
+
* - subscribe/register require replay or direct switch;
|
|
55
|
+
* - mutate only runs in legacy/new (it must never pretend to be a shadow).
|
|
56
|
+
*/
|
|
57
|
+
export declare function isPassiveShadowAllowed(effectClass: HostEffectClass): boolean;
|
|
58
|
+
export declare function shadowPolicyAllowed(effectClass: HostEffectClass, mode: AdapterMode): boolean;
|
|
59
|
+
export declare function assertShadowPolicy(effectClass: HostEffectClass, mode: AdapterMode): void;
|
|
60
|
+
/**
|
|
61
|
+
* Hard guard-position invariant for adapter capability methods:
|
|
62
|
+
* every mediated/effectful entry MUST call this guard (or the
|
|
63
|
+
* `assertAdapterCapability` convenience) as its FIRST side-effect-free
|
|
64
|
+
* preflight step, BEFORE creating subscriptions, registrations, file watches,
|
|
65
|
+
* writes, mounts or any other observable side effect. This is also enforced
|
|
66
|
+
* by `verify:adapter-shadow` for service methods and returned handles.
|
|
67
|
+
*/
|
|
68
|
+
export declare function assertCapabilityShadowPolicy(capability: string, mode: AdapterMode, slices?: readonly string[]): void;
|
|
69
|
+
export declare function assertAdapterCapability(capability: string): void;
|
|
70
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/adapter/kernel/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGxD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,gBAAgB,GAAG,eAAe,GAAG,KAAK,CAAA;AAC/E,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAErC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAC7C;AAED,eAAO,MAAM,oBAAoB,EAAE,WAAsB,CAAA;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAgFtF,CAAA;AAGF,2DAA2D;AAC3D,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8ErE,CAAA;AAEF,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEzE;AAaD,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAE9E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAevE;AAED,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcjE,CAAA;AASF;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAatF;AAED,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,qBAAqB,CAK/F;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAAI,qBAAqB,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAE5E;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAW5F;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CAMxF;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,WAAW,EACjB,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GACzB,IAAI,CAUN;AAOD,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAGhE"}
|