@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
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
* and `tui/compact` are NOT free-for-all `ctx.on` targets: the subscribing
|
|
9
9
|
* plugin (identified by its verified Component identity) must hold the
|
|
10
10
|
* matching `domain.resource.intercept` grant. Grant answers
|
|
11
|
-
* come from the unified 8-permission GrantStore in
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* come from the unified 8-permission GrantStore in
|
|
12
|
+
* `../adapter/standard/grants.js` (registry-driven defaults,
|
|
13
|
+
* `grants`/`denies` sections, corrupt fail-closed) — this module is only the
|
|
14
|
+
* subscribe-time CHECKPOINT: which event needs which permission, and the
|
|
15
|
+
* cordis bail hook that enforces it.
|
|
15
16
|
*
|
|
16
17
|
* A denied subscription never enters the dispatch chain — it is "as if
|
|
17
18
|
* unregistered" (D-7) and the caller gets a no-op disposer plus a logger
|
|
@@ -27,18 +28,23 @@
|
|
|
27
28
|
* the whole hook — no patching of the events service.
|
|
28
29
|
*/
|
|
29
30
|
import type { Context } from '@deepseek-ai/cordis';
|
|
30
|
-
import { EXTENSION_GRANTS_FILE, type GrantStore } from '
|
|
31
|
+
import { EXTENSION_GRANTS_FILE, type GrantStore } from '../adapter/standard/grants.js';
|
|
31
32
|
import { type VerifiedComponentIdentity } from './component-identity.js';
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
import { DECISION_EVENT_PERMISSIONS } from '../adapter/spec/protocol-constants.js';
|
|
34
|
+
import { type AdapterRuntimeOptions } from '../adapter/kernel/runtime.js';
|
|
35
|
+
/** The intercept permission each decision event requires. The map is
|
|
36
|
+
* derived in src/adapter/spec/protocol-constants.ts and re-exported here for
|
|
37
|
+
* compatibility; product code must not declare a second copy. */
|
|
38
|
+
export { DECISION_EVENT_PERMISSIONS };
|
|
36
39
|
export { EXTENSION_GRANTS_FILE };
|
|
37
|
-
/** @deprecated Use GrantStore from
|
|
40
|
+
/** @deprecated Use GrantStore from `../adapter/standard/grants.js` (same shape, plus more).
|
|
41
|
+
* Long-term compatibility alias; owner: dsh-tui adapter. */
|
|
38
42
|
export type ExtensionGrants = GrantStore;
|
|
39
|
-
/** @deprecated Use parseGrantStore from
|
|
43
|
+
/** @deprecated Use parseGrantStore from `../adapter/standard/grants.js`.
|
|
44
|
+
* Long-term compatibility alias; owner: dsh-tui adapter. */
|
|
40
45
|
export declare const parseExtensionGrants: (text: string) => GrantStore;
|
|
41
|
-
/** @deprecated Use readGrantStore from
|
|
46
|
+
/** @deprecated Use readGrantStore from `../adapter/standard/grants.js`.
|
|
47
|
+
* Long-term compatibility alias; owner: dsh-tui adapter. */
|
|
42
48
|
export declare const readExtensionGrants: (dir?: string) => GrantStore;
|
|
43
49
|
export interface DecisionHandlerMetadata {
|
|
44
50
|
componentId: string;
|
|
@@ -69,6 +75,7 @@ export interface RegisteredDecisionHandler {
|
|
|
69
75
|
readonly listener: (payload: Record<string, unknown>) => unknown;
|
|
70
76
|
}
|
|
71
77
|
export interface DecisionRegistry {
|
|
78
|
+
runtime: AdapterRuntimeOptions;
|
|
72
79
|
grants: GrantStore;
|
|
73
80
|
handlers: Map<string, Map<string, RegisteredDecisionHandler>>;
|
|
74
81
|
}
|
|
@@ -80,5 +87,42 @@ export declare function registerDecisionHandler(pluginCtx: Context, identity: Ve
|
|
|
80
87
|
/** Execute ctx.on for one host-mediated decision registration. */
|
|
81
88
|
export declare function withDecisionRegistration<T>(ctx: Context, callback: () => T): T;
|
|
82
89
|
export declare function decisionHandlerMetadataOf(listener: Function): DecisionHandlerMetadata | undefined;
|
|
90
|
+
/** Return the event names for which a real dispatch topology is recorded in
|
|
91
|
+
* this composition. Empty means only a guard (or nothing) is mounted. */
|
|
92
|
+
export declare function decisionDispatchEventNames(ctx: Context): readonly string[];
|
|
93
|
+
/** True when this composition has at least one real DecisionEvents dispatch
|
|
94
|
+
* source (today: the live channel). Used by host descriptor/admission views. */
|
|
95
|
+
export declare function hasDecisionDispatchTopology(ctx: Context): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Record that this composition contains a real DecisionEvents dispatch
|
|
98
|
+
* source for the supplied event names. Called by the channel after it mounts
|
|
99
|
+
* the dispatch path; never called by guard installation alone.
|
|
100
|
+
*
|
|
101
|
+
* Returns a disposer that decrements this source's contribution. Multiple
|
|
102
|
+
* dispatch sources in the same composition are reference-counted per event,
|
|
103
|
+
* so unloading one channel does not erase another live channel's topology.
|
|
104
|
+
*
|
|
105
|
+
* Lifecycle assumption: in the current TUI the channel is mounted by a
|
|
106
|
+
* Cordis plugin/context and `createChannel()` registers this disposer in that
|
|
107
|
+
* context's effect cleanup, so unloading the owning context unmarks the
|
|
108
|
+
* topology. If an embedder intentionally treats the channel as a
|
|
109
|
+
* process-level singleton and never disposes the owning context, the marker
|
|
110
|
+
* persists for the process lifetime — matching the singleton assumption and
|
|
111
|
+
* not leaking across unloaded channels. Tests can always call the disposer or
|
|
112
|
+
* `unmarkDecisionDispatchTopology()` explicitly to prove post-unload
|
|
113
|
+
* behavior.
|
|
114
|
+
*/
|
|
115
|
+
export declare function markDecisionDispatchTopology(ctx: Context, events?: readonly string[]): () => void;
|
|
116
|
+
/**
|
|
117
|
+
* Remove this composition's DecisionEvents dispatch topology registration for
|
|
118
|
+
* the supplied events (defaults to all known events). Also available as the
|
|
119
|
+
* disposer returned by `markDecisionDispatchTopology()`; `createChannel()`
|
|
120
|
+
* calls it when the channel's Cordis effect/context is unloaded.
|
|
121
|
+
*/
|
|
122
|
+
export declare function unmarkDecisionDispatchTopology(ctx: Context, events?: readonly string[]): void;
|
|
123
|
+
/** Read-only DecisionEvents feature probe: reports only event names that have
|
|
124
|
+
* BOTH a guard and a real channel/dispatch topology in this composition. It
|
|
125
|
+
* creates no subscription and is used by the live-driver evidence path. */
|
|
126
|
+
export declare function probeDecisionEventFeatures(ctx: Context): readonly string[];
|
|
83
127
|
export declare function installDecisionGuard(ctx: Context, grants: GrantStore): void;
|
|
84
128
|
//# sourceMappingURL=decision-guard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-guard.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/decision-guard.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"decision-guard.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/decision-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EACL,qBAAqB,EAGrB,KAAK,UAAU,EAChB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAIL,KAAK,yBAAyB,EAC/B,MAAM,yBAAyB,CAAA;AAOhC,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AAGlF,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAA;AAErC;;iEAEiE;AACjE,OAAO,EAAE,0BAA0B,EAAE,CAAA;AAQrC,OAAO,EAAE,qBAAqB,EAAE,CAAA;AAEhC;4DAC4D;AAC5D,MAAM,MAAM,eAAe,GAAG,UAAU,CAAA;AAExC;4DAC4D;AAC5D,eAAO,MAAM,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAA4B,CAAA;AAEjF;4DAC4D;AAC5D,eAAO,MAAM,mBAAmB,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,UAA2B,CAAA;AA4B/E,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAA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QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,EACvD,OAAO,GAAE,2BAAgC,EACzC,SAAS,CAAC,EAAE,MAAM,IAAI,GACrB,MAAM,OAAO,CAgGf;AAkBD,kEAAkE;AAClE,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAI9E;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,GAAG,uBAAuB,GAAG,SAAS,CAEjG;AAED;yEACyE;AACzE,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAQ1E;AAED;gFACgF;AAChF,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEjE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,OAAO,EACZ,MAAM,GAAE,SAAS,MAAM,EAA6B,GACnD,MAAM,IAAI,CAqBZ;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,OAAO,EACZ,MAAM,GAAE,SAAS,MAAM,EAA6B,GACnD,IAAI,CAaN;AAED;;2EAE2E;AAC3E,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAI1E;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CA+D3E"}
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
* and `tui/compact` are NOT free-for-all `ctx.on` targets: the subscribing
|
|
9
9
|
* plugin (identified by its verified Component identity) must hold the
|
|
10
10
|
* matching `domain.resource.intercept` grant. Grant answers
|
|
11
|
-
* come from the unified 8-permission GrantStore in
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* come from the unified 8-permission GrantStore in
|
|
12
|
+
* `../adapter/standard/grants.js` (registry-driven defaults,
|
|
13
|
+
* `grants`/`denies` sections, corrupt fail-closed) — this module is only the
|
|
14
|
+
* subscribe-time CHECKPOINT: which event needs which permission, and the
|
|
15
|
+
* cordis bail hook that enforces it.
|
|
15
16
|
*
|
|
16
17
|
* A denied subscription never enters the dispatch chain — it is "as if
|
|
17
18
|
* unregistered" (D-7) and the caller gets a no-op disposer plus a logger
|
|
@@ -26,28 +27,29 @@
|
|
|
26
27
|
* result skips the registration and becomes the caller's disposer. That is
|
|
27
28
|
* the whole hook — no patching of the events service.
|
|
28
29
|
*/
|
|
29
|
-
import { EXTENSION_GRANTS_FILE, parseGrantStore, readGrantStore, } from '
|
|
30
|
+
import { EXTENSION_GRANTS_FILE, parseGrantStore, readGrantStore, } from '../adapter/standard/grants.js';
|
|
30
31
|
import { componentIdentityOf, requiresDecisionEvents, } from './component-identity.js';
|
|
31
|
-
import { INTERCEPT_EVENT_SCOPE_BY_PERMISSION, normalizePermissionScope, permissionScopeCovers, } from '../
|
|
32
|
-
import { TUI_DECISION_EVENT_NAMES } from '../
|
|
32
|
+
import { INTERCEPT_EVENT_SCOPE_BY_PERMISSION, normalizePermissionScope, permissionScopeCovers, } from '../adapter/standard/permission-scope.js';
|
|
33
|
+
import { TUI_DECISION_EVENT_NAMES } from '../adapter/standard/tui-extension.js';
|
|
34
|
+
import { DECISION_EVENT_PERMISSIONS } from '../adapter/spec/protocol-constants.js';
|
|
33
35
|
import { bindCallerEffect, compositionRoot } from './host-access.js';
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
'tui/session-switch': 'session.switch.intercept',
|
|
41
|
-
'tui/compact': 'session.compact.intercept',
|
|
42
|
-
});
|
|
36
|
+
import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
|
|
37
|
+
import { assertCapabilityShadowPolicy, } from '../adapter/kernel/runtime.js';
|
|
38
|
+
/** The intercept permission each decision event requires. The map is
|
|
39
|
+
* derived in src/adapter/spec/protocol-constants.ts and re-exported here for
|
|
40
|
+
* compatibility; product code must not declare a second copy. */
|
|
41
|
+
export { DECISION_EVENT_PERMISSIONS };
|
|
43
42
|
// ── Compatibility aliases (pre-GrantStore names) ────────────────────────────
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
43
|
+
// These aliases are intentionally outside the P6 removal scope: they are a
|
|
44
|
+
// long-term compatibility surface for existing embedder/test code. They map
|
|
45
|
+
// directly to the canonical `../adapter/standard/grants.js` implementation.
|
|
46
|
+
// OWNER: dsh-tui adapter. UNTIL: no scheduled removal.
|
|
47
47
|
export { EXTENSION_GRANTS_FILE };
|
|
48
|
-
/** @deprecated Use parseGrantStore from
|
|
48
|
+
/** @deprecated Use parseGrantStore from `../adapter/standard/grants.js`.
|
|
49
|
+
* Long-term compatibility alias; owner: dsh-tui adapter. */
|
|
49
50
|
export const parseExtensionGrants = parseGrantStore;
|
|
50
|
-
/** @deprecated Use readGrantStore from
|
|
51
|
+
/** @deprecated Use readGrantStore from `../adapter/standard/grants.js`.
|
|
52
|
+
* Long-term compatibility alias; owner: dsh-tui adapter. */
|
|
51
53
|
export const readExtensionGrants = readGrantStore;
|
|
52
54
|
/**
|
|
53
55
|
* Install the D-7 gate: every subscription to a decision event is checked
|
|
@@ -63,6 +65,18 @@ export const readExtensionGrants = readGrantStore;
|
|
|
63
65
|
* lands first is unobservable.
|
|
64
66
|
*/
|
|
65
67
|
const guardedRoots = new WeakSet();
|
|
68
|
+
/**
|
|
69
|
+
* Real DecisionEvents dispatch topology, keyed by Cordis composition root.
|
|
70
|
+
*
|
|
71
|
+
* The guard alone is NOT evidence that an event is actually dispatched:
|
|
72
|
+
* `installDecisionGuard()` only installs the subscribe-time gate. The actual
|
|
73
|
+
* dispatch paths live in the channel (`createChannel`), which calls
|
|
74
|
+
* `markDecisionDispatchTopology()` after it is composed. Until that marker is
|
|
75
|
+
* present, `probeDecisionEventFeatures()` returns no features — the public
|
|
76
|
+
* Host Descriptor must not publish DecisionEvents from a composition that only
|
|
77
|
+
* has a guard and no real channel/dispatch source.
|
|
78
|
+
*/
|
|
79
|
+
const decisionDispatchTopology = new WeakMap();
|
|
66
80
|
const handlerMetadata = new WeakMap();
|
|
67
81
|
const registries = new WeakMap();
|
|
68
82
|
function rootKey(ctx) {
|
|
@@ -70,9 +84,10 @@ function rootKey(ctx) {
|
|
|
70
84
|
}
|
|
71
85
|
function registryFor(ctx, grants) {
|
|
72
86
|
const key = rootKey(ctx);
|
|
87
|
+
const runtime = adapterRuntimeFor(ctx);
|
|
73
88
|
let registry = registries.get(key);
|
|
74
89
|
if (registry === undefined) {
|
|
75
|
-
registry = { grants: grants ?? readGrantStore(), handlers: new Map() };
|
|
90
|
+
registry = { grants: grants ?? readGrantStore(undefined, undefined, runtime), handlers: new Map(), runtime };
|
|
76
91
|
registries.set(key, registry);
|
|
77
92
|
}
|
|
78
93
|
else if (grants !== undefined) {
|
|
@@ -153,6 +168,8 @@ function defaultDecisionScope(identity, event) {
|
|
|
153
168
|
}
|
|
154
169
|
/** Host-only registration used by TuiPluginHostRuntime. */
|
|
155
170
|
export function registerDecisionHandler(pluginCtx, identity, event, listener, options = {}, onRelease) {
|
|
171
|
+
const runtime = registryFor(pluginCtx).runtime;
|
|
172
|
+
assertCapabilityShadowPolicy('host.decision.subscribe', runtime.mode, runtime.slices);
|
|
156
173
|
if (componentIdentityOf(pluginCtx) !== identity) {
|
|
157
174
|
throw new Error('DecisionEvents registration identity is not bound to the calling activation');
|
|
158
175
|
}
|
|
@@ -284,6 +301,101 @@ export function withDecisionRegistration(ctx, callback) {
|
|
|
284
301
|
export function decisionHandlerMetadataOf(listener) {
|
|
285
302
|
return handlerMetadata.get(listener);
|
|
286
303
|
}
|
|
304
|
+
/** Return the event names for which a real dispatch topology is recorded in
|
|
305
|
+
* this composition. Empty means only a guard (or nothing) is mounted. */
|
|
306
|
+
export function decisionDispatchEventNames(ctx) {
|
|
307
|
+
const root = compositionRoot(ctx);
|
|
308
|
+
const counts = typeof root === 'object' && root !== null
|
|
309
|
+
? decisionDispatchTopology.get(root)
|
|
310
|
+
: undefined;
|
|
311
|
+
return counts === undefined
|
|
312
|
+
? Object.freeze([])
|
|
313
|
+
: Object.freeze([...counts.keys()].sort());
|
|
314
|
+
}
|
|
315
|
+
/** True when this composition has at least one real DecisionEvents dispatch
|
|
316
|
+
* source (today: the live channel). Used by host descriptor/admission views. */
|
|
317
|
+
export function hasDecisionDispatchTopology(ctx) {
|
|
318
|
+
return decisionDispatchEventNames(ctx).length > 0;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Record that this composition contains a real DecisionEvents dispatch
|
|
322
|
+
* source for the supplied event names. Called by the channel after it mounts
|
|
323
|
+
* the dispatch path; never called by guard installation alone.
|
|
324
|
+
*
|
|
325
|
+
* Returns a disposer that decrements this source's contribution. Multiple
|
|
326
|
+
* dispatch sources in the same composition are reference-counted per event,
|
|
327
|
+
* so unloading one channel does not erase another live channel's topology.
|
|
328
|
+
*
|
|
329
|
+
* Lifecycle assumption: in the current TUI the channel is mounted by a
|
|
330
|
+
* Cordis plugin/context and `createChannel()` registers this disposer in that
|
|
331
|
+
* context's effect cleanup, so unloading the owning context unmarks the
|
|
332
|
+
* topology. If an embedder intentionally treats the channel as a
|
|
333
|
+
* process-level singleton and never disposes the owning context, the marker
|
|
334
|
+
* persists for the process lifetime — matching the singleton assumption and
|
|
335
|
+
* not leaking across unloaded channels. Tests can always call the disposer or
|
|
336
|
+
* `unmarkDecisionDispatchTopology()` explicitly to prove post-unload
|
|
337
|
+
* behavior.
|
|
338
|
+
*/
|
|
339
|
+
export function markDecisionDispatchTopology(ctx, events = TUI_DECISION_EVENT_NAMES) {
|
|
340
|
+
const root = compositionRoot(ctx);
|
|
341
|
+
if (typeof root !== 'object' || root === null)
|
|
342
|
+
return () => undefined;
|
|
343
|
+
const known = new Set(TUI_DECISION_EVENT_NAMES);
|
|
344
|
+
const added = [];
|
|
345
|
+
let counts = decisionDispatchTopology.get(root);
|
|
346
|
+
if (counts === undefined) {
|
|
347
|
+
counts = new Map();
|
|
348
|
+
decisionDispatchTopology.set(root, counts);
|
|
349
|
+
}
|
|
350
|
+
for (const event of events) {
|
|
351
|
+
if (!known.has(event))
|
|
352
|
+
continue;
|
|
353
|
+
counts.set(event, (counts.get(event) ?? 0) + 1);
|
|
354
|
+
added.push(event);
|
|
355
|
+
}
|
|
356
|
+
let disposed = false;
|
|
357
|
+
return () => {
|
|
358
|
+
if (disposed)
|
|
359
|
+
return;
|
|
360
|
+
disposed = true;
|
|
361
|
+
unmarkDecisionDispatchTopology(ctx, added);
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Remove this composition's DecisionEvents dispatch topology registration for
|
|
366
|
+
* the supplied events (defaults to all known events). Also available as the
|
|
367
|
+
* disposer returned by `markDecisionDispatchTopology()`; `createChannel()`
|
|
368
|
+
* calls it when the channel's Cordis effect/context is unloaded.
|
|
369
|
+
*/
|
|
370
|
+
export function unmarkDecisionDispatchTopology(ctx, events = TUI_DECISION_EVENT_NAMES) {
|
|
371
|
+
const root = compositionRoot(ctx);
|
|
372
|
+
if (typeof root !== 'object' || root === null)
|
|
373
|
+
return;
|
|
374
|
+
const counts = decisionDispatchTopology.get(root);
|
|
375
|
+
if (counts === undefined)
|
|
376
|
+
return;
|
|
377
|
+
const known = new Set(TUI_DECISION_EVENT_NAMES);
|
|
378
|
+
for (const event of events) {
|
|
379
|
+
if (!known.has(event))
|
|
380
|
+
continue;
|
|
381
|
+
const remaining = (counts.get(event) ?? 0) - 1;
|
|
382
|
+
if (remaining > 0)
|
|
383
|
+
counts.set(event, remaining);
|
|
384
|
+
else
|
|
385
|
+
counts.delete(event);
|
|
386
|
+
}
|
|
387
|
+
if (counts.size === 0)
|
|
388
|
+
decisionDispatchTopology.delete(root);
|
|
389
|
+
}
|
|
390
|
+
/** Read-only DecisionEvents feature probe: reports only event names that have
|
|
391
|
+
* BOTH a guard and a real channel/dispatch topology in this composition. It
|
|
392
|
+
* creates no subscription and is used by the live-driver evidence path. */
|
|
393
|
+
export function probeDecisionEventFeatures(ctx) {
|
|
394
|
+
const root = compositionRoot(ctx);
|
|
395
|
+
if (typeof root !== 'object' || root === null || !guardedRoots.has(root))
|
|
396
|
+
return Object.freeze([]);
|
|
397
|
+
return decisionDispatchEventNames(ctx);
|
|
398
|
+
}
|
|
287
399
|
export function installDecisionGuard(ctx, grants) {
|
|
288
400
|
// Degraded/fake contexts (minimal embedders, test harnesses) may lack
|
|
289
401
|
// `root` or `on` entirely — the gate is best-effort there, matching the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogs.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/dialogs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"dialogs.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/dialogs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAStD,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,8DAA8D;AAC9D,MAAM,MAAM,iBAAiB,GACzB;IACE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAA;CACnD,GACD;IACE,QAA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S;IAMjB,6EAA6E;IAC7E,MAAM,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IACpE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAwCpF,8DAA8D;IAC9D,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC;IAC3D,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC;IAmC3E,kEAAkE;IAClE,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAClE,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CA2BnF;AAsBD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,CAOpG;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
import { Context, Service } from '@deepseek-ai/cordis';
|
|
22
22
|
import { cleanScalarText } from './sanitize.js';
|
|
23
23
|
import { activationContext, bindCallerEffect, compositionRoot, concreteService, requirePluginCaller } from './host-access.js';
|
|
24
|
+
import { assertCapabilityShadowPolicy, } from '../adapter/kernel/runtime.js';
|
|
25
|
+
import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
|
|
24
26
|
/** Render-path strings are untrusted: sanitization (control-char stripping,
|
|
25
27
|
* cell-width caps, scalar-only coercion) lives in ./sanitize.js — the one
|
|
26
28
|
* implementation of the Track A contract. `clean` drops non-scalars to ''
|
|
@@ -187,6 +189,7 @@ export class TuiDialogRuntime extends Service {
|
|
|
187
189
|
// compatibility.
|
|
188
190
|
const store = new TuiDialogStore();
|
|
189
191
|
hostDialogStores.set(this, store);
|
|
192
|
+
hostDialogRuntimes.set(this, adapterRuntimeFor(ctx));
|
|
190
193
|
ctx.effect(() => () => store.settleAll());
|
|
191
194
|
}
|
|
192
195
|
/** Cordis traceable services normally provide the caller through `this.ctx`;
|
|
@@ -211,6 +214,7 @@ export class TuiDialogRuntime extends Service {
|
|
|
211
214
|
: DIALOG_DEFAULT_TIMEOUT_MS;
|
|
212
215
|
}
|
|
213
216
|
select(ownerOrRequest, explicitRequest) {
|
|
217
|
+
assertCapabilityShadowPolicy('host.dialogs.select', dialogRuntimeFor(this).mode, dialogRuntimeFor(this).slices);
|
|
214
218
|
try {
|
|
215
219
|
const owner = this.callContext(ownerOrRequest);
|
|
216
220
|
const request = (explicitRequest ?? ownerOrRequest);
|
|
@@ -244,6 +248,7 @@ export class TuiDialogRuntime extends Service {
|
|
|
244
248
|
}
|
|
245
249
|
}
|
|
246
250
|
confirm(ownerOrRequest, explicitRequest) {
|
|
251
|
+
assertCapabilityShadowPolicy('host.dialogs.confirm', dialogRuntimeFor(this).mode, dialogRuntimeFor(this).slices);
|
|
247
252
|
try {
|
|
248
253
|
const owner = this.callContext(ownerOrRequest);
|
|
249
254
|
const request = (explicitRequest ?? ownerOrRequest);
|
|
@@ -271,6 +276,7 @@ export class TuiDialogRuntime extends Service {
|
|
|
271
276
|
}
|
|
272
277
|
}
|
|
273
278
|
input(ownerOrRequest, explicitRequest) {
|
|
279
|
+
assertCapabilityShadowPolicy('host.dialogs.input', dialogRuntimeFor(this).mode, dialogRuntimeFor(this).slices);
|
|
274
280
|
try {
|
|
275
281
|
const owner = this.callContext(ownerOrRequest);
|
|
276
282
|
const request = (explicitRequest ?? ownerOrRequest);
|
|
@@ -297,6 +303,13 @@ export class TuiDialogRuntime extends Service {
|
|
|
297
303
|
* public surface is select/confirm/input.
|
|
298
304
|
*/
|
|
299
305
|
const hostDialogStores = new WeakMap();
|
|
306
|
+
const hostDialogRuntimes = new WeakMap();
|
|
307
|
+
function dialogRuntimeFor(runtime) {
|
|
308
|
+
const state = hostDialogRuntimes.get(concreteService(runtime));
|
|
309
|
+
if (state === undefined)
|
|
310
|
+
throw new Error('tuiDialogs host runtime is unavailable');
|
|
311
|
+
return state;
|
|
312
|
+
}
|
|
300
313
|
function dialogStoreFor(runtime) {
|
|
301
314
|
const store = hostDialogStores.get(concreteService(runtime));
|
|
302
315
|
if (store === undefined)
|
|
@@ -77,6 +77,11 @@ export declare class TuiEffectLedgerRuntime extends Service {
|
|
|
77
77
|
* parameter); omitting it records `undeclared`, never a guess.
|
|
78
78
|
*/
|
|
79
79
|
record(entry: LedgerEntry, identity?: Context): void;
|
|
80
|
+
/** Append one kernel-resolved record to the JSONL file. */
|
|
81
|
+
private appendKernelRecord;
|
|
82
|
+
/** Kernel-ledger owner resolver: verified activation identity wins; host /
|
|
83
|
+
* undeclared fallbacks are explicit and never borrowed from fiber names. */
|
|
84
|
+
private resolveKernelOwner;
|
|
80
85
|
/** Runtime generation (C-050): options override, else the plugin-host
|
|
81
86
|
* service's id — resolved on first record and cached (the host row mounts
|
|
82
87
|
* before any caller can record). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect-ledger.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/effect-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAIH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"effect-ledger.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/effect-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAIH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AActD,wDAAwD;AACxD,eAAO,MAAM,kBAAkB,QAAwC,CAAA;AAEvE,4DAA4D;AAC5D,eAAO,MAAM,q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;IAUf,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,YAAY;CAarB;AA+CD,eAAe,sBAAsB,CAAA"}
|
|
@@ -36,12 +36,14 @@
|
|
|
36
36
|
*/
|
|
37
37
|
import { appendFileSync, mkdirSync, readFileSync } from 'node:fs';
|
|
38
38
|
import { dirname, join } from 'node:path';
|
|
39
|
-
import { Service } from '@deepseek-ai/cordis';
|
|
39
|
+
import { Context, Service } from '@deepseek-ai/cordis';
|
|
40
40
|
import { DATA_DIR } from '../utils/paths.js';
|
|
41
|
-
import { loadSpecData } from '../
|
|
42
|
-
import { check } from '../
|
|
41
|
+
import { loadSpecData } from '../adapter/standard/registry.js';
|
|
42
|
+
import { check } from '../adapter/standard/schema-check.js';
|
|
43
|
+
import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
|
|
43
44
|
import { componentIdentityOf } from './component-identity.js';
|
|
44
45
|
import { compositionRoot, concreteService } from './host-access.js';
|
|
46
|
+
import { createKernelLedger } from '../adapter/kernel/ledger.js';
|
|
45
47
|
/** Default ledger file (JSONL, one record per line). */
|
|
46
48
|
export const EFFECT_LEDGER_FILE = join(DATA_DIR, 'effect-ledger.jsonl');
|
|
47
49
|
/** Resource kinds recorded by the host's wired emitters. */
|
|
@@ -83,12 +85,19 @@ export class TuiEffectLedgerRuntime extends Service {
|
|
|
83
85
|
nextActivation: 1,
|
|
84
86
|
sequence: 0,
|
|
85
87
|
schemaWarned: false,
|
|
88
|
+
runtime: adapterRuntimeFor(ctx),
|
|
86
89
|
ledgerSchema: undefined,
|
|
90
|
+
kernelLedger: undefined,
|
|
87
91
|
};
|
|
88
92
|
// `'ledgerSchema' in options` lets a caller force-undefined (fail-closed
|
|
89
93
|
// test seam), same contract as the message observer's envelopeSchema.
|
|
90
94
|
state.ledgerSchema = 'ledgerSchema' in options ? options.ledgerSchema : loadSpecData()?.schemas.ledger;
|
|
91
95
|
state.sequence = resumeSequence(file);
|
|
96
|
+
// Route every public ledger write through the unified Kernel ledger
|
|
97
|
+
// channel. The kernel ledger performs shadow-policy enforcement and
|
|
98
|
+
// owner derivation; this class only serializes the normalized record to
|
|
99
|
+
// the existing JSONL file.
|
|
100
|
+
state.kernelLedger = createKernelLedger(record => this.appendKernelRecord(record, state), state.runtime.mode, context => this.resolveKernelOwner(context, state), state.runtime.slices);
|
|
92
101
|
ledgerStates.set(this, state);
|
|
93
102
|
}
|
|
94
103
|
/**
|
|
@@ -97,25 +106,35 @@ export class TuiEffectLedgerRuntime extends Service {
|
|
|
97
106
|
* parameter); omitting it records `undeclared`, never a guess.
|
|
98
107
|
*/
|
|
99
108
|
record(entry, identity) {
|
|
100
|
-
|
|
109
|
+
const state = ledgerStateFor(this);
|
|
110
|
+
// The Kernel ledger is the single owner-deriving write channel. It
|
|
111
|
+
// asserts shadow policy and calls back with a kernel-resolved owner.
|
|
112
|
+
try {
|
|
113
|
+
state.kernelLedger.record(entry, identity);
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
// Ledger writes are explicitly best-effort and must not affect the seam.
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/** Append one kernel-resolved record to the JSONL file. */
|
|
120
|
+
appendKernelRecord(kernelRecord, state) {
|
|
101
121
|
try {
|
|
102
|
-
state = ledgerStateFor(this);
|
|
103
122
|
if (state.ledgerSchema === undefined) {
|
|
104
123
|
if (!state.schemaWarned) {
|
|
105
124
|
state.schemaWarned = true;
|
|
106
|
-
state.hostContext.logger.warn('dsh-tui: effect ledger schema unavailable
|
|
125
|
+
state.hostContext.logger.warn('dsh-tui: effect ledger schema unavailable - suppressing all ledger writes (fail-closed)');
|
|
107
126
|
}
|
|
108
127
|
return;
|
|
109
128
|
}
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
const
|
|
129
|
+
const { entry, owner } = kernelRecord;
|
|
130
|
+
const pluginId = cleanField(owner.componentId, 128, 'undeclared');
|
|
131
|
+
const activationInstance = cleanField(owner.activationId ?? pluginId, 128, pluginId);
|
|
113
132
|
const record = {
|
|
114
133
|
ledgerVersion: '0.15',
|
|
115
134
|
sequence: state.sequence,
|
|
116
135
|
timestamp: new Date().toISOString(),
|
|
117
136
|
pluginId,
|
|
118
|
-
activationInstance
|
|
137
|
+
activationInstance,
|
|
119
138
|
runtimeGenerationId: this.generation(),
|
|
120
139
|
operation: entry.operation,
|
|
121
140
|
resource: {
|
|
@@ -138,9 +157,6 @@ export class TuiEffectLedgerRuntime extends Service {
|
|
|
138
157
|
: {}),
|
|
139
158
|
...(entry.valueDigest !== undefined ? { valueDigest: entry.valueDigest } : {}),
|
|
140
159
|
};
|
|
141
|
-
// Fail-closed self-check: a record that does not satisfy the vendored
|
|
142
|
-
// schema is DROPPED, not written (the schema's additionalProperties:
|
|
143
|
-
// false is the structural secret ban).
|
|
144
160
|
try {
|
|
145
161
|
check(record, state.ledgerSchema, state.ledgerSchema);
|
|
146
162
|
}
|
|
@@ -153,9 +169,31 @@ export class TuiEffectLedgerRuntime extends Service {
|
|
|
153
169
|
state.sequence += 1;
|
|
154
170
|
}
|
|
155
171
|
catch (error) {
|
|
156
|
-
;
|
|
157
|
-
|
|
172
|
+
state.hostContext.logger.warn('dsh-tui: effect ledger write failed');
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/** Kernel-ledger owner resolver: verified activation identity wins; host /
|
|
176
|
+
* undeclared fallbacks are explicit and never borrowed from fiber names. */
|
|
177
|
+
resolveKernelOwner(identity, state) {
|
|
178
|
+
if (!Context.is(identity)) {
|
|
179
|
+
return { componentId: 'undeclared', activationId: 'undeclared' };
|
|
180
|
+
}
|
|
181
|
+
const verified = componentIdentityOf(identity);
|
|
182
|
+
if (verified !== undefined) {
|
|
183
|
+
return { componentId: verified.componentId, activationId: verified.activationId };
|
|
184
|
+
}
|
|
185
|
+
const fiber = this.fiberOf(identity);
|
|
186
|
+
let name = '';
|
|
187
|
+
try {
|
|
188
|
+
name = typeof identity.fiber?.name === 'string' ? identity.fiber.name : '';
|
|
189
|
+
}
|
|
190
|
+
catch {
|
|
191
|
+
name = '';
|
|
192
|
+
}
|
|
193
|
+
if (fiber === undefined || name === '' || name === 'root') {
|
|
194
|
+
return { componentId: 'host', activationId: 'host' };
|
|
158
195
|
}
|
|
196
|
+
return { componentId: 'undeclared', activationId: this.activationOf(fiber, 'undeclared') };
|
|
159
197
|
}
|
|
160
198
|
/** Runtime generation (C-050): options override, else the plugin-host
|
|
161
199
|
* service's id — resolved on first record and cached (the host row mounts
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { TuiRewindMode } from '../adapter/ports/channel-session.js';
|
|
2
|
+
export type { TuiRewindMode } from '../adapter/ports/channel-session.js';
|
|
1
3
|
/**
|
|
2
4
|
* Decision-point events the TUI fires on the cordis bus so plugins can
|
|
3
5
|
* intercept, cancel, or customize interactive flows — the `session_before_*`
|
|
@@ -104,15 +106,6 @@ export interface TuiRewindPromptEvent extends TuiDecisionContext {
|
|
|
104
106
|
/** Session event seq of the picked message. */
|
|
105
107
|
seq: number;
|
|
106
108
|
}
|
|
107
|
-
/** One extra rewind mode offered by a plugin (e.g. "also restore files"). */
|
|
108
|
-
export interface TuiRewindMode {
|
|
109
|
-
/** Stable id reported back in `TuiRewindDoneEvent.mode`. */
|
|
110
|
-
id: string;
|
|
111
|
-
/** One-line label shown in the confirm pane. */
|
|
112
|
-
label: string;
|
|
113
|
-
/** Optional dimmed description under the label. */
|
|
114
|
-
description?: string;
|
|
115
|
-
}
|
|
116
109
|
export type TuiRewindPromptDecision =
|
|
117
110
|
/** Abort the rewind; the picker stays open. Optional reason is toasted. */
|
|
118
111
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension-events.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/extension-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAYlD;;wEAEwE;AACxE,eAAO,MAAM,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AAkB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;QAC9F,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAA;QAChH,sBAAsB,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QAC5E,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;KACxF;CACF"}
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Decision-point events the TUI fires on the cordis bus so plugins can
|
|
3
|
-
* intercept, cancel, or customize interactive flows — the `session_before_*`
|
|
4
|
-
* style seam (pi's `session_before_fork` / `input` events) expressed in
|
|
5
|
-
* cordis dispatch semantics.
|
|
6
|
-
*
|
|
7
|
-
* All of these are FIRED BY THE CHANNEL and answered by admitted Components
|
|
8
|
-
* through the host-mediated DecisionEvents registry. No extra service row is
|
|
9
|
-
* involved: an absent handler simply means "no opinion", and the built-in
|
|
10
|
-
* flow proceeds unchanged. Dispatch is SERIAL in the registry's stable order
|
|
11
|
-
* with the first VALID decision winning — see {@link dispatchTuiDecision} for
|
|
12
|
-
* why this is not raw `ctx.serial`: per-handler crash isolation, deadlines and
|
|
13
|
-
* return-value normalization mean a broken or malformed handler can never
|
|
14
|
-
* skip a later (possibly safety) veto.
|
|
15
|
-
*
|
|
16
|
-
* Synchronous-only rule: handlers may be async, but while a decision is
|
|
17
|
-
* awaited the originating UI flow is parked (the submit is not delivered,
|
|
18
|
-
* the rewind confirm has not happened). Handlers that need user input should
|
|
19
|
-
* use the managed dialogs (`ctx.tuiDialogs`) or open a scene, then resolve.
|
|
20
|
-
*/
|
|
21
1
|
import { cleanScalarText } from './sanitize.js';
|
|
22
2
|
import { DECISION_EVENT_PERMISSIONS, decisionHandlersOf, decisionRegistryOf, } from './decision-guard.js';
|
|
23
3
|
/** Toast-bound plugin text (veto reasons) is render-path data: sanitized
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/extensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/extensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAW7C,eAAO,MAAM,IAAI,uBAAuB,CAAA;AAExC,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAQxC"}
|
|
@@ -37,10 +37,11 @@ import TuiRendererRuntime from './renderers.js';
|
|
|
37
37
|
import TuiToastRuntime from './toast.js';
|
|
38
38
|
import TuiThemeRuntime from './themes.js';
|
|
39
39
|
import { installDecisionGuard } from './decision-guard.js';
|
|
40
|
-
import { readGrantStore } from '
|
|
40
|
+
import { readGrantStore } from '../adapter/standard/grants.js';
|
|
41
|
+
import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
|
|
41
42
|
export const name = 'dsh-tui-extensions';
|
|
42
43
|
export function apply(ctx) {
|
|
43
|
-
installDecisionGuard(ctx, readGrantStore());
|
|
44
|
+
installDecisionGuard(ctx, readGrantStore(undefined, undefined, adapterRuntimeFor(ctx)));
|
|
44
45
|
ctx.plugin(TuiDialogRuntime);
|
|
45
46
|
ctx.plugin(TuiStatusRuntime);
|
|
46
47
|
ctx.plugin(TuiShortcutRuntime);
|