@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,9 @@
|
|
|
1
|
+
const dispatchers = new WeakMap();
|
|
2
|
+
export function bindChannelCommands(state, commands) {
|
|
3
|
+
dispatchers.set(state, commands);
|
|
4
|
+
// Keep the revoked dispatcher installed: late async work must fail closed,
|
|
5
|
+
// not revert to the bare-embedder path after production teardown.
|
|
6
|
+
}
|
|
7
|
+
export function channelCommands(state) {
|
|
8
|
+
return dispatchers.get(state) ?? state;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import type { ChannelOwner } from './owner.js';
|
|
4
|
+
import type { ChannelState } from './types.js';
|
|
5
|
+
type CompactionState = Pick<ChannelState, 'agentId' | 'cwd' | 'working'>;
|
|
6
|
+
type Notify = ChannelState['notify'];
|
|
7
|
+
/** Owns the one manual compaction transaction that must settle before a switch. */
|
|
8
|
+
export declare function createManualCompaction(ctx: Context, state: CompactionState, deps: {
|
|
9
|
+
owner: Pick<ChannelOwner, 'current' | 'signal' | 'own'>;
|
|
10
|
+
agent(): Agent;
|
|
11
|
+
withDecisionPending<T>(name: string, pending: Promise<T>): Promise<T>;
|
|
12
|
+
notify: Notify;
|
|
13
|
+
onComplete(): void;
|
|
14
|
+
}): {
|
|
15
|
+
compact: () => void;
|
|
16
|
+
settle: () => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=compaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/compaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAO9C,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC,CAAA;AACxE,KAAK,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AAEpC,mFAAmF;AACnF,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAC,CAAA;IACvD,KAAK,IAAI,KAAK,CAAA;IACd,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACrE,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,IAAI,IAAI,CAAA;CACnB;mBAuBmB,IAAI;kBAlBC,OAAO,CAAC,IAAI,CAAC;EAwGvC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { t } from '../../i18n.js';
|
|
2
|
+
import { dispatchTuiDecision, normalizeCancelDecision } from '../extension-events.js';
|
|
3
|
+
import { serviceForAgent } from '../presets.js';
|
|
4
|
+
/** Owns the one manual compaction transaction that must settle before a switch. */
|
|
5
|
+
export function createManualCompaction(ctx, state, deps) {
|
|
6
|
+
let active;
|
|
7
|
+
const cancelled = new WeakSet();
|
|
8
|
+
const settle = async () => {
|
|
9
|
+
const transaction = active;
|
|
10
|
+
if (transaction === undefined)
|
|
11
|
+
return;
|
|
12
|
+
active = undefined;
|
|
13
|
+
cancelled.add(transaction.controller);
|
|
14
|
+
transaction.controller.abort(new Error('session switch'));
|
|
15
|
+
deps.notify(t('compact-cancelled-switch'), { color: 'warning', timeoutMs: 4000 });
|
|
16
|
+
let timeout;
|
|
17
|
+
try {
|
|
18
|
+
await Promise.race([
|
|
19
|
+
transaction.settled,
|
|
20
|
+
new Promise(resolve => { timeout = setTimeout(resolve, 3000); }),
|
|
21
|
+
]);
|
|
22
|
+
}
|
|
23
|
+
finally {
|
|
24
|
+
if (timeout !== undefined)
|
|
25
|
+
clearTimeout(timeout);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const compact = () => {
|
|
29
|
+
if (!deps.owner.current() || deps.owner.signal.aborted || active !== undefined)
|
|
30
|
+
return;
|
|
31
|
+
const originAgent = deps.agent();
|
|
32
|
+
const compactService = serviceForAgent(ctx, originAgent, 'compaction');
|
|
33
|
+
if (!compactService) {
|
|
34
|
+
deps.notify(t('compact-unavailable'), { color: 'warning' });
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (state.working) {
|
|
38
|
+
deps.notify(t('compact-while-working'), { color: 'warning' });
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const controller = new AbortController();
|
|
42
|
+
const isCurrent = () => deps.owner.current()
|
|
43
|
+
&& !deps.owner.signal.aborted
|
|
44
|
+
&& !cancelled.has(controller)
|
|
45
|
+
&& deps.agent() === originAgent;
|
|
46
|
+
const releaseOwner = deps.owner.own(() => {
|
|
47
|
+
cancelled.add(controller);
|
|
48
|
+
controller.abort(new Error('channel lifetime ended'));
|
|
49
|
+
});
|
|
50
|
+
const originAgentId = state.agentId;
|
|
51
|
+
let finished = false;
|
|
52
|
+
const settled = (async () => {
|
|
53
|
+
try {
|
|
54
|
+
const decision = await deps.withDecisionPending('tui/compact', dispatchTuiDecision(ctx, 'tui/compact', {
|
|
55
|
+
sessionId: originAgentId,
|
|
56
|
+
cwd: state.cwd,
|
|
57
|
+
}, normalizeCancelDecision));
|
|
58
|
+
// A revoked owner stays silent, but retain the original stale-agent
|
|
59
|
+
// classification when this channel remains active on a new binding.
|
|
60
|
+
if (!deps.owner.current() || deps.owner.signal.aborted || cancelled.has(controller))
|
|
61
|
+
return;
|
|
62
|
+
if (deps.agent() !== originAgent) {
|
|
63
|
+
deps.notify(t('ext-compact-stale'), { color: 'warning', timeoutMs: 4000 });
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (decision !== undefined) {
|
|
67
|
+
deps.notify(decision.reason ?? t('ext-action-cancelled'), { color: 'warning', timeoutMs: 4000 });
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (state.working) {
|
|
71
|
+
deps.notify(t('compact-while-working'), { color: 'warning' });
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
deps.notify(t('compact-working'));
|
|
75
|
+
try {
|
|
76
|
+
// Compact the entry agent, never a later binding read after await.
|
|
77
|
+
const result = await compactService.compactNow(originAgent, controller.signal);
|
|
78
|
+
if (!isCurrent())
|
|
79
|
+
return;
|
|
80
|
+
deps.notify(result ? t('compact-done') : t('compact-nothing'));
|
|
81
|
+
if (result)
|
|
82
|
+
deps.onComplete();
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
if (!isCurrent() || cancelled.has(controller))
|
|
86
|
+
return;
|
|
87
|
+
if (error.code === 'persistence') {
|
|
88
|
+
deps.notify(t('compact-flush-failed'), { color: 'warning', timeoutMs: 12000 });
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
deps.notify(t('compact-failed', { err: error instanceof Error ? error.message : String(error) }), { color: 'error', timeoutMs: 8000 });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
// dispatch is normally isolated, but do not create an unhandled
|
|
96
|
+
// rejection if an embedder's pending wrapper fails.
|
|
97
|
+
if (!isCurrent())
|
|
98
|
+
return;
|
|
99
|
+
deps.notify(t('compact-failed', { err: error instanceof Error ? error.message : String(error) }), { color: 'error', timeoutMs: 8000 });
|
|
100
|
+
}
|
|
101
|
+
finally {
|
|
102
|
+
finished = true;
|
|
103
|
+
releaseOwner();
|
|
104
|
+
const currentTransaction = active;
|
|
105
|
+
if (currentTransaction?.controller === controller)
|
|
106
|
+
active = undefined;
|
|
107
|
+
}
|
|
108
|
+
})();
|
|
109
|
+
// Install before the decision await so a switch/fork settles a pending
|
|
110
|
+
// decision too, rather than letting it start compaction after its seed.
|
|
111
|
+
// A synchronous embedder failure is already handled by the IIFE above.
|
|
112
|
+
if (!finished)
|
|
113
|
+
active = { controller, settled };
|
|
114
|
+
};
|
|
115
|
+
return { compact, settle };
|
|
116
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { ChannelOwner } from './owner.js';
|
|
3
|
+
import type { ChannelImageBlock, ComposerImageRef, StagedImageHandle, StagedImageInput, TranscriptImage } from './types.js';
|
|
4
|
+
/** Every visible composer placeholder token, in source order. */
|
|
5
|
+
export declare const COMPOSER_IMAGE_TOKEN: RegExp;
|
|
6
|
+
/** One whole placeholder token; the distinction matters because a mention
|
|
7
|
+
* reference needs an `@` prefix while an image token must stay verbatim. */
|
|
8
|
+
export declare const COMPOSER_IMAGE_TOKEN_EXACT: RegExp;
|
|
9
|
+
export declare const formatMissingReference: (reference: string) => string;
|
|
10
|
+
/** Resolve only capabilities explicitly carried by this draft, in first
|
|
11
|
+
* textual-occurrence order. The visible token is presentation, never
|
|
12
|
+
* identity: raw history/rewind text has no stageId and therefore resolves
|
|
13
|
+
* to nothing even if a later draft happens to display the same number. */
|
|
14
|
+
export declare function orderedComposerImages<T>(text: string, refs: readonly ComposerImageRef[], staged: ReadonlyMap<string, T>): Map<string, T>;
|
|
15
|
+
/** The FIRST placeholder in `text` that resolved to no live capability: an
|
|
16
|
+
* evicted (FIFO cap) or foreign draft's token would otherwise ship as plain
|
|
17
|
+
* text with no image attached. Callers warn once and deliver unchanged. */
|
|
18
|
+
export declare function firstStaleComposerToken(text: string, ordered: ReadonlyMap<string, unknown>): string | undefined;
|
|
19
|
+
export interface ComposerImageLimits {
|
|
20
|
+
readonly maxImageBytes: number;
|
|
21
|
+
readonly maxImagesPerMessage: number;
|
|
22
|
+
}
|
|
23
|
+
/** The composer's staged-image capability store plus its draft-binding rules. */
|
|
24
|
+
export interface ComposerImages {
|
|
25
|
+
/** Current composer generation. Async paste continuations capture this
|
|
26
|
+
* before I/O and must not mutate a different session's draft. */
|
|
27
|
+
stagedImageGeneration(): number;
|
|
28
|
+
/** Validate and persist an image, returning the historical scene-facing
|
|
29
|
+
* `[Image #N]` token accepted by submit/steer/registry commands. */
|
|
30
|
+
stageImage(input: StagedImageInput): Promise<string>;
|
|
31
|
+
/** Draft-safe composer companion: bind persistence to one session epoch
|
|
32
|
+
* and return an opaque capability whose visible label belongs to Prompt. */
|
|
33
|
+
stageComposerImage(input: StagedImageInput, generation: number): Promise<StagedImageHandle>;
|
|
34
|
+
hasStagedImage(stageId: string): boolean;
|
|
35
|
+
discardStagedImage(stageId: string): void;
|
|
36
|
+
stagedImage(stageId: string): TranscriptImage | undefined;
|
|
37
|
+
stagedImageLimits(): ComposerImageLimits | undefined;
|
|
38
|
+
/** Revoke every capability of the session being replaced and bump the
|
|
39
|
+
* generation so in-flight saves cannot register into the new one. */
|
|
40
|
+
clearStagedImages(): void;
|
|
41
|
+
/** Immutable view of the live capabilities (stageId → durable reference). */
|
|
42
|
+
snapshot(): ReadonlyMap<string, ChannelImageBlock['attachment']>;
|
|
43
|
+
/** Add scene-era token bindings only when the caller did not supply an
|
|
44
|
+
* explicit draft capability for that visible token. */
|
|
45
|
+
includeLegacyImageRefs(text: string, images: readonly ComposerImageRef[]): readonly ComposerImageRef[];
|
|
46
|
+
/** Enqueue-time capture: legacy bindings merged, one object per ref. */
|
|
47
|
+
captureDraftImages(text: string, images: readonly ComposerImageRef[]): readonly ComposerImageRef[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Owns the editable-composer image capabilities: the session epoch, the
|
|
51
|
+
* capability map, its preview facades and the `[Image #N]` compatibility
|
|
52
|
+
* bindings minted by the public scene `stageImage()` API.
|
|
53
|
+
*/
|
|
54
|
+
export declare function createComposerImages(ctx: Context, owner: ChannelOwner, deps: {
|
|
55
|
+
generation(): number;
|
|
56
|
+
}): ComposerImages;
|
|
57
|
+
//# sourceMappingURL=composer-images.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer-images.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/composer-images.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAChB,MAAM,YAAY,CAAA;AAEnB,iEAAiE;AACjE,eAAO,MAAM,oBAAoB,QAAqB,CAAA;AAEtD;6EAC6E;AAC7E,eAAO,MAAM,0BAA0B,QAAsB,CAAA;AAE7D,eAAO,MAAM,sBAAsB,GAAI,WAAW,MAAM,KAAG,MACe,CAAA;AAE1E;;;2EAG2E;AAC3E,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,gBAAgB,EAAE,EACjC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,GAC7B,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAehB;AAED;;4EAE4E;AAC5E,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC,MAAM,GAAG,SAAS,CAKpB;AAOD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAA;CACrC;AAED,iFAAiF;AACjF,MAAM,WAAW,cAAc;IAC7B;sEACkE;IAClE,qBAAqB,IAAI,MAAM,CAAA;IAC/B;yEACqE;IACrE,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACpD;iFAC6E;IAC7E,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAC3F,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;IACxC,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACzC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAA;IACzD,iBAAiB,IAAI,mBAAmB,GAAG,SAAS,CAAA;IACpD;0EACsE;IACtE,iBAAiB,IAAI,IAAI,CAAA;IACzB,6EAA6E;IAC7E,QAAQ,IAAI,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAA;IAChE;4DACwD;IACxD,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,SAAS,gBAAgB,EAAE,CAAA;IACtG,wEAAwE;IACxE,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,SAAS,gBAAgB,EAAE,CAAA;CACnG;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE;IAAE,UAAU,IAAI,MAAM,CAAA;CAAE,GAC7B,cAAc,CAsKhB"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { rememberImagePath, transcriptImageFromAttachment } from '../transcript-images.js';
|
|
3
|
+
import { mentionAttachments } from './mentions.js';
|
|
4
|
+
/** Every visible composer placeholder token, in source order. */
|
|
5
|
+
export const COMPOSER_IMAGE_TOKEN = /\[Image #\d+\]/gu;
|
|
6
|
+
/** One whole placeholder token; the distinction matters because a mention
|
|
7
|
+
* reference needs an `@` prefix while an image token must stay verbatim. */
|
|
8
|
+
export const COMPOSER_IMAGE_TOKEN_EXACT = /^\[Image #\d+\]$/u;
|
|
9
|
+
export const formatMissingReference = (reference) => COMPOSER_IMAGE_TOKEN_EXACT.test(reference) ? reference : `@${reference}`;
|
|
10
|
+
/** Resolve only capabilities explicitly carried by this draft, in first
|
|
11
|
+
* textual-occurrence order. The visible token is presentation, never
|
|
12
|
+
* identity: raw history/rewind text has no stageId and therefore resolves
|
|
13
|
+
* to nothing even if a later draft happens to display the same number. */
|
|
14
|
+
export function orderedComposerImages(text, refs, staged) {
|
|
15
|
+
const byToken = new Map();
|
|
16
|
+
for (const ref of refs) {
|
|
17
|
+
if (!byToken.has(ref.token))
|
|
18
|
+
byToken.set(ref.token, ref.stageId);
|
|
19
|
+
}
|
|
20
|
+
const ordered = new Map();
|
|
21
|
+
for (const match of text.matchAll(COMPOSER_IMAGE_TOKEN)) {
|
|
22
|
+
const token = match[0];
|
|
23
|
+
if (ordered.has(token))
|
|
24
|
+
continue;
|
|
25
|
+
const stageId = byToken.get(token);
|
|
26
|
+
if (stageId === undefined)
|
|
27
|
+
continue;
|
|
28
|
+
const image = staged.get(stageId);
|
|
29
|
+
if (image !== undefined)
|
|
30
|
+
ordered.set(token, image);
|
|
31
|
+
}
|
|
32
|
+
return ordered;
|
|
33
|
+
}
|
|
34
|
+
/** The FIRST placeholder in `text` that resolved to no live capability: an
|
|
35
|
+
* evicted (FIFO cap) or foreign draft's token would otherwise ship as plain
|
|
36
|
+
* text with no image attached. Callers warn once and deliver unchanged. */
|
|
37
|
+
export function firstStaleComposerToken(text, ordered) {
|
|
38
|
+
for (const match of text.matchAll(COMPOSER_IMAGE_TOKEN)) {
|
|
39
|
+
if (!ordered.has(match[0]))
|
|
40
|
+
return match[0];
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
/** Insertion-order FIFO bound on live capabilities. References are
|
|
45
|
+
* content-addressed and durable; this map only connects editable
|
|
46
|
+
* placeholders to them. */
|
|
47
|
+
const STAGED_IMAGE_LIMIT = 128;
|
|
48
|
+
/**
|
|
49
|
+
* Owns the editable-composer image capabilities: the session epoch, the
|
|
50
|
+
* capability map, its preview facades and the `[Image #N]` compatibility
|
|
51
|
+
* bindings minted by the public scene `stageImage()` API.
|
|
52
|
+
*/
|
|
53
|
+
export function createComposerImages(ctx, owner, deps) {
|
|
54
|
+
/** Session epoch for the staged-image maps: bumped by every clear so a
|
|
55
|
+
* `saveImage` that was still in flight when the session changed cannot
|
|
56
|
+
* register its capability in the NEW session. */
|
|
57
|
+
let stagedImageEpoch = 0;
|
|
58
|
+
const stagedImages = new Map();
|
|
59
|
+
/** Compatibility bindings minted by the public scene `stageImage()` API.
|
|
60
|
+
* New Prompt drafts carry explicit opaque refs instead. */
|
|
61
|
+
const legacyStagedImageRefs = new Map();
|
|
62
|
+
let legacyStagedImageSequence = 0;
|
|
63
|
+
/** UI facades for staged capabilities, one stable object per id so the
|
|
64
|
+
* component-side decode cache (keyed by object identity) can hit. Keys
|
|
65
|
+
* mirror `stagedImages` exactly — same insert, evict and clear. */
|
|
66
|
+
const stagedImageViews = new Map();
|
|
67
|
+
const deleteStagedImage = (stageId) => {
|
|
68
|
+
stagedImages.delete(stageId);
|
|
69
|
+
stagedImageViews.delete(stageId);
|
|
70
|
+
for (const [token, candidate] of legacyStagedImageRefs) {
|
|
71
|
+
if (candidate === stageId)
|
|
72
|
+
legacyStagedImageRefs.delete(token);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const clearStagedImages = () => {
|
|
76
|
+
stagedImageEpoch += 1;
|
|
77
|
+
stagedImages.clear();
|
|
78
|
+
stagedImageViews.clear();
|
|
79
|
+
legacyStagedImageRefs.clear();
|
|
80
|
+
legacyStagedImageSequence = 0;
|
|
81
|
+
};
|
|
82
|
+
/** The binding generation the live capabilities belong to. Every entry
|
|
83
|
+
* point re-checks it, so a replacement session revokes the old draft's
|
|
84
|
+
* capabilities BEFORE any subscriber can observe it — the invariant the
|
|
85
|
+
* single-file channel got by clearing immediately after the agent rebind,
|
|
86
|
+
* made independent of the caller's ordering. */
|
|
87
|
+
let syncedGeneration;
|
|
88
|
+
const syncSession = () => {
|
|
89
|
+
const generation = deps.generation();
|
|
90
|
+
if (syncedGeneration === undefined) {
|
|
91
|
+
syncedGeneration = generation;
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (generation === syncedGeneration)
|
|
95
|
+
return;
|
|
96
|
+
syncedGeneration = generation;
|
|
97
|
+
clearStagedImages();
|
|
98
|
+
};
|
|
99
|
+
const includeLegacyImageRefs = (text, images) => {
|
|
100
|
+
if (legacyStagedImageRefs.size === 0)
|
|
101
|
+
return images;
|
|
102
|
+
const merged = images.map(image => ({ ...image }));
|
|
103
|
+
const claimed = new Set(merged.map(image => image.token));
|
|
104
|
+
for (const match of text.matchAll(COMPOSER_IMAGE_TOKEN)) {
|
|
105
|
+
const token = match[0];
|
|
106
|
+
if (claimed.has(token))
|
|
107
|
+
continue;
|
|
108
|
+
const stageId = legacyStagedImageRefs.get(token);
|
|
109
|
+
if (stageId === undefined || !stagedImages.has(stageId))
|
|
110
|
+
continue;
|
|
111
|
+
merged.push({ token, stageId });
|
|
112
|
+
claimed.add(token);
|
|
113
|
+
}
|
|
114
|
+
return merged;
|
|
115
|
+
};
|
|
116
|
+
const persistComposerImage = async (input, generation) => {
|
|
117
|
+
syncSession();
|
|
118
|
+
const attachments = mentionAttachments(ctx);
|
|
119
|
+
if (attachments === undefined)
|
|
120
|
+
throw new Error('image attachments are unavailable in this profile');
|
|
121
|
+
if (generation !== stagedImageEpoch) {
|
|
122
|
+
throw new Error('the session changed while the image was being staged');
|
|
123
|
+
}
|
|
124
|
+
if (!attachments.imageLimits.mediaTypes.includes(input.mediaType)) {
|
|
125
|
+
throw new Error(`${input.mediaType} images are not accepted by this profile`);
|
|
126
|
+
}
|
|
127
|
+
if (input.data.byteLength > attachments.imageLimits.maxImageBytes) {
|
|
128
|
+
throw new Error(`image exceeds this profile's per-image size limit`);
|
|
129
|
+
}
|
|
130
|
+
// The source path is TUI-side display metadata; the store only sees the
|
|
131
|
+
// fields its contract names.
|
|
132
|
+
const { path, ...stored } = input;
|
|
133
|
+
const attachment = await attachments.saveImage(stored);
|
|
134
|
+
// A session change (/new, resume, rewind, model switch, background)
|
|
135
|
+
// cleared the maps while the save was in flight: the durable object is
|
|
136
|
+
// harmless, but the OLD session's capability must not reach the new one.
|
|
137
|
+
syncSession();
|
|
138
|
+
if (generation !== stagedImageEpoch) {
|
|
139
|
+
throw new Error('the session changed while the image was being staged');
|
|
140
|
+
}
|
|
141
|
+
const stageId = randomUUID();
|
|
142
|
+
stagedImages.set(stageId, attachment);
|
|
143
|
+
if (path !== undefined)
|
|
144
|
+
rememberImagePath(String(attachment.attachmentId), path);
|
|
145
|
+
const view = transcriptImageFromAttachment(attachment, () => ctx.get('attachments'));
|
|
146
|
+
if (view !== undefined)
|
|
147
|
+
stagedImageViews.set(stageId, view);
|
|
148
|
+
while (stagedImages.size > STAGED_IMAGE_LIMIT) {
|
|
149
|
+
const oldest = stagedImages.keys().next().value;
|
|
150
|
+
if (oldest === undefined)
|
|
151
|
+
break;
|
|
152
|
+
deleteStagedImage(oldest);
|
|
153
|
+
}
|
|
154
|
+
return { stageId };
|
|
155
|
+
};
|
|
156
|
+
return {
|
|
157
|
+
stagedImageGeneration() {
|
|
158
|
+
syncSession();
|
|
159
|
+
return stagedImageEpoch;
|
|
160
|
+
},
|
|
161
|
+
async stageImage(input) {
|
|
162
|
+
owner.assertActive();
|
|
163
|
+
syncSession();
|
|
164
|
+
const generation = stagedImageEpoch;
|
|
165
|
+
const { stageId } = await persistComposerImage(input, generation);
|
|
166
|
+
legacyStagedImageSequence += 1;
|
|
167
|
+
const token = `[Image #${legacyStagedImageSequence}]`;
|
|
168
|
+
legacyStagedImageRefs.set(token, stageId);
|
|
169
|
+
return token;
|
|
170
|
+
},
|
|
171
|
+
stageComposerImage(input, generation) {
|
|
172
|
+
owner.assertActive();
|
|
173
|
+
syncSession();
|
|
174
|
+
return persistComposerImage(input, generation);
|
|
175
|
+
},
|
|
176
|
+
hasStagedImage(stageId) {
|
|
177
|
+
syncSession();
|
|
178
|
+
return stagedImages.has(stageId);
|
|
179
|
+
},
|
|
180
|
+
discardStagedImage(stageId) {
|
|
181
|
+
// Revocation stays callable after disposal: the composer's own cleanup
|
|
182
|
+
// paths release capabilities they already own.
|
|
183
|
+
syncSession();
|
|
184
|
+
deleteStagedImage(stageId);
|
|
185
|
+
},
|
|
186
|
+
stagedImage(stageId) {
|
|
187
|
+
syncSession();
|
|
188
|
+
return stagedImageViews.get(stageId);
|
|
189
|
+
},
|
|
190
|
+
stagedImageLimits() {
|
|
191
|
+
syncSession();
|
|
192
|
+
const limits = mentionAttachments(ctx)?.imageLimits;
|
|
193
|
+
if (limits === undefined)
|
|
194
|
+
return undefined;
|
|
195
|
+
return {
|
|
196
|
+
maxImageBytes: limits.maxImageBytes,
|
|
197
|
+
maxImagesPerMessage: limits.maxImagesPerMessage,
|
|
198
|
+
};
|
|
199
|
+
},
|
|
200
|
+
clearStagedImages() {
|
|
201
|
+
syncSession();
|
|
202
|
+
clearStagedImages();
|
|
203
|
+
},
|
|
204
|
+
snapshot() {
|
|
205
|
+
syncSession();
|
|
206
|
+
return new Map(stagedImages);
|
|
207
|
+
},
|
|
208
|
+
includeLegacyImageRefs(text, images) {
|
|
209
|
+
syncSession();
|
|
210
|
+
return includeLegacyImageRefs(text, images);
|
|
211
|
+
},
|
|
212
|
+
captureDraftImages(text, images) {
|
|
213
|
+
syncSession();
|
|
214
|
+
return includeLegacyImageRefs(text, images).map(image => ({ ...image }));
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MentionAttachments, MentionExpansion, MentionFs, MentionImageBlock } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Expand a submitted text's `@` mentions (issue #15) into model-facing
|
|
4
|
+
* attachment blocks: supported image files become durable image blocks,
|
|
5
|
+
* other files contribute capped text, and directories contribute a shallow
|
|
6
|
+
* listing. Reads always go through the active fs service, so provider-owned
|
|
7
|
+
* workspaces keep their routing semantics. The typed text stays first and
|
|
8
|
+
* verbatim. Best-effort failures degrade to `missing`, never a failed send.
|
|
9
|
+
*
|
|
10
|
+
* Staged composer images (`[Image #N]`) share ONE admission queue with
|
|
11
|
+
* `@image` files: the earliest reference in the user's text wins both the
|
|
12
|
+
* per-message count and byte budgets, and image blocks preserve that order.
|
|
13
|
+
*/
|
|
14
|
+
export declare function expandComposerMentions(fs: MentionFs | undefined, cwd: string, text: string, attachments?: MentionAttachments, stagedImages?: ReadonlyMap<string, MentionImageBlock['attachment']>): Promise<MentionExpansion>;
|
|
15
|
+
//# sourceMappingURL=composer-mentions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer-mentions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/composer-mentions.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEpG;;;;;;;;;;;GAWG;AACH,wBAAsB,sBAAsB,CAC1C,EAAE,EAAE,SAAS,GAAG,SAAS,EACzB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,kBAAkB,EAChC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC,GAClE,OAAO,CAAC,gBAAgB,CAAC,CAqL3B"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { isAbsolute, join } from 'node:path';
|
|
2
|
+
import { extractMentions } from '../../utils/mentions.js';
|
|
3
|
+
import { COMPOSER_IMAGE_TOKEN } from './composer-images.js';
|
|
4
|
+
import { MENTION_MAX_DIR_ENTRIES, MENTION_MAX_FILE_CHARS, MENTION_MAX_TOTAL_CHARS, mentionImageMediaType, tryResolveMention, } from './mentions.js';
|
|
5
|
+
import { basename } from './paths.js';
|
|
6
|
+
/**
|
|
7
|
+
* Expand a submitted text's `@` mentions (issue #15) into model-facing
|
|
8
|
+
* attachment blocks: supported image files become durable image blocks,
|
|
9
|
+
* other files contribute capped text, and directories contribute a shallow
|
|
10
|
+
* listing. Reads always go through the active fs service, so provider-owned
|
|
11
|
+
* workspaces keep their routing semantics. The typed text stays first and
|
|
12
|
+
* verbatim. Best-effort failures degrade to `missing`, never a failed send.
|
|
13
|
+
*
|
|
14
|
+
* Staged composer images (`[Image #N]`) share ONE admission queue with
|
|
15
|
+
* `@image` files: the earliest reference in the user's text wins both the
|
|
16
|
+
* per-message count and byte budgets, and image blocks preserve that order.
|
|
17
|
+
*/
|
|
18
|
+
export async function expandComposerMentions(fs, cwd, text, attachments, stagedImages) {
|
|
19
|
+
const blocks = [{ type: 'text', text }];
|
|
20
|
+
const attached = [];
|
|
21
|
+
const missing = [];
|
|
22
|
+
const mentions = extractMentions(text);
|
|
23
|
+
let budget = MENTION_MAX_TOTAL_CHARS;
|
|
24
|
+
let imageCount = 0;
|
|
25
|
+
let imageBytes = 0;
|
|
26
|
+
const references = fs === undefined
|
|
27
|
+
? []
|
|
28
|
+
: mentions.map(mention => ({ kind: 'mention', start: mention.start, mention }));
|
|
29
|
+
if (stagedImages !== undefined) {
|
|
30
|
+
const seen = new Set();
|
|
31
|
+
for (const match of text.matchAll(COMPOSER_IMAGE_TOKEN)) {
|
|
32
|
+
const token = match[0];
|
|
33
|
+
if (seen.has(token))
|
|
34
|
+
continue;
|
|
35
|
+
seen.add(token);
|
|
36
|
+
const attachment = stagedImages.get(token);
|
|
37
|
+
if (attachment === undefined)
|
|
38
|
+
continue;
|
|
39
|
+
references.push({
|
|
40
|
+
kind: 'staged-image',
|
|
41
|
+
start: match.index,
|
|
42
|
+
token,
|
|
43
|
+
attachment,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
references.sort((a, b) => a.start - b.start);
|
|
48
|
+
// `@image` files and staged `[Image #N]` capabilities share one admission
|
|
49
|
+
// queue. The earliest reference in the user's text wins both the per-
|
|
50
|
+
// message count and byte budgets, and image blocks preserve that order.
|
|
51
|
+
for (const reference of references) {
|
|
52
|
+
if (reference.kind === 'staged-image') {
|
|
53
|
+
const { attachment, token } = reference;
|
|
54
|
+
// A referenced-but-dropped staged image must be loud: silently sending
|
|
55
|
+
// the bare token would leave the user believing the image reached the
|
|
56
|
+
// model. Reuse the missing-mention warning channel.
|
|
57
|
+
if (attachments === undefined) {
|
|
58
|
+
missing.push(token);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const limits = attachments.imageLimits;
|
|
62
|
+
if (imageCount >= limits.maxImagesPerMessage
|
|
63
|
+
|| imageBytes + attachment.bytes > limits.maxMessageImageBytes
|
|
64
|
+
|| !limits.mediaTypes.includes(attachment.mediaType)) {
|
|
65
|
+
missing.push(token);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
blocks.push({ type: 'image', attachment });
|
|
69
|
+
imageCount += 1;
|
|
70
|
+
imageBytes += attachment.bytes;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (fs === undefined)
|
|
74
|
+
continue;
|
|
75
|
+
const { mention } = reference;
|
|
76
|
+
const display = mention.literal ?? mention.path;
|
|
77
|
+
const imageMediaType = mentionImageMediaType(mention.path);
|
|
78
|
+
// A depleted text budget must not hide a later image reference: image
|
|
79
|
+
// admission has independent limits and still follows source order.
|
|
80
|
+
if (budget <= 0 && imageMediaType === undefined)
|
|
81
|
+
continue;
|
|
82
|
+
// Mentions resolve against the session cwd, same as the model-facing fs
|
|
83
|
+
// tools; absolute paths pass through untouched. A `#L12-14` line suffix
|
|
84
|
+
// (issue #359) is stripped before resolution; when the stripped path
|
|
85
|
+
// misses, the typed literal (suffix intact) gets ONE fallback try so
|
|
86
|
+
// filenames genuinely containing `#L…` still resolve as whole files.
|
|
87
|
+
const absolute = isAbsolute(mention.path) ? mention.path : join(cwd, mention.path);
|
|
88
|
+
let resolved = await tryResolveMention(fs, absolute);
|
|
89
|
+
let literalFallback = false;
|
|
90
|
+
if (resolved === undefined && mention.literal !== undefined) {
|
|
91
|
+
const literalPath = isAbsolute(mention.literal) ? mention.literal : join(cwd, mention.literal);
|
|
92
|
+
resolved = await tryResolveMention(fs, literalPath);
|
|
93
|
+
literalFallback = resolved !== undefined;
|
|
94
|
+
}
|
|
95
|
+
if (resolved === undefined) {
|
|
96
|
+
missing.push(display);
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const { target, info } = resolved;
|
|
100
|
+
// On a literal-fallback hit the attached file IS the typed name — the
|
|
101
|
+
// model must see that path, not the suffix-stripped one.
|
|
102
|
+
const shownPath = literalFallback ? display : mention.path;
|
|
103
|
+
// …and judge image-ness by the typed extension in that case too.
|
|
104
|
+
const imageType = literalFallback && mention.literal !== undefined
|
|
105
|
+
? mentionImageMediaType(mention.literal)
|
|
106
|
+
: imageMediaType;
|
|
107
|
+
if (info?.type === 'file') {
|
|
108
|
+
if (imageType !== undefined && attachments !== undefined && fs.readBytes !== undefined) {
|
|
109
|
+
const limits = attachments.imageLimits;
|
|
110
|
+
if (!limits.mediaTypes.includes(imageType) || imageCount >= limits.maxImagesPerMessage) {
|
|
111
|
+
missing.push(display);
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
try {
|
|
115
|
+
const data = await fs.readBytes(target, undefined, limits.maxImageBytes);
|
|
116
|
+
if (imageBytes + data.byteLength > limits.maxMessageImageBytes) {
|
|
117
|
+
missing.push(display);
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
const attachment = await attachments.saveImage({
|
|
121
|
+
data,
|
|
122
|
+
mediaType: imageType,
|
|
123
|
+
name: basename(target.displayPath),
|
|
124
|
+
});
|
|
125
|
+
blocks.push({ type: 'image', attachment });
|
|
126
|
+
imageCount += 1;
|
|
127
|
+
imageBytes += data.byteLength;
|
|
128
|
+
attached.push(display);
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
missing.push(display);
|
|
132
|
+
}
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
const cap = Math.min(MENTION_MAX_FILE_CHARS, budget);
|
|
137
|
+
const content = await fs.readText(target);
|
|
138
|
+
let body = content;
|
|
139
|
+
let truncated = false;
|
|
140
|
+
let header = `<attached-file path="${shownPath}">`;
|
|
141
|
+
if (mention.startLine !== undefined && !literalFallback) {
|
|
142
|
+
// Line-range slice (issue #359): 1-based inclusive. An endLine
|
|
143
|
+
// past EOF clamps to the file; a startLine past EOF falls back
|
|
144
|
+
// to the whole file with an in-band note — never a silent
|
|
145
|
+
// empty attach. Line ranges never apply to literal-fallback
|
|
146
|
+
// hits (those files really are named `…#L…`, no suffix typed).
|
|
147
|
+
const lines = content.split('\n');
|
|
148
|
+
if (mention.startLine > lines.length) {
|
|
149
|
+
header = `<attached-file path="${shownPath}" lines="${mention.startLine}-${mention.endLine}" note="requested lines beyond EOF (file has ${lines.length} line${lines.length === 1 ? '' : 's'}); whole file attached">`;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
const endLine = Math.min(mention.endLine ?? mention.startLine, lines.length);
|
|
153
|
+
header = `<attached-file path="${shownPath}" lines="${mention.startLine}${endLine === mention.startLine ? '' : `-${endLine}`}">`;
|
|
154
|
+
body = lines.slice(mention.startLine - 1, endLine).join('\n');
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (body.length > cap) {
|
|
158
|
+
body = body.slice(0, cap);
|
|
159
|
+
truncated = true;
|
|
160
|
+
}
|
|
161
|
+
budget -= body.length;
|
|
162
|
+
blocks.push({
|
|
163
|
+
type: 'text',
|
|
164
|
+
text: `${header}\n${body}${truncated ? '\n[… truncated]' : ''}\n</attached-file>`,
|
|
165
|
+
});
|
|
166
|
+
attached.push(display);
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
// Binary/undecodable or unreadable — report it like a miss.
|
|
170
|
+
missing.push(display);
|
|
171
|
+
}
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (info?.type === 'directory') {
|
|
175
|
+
try {
|
|
176
|
+
const entries = await fs.listDir(target);
|
|
177
|
+
const listing = entries
|
|
178
|
+
.slice(0, MENTION_MAX_DIR_ENTRIES)
|
|
179
|
+
.map(entry => (entry.type === 'directory' ? `${entry.name}/` : entry.name));
|
|
180
|
+
if (entries.length > MENTION_MAX_DIR_ENTRIES) {
|
|
181
|
+
listing.push(`… (${entries.length - MENTION_MAX_DIR_ENTRIES} more)`);
|
|
182
|
+
}
|
|
183
|
+
const body = listing.join('\n');
|
|
184
|
+
budget -= body.length;
|
|
185
|
+
blocks.push({
|
|
186
|
+
type: 'text',
|
|
187
|
+
text: `<attached-directory path="${shownPath}">\n${body}\n</attached-directory>`,
|
|
188
|
+
});
|
|
189
|
+
attached.push(display);
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
missing.push(display);
|
|
193
|
+
}
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
// Absent (stat → undefined) or a special file.
|
|
197
|
+
missing.push(display);
|
|
198
|
+
}
|
|
199
|
+
return { blocks, attached, missing };
|
|
200
|
+
}
|