@deepseek-harness-tui/dsh-tui 0.8.0 → 0.8.1
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 +13 -5
- package/cordis.patch.yml +21 -2
- package/cordis.yml +12 -1
- package/ecosystem-spec/registry/contracts/decision-events-v1alpha1.json +13 -0
- package/ecosystem-spec/registry/host-descriptor.tui.example.json +56 -0
- package/ecosystem-spec/registry/permissions-0.1.json +13 -0
- package/ecosystem-spec/registry/registry-0.15.json +57 -0
- package/ecosystem-spec/schemas/conformance-claim.schema.json +15 -0
- package/ecosystem-spec/schemas/effect-ledger-record.schema.json +16 -0
- package/ecosystem-spec/schemas/host-descriptor.schema.json +26 -0
- package/lib/types/cc/figures.d.ts +4 -0
- package/lib/types/cc/figures.d.ts.map +1 -1
- package/lib/types/cc/figures.js +4 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +2 -0
- package/lib/types/components/ExtensionDialog.d.ts +40 -0
- package/lib/types/components/ExtensionDialog.d.ts.map +1 -0
- package/lib/types/components/ExtensionDialog.js +210 -0
- package/lib/types/components/HelpMenu.js +1 -1
- package/lib/types/components/LoadedContextPanel.d.ts +5 -10
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
- package/lib/types/components/LoadedContextPanel.js +7 -18
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +1 -2
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +25 -1
- package/lib/types/components/RewindPicker.d.ts +13 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +26 -2
- package/lib/types/components/ToolUseLoader.d.ts +8 -3
- package/lib/types/components/ToolUseLoader.d.ts.map +1 -1
- package/lib/types/components/ToolUseLoader.js +43 -9
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +1 -1
- package/lib/types/dsh-adapter/channel.d.ts +30 -7
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +503 -21
- package/lib/types/dsh-adapter/command-attribution.d.ts +51 -0
- package/lib/types/dsh-adapter/command-attribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/command-attribution.js +93 -0
- package/lib/types/dsh-adapter/command-errors.d.ts +42 -0
- package/lib/types/dsh-adapter/command-errors.d.ts.map +1 -0
- package/lib/types/dsh-adapter/command-errors.js +63 -0
- package/lib/types/dsh-adapter/component-identity.d.ts +28 -0
- package/lib/types/dsh-adapter/component-identity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/component-identity.js +108 -0
- package/lib/types/dsh-adapter/contract.d.ts +1 -1
- package/lib/types/dsh-adapter/contract.js +2 -2
- package/lib/types/dsh-adapter/decision-guard.d.ts +84 -0
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/decision-guard.js +354 -0
- package/lib/types/dsh-adapter/dialogs.d.ts +146 -0
- package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/dialogs.js +262 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts +99 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -0
- package/lib/types/dsh-adapter/effect-ledger.js +231 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +193 -0
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -0
- package/lib/types/dsh-adapter/extension-events.js +169 -0
- package/lib/types/dsh-adapter/extensions.d.ts +32 -0
- package/lib/types/dsh-adapter/extensions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/extensions.js +42 -0
- package/lib/types/dsh-adapter/grants.d.ts +25 -0
- package/lib/types/dsh-adapter/grants.d.ts.map +1 -0
- package/lib/types/dsh-adapter/grants.js +184 -0
- package/lib/types/dsh-adapter/host-descriptor.d.ts +24 -0
- package/lib/types/dsh-adapter/host-descriptor.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-descriptor.js +146 -0
- package/lib/types/dsh-adapter/message-observer.d.ts +178 -0
- package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -0
- package/lib/types/dsh-adapter/message-observer.js +509 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +103 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-host.js +270 -0
- package/lib/types/dsh-adapter/plugin-storage.d.ts +113 -0
- package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-storage.js +385 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +47 -1
- package/lib/types/dsh-adapter/plugins-info.d.ts +43 -0
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugins-info.js +276 -0
- package/lib/types/dsh-adapter/renderers.d.ts +65 -0
- package/lib/types/dsh-adapter/renderers.d.ts.map +1 -0
- package/lib/types/dsh-adapter/renderers.js +138 -0
- package/lib/types/dsh-adapter/sanitize.d.ts +36 -0
- package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sanitize.js +65 -0
- package/lib/types/dsh-adapter/scenes.d.ts +7 -1
- package/lib/types/dsh-adapter/scenes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/scenes.js +17 -2
- package/lib/types/dsh-adapter/shortcuts.d.ts +109 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -0
- package/lib/types/dsh-adapter/shortcuts.js +268 -0
- package/lib/types/dsh-adapter/status.d.ts +75 -0
- package/lib/types/dsh-adapter/status.d.ts.map +1 -0
- package/lib/types/dsh-adapter/status.js +168 -0
- package/lib/types/extensions.d.ts +8 -0
- package/lib/types/extensions.d.ts.map +1 -0
- package/lib/types/extensions.js +15 -0
- package/lib/types/i18n.d.ts +162 -16
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +53 -5
- package/lib/types/ink/ink.d.ts +11 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +33 -0
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +101 -51
- package/lib/types/ink/output.d.ts +7 -0
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +125 -4
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +14 -6
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +18 -6
- package/lib/types/plugin-host.d.ts +13 -0
- package/lib/types/plugin-host.d.ts.map +1 -0
- package/lib/types/plugin-host.js +17 -0
- package/lib/types/plugin-spec/negotiate.d.ts +11 -0
- package/lib/types/plugin-spec/negotiate.d.ts.map +1 -0
- package/lib/types/plugin-spec/negotiate.js +97 -0
- package/lib/types/plugin-spec/permission-scope.d.ts +32 -0
- package/lib/types/plugin-spec/permission-scope.d.ts.map +1 -0
- package/lib/types/plugin-spec/permission-scope.js +90 -0
- package/lib/types/plugin-spec/registry.d.ts +23 -0
- package/lib/types/plugin-spec/registry.d.ts.map +1 -0
- package/lib/types/plugin-spec/registry.js +157 -0
- package/lib/types/plugin-spec/schema-check.d.ts +17 -0
- package/lib/types/plugin-spec/schema-check.d.ts.map +1 -0
- package/lib/types/plugin-spec/schema-check.js +165 -0
- package/lib/types/plugin-spec/tui-extension.d.ts +16 -0
- package/lib/types/plugin-spec/tui-extension.d.ts.map +1 -0
- package/lib/types/plugin-spec/tui-extension.js +77 -0
- package/lib/types/plugin-spec/types.d.ts +114 -0
- package/lib/types/plugin-spec/types.d.ts.map +1 -0
- package/lib/types/plugin-spec/types.js +10 -0
- package/lib/types/plugin-spec/validate.d.ts +21 -0
- package/lib/types/plugin-spec/validate.d.ts.map +1 -0
- package/lib/types/plugin-spec/validate.js +119 -0
- package/lib/types/screens/Chat.d.ts +14 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +142 -39
- package/lib/types/theme.d.ts +5 -0
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +15 -0
- package/lib/types/update.d.ts +20 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +54 -7
- package/lib/types/utils/loaded-context.d.ts +8 -3
- package/lib/types/utils/loaded-context.d.ts.map +1 -1
- package/lib/types/utils/loaded-context.js +39 -3
- package/lib/types/utils/modifiers.d.ts.map +1 -1
- package/lib/types/utils/modifiers.js +3 -2
- package/lib/types/working-activity.d.ts +12 -0
- package/lib/types/working-activity.d.ts.map +1 -1
- package/lib/types/working-activity.js +13 -0
- package/node_modules/@dsh-std/command/LICENSE +21 -0
- package/node_modules/@dsh-std/command/README.md +26 -0
- package/node_modules/@dsh-std/command/README.zh.md +28 -0
- package/node_modules/@dsh-std/command/lib/index.d.ts +144 -0
- package/node_modules/@dsh-std/command/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/command/lib/index.js +252 -0
- package/node_modules/@dsh-std/command/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/command/package.json +22 -0
- package/node_modules/@dsh-std/connection/LICENSE +21 -0
- package/node_modules/@dsh-std/connection/README.md +42 -0
- package/node_modules/@dsh-std/connection/README.zh.md +42 -0
- package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
- package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
- package/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
- package/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/connection/lib/index.js +158 -0
- package/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
- package/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
- package/node_modules/@dsh-std/connection/lib/memory.js +257 -0
- package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
- package/node_modules/@dsh-std/connection/package.json +20 -0
- package/node_modules/@dsh-std/core/LICENSE +21 -0
- package/node_modules/@dsh-std/core/README.md +13 -0
- package/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/core/package.json +21 -0
- package/node_modules/@dsh-std/manifest/LICENSE +21 -0
- package/node_modules/@dsh-std/manifest/README.md +5 -0
- package/node_modules/@dsh-std/manifest/README.zh.md +5 -0
- package/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
- package/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/manifest/lib/index.js +625 -0
- package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/manifest/package.json +20 -0
- package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
- package/node_modules/@dsh-std/messages/LICENSE +21 -0
- package/node_modules/@dsh-std/messages/README.md +5 -0
- package/node_modules/@dsh-std/messages/README.zh.md +7 -0
- package/node_modules/@dsh-std/messages/lib/index.d.ts +50 -0
- package/node_modules/@dsh-std/messages/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/messages/lib/index.js +151 -0
- package/node_modules/@dsh-std/messages/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/messages/package.json +20 -0
- package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -0
- package/node_modules/@dsh-std/presentation/LICENSE +21 -0
- package/node_modules/@dsh-std/presentation/README.md +26 -0
- package/node_modules/@dsh-std/presentation/README.zh.md +28 -0
- package/node_modules/@dsh-std/presentation/lib/index.d.ts +219 -0
- package/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/presentation/lib/index.js +547 -0
- package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
- package/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
- package/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
- package/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
- package/node_modules/@dsh-std/presentation/package.json +21 -0
- package/node_modules/@dsh-std/storage/LICENSE +21 -0
- package/node_modules/@dsh-std/storage/README.md +5 -0
- package/node_modules/@dsh-std/storage/README.zh.md +7 -0
- package/node_modules/@dsh-std/storage/lib/index.d.ts +48 -0
- package/node_modules/@dsh-std/storage/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/storage/lib/index.js +104 -0
- package/node_modules/@dsh-std/storage/lib/index.js.map +1 -0
- package/node_modules/@dsh-std/storage/package.json +20 -0
- package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -0
- package/package.json +105 -70
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js +158 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js +257 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js +625 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +26 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +28 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts +219 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js +547 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +21 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js +158 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js +257 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js +424 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -0
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -0
package/README.md
CHANGED
|
@@ -33,6 +33,12 @@
|
|
|
33
33
|
<img src="screenshots/wechat-official.png" alt="DeepSeek Harness 官方公众号推文收录 dsh-TUI" width="560">
|
|
34
34
|
</p>
|
|
35
35
|
|
|
36
|
+
同时也被 [dshfind](https://dshfind.com/ccch1mneyyy/dsh-TUI) 插件目录收录:
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<a href="https://dshfind.com/ccch1mneyyy/dsh-TUI"><img src="https://dshfind.com/api/card/ccch1mneyyy/dsh-TUI?lang=zh" alt="dsh-TUI on dshfind"></a>
|
|
40
|
+
</p>
|
|
41
|
+
|
|
36
42
|
## 核心能力
|
|
37
43
|
|
|
38
44
|
- **终端原生交互**:流式 Markdown、结构化工具卡、命令与文件补全、`@` 文件引用
|
|
@@ -136,7 +142,7 @@ macOS 自带 Terminal.app 会自行消费 `⌘` 快捷键,请继续使用 `Ctr
|
|
|
136
142
|
| 分组 | 命令 |
|
|
137
143
|
|---|---|
|
|
138
144
|
| 会话 | `/new` 新会话 · `/resume` 会话浏览器(搜索、预览、跨项目、折叠子 agent 运行) · `/rename` 重命名会话 · `/workspace resume|rename|open` 管理工作区 · `/clear` 清屏 · `/compact` 压缩 · `/export` 导出 Markdown · `/trace` 轨迹场景(亦可 `Ctrl+T`) |
|
|
139
|
-
| 状态 | `/status` 会话信息 · `/cost` token 用量 · `/doctor` 环境自检 · `/config` 配置来源 · `/init` 创建 AGENTS.md |
|
|
145
|
+
| 状态 | `/context` 已加载上下文明细 · `/status` 会话信息 · `/cost` token 用量 · `/doctor` 环境自检 · `/config` 配置来源 · `/init` 创建 AGENTS.md |
|
|
140
146
|
| 模型 | `/model` 选择器 · `/thinking` 思考显示 · `/tokens` token 明细 · `/theme` 主题选择器 · `/lang` 中英界面切换 |
|
|
141
147
|
| 账号/策略 | `/provider` 添加模型提供方 · `/login` 凭证状态 · `/logout` 登出说明 · `/permissions` 权限说明 · `/add-dir` 文件策略范围 · `/hooks` · `/mcp` |
|
|
142
148
|
| 技能 | `/audit` 代码审计 · `/bug` bug 报告 · `/review` 代码评审 · `/practice` 编程练习 · `/pr_comments` PR 评论 · `/release-notes` 发布说明 · `/vuln-check` 漏洞检查 |
|
|
@@ -259,16 +265,18 @@ pnpm smoke
|
|
|
259
265
|
- **模板仓库**:[plugin-template](https://github.com/dsh-tui-ecosystem/plugin-template)(从模板起步,5 分钟出一个插件)
|
|
260
266
|
- **参考实现**:`dsh-working-activity`(实时工作状态行:TUI 槽位 + `activity/status` 会话事件双出口)
|
|
261
267
|
|
|
262
|
-
|
|
268
|
+
核心仓库不迁移、社区插件独立成仓。组织只维护收录列表与准入规范,不对社区插件
|
|
269
|
+
的功能、质量或安全作背书或担保;插件作者对自己的仓库保持完全所有权,并自行承担
|
|
270
|
+
维护与安全责任。
|
|
263
271
|
|
|
264
272
|
## 社区
|
|
265
273
|
|
|
266
274
|
- **生态组织**:[dsh-tui-ecosystem](https://github.com/dsh-tui-ecosystem) —— 社区插件、模板与收录列表的家。欢迎来发插件、提创意、互相取暖 🐋
|
|
267
275
|
- **社区交流群**:使用问题、插件创意、功能许愿,都欢迎进来聊。
|
|
268
276
|
|
|
269
|
-
| 微信群 | QQ 群(群号 572549239) |
|
|
270
|
-
| :---: | :---: |
|
|
271
|
-
| <img src="screenshots/wechat-group.jpg" alt="dsh-TUI 社区交流群微信群二维码" width="200"> | <img src="screenshots/qq-group.png" alt="dsh-TUI 社区交流群 QQ 群二维码" width="200"> |
|
|
277
|
+
| 微信群 | QQ 群(群号 572549239) | 微信三群 |
|
|
278
|
+
| :---: | :---: | :---: |
|
|
279
|
+
| <img src="screenshots/wechat-group.jpg" alt="dsh-TUI 社区交流群微信群二维码" width="200"> | <img src="screenshots/qq-group.png" alt="dsh-TUI 社区交流群 QQ 群二维码" width="200"> | <img src="screenshots/wechat-group3.jpg" alt="dsh-TUI 社区交流群微信三群二维码" width="200"> |
|
|
272
280
|
|
|
273
281
|
> 微信群二维码约 7 天过期一次,如遇失效请走 QQ 群(572549239),或开个 issue 提醒我们更新。
|
|
274
282
|
|
package/cordis.patch.yml
CHANGED
|
@@ -198,6 +198,24 @@
|
|
|
198
198
|
- id: dsh-tui-scenes
|
|
199
199
|
name: '@deepseek-harness-tui/dsh-tui/scenes'
|
|
200
200
|
|
|
201
|
+
# Plugin-interop anchor (Community Consensus v0.15): the unified grant
|
|
202
|
+
# store, runtime generation id, and Host Descriptor live here; later
|
|
203
|
+
# contract surfaces (plugin storage, message observation, effect
|
|
204
|
+
# ledger) mount off THIS row's apply, so the patch surface changes only
|
|
205
|
+
# once for the whole alignment. Mounted ahead of the extensions row and
|
|
206
|
+
# any third-party plugin row.
|
|
207
|
+
- id: dsh-tui-plugin-host
|
|
208
|
+
name: '@deepseek-harness-tui/dsh-tui/plugin-host'
|
|
209
|
+
|
|
210
|
+
# Plugin-facing UI seams (the pi-style extension surface): managed
|
|
211
|
+
# dialogs (select/confirm/input), keyed status-line contributions,
|
|
212
|
+
# keyboard shortcuts, and custom session-entry text renderers. The
|
|
213
|
+
# decision events (tui/input, tui/rewind-prompt, tui/session-switch,
|
|
214
|
+
# tui/compact, …) are fired by the channel on the cordis bus directly
|
|
215
|
+
# and need no row.
|
|
216
|
+
- id: dsh-tui-extensions
|
|
217
|
+
name: '@deepseek-harness-tui/dsh-tui/extensions'
|
|
218
|
+
|
|
201
219
|
# The agent-preset roster (issue #8): `ctx.agentPresets`, the service the
|
|
202
220
|
# TUI composes every session's model-facing world from. No `roots` here —
|
|
203
221
|
# the dsh CLI's profile-boot overlays its shipped `config/agent-presets/`
|
|
@@ -227,8 +245,9 @@
|
|
|
227
245
|
name: '@deepseek-harness-tui/dsh-tui'
|
|
228
246
|
# The entry-level dependency augments the plugin's `agents` inject and
|
|
229
247
|
# prevents startup Session creation from racing WorkspaceRegistry init.
|
|
230
|
-
inject: [workspaceRegistry, agents, tuiWorkspaces, tuiScenes]
|
|
231
|
-
# `tuiWorkspaces`/`tuiScenes`
|
|
248
|
+
inject: [workspaceRegistry, agents, tuiWorkspaces, tuiScenes, tuiDialogs, tuiStatus, tuiShortcuts, tuiRenderers]
|
|
249
|
+
# `tuiWorkspaces`/`tuiScenes` (and the dsh-tui-extensions services)
|
|
250
|
+
# live in the entry-level inject ONLY as an
|
|
232
251
|
# ordering (and reload-rebind) guarantee alongside their service rows
|
|
233
252
|
# above — they are deliberately absent from the plugin's code-level
|
|
234
253
|
# inject (issue #183): the dsh CLI may read this patch from an older
|
package/cordis.yml
CHANGED
|
@@ -37,9 +37,20 @@
|
|
|
37
37
|
- id: dsh-tui-scenes
|
|
38
38
|
name: '@deepseek-harness-tui/dsh-tui/scenes'
|
|
39
39
|
|
|
40
|
+
# Plugin-interop anchor (v0.15): unified grant store, runtime generation
|
|
41
|
+
# id, Host Descriptor; later contract surfaces mount off this row's apply.
|
|
42
|
+
- id: dsh-tui-plugin-host
|
|
43
|
+
name: '@deepseek-harness-tui/dsh-tui/plugin-host'
|
|
44
|
+
|
|
45
|
+
# Plugin-facing UI seams: managed dialogs, status-line contributions,
|
|
46
|
+
# keyboard shortcuts, custom session-entry renderers (decision events are
|
|
47
|
+
# fired by the channel and need no row).
|
|
48
|
+
- id: dsh-tui-extensions
|
|
49
|
+
name: '@deepseek-harness-tui/dsh-tui/extensions'
|
|
50
|
+
|
|
40
51
|
- id: dsh-tui
|
|
41
52
|
name: '@deepseek-harness-tui/dsh-tui'
|
|
42
|
-
inject: [agents, tuiWorkspaces, tuiScenes]
|
|
53
|
+
inject: [agents, tuiWorkspaces, tuiScenes, tuiDialogs, tuiStatus, tuiShortcuts, tuiRenderers]
|
|
43
54
|
config:
|
|
44
55
|
provider: deepseek-official
|
|
45
56
|
# Alt-screen fullscreen (CC 同款): 应用内鼠标选区(选择即复制, OSC 52 +
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name":"tui.decision-events","version":"v1alpha1","kind":"capability",
|
|
3
|
+
"coordinates":{"apiVersion":"tui.dsh/v1alpha1","kind":"DecisionEvents"},
|
|
4
|
+
"caller":"authorized TUI decision-point dispatcher",
|
|
5
|
+
"permissions":["session.input.intercept","session.rewind.intercept","session.switch.intercept","session.compact.intercept"],
|
|
6
|
+
"operations":[{"name":"decide","input":{"event":"private decision envelope"},"output":{"decision":"event-point-defined decision or no-opinion"}}],
|
|
7
|
+
"errors":["INTERCEPT_PERMISSION_NOT_GRANTED","DECISION_STALE","DECISION_BUDGET_EXCEEDED","INVALID_DECISION"],
|
|
8
|
+
"concurrency":"one decision chain is serialized; independent decision points may run concurrently",
|
|
9
|
+
"timeout":"the dispatcher applies an explicit per-handler and total decision budget",
|
|
10
|
+
"cleanup":"subscriptions are owned by an activation scope and removed on deactivate or grant revocation",
|
|
11
|
+
"privacyClass":"sensitive",
|
|
12
|
+
"securityBoundary":false
|
|
13
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "urn:dsh-tui:host-descriptor:0.15",
|
|
3
|
+
"hostId": "dsh-tui",
|
|
4
|
+
"hostVersion": "0.1.0-experimental",
|
|
5
|
+
"facetApiVersions": [
|
|
6
|
+
"v1alpha1"
|
|
7
|
+
],
|
|
8
|
+
"contracts": [
|
|
9
|
+
{
|
|
10
|
+
"apiVersion": "storage.dsh/v1alpha1",
|
|
11
|
+
"kind": "LocalStorage",
|
|
12
|
+
"definition": {
|
|
13
|
+
"source": "dsh-std",
|
|
14
|
+
"package": "@dsh-std/storage"
|
|
15
|
+
},
|
|
16
|
+
"permissions": [
|
|
17
|
+
"storage.local.read",
|
|
18
|
+
"storage.local.write"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"apiVersion": "commands.dsh/v1alpha1",
|
|
23
|
+
"kind": "Command",
|
|
24
|
+
"definition": {
|
|
25
|
+
"source": "dsh-std",
|
|
26
|
+
"package": "@dsh-std/command"
|
|
27
|
+
},
|
|
28
|
+
"permissions": [
|
|
29
|
+
"commands.invoke"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"apiVersion": "messages.dsh/v1alpha1",
|
|
34
|
+
"kind": "MessageObserver",
|
|
35
|
+
"definition": {
|
|
36
|
+
"source": "dsh-std",
|
|
37
|
+
"package": "@dsh-std/messages"
|
|
38
|
+
},
|
|
39
|
+
"permissions": [
|
|
40
|
+
"messages.observe.read"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"runtime": {
|
|
45
|
+
"location": "remote",
|
|
46
|
+
"generationId": "example-generation-1",
|
|
47
|
+
"headless": true,
|
|
48
|
+
"remoteAttach": true
|
|
49
|
+
},
|
|
50
|
+
"trustLevel": "trusted-in-process",
|
|
51
|
+
"platform": {
|
|
52
|
+
"os": "linux",
|
|
53
|
+
"arch": "x64",
|
|
54
|
+
"node": ">=22.19"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"registryVersion":"0.1",
|
|
3
|
+
"permissions":[
|
|
4
|
+
{"name":"storage.local.read","default":"deny","revocable":true,"scope":"plugin namespace"},
|
|
5
|
+
{"name":"storage.local.write","default":"deny","revocable":true,"scope":"plugin namespace"},
|
|
6
|
+
{"name":"commands.invoke","default":"allow","revocable":true,"scope":"declared command id","rationale":"调用由宿主或用户通过一次 invocation 主动发起,不同于数据访问类权限——插件无法仅凭此权限被动读取任何数据,故默认允许;撤销只关闭该 command ID 的调用入口"},
|
|
7
|
+
{"name":"messages.observe.read","default":"deny","revocable":true,"scope":"message observation scope"},
|
|
8
|
+
{"name":"session.input.intercept","default":"deny","revocable":true,"scope":"decision event subscription","rationale":"拦截类订阅(RFC 0005 D-7):能否决/改写用户输入,严格强于观察,故默认拒绝;TUI 实验实现见 tui.dsh/v1alpha1#DecisionEvents"},
|
|
9
|
+
{"name":"session.rewind.intercept","default":"deny","revocable":true,"scope":"decision event subscription","rationale":"同 session.input.intercept——可否决会话回退或注入回退模式"},
|
|
10
|
+
{"name":"session.switch.intercept","default":"deny","revocable":true,"scope":"decision event subscription","rationale":"同 session.input.intercept——可否决会话切换"},
|
|
11
|
+
{"name":"session.compact.intercept","default":"deny","revocable":true,"scope":"decision event subscription","rationale":"同 session.input.intercept——可否决手动压缩"}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"profileVersion": "tui-admission/0.15",
|
|
4
|
+
"std": {
|
|
5
|
+
"repository": "https://github.com/Yan-Zero/dsh-std",
|
|
6
|
+
"submodule": "vendor/dsh-std",
|
|
7
|
+
"manifestVersion": "0.15"
|
|
8
|
+
},
|
|
9
|
+
"imports": [
|
|
10
|
+
{
|
|
11
|
+
"name": "commands",
|
|
12
|
+
"coordinates": {"apiVersion": "commands.dsh/v1alpha1", "kind": "Command"},
|
|
13
|
+
"package": "@dsh-std/command",
|
|
14
|
+
"kind": "capability",
|
|
15
|
+
"permissions": ["commands.invoke"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "storage.local",
|
|
19
|
+
"coordinates": {"apiVersion": "storage.dsh/v1alpha1", "kind": "LocalStorage"},
|
|
20
|
+
"package": "@dsh-std/storage",
|
|
21
|
+
"kind": "capability",
|
|
22
|
+
"permissions": ["storage.local.read", "storage.local.write"]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "messages.observe",
|
|
26
|
+
"coordinates": {"apiVersion": "messages.dsh/v1alpha1", "kind": "MessageObserver"},
|
|
27
|
+
"package": "@dsh-std/messages",
|
|
28
|
+
"kind": "event",
|
|
29
|
+
"permissions": ["messages.observe.read"],
|
|
30
|
+
"eventEnvelope": "@dsh-std/messages/schema/message-observer-envelope-0.15.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "presentation.open-external",
|
|
34
|
+
"coordinates": {"apiVersion": "presentation.dsh/v1alpha1", "kind": "OpenExternal"},
|
|
35
|
+
"package": "@dsh-std/presentation",
|
|
36
|
+
"kind": "capability",
|
|
37
|
+
"permissions": []
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"definitions": [
|
|
41
|
+
{
|
|
42
|
+
"name": "tui.decision-events",
|
|
43
|
+
"authority": "dsh-tui",
|
|
44
|
+
"coordinates": {"apiVersion": "tui.dsh/v1alpha1", "kind": "DecisionEvents"},
|
|
45
|
+
"kind": "capability",
|
|
46
|
+
"profile": "registry/contracts/decision-events-v1alpha1.json",
|
|
47
|
+
"profileHash": "sha256:56440dde1b00c210b22761a0cba139ce0a20207330567777cebe1e48b494ceb0",
|
|
48
|
+
"permissions": [
|
|
49
|
+
"session.input.intercept",
|
|
50
|
+
"session.rewind.intercept",
|
|
51
|
+
"session.switch.intercept",
|
|
52
|
+
"session.compact.intercept"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"facetApiVersions": ["v1alpha1"]
|
|
57
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema":"https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id":"https://dsh.community/schemas/conformance-claim-0.15.json",
|
|
4
|
+
"title":"DSH Conformance Claim v0.15",
|
|
5
|
+
"type":"object","additionalProperties":false,
|
|
6
|
+
"required":["claimVersion","subject","specVersion","hostDescriptorDigest","artifactDigest","suiteVersion","evidenceLevel","result","testedAt"],
|
|
7
|
+
"properties":{
|
|
8
|
+
"claimVersion":{"const":"0.15"},"subject":{"type":"string"},"specVersion":{"const":"community-v0.15"},
|
|
9
|
+
"hostDescriptorDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"artifactDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},
|
|
10
|
+
"suiteVersion":{"type":"string"},"evidenceLevel":{"enum":["Declared","Parsed","Negotiated","Tested","Observed","Attested"]},
|
|
11
|
+
"result":{"enum":["pass","fail"]},"testedAt":{"type":"string","format":"date-time"},"runtime":{"type":"string"},
|
|
12
|
+
"signer":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"revoked":{"type":"boolean"},
|
|
13
|
+
"failedRequirements":{"type":"array","items":{"type":"string"}}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema":"https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id":"https://dsh.community/schemas/effect-ledger-record-0.15.json",
|
|
4
|
+
"title":"DSH Effect Ledger Record v0.15",
|
|
5
|
+
"type":"object","additionalProperties":false,
|
|
6
|
+
"required":["ledgerVersion","sequence","timestamp","pluginId","activationInstance","runtimeGenerationId","operation","resource","result"],
|
|
7
|
+
"properties":{
|
|
8
|
+
"ledgerVersion":{"const":"0.15"},"sequence":{"type":"integer","minimum":0},"timestamp":{"type":"string","format":"date-time"},
|
|
9
|
+
"pluginId":{"type":"string","minLength":1,"maxLength":128},"activationInstance":{"type":"string","minLength":1,"maxLength":128},"runtimeGenerationId":{"type":"string","pattern":"^[A-Za-z0-9._:-]+$","maxLength":128},
|
|
10
|
+
"operation":{"enum":["create","bind","replace","release","cleanup-failed"]},
|
|
11
|
+
"resource":{"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"type":"string","minLength":1,"maxLength":64},"id":{"type":"string","minLength":1,"maxLength":128}}},
|
|
12
|
+
"replaces":{"type":"object","additionalProperties":false,"properties":{"resourceId":{"type":"string","minLength":1,"maxLength":128},"activationInstance":{"type":"string","minLength":1,"maxLength":128}}},
|
|
13
|
+
"result":{"enum":["applied","pending","failed"]},"errorCode":{"type":"string","minLength":1,"maxLength":64},
|
|
14
|
+
"valueDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema":"https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id":"urn:dsh-tui:host-descriptor:0.15",
|
|
4
|
+
"title":"dsh-TUI Admission Host Descriptor v0.15",
|
|
5
|
+
"type":"object","additionalProperties":false,
|
|
6
|
+
"required":["$schema","hostId","hostVersion","facetApiVersions","contracts","runtime","trustLevel","platform"],
|
|
7
|
+
"properties":{
|
|
8
|
+
"$schema":{"type":"string","const":"urn:dsh-tui:host-descriptor:0.15"},
|
|
9
|
+
"hostId":{"type":"string","pattern":"^[a-z0-9]+([.-][a-z0-9]+)*$"},
|
|
10
|
+
"hostVersion":{"type":"string","minLength":1},
|
|
11
|
+
"facetApiVersions":{"type":"array","items":{"type":"string","pattern":"^v[0-9]+(?:alpha[0-9]+|beta[0-9]+)?$"},"minItems":1,"uniqueItems":true},
|
|
12
|
+
"contracts":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["apiVersion","kind","definition","permissions"],"properties":{
|
|
13
|
+
"apiVersion":{"type":"string","pattern":"^[a-z][a-z0-9.-]*/v[0-9]+(?:alpha[0-9]+|beta[0-9]+)?$"},
|
|
14
|
+
"kind":{"type":"string","pattern":"^[A-Z][A-Za-z0-9]*$"},
|
|
15
|
+
"spec":{},
|
|
16
|
+
"definition":{"oneOf":[
|
|
17
|
+
{"type":"object","additionalProperties":false,"required":["source","package"],"properties":{"source":{"const":"dsh-std"},"package":{"type":"string","pattern":"^@dsh-std/"}}},
|
|
18
|
+
{"type":"object","additionalProperties":false,"required":["source","profileHash"],"properties":{"source":{"const":"tui-profile"},"profileHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}}}
|
|
19
|
+
]},
|
|
20
|
+
"permissions":{"type":"array","items":{"type":"string"},"uniqueItems":true}
|
|
21
|
+
}},"uniqueItems":true},
|
|
22
|
+
"runtime":{"type":"object","additionalProperties":false,"required":["location","generationId","headless"],"properties":{"location":{"enum":["local","remote","container"]},"generationId":{"type":"string","pattern":"^[A-Za-z0-9._:-]+$"},"headless":{"type":"boolean"},"remoteAttach":{"type":"boolean"}}},
|
|
23
|
+
"trustLevel":{"enum":["trusted-in-process"]},
|
|
24
|
+
"platform":{"type":"object","additionalProperties":false,"required":["os","arch"],"properties":{"os":{"type":"string"},"arch":{"type":"string"},"node":{"type":"string"}}}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -17,6 +17,10 @@ export declare const POINTER = "\u276F";
|
|
|
17
17
|
export declare const TICK = "\u2713";
|
|
18
18
|
/** Small dot for separating operators (`∙`). */
|
|
19
19
|
export declare const BULLET_OPERATOR = "\u2219";
|
|
20
|
+
/** Settled tool-status dot, smaller than the running pulse (`•`). */
|
|
21
|
+
export declare const BULLET = "\u2022";
|
|
22
|
+
/** Failed tool status (`✗`). */
|
|
23
|
+
export declare const MULTIPLICATION_X = "\u2717";
|
|
20
24
|
/** Teardrop asterisk, decorative list marker (`✻`). */
|
|
21
25
|
export declare const TEARDROP_ASTERISK = "\u273B";
|
|
22
26
|
/** Lightning bolt, "fast / hot" marker (`↯`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figures.d.ts","sourceRoot":"","sources":["../../../src/cc/figures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,uEAAuE;AACvE,eAAO,MAAM,YAAY,QAA4C,CAAA;AAGrE,kDAAkD;AAClD,eAAO,MAAM,OAAO,WAAW,CAAA;AAC/B,+BAA+B;AAC/B,eAAO,MAAM,IAAI,WAAW,CAA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MAAM,cAAc,WAAW,CAAA;AACtC,iDAAiD;AACjD,eAAO,MAAM,cAAc,WAAW,CAAA;AAGtC,wCAAwC;AACxC,eAAO,MAAM,SAAS,WAAW,CAAA;AACjC,oDAAoD;AACpD,eAAO,MAAM,cAAc,WAAW,CAAA;AACtC,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,WAAW,CAAA;AAGxC,4DAA4D;AAC5D,eAAO,MAAM,qBAAqB,UAKjC,CAAA;AACD,uCAAuC;AACvC,eAAO,MAAM,sBAAsB,6BAA6B,CAAA;AAChE,qCAAqC;AACrC,eAAO,MAAM,uBAAuB,WAAW,CAAA"}
|
package/lib/types/cc/figures.js
CHANGED
|
@@ -18,6 +18,10 @@ export const POINTER = '\u276f'; // ❯
|
|
|
18
18
|
export const TICK = '\u2713'; // ✓
|
|
19
19
|
/** Small dot for separating operators (`∙`). */
|
|
20
20
|
export const BULLET_OPERATOR = '\u2219'; // ∙
|
|
21
|
+
/** Settled tool-status dot, smaller than the running pulse (`•`). */
|
|
22
|
+
export const BULLET = '\u2022'; // •
|
|
23
|
+
/** Failed tool status (`✗`). */
|
|
24
|
+
export const MULTIPLICATION_X = '\u2717'; // ✗
|
|
21
25
|
/** Teardrop asterisk, decorative list marker (`✻`). */
|
|
22
26
|
export const TEARDROP_ASTERISK = '\u273b'; // ✻
|
|
23
27
|
/** Lightning bolt, "fast / hot" marker (`↯`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;AAElF,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,yE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AAE,CAKhB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,SAAS,YAAY,EAAmB,EAC/C,QAAQ,GAAE,eAA0B,GACnC,iBAAiB,EAAE,CAoCrB"}
|
package/lib/types/commands.js
CHANGED
|
@@ -23,6 +23,7 @@ export const LOCAL_COMMANDS = [
|
|
|
23
23
|
{ name: 'btw', description: 'Ask a quick side question without interrupting the conversation' },
|
|
24
24
|
{ name: 'trace', description: 'Show the session event trace timeline' },
|
|
25
25
|
// Session / environment
|
|
26
|
+
{ name: 'context', description: 'Show loaded context details' },
|
|
26
27
|
{ name: 'status', description: 'Show session status' },
|
|
27
28
|
{ name: 'cost', description: 'Show session token usage' },
|
|
28
29
|
{ name: 'config', description: 'Show the dsh-tui configuration source' },
|
|
@@ -48,6 +49,7 @@ export const LOCAL_COMMANDS = [
|
|
|
48
49
|
{ name: 'hooks', description: 'Show hooks status' },
|
|
49
50
|
{ name: 'mcp', description: 'Show MCP status' },
|
|
50
51
|
{ name: 'skills', description: 'List available skills' },
|
|
52
|
+
{ name: 'plugins', description: 'Show plugin contract, grant, and ledger diagnostics' },
|
|
51
53
|
{ name: 'update', description: 'Update dsh-tui and restart' },
|
|
52
54
|
// Built-in skills (CC's skill commands, driven through DSH skills)
|
|
53
55
|
{ name: 'audit', description: 'Run a comprehensive code audit on this project' },
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The managed plugin dialog (`ctx.tuiDialogs`) — one panel rendering the
|
|
3
|
+
* store's current snapshot in the chat chrome (the slot approval/question
|
|
4
|
+
* panels occupy). Three kinds share one component:
|
|
5
|
+
*
|
|
6
|
+
* - `select` — focus list (↑/↓, windowed), Enter settles the option id
|
|
7
|
+
* - `confirm` — two rows (confirm/cancel), Enter settles the boolean
|
|
8
|
+
* - `input` — single-line text edit, Enter settles the text
|
|
9
|
+
*
|
|
10
|
+
* Esc (and Ctrl+C) always cancels — the plugin's promise resolves with the
|
|
11
|
+
* cancelled value. The panel owns the keyboard through its own useInput,
|
|
12
|
+
* the same contract as ApprovalPanel/AskUserQuestionPanel: Chat's global
|
|
13
|
+
* handler early-returns while a snapshot is pending.
|
|
14
|
+
*
|
|
15
|
+
* Two input-pipeline rules shape every handler below:
|
|
16
|
+
*
|
|
17
|
+
* - BATCHED KEYS: a terminal delivers one stdin chunk as several key events
|
|
18
|
+
* inside a single React batch (Down+Enter arrives together), so state
|
|
19
|
+
* queued by the first event is NOT visible to the second. Every piece of
|
|
20
|
+
* editing state the handlers act on (focus, value, cursor) therefore
|
|
21
|
+
* lives in a ref mutated SYNCHRONOUSLY per event; the useState mirror
|
|
22
|
+
* only exists to re-render.
|
|
23
|
+
* - CODE POINTS: cursor movement and deletion step over whole code points
|
|
24
|
+
* (`[...s]` iteration, same contract as the transcript search box), so an
|
|
25
|
+
* emoji can never be split into a lone surrogate.
|
|
26
|
+
*
|
|
27
|
+
* All text arrives pre-sanitized from TuiDialogRuntime (control chars
|
|
28
|
+
* stripped, cell-width capped); the panel still renders everything through
|
|
29
|
+
* ListItem's single-line truncation.
|
|
30
|
+
*/
|
|
31
|
+
import React from 'react';
|
|
32
|
+
import { type TuiDialogAnswer, type TuiDialogSnapshot } from '../dsh-adapter/dialogs.js';
|
|
33
|
+
export type ExtensionDialogProps = {
|
|
34
|
+
/** The pending dialog (TuiDialogStore snapshot; `key` remounts per dialog). */
|
|
35
|
+
readonly dialog: TuiDialogSnapshot;
|
|
36
|
+
readonly onDecide: (value: TuiDialogAnswer) => void;
|
|
37
|
+
readonly onCancel: () => void;
|
|
38
|
+
};
|
|
39
|
+
export declare function ExtensionDialog({ dialog, onDecide, onCancel }: ExtensionDialogProps): React.ReactNode;
|
|
40
|
+
//# sourceMappingURL=ExtensionDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtensionDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ExtensionDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,EAAe,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAGrG,MAAM,MAAM,oBAAoB,GAAG;IACjC,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IACnD,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;CAC9B,CAAA;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,oBAAoB,GAAG,KAAK,CAAC,SAAS,CASrG"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The managed plugin dialog (`ctx.tuiDialogs`) — one panel rendering the
|
|
4
|
+
* store's current snapshot in the chat chrome (the slot approval/question
|
|
5
|
+
* panels occupy). Three kinds share one component:
|
|
6
|
+
*
|
|
7
|
+
* - `select` — focus list (↑/↓, windowed), Enter settles the option id
|
|
8
|
+
* - `confirm` — two rows (confirm/cancel), Enter settles the boolean
|
|
9
|
+
* - `input` — single-line text edit, Enter settles the text
|
|
10
|
+
*
|
|
11
|
+
* Esc (and Ctrl+C) always cancels — the plugin's promise resolves with the
|
|
12
|
+
* cancelled value. The panel owns the keyboard through its own useInput,
|
|
13
|
+
* the same contract as ApprovalPanel/AskUserQuestionPanel: Chat's global
|
|
14
|
+
* handler early-returns while a snapshot is pending.
|
|
15
|
+
*
|
|
16
|
+
* Two input-pipeline rules shape every handler below:
|
|
17
|
+
*
|
|
18
|
+
* - BATCHED KEYS: a terminal delivers one stdin chunk as several key events
|
|
19
|
+
* inside a single React batch (Down+Enter arrives together), so state
|
|
20
|
+
* queued by the first event is NOT visible to the second. Every piece of
|
|
21
|
+
* editing state the handlers act on (focus, value, cursor) therefore
|
|
22
|
+
* lives in a ref mutated SYNCHRONOUSLY per event; the useState mirror
|
|
23
|
+
* only exists to re-render.
|
|
24
|
+
* - CODE POINTS: cursor movement and deletion step over whole code points
|
|
25
|
+
* (`[...s]` iteration, same contract as the transcript search box), so an
|
|
26
|
+
* emoji can never be split into a lone surrogate.
|
|
27
|
+
*
|
|
28
|
+
* All text arrives pre-sanitized from TuiDialogRuntime (control chars
|
|
29
|
+
* stripped, cell-width capped); the panel still renders everything through
|
|
30
|
+
* ListItem's single-line truncation.
|
|
31
|
+
*/
|
|
32
|
+
import React from 'react';
|
|
33
|
+
import { t } from '../i18n.js';
|
|
34
|
+
import { Box, Text, useInput, useTerminalSize } from '../ui.js';
|
|
35
|
+
import { stringWidth } from '../ink/stringWidth.js';
|
|
36
|
+
import { isPlainReturnInput } from '../utils/modifiers.js';
|
|
37
|
+
import { Pane } from './design-system/Pane.js';
|
|
38
|
+
import { ListItem } from './design-system/ListItem.js';
|
|
39
|
+
import { HintLine } from './design-system/HintLine.js';
|
|
40
|
+
import { listWindow } from './listWindow.js';
|
|
41
|
+
import { INPUT_CELLS } from '../dsh-adapter/dialogs.js';
|
|
42
|
+
import { capCells, flattenInline } from '../dsh-adapter/sanitize.js';
|
|
43
|
+
export function ExtensionDialog({ dialog, onDecide, onCancel }) {
|
|
44
|
+
switch (dialog.kind) {
|
|
45
|
+
case 'select':
|
|
46
|
+
return _jsx(SelectDialog, { dialog: dialog, onDecide: onDecide, onCancel: onCancel });
|
|
47
|
+
case 'confirm':
|
|
48
|
+
return _jsx(ConfirmDialog, { dialog: dialog, onDecide: onDecide, onCancel: onCancel });
|
|
49
|
+
case 'input':
|
|
50
|
+
return _jsx(InputDialog, { dialog: dialog, onDecide: onDecide, onCancel: onCancel });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function SelectDialog({ dialog, onDecide, onCancel, }) {
|
|
54
|
+
const [focusIndex, setFocusIndex] = React.useState(0);
|
|
55
|
+
// Synchronous source of truth for the handlers (see the module header):
|
|
56
|
+
// Down+Enter in one stdin chunk must move AND read the new focus.
|
|
57
|
+
const focusRef = React.useRef(0);
|
|
58
|
+
const moveFocus = (delta) => {
|
|
59
|
+
const next = (focusRef.current + delta + dialog.options.length) % dialog.options.length;
|
|
60
|
+
focusRef.current = next;
|
|
61
|
+
setFocusIndex(next);
|
|
62
|
+
};
|
|
63
|
+
const { rows: terminalRows } = useTerminalSize();
|
|
64
|
+
useInput((input, key, event) => {
|
|
65
|
+
if (key.escape || (key.ctrl && input === 'c')) {
|
|
66
|
+
onCancel();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (key.upArrow) {
|
|
70
|
+
moveFocus(-1);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (key.downArrow) {
|
|
74
|
+
moveFocus(1);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
// isPasted lives on the InputEvent, not the key: a bracketed paste that
|
|
78
|
+
// is all line breaks is pasted content, never an Enter press.
|
|
79
|
+
if (isPlainReturnInput(input, { ...key, isPasted: event.isPasted })) {
|
|
80
|
+
const option = dialog.options[focusRef.current];
|
|
81
|
+
if (option !== undefined)
|
|
82
|
+
onDecide(option.id);
|
|
83
|
+
}
|
|
84
|
+
}, { isActive: true });
|
|
85
|
+
// Row budget mirrors the rewind picker: a described option costs 2 rows,
|
|
86
|
+
// a bare one 1; frame rows: Pane 2 + title 2 + footer 1 + slack.
|
|
87
|
+
const { start, end } = listWindow(dialog.options.map(option => (option.description === undefined ? 1 : 2)), focusIndex, Math.max(terminalRows - 10, 2));
|
|
88
|
+
return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: dialog.title }) }), dialog.options.slice(start, end).map((option, index) => {
|
|
89
|
+
const absoluteIndex = start + index;
|
|
90
|
+
return (_jsx(ListItem, { isFocused: absoluteIndex === focusIndex, description: option.description, showScrollUp: absoluteIndex === start && start > 0, showScrollDown: absoluteIndex === end - 1 && end < dialog.options.length, children: option.label }, option.id));
|
|
91
|
+
})] }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('hint-select-exit') }) })] }));
|
|
92
|
+
}
|
|
93
|
+
function ConfirmDialog({ dialog, onDecide, onCancel, }) {
|
|
94
|
+
const [focusIndex, setFocusIndex] = React.useState(0);
|
|
95
|
+
// Synchronous source of truth for the handlers (see the module header):
|
|
96
|
+
// Right+Enter in one stdin chunk must settle the NEW row, not the old.
|
|
97
|
+
const focusRef = React.useRef(0);
|
|
98
|
+
const labels = [
|
|
99
|
+
dialog.confirmLabel || t('ext-dialog-yes'),
|
|
100
|
+
dialog.cancelLabel || t('ext-dialog-no'),
|
|
101
|
+
];
|
|
102
|
+
const moveFocus = (delta) => {
|
|
103
|
+
const next = (focusRef.current + delta + labels.length) % labels.length;
|
|
104
|
+
focusRef.current = next;
|
|
105
|
+
setFocusIndex(next);
|
|
106
|
+
};
|
|
107
|
+
useInput((input, key, event) => {
|
|
108
|
+
if (key.escape || (key.ctrl && input === 'c')) {
|
|
109
|
+
onCancel();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (key.upArrow || key.leftArrow) {
|
|
113
|
+
moveFocus(-1);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (key.downArrow || key.rightArrow) {
|
|
117
|
+
moveFocus(1);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
// isPasted lives on the InputEvent, not the key: a bracketed paste that
|
|
121
|
+
// is all line breaks must not confirm on the default focus.
|
|
122
|
+
if (isPlainReturnInput(input, { ...key, isPasted: event.isPasted })) {
|
|
123
|
+
onDecide(focusRef.current === 0);
|
|
124
|
+
}
|
|
125
|
+
}, { isActive: true });
|
|
126
|
+
return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: "remember", bold: true, children: dialog.title }), dialog.message !== undefined && _jsx(Text, { dimColor: true, children: dialog.message })] }), labels.map((label, index) => (_jsx(ListItem, { isFocused: index === focusIndex, children: label }, label)))] }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('hint-select-exit') }) })] }));
|
|
127
|
+
}
|
|
128
|
+
function InputDialog({ dialog, onDecide, onCancel, }) {
|
|
129
|
+
const [value, setValue] = React.useState(dialog.initial);
|
|
130
|
+
const [cursor, setCursor] = React.useState(() => [...dialog.initial].length);
|
|
131
|
+
// Synchronous source of truth for the handlers (see the module header):
|
|
132
|
+
// two Backspaces in one stdin chunk must BOTH delete, each seeing the
|
|
133
|
+
// other's result. The cursor counts CODE POINTS, not UTF-16 units — an
|
|
134
|
+
// emoji is one step and can never be split into a lone surrogate.
|
|
135
|
+
const valueRef = React.useRef(dialog.initial);
|
|
136
|
+
const cursorRef = React.useRef([...dialog.initial].length);
|
|
137
|
+
const applyEdit = (nextValue, nextCursor) => {
|
|
138
|
+
valueRef.current = nextValue;
|
|
139
|
+
cursorRef.current = nextCursor;
|
|
140
|
+
setValue(nextValue);
|
|
141
|
+
setCursor(nextCursor);
|
|
142
|
+
};
|
|
143
|
+
useInput((input, key, event) => {
|
|
144
|
+
if (key.escape || (key.ctrl && input === 'c')) {
|
|
145
|
+
onCancel();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
// isPasted lives on the InputEvent, not the key: a bracketed paste that
|
|
149
|
+
// is all line breaks is inserted as text, not submitted.
|
|
150
|
+
if (isPlainReturnInput(input, { ...key, isPasted: event.isPasted })) {
|
|
151
|
+
onDecide(valueRef.current);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const points = [...valueRef.current];
|
|
155
|
+
const at = cursorRef.current;
|
|
156
|
+
// Single-line editing, same key set as the transcript search bar.
|
|
157
|
+
if (key.backspace) {
|
|
158
|
+
if (at > 0) {
|
|
159
|
+
points.splice(at - 1, 1);
|
|
160
|
+
applyEdit(points.join(''), at - 1);
|
|
161
|
+
}
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (key.delete) {
|
|
165
|
+
if (at < points.length) {
|
|
166
|
+
points.splice(at, 1);
|
|
167
|
+
applyEdit(points.join(''), at);
|
|
168
|
+
}
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (key.leftArrow) {
|
|
172
|
+
if (at > 0)
|
|
173
|
+
applyEdit(valueRef.current, at - 1);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (key.rightArrow) {
|
|
177
|
+
if (at < points.length)
|
|
178
|
+
applyEdit(valueRef.current, at + 1);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (key.home) {
|
|
182
|
+
applyEdit(valueRef.current, 0);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (key.end) {
|
|
186
|
+
applyEdit(valueRef.current, points.length);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
if (input && !key.ctrl && !key.meta && !key.super && !key.tab && !key.escape) {
|
|
190
|
+
// A bracketed paste arrives as one chunk and may carry newlines/control
|
|
191
|
+
// chars — this is a single-line panel, so flatten them to spaces. Every
|
|
192
|
+
// edit path holds the value at INPUT_CELLS cells so the resolved answer
|
|
193
|
+
// keeps the documented bound: typing past the cap is ignored, an
|
|
194
|
+
// oversized paste is truncated (never silently unbounded).
|
|
195
|
+
const chunk = event.isPasted ? flattenInline(input) : input;
|
|
196
|
+
const chunkPoints = [...chunk].length;
|
|
197
|
+
const candidate = points.slice(0, at).join('') + chunk + points.slice(at).join('');
|
|
198
|
+
if (stringWidth(candidate) <= INPUT_CELLS) {
|
|
199
|
+
applyEdit(candidate, at + chunkPoints);
|
|
200
|
+
}
|
|
201
|
+
else if (event.isPasted) {
|
|
202
|
+
const capped = capCells(candidate, INPUT_CELLS);
|
|
203
|
+
applyEdit(capped, Math.min(at + chunkPoints, [...capped].length));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}, { isActive: true });
|
|
207
|
+
const shown = value === '' && dialog.placeholder !== undefined ? dialog.placeholder : value;
|
|
208
|
+
const shownPoints = [...shown];
|
|
209
|
+
return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: dialog.title }) }), _jsxs(Text, { children: [_jsx(Text, { dimColor: value === '', children: shownPoints.slice(0, cursor).join('') }), _jsx(Text, { inverse: true, children: shownPoints[cursor] ?? ' ' }), _jsx(Text, { children: shownPoints.slice(cursor + 1).join('') })] })] }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('hint-ext-dialog-input') }) })] }));
|
|
210
|
+
}
|