@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["nonEmpty"],"sources":["../src/protocol.ts","../src/negotiation.ts","../src/version.ts"],"sourcesContent":["/** Domain-neutral protocol identities and live participant declarations. */\n\nexport interface ApiReference {\n readonly apiVersion: string\n readonly kind: string\n}\n\nexport interface ParticipantIdentity {\n /** Unique within the negotiation scope that carries this declaration. */\n readonly id: string\n}\n\nexport interface ProtocolRequirement<Spec = unknown> extends ApiReference {\n readonly optional?: boolean\n readonly spec?: Spec\n}\n\nexport interface ProtocolSupport<Spec = unknown> extends ApiReference {\n readonly spec?: Spec\n}\n\nexport interface ProtocolDeclaration {\n readonly participant: ParticipantIdentity\n readonly requires?: readonly ProtocolRequirement[]\n readonly supports?: readonly ProtocolSupport[]\n}\n\nexport interface ParsedApiVersion {\n readonly group: string\n readonly major: number\n readonly stability: 'alpha' | 'beta' | 'stable'\n readonly revision: number\n}\n\nexport function protocolKey(reference: ApiReference): string {\n return `${reference.apiVersion}\\0${reference.kind}`\n}\n\n/** A grouping key only. It does not claim that versions in the family interoperate. */\nexport function protocolFamilyKey(reference: ApiReference): string {\n const version = parseApiVersion(reference.apiVersion)\n return `${version.group}/v${version.major}\\0${reference.kind}`\n}\n\nexport function sameProtocol(left: ApiReference, right: ApiReference): boolean {\n return left.apiVersion === right.apiVersion && left.kind === right.kind\n}\n\nexport function parseApiVersion(value: string): ParsedApiVersion {\n const match = /^([a-z][a-z0-9.-]*)\\/v([1-9][0-9]*)(?:(alpha|beta)([1-9][0-9]*))?$/u.exec(value)\n if (match === null) throw new TypeError(`invalid apiVersion ${JSON.stringify(value)}`)\n return Object.freeze({\n group: match[1] as string,\n major: Number(match[2]),\n stability: (match[3] ?? 'stable') as ParsedApiVersion['stability'],\n revision: match[4] === undefined ? 0 : Number(match[4]),\n })\n}\n\nexport function validateApiReference(value: unknown, label = 'protocol reference'): asserts value is ApiReference {\n if (!record(value)) throw new TypeError(`${label} must be an object`)\n if (typeof value.apiVersion !== 'string') throw new TypeError(`${label}.apiVersion must be a string`)\n parseApiVersion(value.apiVersion)\n if (typeof value.kind !== 'string' || !/^[A-Z][A-Za-z0-9]*$/u.test(value.kind)) {\n throw new TypeError(`${label}.kind is invalid`)\n }\n}\n\nexport function validateProtocolDeclaration(value: unknown): asserts value is ProtocolDeclaration {\n if (!record(value)) throw new TypeError('protocol declaration must be an object')\n exact(value, ['participant', 'requires', 'supports'], 'protocol declaration')\n if (!record(value.participant)) throw new TypeError('protocol declaration participant must be an object')\n exact(value.participant, ['id'], 'participant identity')\n nonEmpty(value.participant.id, 'participant identity.id')\n validateRows(value.requires, true)\n validateRows(value.supports, false)\n}\n\nexport function defineProtocolDeclaration<const T extends ProtocolDeclaration>(declaration: T): T {\n validateProtocolDeclaration(declaration)\n return deepFreeze(structuredClone(declaration))\n}\n\nfunction validateRows(value: unknown, requirement: boolean): void {\n if (value === undefined) return\n const label = requirement ? 'protocol requirements' : 'protocol supports'\n if (!Array.isArray(value)) throw new TypeError(`${label} must be an array`)\n const seen = new Set<string>()\n for (const [index, rowValue] of value.entries()) {\n const rowLabel = `${label}[${index}]`\n validateApiReference(rowValue, rowLabel)\n const row = rowValue as unknown as Record<string, unknown>\n exact(row, requirement ? ['apiVersion', 'kind', 'optional', 'spec'] : ['apiVersion', 'kind', 'spec'], rowLabel)\n if (requirement && row.optional !== undefined && typeof row.optional !== 'boolean') {\n throw new TypeError(`${rowLabel}.optional must be boolean`)\n }\n const key = protocolKey(row as unknown as ApiReference)\n if (seen.has(key)) throw new TypeError(`${label} contains duplicate ${JSON.stringify(key)}`)\n seen.add(key)\n }\n}\n\nfunction nonEmpty(value: unknown, label: string): asserts value is string {\n if (typeof value !== 'string' || value.trim() === '') throw new TypeError(`${label} must be a non-empty string`)\n}\n\nfunction record(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nfunction exact(value: Record<string, unknown>, allowed: readonly string[], label: string): void {\n const unknown = Object.keys(value).filter(key => !allowed.includes(key) && !key.startsWith('x-'))\n if (unknown.length > 0) throw new TypeError(`${label} contains unknown field ${JSON.stringify(unknown[0])}`)\n}\n\nfunction deepFreeze<T>(value: T): T {\n if (typeof value !== 'object' || value === null || Object.isFrozen(value)) return value\n Object.freeze(value)\n for (const child of Object.values(value)) deepFreeze(child)\n return value\n}\n","import {\n protocolKey,\n validateApiReference,\n validateProtocolDeclaration,\n type ApiReference,\n type ProtocolDeclaration,\n type ProtocolRequirement,\n type ProtocolSupport,\n} from './protocol.js'\n\nexport interface EvaluatorIdentity {\n readonly name: string\n readonly version: string\n}\n\nexport interface ProtocolRequirementEntry<Spec = unknown> {\n readonly participant: string\n readonly requirement: ProtocolRequirement<Spec>\n}\n\nexport interface ProtocolSupportEntry<Spec = unknown> {\n readonly participant: string\n readonly support: ProtocolSupport<Spec>\n}\n\nexport interface ProtocolIssue {\n readonly code: string\n readonly severity: 'error' | 'warning'\n readonly participant?: string\n readonly path?: string\n readonly message: string\n}\n\nexport interface ProtocolNegotiationInput<RequirementSpec = unknown, SupportSpec = unknown, Policy = unknown> {\n readonly requirements: readonly ProtocolRequirementEntry<RequirementSpec>[]\n readonly supports: readonly ProtocolSupportEntry<SupportSpec>[]\n readonly policy?: Policy\n}\n\nexport interface ProtocolNegotiationOutcome<Agreement = unknown> {\n readonly agreement?: Agreement\n readonly issues?: readonly ProtocolIssue[]\n}\n\nexport interface ProtocolDefinition<RequirementSpec = unknown, SupportSpec = unknown, Agreement = unknown, Policy = unknown>\n extends ApiReference {\n /** Every accepted wire/static API version. No compatibility is inferred by core. */\n readonly accepts?: readonly string[]\n validateRequirement(spec: unknown): RequirementSpec\n validateSupport(spec: unknown): SupportSpec\n negotiate(\n input: ProtocolNegotiationInput<RequirementSpec, SupportSpec, Policy>,\n ): ProtocolNegotiationOutcome<Agreement>\n}\n\nexport interface NegotiatedProtocol<Agreement = unknown> extends ApiReference {\n readonly participants: readonly string[]\n readonly agreement?: Agreement\n readonly issues: readonly ProtocolIssue[]\n}\n\nexport interface NegotiationReport {\n readonly apiVersion: 'core.dsh/report/v1alpha1'\n readonly evaluator: EvaluatorIdentity\n readonly compatible: boolean\n readonly protocols: readonly NegotiatedProtocol[]\n readonly issues: readonly ProtocolIssue[]\n}\n\ninterface StoredDefinition {\n readonly definition: ProtocolDefinition\n readonly accepted: ReadonlySet<string>\n}\n\nexport class ProtocolCatalog {\n private readonly definitions = new Map<string, StoredDefinition>()\n\n constructor(readonly evaluator: EvaluatorIdentity) {\n nonEmpty(evaluator.name, 'evaluator.name')\n nonEmpty(evaluator.version, 'evaluator.version')\n }\n\n register(definition: ProtocolDefinition): () => void {\n validateDefinition(definition)\n const accepted = new Set([definition.apiVersion, ...(definition.accepts ?? [])])\n for (const version of accepted) {\n const key = protocolKey({ apiVersion: version, kind: definition.kind })\n if (this.definitions.has(key)) {\n throw new Error(`protocol definition for ${version} ${definition.kind} is already registered`)\n }\n }\n const stored = Object.freeze({ definition: freezeDefinition(definition), accepted: new Set(accepted) })\n for (const version of accepted) this.definitions.set(protocolKey({ apiVersion: version, kind: definition.kind }), stored)\n return () => {\n for (const version of accepted) {\n const key = protocolKey({ apiVersion: version, kind: definition.kind })\n if (this.definitions.get(key) === stored) this.definitions.delete(key)\n }\n }\n }\n\n list(): readonly ProtocolDefinition[] {\n return Object.freeze([...new Set([...this.definitions.values()].map(row => row.definition))])\n }\n\n resolve(reference: ApiReference): ProtocolDefinition | undefined {\n validateApiReference(reference)\n return this.definitions.get(protocolKey(reference))?.definition\n }\n\n understands(reference: ApiReference): boolean {\n return this.resolve(reference) !== undefined\n }\n\n negotiate(declarations: readonly ProtocolDeclaration[], policy?: unknown): NegotiationReport {\n const participantIds = new Set<string>()\n for (const declaration of declarations) {\n validateProtocolDeclaration(declaration)\n if (participantIds.has(declaration.participant.id)) {\n throw new TypeError(`duplicate participant identity ${JSON.stringify(declaration.participant.id)}`)\n }\n participantIds.add(declaration.participant.id)\n }\n\n const groups = new Map<StoredDefinition, {\n requirements: ProtocolRequirementEntry[]\n supports: ProtocolSupportEntry[]\n }>()\n const issues: ProtocolIssue[] = []\n for (const [declarationIndex, declaration] of declarations.entries()) {\n for (const [index, requirement] of (declaration.requires ?? []).entries()) {\n const stored = this.definitions.get(protocolKey(requirement))\n if (stored === undefined) {\n issues.push(freezeIssue({\n code: 'definition-unavailable',\n severity: requirement.optional === true ? 'warning' : 'error',\n participant: declaration.participant.id,\n path: `/declarations/${declarationIndex}/requires/${index}`,\n message: `no definition recognizes ${requirement.apiVersion} ${requirement.kind}`,\n }))\n continue\n }\n const group = groups.get(stored) ?? { requirements: [], supports: [] }\n try {\n group.requirements.push(Object.freeze({\n participant: declaration.participant.id,\n requirement: Object.freeze({\n ...requirement,\n ...(Object.hasOwn(requirement, 'spec')\n ? { spec: stored.definition.validateRequirement(requirement.spec) }\n : { spec: stored.definition.validateRequirement(undefined) }),\n }),\n }))\n } catch (error) {\n issues.push(freezeIssue({\n code: 'invalid-requirement', severity: 'error', participant: declaration.participant.id,\n path: `/declarations/${declarationIndex}/requires/${index}/spec`, message: errorMessage(error),\n }))\n }\n groups.set(stored, group)\n }\n for (const [index, support] of (declaration.supports ?? []).entries()) {\n const stored = this.definitions.get(protocolKey(support))\n if (stored === undefined) {\n issues.push(freezeIssue({\n code: 'definition-unavailable', severity: 'warning', participant: declaration.participant.id,\n path: `/declarations/${declarationIndex}/supports/${index}`,\n message: `no definition recognizes ${support.apiVersion} ${support.kind}`,\n }))\n continue\n }\n const group = groups.get(stored) ?? { requirements: [], supports: [] }\n try {\n group.supports.push(Object.freeze({\n participant: declaration.participant.id,\n support: Object.freeze({\n ...support,\n ...(Object.hasOwn(support, 'spec')\n ? { spec: stored.definition.validateSupport(support.spec) }\n : { spec: stored.definition.validateSupport(undefined) }),\n }),\n }))\n } catch (error) {\n issues.push(freezeIssue({\n code: 'invalid-support', severity: 'error', participant: declaration.participant.id,\n path: `/declarations/${declarationIndex}/supports/${index}/spec`, message: errorMessage(error),\n }))\n }\n groups.set(stored, group)\n }\n }\n\n const protocols: NegotiatedProtocol[] = []\n for (const stored of [...groups.keys()].sort((left, right) => protocolKey(left.definition).localeCompare(protocolKey(right.definition)))) {\n const group = groups.get(stored) as NonNullable<ReturnType<typeof groups.get>>\n let outcome: ProtocolNegotiationOutcome\n try {\n outcome = stored.definition.negotiate(Object.freeze({\n requirements: Object.freeze([...group.requirements]),\n supports: Object.freeze([...group.supports]),\n ...(policy === undefined ? {} : { policy }),\n }))\n } catch (error) {\n outcome = { issues: [{ code: 'definition-failed', severity: 'error', message: errorMessage(error) }] }\n }\n const protocolIssues = Object.freeze((outcome.issues ?? []).map(freezeIssue))\n issues.push(...protocolIssues)\n protocols.push(Object.freeze({\n apiVersion: stored.definition.apiVersion,\n kind: stored.definition.kind,\n participants: Object.freeze([...new Set([\n ...group.requirements.map(row => row.participant),\n ...group.supports.map(row => row.participant),\n ])].sort()),\n ...(Object.hasOwn(outcome, 'agreement') ? { agreement: outcome.agreement } : {}),\n issues: protocolIssues,\n }))\n }\n\n return Object.freeze({\n apiVersion: 'core.dsh/report/v1alpha1',\n evaluator: Object.freeze({ ...this.evaluator }),\n compatible: !issues.some(issue => issue.severity === 'error'),\n protocols: Object.freeze(protocols),\n issues: Object.freeze(issues),\n })\n }\n}\n\nfunction validateDefinition(definition: ProtocolDefinition): void {\n validateApiReference(definition, 'protocol definition')\n if (typeof definition.validateRequirement !== 'function'\n || typeof definition.validateSupport !== 'function'\n || typeof definition.negotiate !== 'function') {\n throw new TypeError('protocol definition must provide validators and negotiate')\n }\n const versions = [definition.apiVersion, ...(definition.accepts ?? [])]\n if (new Set(versions).size !== versions.length) throw new TypeError('protocol definition accepts duplicate versions')\n for (const version of versions) validateApiReference({ apiVersion: version, kind: definition.kind })\n}\n\nfunction freezeDefinition(definition: ProtocolDefinition): ProtocolDefinition {\n return Object.freeze({ ...definition, ...(definition.accepts === undefined ? {} : { accepts: Object.freeze([...definition.accepts]) }) })\n}\n\nfunction freezeIssue(issue: ProtocolIssue): ProtocolIssue {\n if (issue.severity !== 'error' && issue.severity !== 'warning') throw new TypeError('protocol issue severity is invalid')\n nonEmpty(issue.code, 'protocol issue.code')\n nonEmpty(issue.message, 'protocol issue.message')\n return Object.freeze({ ...issue })\n}\n\nfunction nonEmpty(value: unknown, label: string): asserts value is string {\n if (typeof value !== 'string' || value.trim() === '') throw new TypeError(`${label} must be a non-empty string`)\n}\n\nfunction errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error)\n}\n","export interface SemanticVersion {\n readonly major: number\n readonly minor: number\n readonly patch: number\n readonly prerelease: readonly (string | number)[]\n readonly build: readonly string[]\n}\n\nexport type VersionRange = string | readonly string[]\n\nexport function parseSemanticVersion(value: string): SemanticVersion {\n const match = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$/u.exec(value)\n if (match === null) throw new TypeError(`invalid semantic version ${JSON.stringify(value)}`)\n const prerelease = match[4] === undefined ? [] : match[4].split('.').map(identifier => {\n if (!/^\\d+$/u.test(identifier)) return identifier\n if (identifier.length > 1 && identifier.startsWith('0')) throw new TypeError(`invalid semantic version ${JSON.stringify(value)}`)\n return Number(identifier)\n })\n return Object.freeze({\n major: Number(match[1]), minor: Number(match[2]), patch: Number(match[3]),\n prerelease: Object.freeze(prerelease),\n build: Object.freeze(match[5] === undefined ? [] : match[5].split('.')),\n })\n}\n\nexport function compareSemanticVersions(leftValue: string | SemanticVersion, rightValue: string | SemanticVersion): number {\n const left = typeof leftValue === 'string' ? parseSemanticVersion(leftValue) : leftValue\n const right = typeof rightValue === 'string' ? parseSemanticVersion(rightValue) : rightValue\n return left.major - right.major\n || left.minor - right.minor\n || left.patch - right.patch\n || comparePrerelease(left.prerelease, right.prerelease)\n}\n\nexport function assertVersionRange(range: VersionRange): void {\n compileRange(range)\n}\n\nexport function satisfiesVersionRange(versionValue: string, range: VersionRange): boolean {\n const version = parseSemanticVersion(versionValue)\n return compileRange(range).some(group => {\n if (version.prerelease.length > 0 && !group.explicitPrereleases.has(coreKey(version))) return false\n return group.predicates.every(predicate => predicate(version))\n })\n}\n\ninterface ComparatorGroup {\n readonly predicates: readonly ((version: SemanticVersion) => boolean)[]\n readonly explicitPrereleases: ReadonlySet<string>\n}\n\nfunction compileRange(range: VersionRange): readonly ComparatorGroup[] {\n const values = typeof range === 'string' ? [range] : range\n if (!Array.isArray(values) || values.length === 0) throw new TypeError('version range must be a string or non-empty array')\n return Object.freeze(values.flatMap(value => {\n if (typeof value !== 'string' || value.trim() === '') throw new TypeError('version range must not be empty')\n return value.split('||').map(part => compileGroup(part.trim()))\n }))\n}\n\nfunction compileGroup(value: string): ComparatorGroup {\n if (value === '') throw new TypeError('version range contains an empty alternative')\n if (value === '*' || /^x$/iu.test(value)) return { predicates: [], explicitPrereleases: new Set() }\n const predicates: Array<(version: SemanticVersion) => boolean> = []\n const explicitPrereleases = new Set<string>()\n for (const token of value.split(/\\s+/u)) {\n const parsed = compileComparator(token)\n predicates.push(...parsed.predicates)\n if (parsed.explicitPrerelease !== undefined) explicitPrereleases.add(parsed.explicitPrerelease)\n }\n return Object.freeze({ predicates: Object.freeze(predicates), explicitPrereleases })\n}\n\nfunction compileComparator(token: string): {\n readonly predicates: readonly ((version: SemanticVersion) => boolean)[]\n readonly explicitPrerelease?: string\n} {\n const match = /^(<=|>=|<|>|=|\\^|~)?(.+)$/u.exec(token)\n if (match === null) throw new TypeError(`invalid version comparator ${JSON.stringify(token)}`)\n const operator = match[1] ?? '='\n const body = match[2] as string\n const partial = /^(0|[1-9]\\d*|[xX*])(?:\\.(0|[1-9]\\d*|[xX*]))?(?:\\.(0|[1-9]\\d*|[xX*]))?$/u.exec(body)\n if (partial !== null && (partial[2] === undefined || partial[3] === undefined || [partial[1], partial[2], partial[3]].some(wild))) {\n if (operator !== '=') {\n if ((operator === '~' || operator === '^') && ![partial[1], partial[2]].some(wild)) {\n const lower = version(Number(partial[1]), Number(partial[2]), partial[3] === undefined || wild(partial[3]) ? 0 : Number(partial[3]))\n return bounded(lower, operator === '~' ? version(lower.major, lower.minor + 1, 0) : caretUpper(lower))\n }\n throw new TypeError(`partial version cannot use ${JSON.stringify(operator)}`)\n }\n return wildcardRange(partial)\n }\n\n const target = parseSemanticVersion(body)\n const explicitPrerelease = target.prerelease.length === 0 ? undefined : coreKey(target)\n if (operator === '^') return { ...bounded(target, caretUpper(target)), ...(explicitPrerelease === undefined ? {} : { explicitPrerelease }) }\n if (operator === '~') return { ...bounded(target, version(target.major, target.minor + 1, 0)), ...(explicitPrerelease === undefined ? {} : { explicitPrerelease }) }\n const comparison = (candidate: SemanticVersion) => compareSemanticVersions(candidate, target)\n const predicate = operator === '=' ? (candidate: SemanticVersion) => comparison(candidate) === 0\n : operator === '<' ? (candidate: SemanticVersion) => comparison(candidate) < 0\n : operator === '<=' ? (candidate: SemanticVersion) => comparison(candidate) <= 0\n : operator === '>' ? (candidate: SemanticVersion) => comparison(candidate) > 0\n : (candidate: SemanticVersion) => comparison(candidate) >= 0\n return { predicates: [predicate], ...(explicitPrerelease === undefined ? {} : { explicitPrerelease }) }\n}\n\nfunction wildcardRange(match: RegExpExecArray): { readonly predicates: readonly ((version: SemanticVersion) => boolean)[] } {\n if (wild(match[1])) return { predicates: [] }\n const major = Number(match[1])\n if (match[2] === undefined || wild(match[2])) return bounded(version(major, 0, 0), version(major + 1, 0, 0))\n const minor = Number(match[2])\n if (match[3] === undefined || wild(match[3])) return bounded(version(major, minor, 0), version(major, minor + 1, 0))\n throw new TypeError('unreachable complete version range')\n}\n\nfunction bounded(lower: SemanticVersion, upper: SemanticVersion): { readonly predicates: readonly ((version: SemanticVersion) => boolean)[] } {\n return { predicates: [\n candidate => compareSemanticVersions(candidate, lower) >= 0,\n candidate => compareSemanticVersions(candidate, upper) < 0,\n ] }\n}\n\nfunction caretUpper(lower: SemanticVersion): SemanticVersion {\n if (lower.major > 0) return version(lower.major + 1, 0, 0)\n if (lower.minor > 0) return version(0, lower.minor + 1, 0)\n return version(0, 0, lower.patch + 1)\n}\n\nfunction version(major: number, minor: number, patch: number): SemanticVersion {\n return { major, minor, patch, prerelease: [], build: [] }\n}\n\nfunction wild(value: string | undefined): boolean {\n return value === '*' || /^x$/iu.test(value ?? '')\n}\n\nfunction coreKey(value: SemanticVersion): string {\n return `${value.major}.${value.minor}.${value.patch}`\n}\n\nfunction comparePrerelease(left: readonly (string | number)[], right: readonly (string | number)[]): number {\n if (left.length === 0) return right.length === 0 ? 0 : 1\n if (right.length === 0) return -1\n for (let index = 0; index < Math.max(left.length, right.length); index += 1) {\n const leftPart = left[index]\n const rightPart = right[index]\n if (leftPart === undefined) return -1\n if (rightPart === undefined) return 1\n if (leftPart === rightPart) continue\n if (typeof leftPart === 'number' && typeof rightPart === 'string') return -1\n if (typeof leftPart === 'string' && typeof rightPart === 'number') return 1\n return leftPart < rightPart ? -1 : 1\n }\n return 0\n}\n"],"mappings":";AAkCA,SAAgB,YAAY,WAAiC;CAC3D,OAAO,GAAG,UAAU,WAAW,IAAI,UAAU;AAC/C;;AAGA,SAAgB,kBAAkB,WAAiC;CACjE,MAAM,UAAU,gBAAgB,UAAU,UAAU;CACpD,OAAO,GAAG,QAAQ,MAAM,IAAI,QAAQ,MAAM,IAAI,UAAU;AAC1D;AAEA,SAAgB,aAAa,MAAoB,OAA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AAM,GAAG,MAAM,MAAM,GAAG,MAAM;AAChD;AAEA,SAAS,kBAAkB,MAAoC,OAA6C;CAC1G,IAAI,KAAK,WAAW,GAAG,OAAO,MAAM,WAAW,IAAI,IAAI;CACvD,IAAI,MAAM,WAAW,GAAG,OAAO;CAC/B,KAAK,IAAI,QAAQ,GAAG,QAAQ,KAAK,IAAI,KAAK,QAAQ,MAAM,MAAM,GAAG,SAAS,GAAG;EAC3E,MAAM,WAAW,KAAK;EACtB,MAAM,YAAY,MAAM;EACxB,IAAI,aAAa,KAAA,GAAW,OAAO;EACnC,IAAI,cAAc,KAAA,GAAW,OAAO;EACpC,IAAI,aAAa,WAAW;EAC5B,IAAI,OAAO,aAAa,YAAY,OAAO,cAAc,UAAU,OAAO;EAC1E,IAAI,OAAO,aAAa,YAAY,OAAO,cAAc,UAAU,OAAO;EAC1E,OAAO,WAAW,YAAY,KAAK;CACrC;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dsh-std/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": ["lib"],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "pnpm run typecheck && tsdown",
|
|
17
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
18
|
+
"test": "vitest run"
|
|
19
|
+
},
|
|
20
|
+
"engines": { "node": "^22.19 || >=24" }
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DSH Standard contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @dsh-std/connection
|
|
2
|
+
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
The proposed design is documented in [Endpoint Connection](../../docs/proposals/endpoint-connection.zh.md). It separates the application-facing `ConnectionService` from the Connection Host provider SPI. The remainder of this page describes the current reference implementation, which does not yet complete that split.
|
|
6
|
+
|
|
7
|
+
Host-provided communication service, two-endpoint capability negotiation, and implementation-neutral invocation for the DSH Standard.
|
|
8
|
+
|
|
9
|
+
## Endpoint offers
|
|
10
|
+
|
|
11
|
+
An endpoint offer contains an endpoint identity, a revision, and the live participant declarations admitted by endpoint policy. It carries no component manifests, installation inventory, or plugin registry.
|
|
12
|
+
|
|
13
|
+
`resolveConnection()` passes both sets of declarations to a caller-owned `ProtocolCatalog`. Each protocol definition owns its negotiation and may place invocation bindings in its agreement; connection does not impose consumer/provider semantics on every protocol. `defineCapabilityProtocol()` is an explicit helper for domain protocols that do use RPC-shaped bindings.
|
|
14
|
+
|
|
15
|
+
Each invocation binding is participant-scoped and plan-revision-scoped. A client for one participant cannot discover or invoke bindings granted to another participant.
|
|
16
|
+
|
|
17
|
+
## Current reference API
|
|
18
|
+
|
|
19
|
+
`StandardConnection` exposes endpoint identities, the active plan, consumer-scoped clients, plan-change observation, and close. `CapabilityClient.invoke()` returns an invocation id, a result promise, an asynchronous progress stream, and cancellation. Domain protocol packages own operation names and input, output, and progress values.
|
|
20
|
+
|
|
21
|
+
`ConnectionBroker` selects one registered `ConnectionConnector` for an implementation-neutral target URI. Zero matches and multiple matches are both explicit errors. The broker does not expose the selected connector type through `StandardConnection`.
|
|
22
|
+
|
|
23
|
+
These types are an early reference implementation. They do not require a TUI, Web UI, GUI, or business plugin to register and operate its own connector. The protocol direction places the broker, connector/provider registry, carrier, and wire behind a Connection Host's `ConnectionService`. A consumer submits a target and uses scoped typed clients for the negotiated protocols.
|
|
24
|
+
|
|
25
|
+
A Connection Host may install or discover a remote service, own authentication, ports, forwarding and reconnection, and produce the `StandardConnection`. An SSH target facet contributes resolution and bootstrap integration while system OpenSSH or another provider may supply the physical SSH implementation. Applications do not observe the selected provider, ports, credentials, or wire.
|
|
26
|
+
|
|
27
|
+
## Lifecycle
|
|
28
|
+
|
|
29
|
+
Renegotiation creates a complete new plan revision and publishes it atomically. An invocation admitted under the old revision retains its binding until settlement; later invocations use the new revision. Closing a connection cancels active work and rejects new work with `connection-closed`.
|
|
30
|
+
|
|
31
|
+
Transport implementations must preserve invocation isolation, progress order, cancellation, and the error classification exposed by `ConnectionInvocationError`. They are also responsible for authenticating the peer and preventing one connection from reusing another connection's grants.
|
|
32
|
+
|
|
33
|
+
## Reference implementation
|
|
34
|
+
|
|
35
|
+
The `@dsh-std/connection/memory` export provides a process-local implementation for tests, adapters, and conformance experiments. It demonstrates symmetric calls, progress, cancellation, isolation, and renegotiation. It is not a required carrier or a wire-format specification.
|
|
36
|
+
|
|
37
|
+
## Known Limitations and Deferred Work
|
|
38
|
+
|
|
39
|
+
- The consumer-facing `ConnectionService` and Host provider SPI are not implemented in the current code yet.
|
|
40
|
+
- The package does not yet standardize discovery, authentication, encryption, reconnect policy, framing, or serialization.
|
|
41
|
+
- A connection has exactly two endpoints in `v1alpha1`; multi-party routing is composed from separate connections.
|
|
42
|
+
- The capability helper requires one peer provider by default. Protocols that allow multiple providers must opt into and define that behavior explicitly.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @dsh-std/connection
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
拟议设计见 [Endpoint Connection](../../docs/proposals/endpoint-connection.zh.md)。规范把普通应用使用的 `ConnectionService` 与 Connection Host 的 provider SPI 分开;本页其余内容描述尚未完成该分层的当前参考实现。
|
|
6
|
+
|
|
7
|
+
DSH Standard 的宿主通信 service、双端点能力协商与实现无关调用。
|
|
8
|
+
|
|
9
|
+
## 端点提议
|
|
10
|
+
|
|
11
|
+
端点提议包含端点身份、修订号,以及经端点 policy 裁剪后的 live participant declarations。它不携带 component manifests、安装记录或插件注册表。
|
|
12
|
+
|
|
13
|
+
`resolveConnection()` 把两端 declarations 交给调用方提供的 `ProtocolCatalog`。每份协议 definition 决定如何协商,并可在 agreement 中产生调用绑定;connection 不为所有协议预设 consumer/provider 语义。内置的 `defineCapabilityProtocol()` 是需要 RPC 绑定的领域协议可显式采用的辅助定义。
|
|
14
|
+
|
|
15
|
+
每项调用绑定都限定于消费 participant 和方案修订版。一个 participant 的客户端不能发现或调用授予另一 participant 的绑定。
|
|
16
|
+
|
|
17
|
+
## 当前参考 API
|
|
18
|
+
|
|
19
|
+
`StandardConnection` 暴露端点身份、当前方案、按消费方隔离的客户端、方案变更观察与关闭操作。`CapabilityClient.invoke()` 返回调用 id、结果 Promise、异步进度流与取消操作。领域协议包拥有操作名称以及输入、输出和进度值的语义。
|
|
20
|
+
|
|
21
|
+
`ConnectionBroker` 根据与实现无关的目标 URI,从已注册 `ConnectionConnector` 中选择唯一实现。零个匹配与多个匹配都是明确错误。broker 不会通过 `StandardConnection` 暴露选中的 connector 类型。
|
|
22
|
+
|
|
23
|
+
这些类型是早期参考实现,不表示 TUI、Web、GUI 或业务插件应自行注册 connector。规范方向是由 Connection Host 把 broker、connector/provider、carrier 和 wire 封装为 `ConnectionService`;consumer 只提交 target,并通过 scoped typed client 使用已协商协议。
|
|
24
|
+
|
|
25
|
+
Connection Host 负责安装或发现远端服务、认证、端口与转发、重连和 `StandardConnection`。SSH target facet 可以贡献解析与 bootstrap 集成,物理 SSH 则可由系统 OpenSSH 或独立 provider 完成。应用不会看到所选 provider、端口、凭据或 wire。
|
|
26
|
+
|
|
27
|
+
## 生命周期
|
|
28
|
+
|
|
29
|
+
重新协商会生成完整的新方案修订版,并原子发布。旧修订版已经接纳的调用保留其绑定直至结束;后续调用使用新修订版。关闭连接会取消活跃工作,并以 `connection-closed` 拒绝新工作。
|
|
30
|
+
|
|
31
|
+
传输实现必须保持调用隔离、进度顺序、取消语义和 `ConnectionInvocationError` 暴露的错误分类。实现还负责认证对端,并阻止一条连接复用另一条连接的授权。
|
|
32
|
+
|
|
33
|
+
## 参考实现
|
|
34
|
+
|
|
35
|
+
`@dsh-std/connection/memory` 导出用于测试、适配器和一致性实验的进程内实现。它演示双向调用、进度、取消、隔离和重新协商,但不是强制承载方式或线协议规范。
|
|
36
|
+
|
|
37
|
+
## 已知限制与暂缓事项
|
|
38
|
+
|
|
39
|
+
- consumer-facing `ConnectionService` 与 Host provider SPI 尚未在当前代码中实现。
|
|
40
|
+
- 本包尚未标准化发现、认证、加密、重连策略、封帧或序列化。
|
|
41
|
+
- `v1alpha1` 的一条连接恰好包含两个端点;多方路由由多条独立连接组合。
|
|
42
|
+
- Capability helper 默认要求唯一对端提供方;需要多提供方的协议必须明确选择其规则。
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { ApiReference, NegotiatedProtocol, ProtocolCatalog, ProtocolDeclaration, ProtocolRequirement, ProtocolSupport } from "@dsh-std/core";
|
|
2
|
+
//#region src/model.d.ts
|
|
3
|
+
declare const CONNECTION_API_VERSION = "connection.dsh/v1alpha1";
|
|
4
|
+
interface EndpointIdentity {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly instanceId: string;
|
|
7
|
+
}
|
|
8
|
+
interface EndpointOffer {
|
|
9
|
+
readonly apiVersion: typeof CONNECTION_API_VERSION;
|
|
10
|
+
readonly kind: 'ConnectionOffer';
|
|
11
|
+
readonly endpoint: EndpointIdentity;
|
|
12
|
+
readonly revision: number;
|
|
13
|
+
readonly declarations: readonly ProtocolDeclaration[];
|
|
14
|
+
}
|
|
15
|
+
interface ConnectionEndpointReference extends EndpointIdentity {}
|
|
16
|
+
interface CapabilityParticipant {
|
|
17
|
+
readonly endpoint: ConnectionEndpointReference;
|
|
18
|
+
readonly participantId: string;
|
|
19
|
+
}
|
|
20
|
+
interface CapabilityBinding {
|
|
21
|
+
readonly bindingId: string;
|
|
22
|
+
readonly agreementId: string;
|
|
23
|
+
readonly planRevision: number;
|
|
24
|
+
readonly consumer: CapabilityParticipant;
|
|
25
|
+
readonly provider: CapabilityParticipant;
|
|
26
|
+
readonly requirement: ProtocolRequirement;
|
|
27
|
+
readonly support: ProtocolSupport;
|
|
28
|
+
}
|
|
29
|
+
interface ConnectionIssue {
|
|
30
|
+
readonly severity: 'error' | 'warning';
|
|
31
|
+
readonly code: string;
|
|
32
|
+
readonly participant?: CapabilityParticipant;
|
|
33
|
+
readonly path?: string;
|
|
34
|
+
readonly message: string;
|
|
35
|
+
}
|
|
36
|
+
interface ConnectionPlan {
|
|
37
|
+
readonly apiVersion: typeof CONNECTION_API_VERSION;
|
|
38
|
+
readonly kind: 'ConnectionAgreement';
|
|
39
|
+
readonly connectionId: string;
|
|
40
|
+
readonly revision: number;
|
|
41
|
+
readonly digest: string;
|
|
42
|
+
readonly offers: readonly {
|
|
43
|
+
readonly endpoint: ConnectionEndpointReference;
|
|
44
|
+
readonly revision: number;
|
|
45
|
+
}[];
|
|
46
|
+
readonly compatible: boolean;
|
|
47
|
+
readonly protocols: readonly NegotiatedProtocol[];
|
|
48
|
+
readonly bindings: readonly CapabilityBinding[];
|
|
49
|
+
readonly issues: readonly ConnectionIssue[];
|
|
50
|
+
}
|
|
51
|
+
interface ResolveConnectionOptions {
|
|
52
|
+
readonly connectionId: string;
|
|
53
|
+
readonly revision: number;
|
|
54
|
+
readonly protocols: ProtocolCatalog;
|
|
55
|
+
readonly policy?: unknown;
|
|
56
|
+
}
|
|
57
|
+
/** Policy envelope supplied to definitions while evaluating a pair of endpoint offers. */
|
|
58
|
+
interface ConnectionNegotiationPolicy {
|
|
59
|
+
readonly endpointByParticipant: Readonly<Record<string, string>>;
|
|
60
|
+
readonly protocol?: unknown;
|
|
61
|
+
}
|
|
62
|
+
declare function createEndpointOffer(endpoint: EndpointIdentity, revision: number, declarations: readonly ProtocolDeclaration[]): EndpointOffer;
|
|
63
|
+
declare function validateEndpointOffer(offer: EndpointOffer): void;
|
|
64
|
+
declare function freezeEndpoint(endpoint: EndpointIdentity): ConnectionEndpointReference;
|
|
65
|
+
declare function validatePlanCoordinates(connectionId: string, revision: number): void;
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/connection.d.ts
|
|
68
|
+
interface CapabilityHandlerContext<TProgress = unknown> {
|
|
69
|
+
readonly connectionId: string;
|
|
70
|
+
readonly planRevision: number;
|
|
71
|
+
readonly invocationId: string;
|
|
72
|
+
readonly binding: CapabilityBinding;
|
|
73
|
+
readonly signal: AbortSignal;
|
|
74
|
+
progress(value: TProgress): void;
|
|
75
|
+
}
|
|
76
|
+
type CapabilityHandler<TInput = unknown, TOutput = unknown, TProgress = unknown> = (operation: string, input: TInput, context: CapabilityHandlerContext<TProgress>) => TOutput | Promise<TOutput>;
|
|
77
|
+
interface CapabilityImplementation<TInput = unknown, TOutput = unknown, TProgress = unknown> {
|
|
78
|
+
readonly participantId: string;
|
|
79
|
+
readonly protocol: ProtocolSupport;
|
|
80
|
+
readonly handle: CapabilityHandler<TInput, TOutput, TProgress>;
|
|
81
|
+
}
|
|
82
|
+
interface CapabilityDispatch<TInput = unknown, TProgress = unknown> {
|
|
83
|
+
readonly connectionId: string;
|
|
84
|
+
readonly planRevision: number;
|
|
85
|
+
readonly invocationId: string;
|
|
86
|
+
readonly binding: CapabilityBinding;
|
|
87
|
+
readonly operation: string;
|
|
88
|
+
readonly input: TInput;
|
|
89
|
+
readonly signal: AbortSignal;
|
|
90
|
+
progress(value: TProgress): void;
|
|
91
|
+
}
|
|
92
|
+
interface ConnectionEndpoint {
|
|
93
|
+
readonly offer: EndpointOffer;
|
|
94
|
+
dispatch<TInput = unknown, TOutput = unknown, TProgress = unknown>(invocation: CapabilityDispatch<TInput, TProgress>): Promise<TOutput>;
|
|
95
|
+
onOfferChange(listener: (offer: EndpointOffer) => void): () => void;
|
|
96
|
+
}
|
|
97
|
+
interface CapabilityCall<TOutput = unknown, TProgress = unknown> {
|
|
98
|
+
readonly invocationId: string;
|
|
99
|
+
readonly result: Promise<TOutput>;
|
|
100
|
+
readonly progress: AsyncIterable<TProgress>;
|
|
101
|
+
cancel(reason?: string): void;
|
|
102
|
+
}
|
|
103
|
+
interface CapabilityClient {
|
|
104
|
+
readonly participantId: string;
|
|
105
|
+
binding(reference: ApiReference): CapabilityBinding | undefined;
|
|
106
|
+
invoke<TInput = unknown, TOutput = unknown, TProgress = unknown>(reference: ApiReference, operation: string, input: TInput, options?: {
|
|
107
|
+
readonly signal?: AbortSignal;
|
|
108
|
+
}): CapabilityCall<TOutput, TProgress>;
|
|
109
|
+
}
|
|
110
|
+
interface StandardConnection {
|
|
111
|
+
readonly id: string;
|
|
112
|
+
readonly local: ConnectionEndpointReference;
|
|
113
|
+
readonly remote: ConnectionEndpointReference;
|
|
114
|
+
readonly plan: ConnectionPlan;
|
|
115
|
+
client(participantId: string): CapabilityClient;
|
|
116
|
+
onPlanChange(listener: (plan: ConnectionPlan) => void): () => void;
|
|
117
|
+
close(reason?: string): void | Promise<void>;
|
|
118
|
+
}
|
|
119
|
+
declare class ConnectionInvocationError extends Error {
|
|
120
|
+
readonly code: 'connection-closed' | 'capability-unbound' | 'handler-missing' | 'cancelled' | 'handler-failed';
|
|
121
|
+
constructor(code: 'connection-closed' | 'capability-unbound' | 'handler-missing' | 'cancelled' | 'handler-failed', message: string, options?: ErrorOptions);
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
export { validatePlanCoordinates as C, validateEndpointOffer as S, EndpointIdentity as _, CapabilityHandlerContext as a, createEndpointOffer as b, ConnectionInvocationError as c, CapabilityBinding as d, CapabilityParticipant as f, ConnectionPlan as g, ConnectionNegotiationPolicy as h, CapabilityHandler as i, StandardConnection as l, ConnectionIssue as m, CapabilityClient as n, CapabilityImplementation as o, ConnectionEndpointReference as p, CapabilityDispatch as r, ConnectionEndpoint as s, CapabilityCall as t, CONNECTION_API_VERSION as u, EndpointOffer as v, freezeEndpoint as x, ResolveConnectionOptions as y };
|
|
125
|
+
//# sourceMappingURL=connection-CdGcSQnu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-CdGcSQnu.d.ts","names":[],"sources":["../src/model.ts","../src/connection.ts"],"mappings":";;cASa;UAEI;WACN;WACA;;UAGM;WACN,mBAAmB;WACnB;WACA,UAAU;WACV;WACA,uBAAuB;;UAGjB,oCAAoC;UAEpC;WACN,UAAU;WACV;;UAGM;WACN;WACA;WACA;WACA,UAAU;WACV,UAAU;WACV,aAAa;WACb,SAAS;;UAGH;WACN;WACA;WACA,cAAc;WACd;WACA;;UAGM;WACN,mBAAmB;WACnB;WACA;WACA;WACA;WACA;aACE,UAAU;aACV;;WAEF;WACA,oBAAoB;WACpB,mBAAmB;WACnB,iBAAiB;;UAGX;WACN;WACA;WACA,WAAW;WACX;;;UAIM;WACN,uBAAuB,SAAS;WAChC;;iBAGK,oBACd,UAAU,kBACV,kBACA,uBAAuB,wBACtB;iBAkBa,sBAAsB,OAAO;iBAa7B,eAAe,UAAU,mBAAmB;iBAI5C,wBAAwB,sBAAsB;;;UClH7C,yBAAyB;WAC/B;WACA;WACA;WACA,SAAS;WACT,QAAQ;EACjB,SAAS,OAAO;;KAGN,kBAAkB,kBAAkB,mBAAmB,wBACjE,mBAAmB,OAAO,QAAQ,SAAS,yBAAyB,eACjE,UAAU,QAAQ;UAEN,yBAAyB,kBAAkB,mBAAmB;WACpE;WACA,UAAU;WACV,QAAQ,kBAAkB,QAAQ,SAAS;;UAGrC,mBAAmB,kBAAkB;WAC3C;WACA;WACA;WACA,SAAS;WACT;WACA,OAAO;WACP,QAAQ;EACjB,SAAS,OAAO;;UAGD;WACN,OAAO;EAChB,SAAS,kBAAkB,mBAAmB,qBAAqB,YAAY,mBAAmB,QAAQ,aAAa,QAAQ;EAC/H,cAAc,WAAW,OAAO;;UAGjB,eAAe,mBAAmB;WACxC;WACA,QAAQ,QAAQ;WAChB,UAAU,cAAc;EACjC,OAAO;;UAGQ;WACN;EACT,QAAQ,WAAW,eAAe;EAClC,OAAO,kBAAkB,mBAAmB,qBAC1C,WAAW,cACX,mBACA,OAAO,QACP;aAAqB,SAAS;MAC7B,eAAe,SAAS;;UAGZ;WACN;WACA,OAAO;WACP,QAAQ;WACR,MAAM;EACf,OAAO,wBAAwB;EAC/B,aAAa,WAAW,MAAM;EAC9B,MAAM,yBAAyB;;cAGpB,kCAAkC;WAElC;EAAA,YAAA,uGACT,iBACA,UAAU"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { C as validatePlanCoordinates, S as validateEndpointOffer, _ as EndpointIdentity, a as CapabilityHandlerContext, b as createEndpointOffer, c as ConnectionInvocationError, d as CapabilityBinding, f as CapabilityParticipant, g as ConnectionPlan, h as ConnectionNegotiationPolicy, i as CapabilityHandler, l as StandardConnection, m as ConnectionIssue, n as CapabilityClient, o as CapabilityImplementation, p as ConnectionEndpointReference, r as CapabilityDispatch, s as ConnectionEndpoint, t as CapabilityCall, u as CONNECTION_API_VERSION, v as EndpointOffer, x as freezeEndpoint, y as ResolveConnectionOptions } from "./connection-CdGcSQnu.js";
|
|
2
|
+
import { ProtocolDeclaration, ProtocolDefinition, ProtocolRequirement, ProtocolSupport } from "@dsh-std/core";
|
|
3
|
+
//#region src/broker.d.ts
|
|
4
|
+
interface ConnectionTarget {
|
|
5
|
+
/** Implementation-neutral target. Its URI scheme is interpreted by registered connectors. */
|
|
6
|
+
readonly uri: string;
|
|
7
|
+
readonly metadata?: Readonly<Record<string, string>>;
|
|
8
|
+
}
|
|
9
|
+
interface ConnectRequest {
|
|
10
|
+
readonly target: ConnectionTarget;
|
|
11
|
+
/** Live endpoint, including the dispatcher used for peer-to-local calls. */
|
|
12
|
+
readonly local: ConnectionEndpoint;
|
|
13
|
+
readonly signal?: AbortSignal;
|
|
14
|
+
}
|
|
15
|
+
/** Client half of one concrete connection implementation. */
|
|
16
|
+
interface ConnectionConnector {
|
|
17
|
+
/** Namespaced implementation identity, not a transport or product name exposed to domain consumers. */
|
|
18
|
+
readonly id: string;
|
|
19
|
+
supports(target: ConnectionTarget): boolean;
|
|
20
|
+
connect(request: ConnectRequest): Promise<StandardConnection>;
|
|
21
|
+
}
|
|
22
|
+
declare class ConnectionSelectionError extends Error {
|
|
23
|
+
readonly code: 'implementation-unavailable' | 'implementation-ambiguous';
|
|
24
|
+
readonly implementations: readonly string[];
|
|
25
|
+
constructor(code: 'implementation-unavailable' | 'implementation-ambiguous', message: string, implementations: readonly string[]);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Implementation registry used by an adapter or application composition root.
|
|
29
|
+
* Domain consumers request a connection; they never import the selected implementation.
|
|
30
|
+
*/
|
|
31
|
+
declare class ConnectionBroker {
|
|
32
|
+
private readonly connectors;
|
|
33
|
+
register(connector: ConnectionConnector): () => void;
|
|
34
|
+
implementations(target?: ConnectionTarget): readonly string[];
|
|
35
|
+
connect(request: ConnectRequest): Promise<StandardConnection>;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/endpoint.d.ts
|
|
39
|
+
interface EndpointPublication {
|
|
40
|
+
readonly declaration: ProtocolDeclaration;
|
|
41
|
+
readonly implementations?: readonly CapabilityImplementation[];
|
|
42
|
+
}
|
|
43
|
+
interface EndpointRuntimeOptions extends EndpointIdentity {
|
|
44
|
+
readonly revision?: number;
|
|
45
|
+
}
|
|
46
|
+
declare class StandardEndpointRuntime implements ConnectionEndpoint {
|
|
47
|
+
private readonly declarations;
|
|
48
|
+
private readonly implementations;
|
|
49
|
+
private readonly listeners;
|
|
50
|
+
private readonly identity;
|
|
51
|
+
private revision;
|
|
52
|
+
private currentOffer;
|
|
53
|
+
constructor(options: EndpointRuntimeOptions);
|
|
54
|
+
get offer(): EndpointOffer;
|
|
55
|
+
register(publication: EndpointPublication): () => void;
|
|
56
|
+
dispatch<TInput = unknown, TOutput = unknown, TProgress = unknown>(invocation: CapabilityDispatch<TInput, TProgress>): Promise<TOutput>;
|
|
57
|
+
onOfferChange(listener: (offer: EndpointOffer) => void): () => void;
|
|
58
|
+
private createOffer;
|
|
59
|
+
private publishOffer;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/resolve.d.ts
|
|
63
|
+
declare function resolveConnection(left: EndpointOffer, right: EndpointOffer, options: ResolveConnectionOptions): ConnectionPlan;
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/rpc.d.ts
|
|
66
|
+
interface CapabilityBindingDraft {
|
|
67
|
+
readonly consumer: string;
|
|
68
|
+
readonly provider: string;
|
|
69
|
+
readonly requirement: ProtocolRequirement;
|
|
70
|
+
readonly support: ProtocolSupport;
|
|
71
|
+
}
|
|
72
|
+
interface CapabilityAgreement {
|
|
73
|
+
readonly kind: 'CapabilityBindings';
|
|
74
|
+
readonly bindings: readonly CapabilityBindingDraft[];
|
|
75
|
+
}
|
|
76
|
+
interface CapabilityProtocolOptions {
|
|
77
|
+
readonly apiVersion: string;
|
|
78
|
+
readonly kind: string;
|
|
79
|
+
readonly accepts?: readonly string[];
|
|
80
|
+
readonly multipleProviders?: boolean;
|
|
81
|
+
validateRequirement?(spec: unknown): unknown;
|
|
82
|
+
validateSupport?(spec: unknown): unknown;
|
|
83
|
+
}
|
|
84
|
+
/** Reusable RPC-shaped protocol definition. Domain packages opt into these semantics explicitly. */
|
|
85
|
+
declare function defineCapabilityProtocol(options: CapabilityProtocolOptions): ProtocolDefinition;
|
|
86
|
+
declare function isCapabilityAgreement(value: unknown): value is CapabilityAgreement;
|
|
87
|
+
//#endregion
|
|
88
|
+
export { CONNECTION_API_VERSION, CapabilityAgreement, CapabilityBinding, CapabilityBindingDraft, CapabilityCall, CapabilityClient, CapabilityDispatch, CapabilityHandler, CapabilityHandlerContext, CapabilityImplementation, CapabilityParticipant, CapabilityProtocolOptions, ConnectRequest, ConnectionBroker, ConnectionConnector, ConnectionEndpoint, ConnectionEndpointReference, ConnectionInvocationError, ConnectionIssue, ConnectionNegotiationPolicy, ConnectionPlan, ConnectionSelectionError, ConnectionTarget, EndpointIdentity, EndpointOffer, EndpointPublication, EndpointRuntimeOptions, ResolveConnectionOptions, StandardConnection, StandardEndpointRuntime, createEndpointOffer, defineCapabilityProtocol, freezeEndpoint, isCapabilityAgreement, resolveConnection, validateEndpointOffer, validatePlanCoordinates };
|
|
89
|
+
//# sourceMappingURL=index.d.ts.map
|
package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/broker.ts","../src/endpoint.ts","../src/resolve.ts","../src/rpc.ts"],"mappings":";;;UAGiB;;WAEN;WACA,WAAW,SAAS;;UAGd;WACN,QAAQ;;WAER,OAAO;WACP,SAAS;;;UAIH;;WAEN;EACT,SAAS,QAAQ;EACjB,QAAQ,SAAS,iBAAiB,QAAQ;;cAG/B,iCAAiC;WAEjC;WAEA;EAFA,YAAA,iEACT,iBACS;;;;;;cAWA;mBACM;EAEjB,SAAS,WAAW;EAOpB,gBAAgB,SAAS;EAQnB,QAAQ,SAAS,iBAAiB,QAAQ;;;;UC3CjC;WACN,aAAa;WACb,2BAA2B;;UAGrB,+BAA+B;WACrC;;cAGE,mCAAmC;mBAC7B;mBACA;mBACA;mBACA;UACT;UACA;EAEI,YAAA,SAAS;MAMjB,SAAS;EAEb,SAAS,aAAa;EAmChB,SAAS,kBAAkB,mBAAmB,qBAAqB,YAAY,mBAAmB,QAAQ,aAAa,QAAQ;EAqBrI,cAAc,WAAW,OAAO;UAKxB;UAIA;;;;iBCxFM,kBAAkB,MAAM,eAAe,OAAO,eAAe,SAAS,2BAA2B;;;UCRhG;WACN;WACA;WACA,aAAa;WACb,SAAS;;UAGH;WACN;WACA,mBAAmB;;UAGb;WACN;WACA;WACA;WACA;EACT,qBAAqB;EACrB,iBAAiB;;;iBAIH,yBAAyB,SAAS,4BAA4B;iBA0D9D,sBAAsB,iBAAiB,SAAS"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { a as CONNECTION_API_VERSION, c as validateEndpointOffer, i as ConnectionInvocationError, l as validatePlanCoordinates, n as defineCapabilityProtocol, o as createEndpointOffer, r as isCapabilityAgreement, s as freezeEndpoint, t as resolveConnection } from "./resolve-3X6ausgz.js";
|
|
2
|
+
import { defineProtocolDeclaration, sameProtocol } from "@dsh-std/core";
|
|
3
|
+
//#region src/broker.ts
|
|
4
|
+
var ConnectionSelectionError = class extends Error {
|
|
5
|
+
code;
|
|
6
|
+
implementations;
|
|
7
|
+
constructor(code, message, implementations) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.implementations = implementations;
|
|
11
|
+
this.name = "ConnectionSelectionError";
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Implementation registry used by an adapter or application composition root.
|
|
16
|
+
* Domain consumers request a connection; they never import the selected implementation.
|
|
17
|
+
*/
|
|
18
|
+
var ConnectionBroker = class {
|
|
19
|
+
connectors = /* @__PURE__ */ new Map();
|
|
20
|
+
register(connector) {
|
|
21
|
+
namespaced(connector.id, "connection connector id");
|
|
22
|
+
if (this.connectors.has(connector.id)) throw new Error(`connection connector ${JSON.stringify(connector.id)} is already registered`);
|
|
23
|
+
this.connectors.set(connector.id, connector);
|
|
24
|
+
return () => {
|
|
25
|
+
if (this.connectors.get(connector.id) === connector) this.connectors.delete(connector.id);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
implementations(target) {
|
|
29
|
+
if (target !== void 0) validateTarget(target);
|
|
30
|
+
return Object.freeze([...this.connectors.values()].filter((connector) => target === void 0 || safelySupports(connector, target)).map((connector) => connector.id).sort());
|
|
31
|
+
}
|
|
32
|
+
async connect(request) {
|
|
33
|
+
validateTarget(request.target);
|
|
34
|
+
validateEndpointOffer(request.local.offer);
|
|
35
|
+
request.signal?.throwIfAborted();
|
|
36
|
+
const matches = [...this.connectors.values()].filter((connector) => safelySupports(connector, request.target)).sort((left, right) => left.id.localeCompare(right.id));
|
|
37
|
+
if (matches.length === 0) throw new ConnectionSelectionError("implementation-unavailable", `no connection implementation supports ${JSON.stringify(request.target.uri)}`, []);
|
|
38
|
+
if (matches.length > 1) {
|
|
39
|
+
const ids = Object.freeze(matches.map((connector) => connector.id));
|
|
40
|
+
throw new ConnectionSelectionError("implementation-ambiguous", `multiple connection implementations support ${JSON.stringify(request.target.uri)}: ${ids.join(", ")}`, ids);
|
|
41
|
+
}
|
|
42
|
+
return matches[0].connect(request);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
function safelySupports(connector, target) {
|
|
46
|
+
try {
|
|
47
|
+
return connector.supports(target);
|
|
48
|
+
} catch {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function validateTarget(target) {
|
|
53
|
+
if (typeof target.uri !== "string" || target.uri.trim() === "") throw new TypeError("connection target uri must be non-empty");
|
|
54
|
+
if (target.metadata !== void 0) {
|
|
55
|
+
for (const [key, value] of Object.entries(target.metadata)) if (key.trim() === "" || typeof value !== "string") throw new TypeError("connection target metadata must contain string pairs");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function namespaced(value, label) {
|
|
59
|
+
if (!/^[a-z][a-z0-9]*(?:[.-][a-z0-9][a-z0-9-]*)+$/u.test(value)) throw new TypeError(`${label} must be namespaced`);
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/endpoint.ts
|
|
63
|
+
var StandardEndpointRuntime = class {
|
|
64
|
+
declarations = /* @__PURE__ */ new Map();
|
|
65
|
+
implementations = [];
|
|
66
|
+
listeners = /* @__PURE__ */ new Set();
|
|
67
|
+
identity;
|
|
68
|
+
revision;
|
|
69
|
+
currentOffer;
|
|
70
|
+
constructor(options) {
|
|
71
|
+
this.identity = Object.freeze({
|
|
72
|
+
id: options.id,
|
|
73
|
+
instanceId: options.instanceId
|
|
74
|
+
});
|
|
75
|
+
this.revision = options.revision ?? 0;
|
|
76
|
+
this.currentOffer = this.createOffer();
|
|
77
|
+
}
|
|
78
|
+
get offer() {
|
|
79
|
+
return this.currentOffer;
|
|
80
|
+
}
|
|
81
|
+
register(publication) {
|
|
82
|
+
const declaration = defineProtocolDeclaration(publication.declaration);
|
|
83
|
+
const participantId = declaration.participant.id;
|
|
84
|
+
if (this.declarations.has(participantId)) throw new Error(`participant ${JSON.stringify(participantId)} is already registered`);
|
|
85
|
+
const implementations = [...publication.implementations ?? []];
|
|
86
|
+
const implemented = /* @__PURE__ */ new Set();
|
|
87
|
+
for (const implementation of implementations) {
|
|
88
|
+
if (implementation.participantId !== participantId) throw new TypeError(`implementation participantId must be ${JSON.stringify(participantId)}`);
|
|
89
|
+
if (!(declaration.supports ?? []).some((support) => sameProtocol(support, implementation.protocol))) throw new TypeError(`participant implementation ${implementation.protocol.apiVersion} ${implementation.protocol.kind} is not declared live`);
|
|
90
|
+
const key = `${implementation.protocol.apiVersion}\0${implementation.protocol.kind}`;
|
|
91
|
+
if (implemented.has(key)) throw new TypeError(`participant has multiple implementations for ${implementation.protocol.apiVersion} ${implementation.protocol.kind}`);
|
|
92
|
+
implemented.add(key);
|
|
93
|
+
}
|
|
94
|
+
const stored = implementations.map((implementation) => Object.freeze({
|
|
95
|
+
...implementation,
|
|
96
|
+
protocol: Object.freeze({ ...implementation.protocol }),
|
|
97
|
+
handle: implementation.handle
|
|
98
|
+
}));
|
|
99
|
+
this.declarations.set(participantId, declaration);
|
|
100
|
+
this.implementations.push(...stored);
|
|
101
|
+
this.publishOffer();
|
|
102
|
+
let active = true;
|
|
103
|
+
return () => {
|
|
104
|
+
if (!active) return;
|
|
105
|
+
active = false;
|
|
106
|
+
if (this.declarations.get(participantId) === declaration) this.declarations.delete(participantId);
|
|
107
|
+
for (const implementation of stored) {
|
|
108
|
+
const index = this.implementations.indexOf(implementation);
|
|
109
|
+
if (index >= 0) this.implementations.splice(index, 1);
|
|
110
|
+
}
|
|
111
|
+
this.publishOffer();
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
async dispatch(invocation) {
|
|
115
|
+
validateDispatch(invocation, this.currentOffer);
|
|
116
|
+
const implementation = this.implementations.find((candidate) => candidate.participantId === invocation.binding.provider.participantId && sameProtocol(candidate.protocol, invocation.binding.support));
|
|
117
|
+
if (implementation === void 0) throw new ConnectionInvocationError("handler-missing", `binding ${JSON.stringify(invocation.binding.bindingId)} has no live implementation`);
|
|
118
|
+
try {
|
|
119
|
+
return await implementation.handle(invocation.operation, invocation.input, Object.freeze({
|
|
120
|
+
connectionId: invocation.connectionId,
|
|
121
|
+
planRevision: invocation.planRevision,
|
|
122
|
+
invocationId: invocation.invocationId,
|
|
123
|
+
binding: invocation.binding,
|
|
124
|
+
signal: invocation.signal,
|
|
125
|
+
progress: invocation.progress
|
|
126
|
+
}));
|
|
127
|
+
} catch (error) {
|
|
128
|
+
if (error instanceof ConnectionInvocationError) throw error;
|
|
129
|
+
throw new ConnectionInvocationError("handler-failed", error instanceof Error ? error.message : String(error), { cause: error });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
onOfferChange(listener) {
|
|
133
|
+
this.listeners.add(listener);
|
|
134
|
+
return () => {
|
|
135
|
+
this.listeners.delete(listener);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
createOffer() {
|
|
139
|
+
return createEndpointOffer(this.identity, this.revision, [...this.declarations.values()]);
|
|
140
|
+
}
|
|
141
|
+
publishOffer() {
|
|
142
|
+
this.revision += 1;
|
|
143
|
+
this.currentOffer = this.createOffer();
|
|
144
|
+
for (const listener of this.listeners) listener(this.currentOffer);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
function validateDispatch(invocation, offer) {
|
|
148
|
+
if (invocation.connectionId.trim() === "") throw new TypeError("connectionId must be non-empty");
|
|
149
|
+
if (!Number.isSafeInteger(invocation.planRevision) || invocation.planRevision < 1) throw new TypeError("planRevision must be positive");
|
|
150
|
+
if (invocation.binding.planRevision !== invocation.planRevision) throw new ConnectionInvocationError("capability-unbound", "binding belongs to another plan revision");
|
|
151
|
+
if (invocation.binding.provider.endpoint.instanceId !== offer.endpoint.instanceId) throw new ConnectionInvocationError("capability-unbound", "binding provider belongs to another endpoint");
|
|
152
|
+
if (invocation.invocationId.trim() === "" || invocation.operation.trim() === "") throw new TypeError("invocationId and operation must be non-empty");
|
|
153
|
+
invocation.signal.throwIfAborted();
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
export { CONNECTION_API_VERSION, ConnectionBroker, ConnectionInvocationError, ConnectionSelectionError, StandardEndpointRuntime, createEndpointOffer, defineCapabilityProtocol, freezeEndpoint, isCapabilityAgreement, resolveConnection, validateEndpointOffer, validatePlanCoordinates };
|
|
157
|
+
|
|
158
|
+
//# sourceMappingURL=index.js.map
|