@deepseek-harness-tui/dsh-tui 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -15
- package/cordis.patch.yml +21 -2
- package/cordis.yml +12 -1
- package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -0
- package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -0
- package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -0
- package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -0
- package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -0
- package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -0
- package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -0
- package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -0
- package/dsh-ecosystem-spec/registry/README.md +14 -0
- package/dsh-ecosystem-spec/registry/contracts/decision-events-v1alpha1.json +13 -0
- package/dsh-ecosystem-spec/registry/contracts/scene-v1alpha1.json +13 -0
- package/dsh-ecosystem-spec/registry/contracts/settings-section-v1alpha1.json +13 -0
- package/dsh-ecosystem-spec/registry/contracts/tui-channel-v1alpha1.json +30 -0
- package/dsh-ecosystem-spec/registry/contracts/workspace-provider-v1alpha1.json +6 -0
- package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -0
- package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -0
- package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -0
- package/dsh-ecosystem-spec/schemas/conformance-claim.schema.json +15 -0
- package/dsh-ecosystem-spec/schemas/effect-ledger-record.schema.json +16 -0
- package/dsh-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/command-trees.d.ts +2 -1
- package/lib/types/command-trees.d.ts.map +1 -1
- package/lib/types/command-trees.js +1 -1
- 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 -5
- package/lib/types/components/LoadedContextPanel.js +6 -6
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +16 -8
- package/lib/types/components/Markdown.d.ts +13 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +15 -1
- package/lib/types/components/MessageList.d.ts +3 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +111 -6
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +26 -12
- 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/StreamingMarkdown.d.ts +2 -8
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +51 -9
- 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/activityFrames.d.ts +1 -1
- package/lib/types/components/activityFrames.d.ts.map +1 -1
- package/lib/types/components/activityFrames.js +4 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +5 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +26 -3
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +13 -2
- package/lib/types/dsh-adapter/channel.d.ts +61 -11
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +767 -120
- package/lib/types/dsh-adapter/childStderr.d.ts.map +1 -1
- package/lib/types/dsh-adapter/childStderr.js +10 -0
- 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/command-trees.d.ts +7 -1
- package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -1
- package/lib/types/dsh-adapter/command-trees.js +70 -20
- package/lib/types/dsh-adapter/component-identity.d.ts +33 -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 +348 -0
- package/lib/types/dsh-adapter/dialogs.d.ts +145 -0
- package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/dialogs.js +316 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts +91 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -0
- package/lib/types/dsh-adapter/effect-ledger.js +251 -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 +207 -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 +213 -0
- package/lib/types/dsh-adapter/host-access.d.ts +37 -0
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-access.js +652 -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 +169 -0
- package/lib/types/dsh-adapter/index.d.ts +4 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +1 -0
- package/lib/types/dsh-adapter/message-observer.d.ts +173 -0
- package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -0
- package/lib/types/dsh-adapter/message-observer.js +553 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +136 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-host.js +365 -0
- package/lib/types/dsh-adapter/plugin-storage.d.ts +108 -0
- package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-storage.js +397 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +124 -14
- 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/promptDebug.d.ts +0 -6
- package/lib/types/dsh-adapter/promptDebug.d.ts.map +1 -1
- package/lib/types/dsh-adapter/promptDebug.js +13 -4
- package/lib/types/dsh-adapter/renderers.d.ts +57 -0
- package/lib/types/dsh-adapter/renderers.d.ts.map +1 -0
- package/lib/types/dsh-adapter/renderers.js +173 -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 +15 -5
- package/lib/types/dsh-adapter/scenes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/scenes.js +149 -35
- package/lib/types/dsh-adapter/settings-sections.d.ts +7 -3
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +106 -26
- package/lib/types/dsh-adapter/shortcuts.d.ts +107 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -0
- package/lib/types/dsh-adapter/shortcuts.js +340 -0
- package/lib/types/dsh-adapter/status.d.ts +74 -0
- package/lib/types/dsh-adapter/status.d.ts.map +1 -0
- package/lib/types/dsh-adapter/status.js +234 -0
- package/lib/types/dsh-adapter/workspaces.d.ts +16 -5
- package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.js +287 -170
- package/lib/types/extensions.d.ts +13 -0
- package/lib/types/extensions.d.ts.map +1 -0
- package/lib/types/extensions.js +21 -0
- package/lib/types/force-production-react.d.ts +1 -0
- package/lib/types/force-production-react.d.ts.map +1 -0
- package/lib/types/force-production-react.js +12 -0
- package/lib/types/i18n.d.ts +174 -20
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +56 -6
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +1 -0
- package/lib/types/ink/components/App.d.ts +2 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +4 -0
- package/lib/types/ink/ink.d.ts +31 -3
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +90 -5
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +225 -56
- package/lib/types/ink/output.d.ts +35 -2
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +281 -14
- 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/screen.d.ts +39 -0
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/screen.js +117 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +26 -6
- package/lib/types/ink/wrapAnsi.d.ts +1 -1
- package/lib/types/ink/wrapAnsi.d.ts.map +1 -1
- package/lib/types/ink/wrapAnsi.js +29 -2
- package/lib/types/plugin-host.d.ts +15 -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 +252 -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 +79 -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 +138 -0
- package/lib/types/scenes.d.ts +2 -1
- package/lib/types/scenes.d.ts.map +1 -1
- package/lib/types/scenes.js +1 -1
- 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 +173 -49
- package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
- package/lib/types/screens/SessionBrowser.js +10 -3
- package/lib/types/sessions/view.d.ts +3 -2
- package/lib/types/sessions/view.d.ts.map +1 -1
- package/lib/types/sessions/view.js +18 -0
- package/lib/types/settings-sections.d.ts +2 -1
- package/lib/types/settings-sections.d.ts.map +1 -1
- package/lib/types/settings-sections.js +1 -1
- 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/execFileNoThrow.d.ts.map +1 -1
- package/lib/types/utils/execFileNoThrow.js +3 -0
- 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/lib/types/workspaces.d.ts +2 -1
- package/lib/types/workspaces.d.ts.map +1 -1
- package/lib/types/workspaces.js +1 -1
- package/node_modules/@dsh-std/command/CHANGELOG.md +8 -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/CHANGELOG.md +8 -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 +258 -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/CHANGELOG.md +8 -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/CHANGELOG.md +9 -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/CHANGELOG.md +8 -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/CHANGELOG.md +9 -0
- package/node_modules/@dsh-std/presentation/LICENSE +21 -0
- package/node_modules/@dsh-std/presentation/README.md +27 -0
- package/node_modules/@dsh-std/presentation/README.zh.md +29 -0
- package/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
- package/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
- package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
- package/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -0
- package/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
- package/node_modules/@dsh-std/presentation/lib/index.js +550 -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 +25 -0
- package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -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 +110 -70
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
- 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 +258 -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/CHANGELOG.md +8 -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/CHANGELOG.md +9 -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/CHANGELOG.md +9 -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 +27 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -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 +550 -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 +25 -0
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -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/CHANGELOG.md +8 -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/CHANGELOG.md +8 -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/CHANGELOG.md +8 -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 +258 -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/CHANGELOG.md +8 -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/CHANGELOG.md +8 -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/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { defineProtocolDeclaration, validateProtocolDeclaration } from "@dsh-std/core";
|
|
2
|
+
//#region src/model.ts
|
|
3
|
+
const CONNECTION_API_VERSION = "connection.dsh/v1alpha1";
|
|
4
|
+
function createEndpointOffer(endpoint, revision, declarations) {
|
|
5
|
+
validateEndpoint(endpoint);
|
|
6
|
+
validateOfferRevision(revision);
|
|
7
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8
|
+
const normalized = declarations.map((declaration) => defineProtocolDeclaration(declaration));
|
|
9
|
+
for (const declaration of normalized) {
|
|
10
|
+
if (seen.has(declaration.participant.id)) throw new TypeError(`duplicate endpoint participant ${JSON.stringify(declaration.participant.id)}`);
|
|
11
|
+
seen.add(declaration.participant.id);
|
|
12
|
+
}
|
|
13
|
+
return Object.freeze({
|
|
14
|
+
apiVersion: CONNECTION_API_VERSION,
|
|
15
|
+
kind: "ConnectionOffer",
|
|
16
|
+
endpoint: freezeEndpoint(endpoint),
|
|
17
|
+
revision,
|
|
18
|
+
declarations: Object.freeze(normalized)
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function validateEndpointOffer(offer) {
|
|
22
|
+
if (offer.apiVersion !== "connection.dsh/v1alpha1" || offer.kind !== "ConnectionOffer") throw new TypeError("endpoint offer version or kind is unsupported");
|
|
23
|
+
validateEndpoint(offer.endpoint);
|
|
24
|
+
validateOfferRevision(offer.revision);
|
|
25
|
+
if (!Array.isArray(offer.declarations)) throw new TypeError("endpoint offer declarations must be an array");
|
|
26
|
+
const seen = /* @__PURE__ */ new Set();
|
|
27
|
+
for (const declaration of offer.declarations) {
|
|
28
|
+
validateProtocolDeclaration(declaration);
|
|
29
|
+
if (seen.has(declaration.participant.id)) throw new TypeError(`duplicate endpoint participant ${JSON.stringify(declaration.participant.id)}`);
|
|
30
|
+
seen.add(declaration.participant.id);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function freezeEndpoint(endpoint) {
|
|
34
|
+
return Object.freeze({
|
|
35
|
+
id: endpoint.id,
|
|
36
|
+
instanceId: endpoint.instanceId
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function validatePlanCoordinates(connectionId, revision) {
|
|
40
|
+
nonEmpty(connectionId, "connectionId");
|
|
41
|
+
if (!Number.isSafeInteger(revision) || revision < 1) throw new TypeError("connection revision must be a positive safe integer");
|
|
42
|
+
}
|
|
43
|
+
function validateEndpoint(endpoint) {
|
|
44
|
+
nonEmpty(endpoint.id, "endpoint.id");
|
|
45
|
+
nonEmpty(endpoint.instanceId, "endpoint.instanceId");
|
|
46
|
+
}
|
|
47
|
+
function validateOfferRevision(revision) {
|
|
48
|
+
if (!Number.isSafeInteger(revision) || revision < 0) throw new TypeError("offer revision must be a non-negative safe integer");
|
|
49
|
+
}
|
|
50
|
+
function nonEmpty(value, label) {
|
|
51
|
+
if (typeof value !== "string" || value.trim() === "") throw new TypeError(`${label} must be a non-empty string`);
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/connection.ts
|
|
55
|
+
var ConnectionInvocationError = class extends Error {
|
|
56
|
+
code;
|
|
57
|
+
constructor(code, message, options) {
|
|
58
|
+
super(message, options);
|
|
59
|
+
this.code = code;
|
|
60
|
+
this.name = "ConnectionInvocationError";
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/rpc.ts
|
|
65
|
+
/** Reusable RPC-shaped protocol definition. Domain packages opt into these semantics explicitly. */
|
|
66
|
+
function defineCapabilityProtocol(options) {
|
|
67
|
+
const definition = {
|
|
68
|
+
apiVersion: options.apiVersion,
|
|
69
|
+
kind: options.kind,
|
|
70
|
+
...options.accepts === void 0 ? {} : { accepts: Object.freeze([...options.accepts]) },
|
|
71
|
+
validateRequirement: options.validateRequirement ?? ((value) => value),
|
|
72
|
+
validateSupport: options.validateSupport ?? ((value) => value),
|
|
73
|
+
negotiate(input) {
|
|
74
|
+
const issues = [];
|
|
75
|
+
const bindings = [];
|
|
76
|
+
const connectionPolicy = isConnectionPolicy(input.policy) ? input.policy : void 0;
|
|
77
|
+
for (const row of input.requirements) {
|
|
78
|
+
const consumerEndpoint = connectionPolicy?.endpointByParticipant[row.participant];
|
|
79
|
+
const providers = input.supports.filter((candidate) => candidate.participant !== row.participant && (consumerEndpoint === void 0 || connectionPolicy?.endpointByParticipant[candidate.participant] !== consumerEndpoint));
|
|
80
|
+
if (providers.length === 0) {
|
|
81
|
+
issues.push(Object.freeze({
|
|
82
|
+
code: row.requirement.optional === true ? "optional-support-missing" : "required-support-missing",
|
|
83
|
+
severity: row.requirement.optional === true ? "warning" : "error",
|
|
84
|
+
participant: row.participant,
|
|
85
|
+
message: `no participant supports ${row.requirement.apiVersion} ${row.requirement.kind}`
|
|
86
|
+
}));
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (providers.length > 1 && options.multipleProviders !== true) {
|
|
90
|
+
issues.push(Object.freeze({
|
|
91
|
+
code: "support-ambiguous",
|
|
92
|
+
severity: "error",
|
|
93
|
+
participant: row.participant,
|
|
94
|
+
message: `multiple participants support ${row.requirement.apiVersion} ${row.requirement.kind}`
|
|
95
|
+
}));
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
for (const provider of options.multipleProviders === true ? providers : providers.slice(0, 1)) bindings.push(Object.freeze({
|
|
99
|
+
consumer: row.participant,
|
|
100
|
+
provider: provider.participant,
|
|
101
|
+
requirement: row.requirement,
|
|
102
|
+
support: provider.support
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
agreement: Object.freeze({
|
|
107
|
+
kind: "CapabilityBindings",
|
|
108
|
+
bindings: Object.freeze(bindings)
|
|
109
|
+
}),
|
|
110
|
+
issues: Object.freeze(issues)
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
return Object.freeze(definition);
|
|
115
|
+
}
|
|
116
|
+
function isConnectionPolicy(value) {
|
|
117
|
+
return typeof value === "object" && value !== null && typeof value.endpointByParticipant === "object" && value.endpointByParticipant !== null;
|
|
118
|
+
}
|
|
119
|
+
function isCapabilityAgreement(value) {
|
|
120
|
+
return typeof value === "object" && value !== null && value.kind === "CapabilityBindings" && Array.isArray(value.bindings);
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/resolve.ts
|
|
124
|
+
function resolveConnection(left, right, options) {
|
|
125
|
+
validateEndpointOffer(left);
|
|
126
|
+
validateEndpointOffer(right);
|
|
127
|
+
validatePlanCoordinates(options.connectionId, options.revision);
|
|
128
|
+
if (left.endpoint.instanceId === right.endpoint.instanceId) throw new TypeError("connection endpoints must have distinct instanceId values");
|
|
129
|
+
const owner = participantOwners(left, right);
|
|
130
|
+
const endpointByParticipant = Object.freeze(Object.fromEntries([...owner.entries()].map(([participant, row]) => [participant, row.endpoint.instanceId])));
|
|
131
|
+
const policy = Object.freeze({
|
|
132
|
+
endpointByParticipant,
|
|
133
|
+
...options.policy === void 0 ? {} : { protocol: options.policy }
|
|
134
|
+
});
|
|
135
|
+
const report = options.protocols.negotiate([...left.declarations, ...right.declarations], policy);
|
|
136
|
+
const bindings = [];
|
|
137
|
+
for (const protocol of report.protocols) {
|
|
138
|
+
if (!isCapabilityAgreement(protocol.agreement)) continue;
|
|
139
|
+
for (const draft of protocol.agreement.bindings) {
|
|
140
|
+
const consumer = owner.get(draft.consumer);
|
|
141
|
+
const provider = owner.get(draft.provider);
|
|
142
|
+
if (consumer === void 0 || provider === void 0) continue;
|
|
143
|
+
bindings.push(Object.freeze({
|
|
144
|
+
bindingId: "",
|
|
145
|
+
agreementId: `${protocol.apiVersion}:${protocol.kind}`,
|
|
146
|
+
planRevision: options.revision,
|
|
147
|
+
consumer,
|
|
148
|
+
provider,
|
|
149
|
+
requirement: Object.freeze({ ...draft.requirement }),
|
|
150
|
+
support: Object.freeze({ ...draft.support })
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
bindings.sort((a, b) => a.consumer.participantId.localeCompare(b.consumer.participantId) || a.requirement.apiVersion.localeCompare(b.requirement.apiVersion) || a.requirement.kind.localeCompare(b.requirement.kind) || a.provider.participantId.localeCompare(b.provider.participantId));
|
|
155
|
+
const numbered = bindings.map((binding, index) => Object.freeze({
|
|
156
|
+
...binding,
|
|
157
|
+
bindingId: `binding-${String(index + 1)}`
|
|
158
|
+
}));
|
|
159
|
+
const issues = Object.freeze(report.issues.map((row) => connectionIssue(row, owner)));
|
|
160
|
+
const coordinates = Object.freeze([Object.freeze({
|
|
161
|
+
endpoint: freezeEndpoint(left.endpoint),
|
|
162
|
+
revision: left.revision
|
|
163
|
+
}), Object.freeze({
|
|
164
|
+
endpoint: freezeEndpoint(right.endpoint),
|
|
165
|
+
revision: right.revision
|
|
166
|
+
})]);
|
|
167
|
+
const digest = planDigest({
|
|
168
|
+
connectionId: options.connectionId,
|
|
169
|
+
revision: options.revision,
|
|
170
|
+
offers: coordinates,
|
|
171
|
+
protocols: report.protocols
|
|
172
|
+
});
|
|
173
|
+
return Object.freeze({
|
|
174
|
+
apiVersion: CONNECTION_API_VERSION,
|
|
175
|
+
kind: "ConnectionAgreement",
|
|
176
|
+
connectionId: options.connectionId,
|
|
177
|
+
revision: options.revision,
|
|
178
|
+
digest,
|
|
179
|
+
offers: coordinates,
|
|
180
|
+
compatible: report.compatible,
|
|
181
|
+
protocols: report.protocols,
|
|
182
|
+
bindings: Object.freeze(numbered),
|
|
183
|
+
issues
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
function planDigest(value) {
|
|
187
|
+
const input = canonical(value);
|
|
188
|
+
let hash = 2166136261;
|
|
189
|
+
for (let index = 0; index < input.length; index += 1) hash = Math.imul(hash ^ input.charCodeAt(index), 16777619);
|
|
190
|
+
return `fnv1a32:${(hash >>> 0).toString(16).padStart(8, "0")}`;
|
|
191
|
+
}
|
|
192
|
+
function canonical(value) {
|
|
193
|
+
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
194
|
+
if (typeof value === "object" && value !== null) return `{${Object.entries(value).sort(([a], [b]) => a.localeCompare(b)).map(([key, item]) => `${JSON.stringify(key)}:${canonical(item)}`).join(",")}}`;
|
|
195
|
+
return JSON.stringify(value);
|
|
196
|
+
}
|
|
197
|
+
function participantOwners(left, right) {
|
|
198
|
+
const owners = /* @__PURE__ */ new Map();
|
|
199
|
+
for (const offer of [left, right]) for (const declaration of offer.declarations) {
|
|
200
|
+
if (owners.has(declaration.participant.id)) throw new TypeError(`participant ${JSON.stringify(declaration.participant.id)} appears in both endpoint offers`);
|
|
201
|
+
owners.set(declaration.participant.id, Object.freeze({
|
|
202
|
+
endpoint: freezeEndpoint(offer.endpoint),
|
|
203
|
+
participantId: declaration.participant.id
|
|
204
|
+
}));
|
|
205
|
+
}
|
|
206
|
+
return owners;
|
|
207
|
+
}
|
|
208
|
+
function connectionIssue(issue, owners) {
|
|
209
|
+
return Object.freeze({
|
|
210
|
+
severity: issue.severity,
|
|
211
|
+
code: issue.code,
|
|
212
|
+
...issue.participant === void 0 ? {} : { participant: owners.get(issue.participant) ?? Object.freeze({
|
|
213
|
+
endpoint: Object.freeze({
|
|
214
|
+
id: "unknown",
|
|
215
|
+
instanceId: "unknown"
|
|
216
|
+
}),
|
|
217
|
+
participantId: issue.participant
|
|
218
|
+
}) },
|
|
219
|
+
...issue.path === void 0 ? {} : { path: issue.path },
|
|
220
|
+
message: issue.message
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
//#endregion
|
|
224
|
+
export { CONNECTION_API_VERSION as a, validateEndpointOffer as c, ConnectionInvocationError as i, validatePlanCoordinates as l, defineCapabilityProtocol as n, createEndpointOffer as o, isCapabilityAgreement as r, freezeEndpoint as s, resolveConnection as t };
|
|
225
|
+
|
|
226
|
+
//# sourceMappingURL=resolve-3X6ausgz.js.map
|
package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-3X6ausgz.js","names":[],"sources":["../src/model.ts","../src/connection.ts","../src/rpc.ts","../src/resolve.ts"],"sourcesContent":["import type {\n NegotiatedProtocol,\n ProtocolDeclaration,\n ProtocolRequirement,\n ProtocolSupport,\n} from '@dsh-std/core'\nimport type { ProtocolCatalog } from '@dsh-std/core'\nimport { defineProtocolDeclaration, validateProtocolDeclaration } from '@dsh-std/core'\n\nexport const CONNECTION_API_VERSION = 'connection.dsh/v1alpha1'\n\nexport interface EndpointIdentity {\n readonly id: string\n readonly instanceId: string\n}\n\nexport interface EndpointOffer {\n readonly apiVersion: typeof CONNECTION_API_VERSION\n readonly kind: 'ConnectionOffer'\n readonly endpoint: EndpointIdentity\n readonly revision: number\n readonly declarations: readonly ProtocolDeclaration[]\n}\n\nexport interface ConnectionEndpointReference extends EndpointIdentity {}\n\nexport interface CapabilityParticipant {\n readonly endpoint: ConnectionEndpointReference\n readonly participantId: string\n}\n\nexport interface CapabilityBinding {\n readonly bindingId: string\n readonly agreementId: string\n readonly planRevision: number\n readonly consumer: CapabilityParticipant\n readonly provider: CapabilityParticipant\n readonly requirement: ProtocolRequirement\n readonly support: ProtocolSupport\n}\n\nexport interface ConnectionIssue {\n readonly severity: 'error' | 'warning'\n readonly code: string\n readonly participant?: CapabilityParticipant\n readonly path?: string\n readonly message: string\n}\n\nexport interface ConnectionPlan {\n readonly apiVersion: typeof CONNECTION_API_VERSION\n readonly kind: 'ConnectionAgreement'\n readonly connectionId: string\n readonly revision: number\n readonly digest: string\n readonly offers: readonly {\n readonly endpoint: ConnectionEndpointReference\n readonly revision: number\n }[]\n readonly compatible: boolean\n readonly protocols: readonly NegotiatedProtocol[]\n readonly bindings: readonly CapabilityBinding[]\n readonly issues: readonly ConnectionIssue[]\n}\n\nexport interface ResolveConnectionOptions {\n readonly connectionId: string\n readonly revision: number\n readonly protocols: ProtocolCatalog\n readonly policy?: unknown\n}\n\n/** Policy envelope supplied to definitions while evaluating a pair of endpoint offers. */\nexport interface ConnectionNegotiationPolicy {\n readonly endpointByParticipant: Readonly<Record<string, string>>\n readonly protocol?: unknown\n}\n\nexport function createEndpointOffer(\n endpoint: EndpointIdentity,\n revision: number,\n declarations: readonly ProtocolDeclaration[],\n): EndpointOffer {\n validateEndpoint(endpoint)\n validateOfferRevision(revision)\n const seen = new Set<string>()\n const normalized = declarations.map(declaration => defineProtocolDeclaration(declaration))\n for (const declaration of normalized) {\n if (seen.has(declaration.participant.id)) throw new TypeError(`duplicate endpoint participant ${JSON.stringify(declaration.participant.id)}`)\n seen.add(declaration.participant.id)\n }\n return Object.freeze({\n apiVersion: CONNECTION_API_VERSION,\n kind: 'ConnectionOffer',\n endpoint: freezeEndpoint(endpoint),\n revision,\n declarations: Object.freeze(normalized),\n })\n}\n\nexport function validateEndpointOffer(offer: EndpointOffer): void {\n if (offer.apiVersion !== CONNECTION_API_VERSION || offer.kind !== 'ConnectionOffer') throw new TypeError('endpoint offer version or kind is unsupported')\n validateEndpoint(offer.endpoint)\n validateOfferRevision(offer.revision)\n if (!Array.isArray(offer.declarations)) throw new TypeError('endpoint offer declarations must be an array')\n const seen = new Set<string>()\n for (const declaration of offer.declarations) {\n validateProtocolDeclaration(declaration)\n if (seen.has(declaration.participant.id)) throw new TypeError(`duplicate endpoint participant ${JSON.stringify(declaration.participant.id)}`)\n seen.add(declaration.participant.id)\n }\n}\n\nexport function freezeEndpoint(endpoint: EndpointIdentity): ConnectionEndpointReference {\n return Object.freeze({ id: endpoint.id, instanceId: endpoint.instanceId })\n}\n\nexport function validatePlanCoordinates(connectionId: string, revision: number): void {\n nonEmpty(connectionId, 'connectionId')\n if (!Number.isSafeInteger(revision) || revision < 1) throw new TypeError('connection revision must be a positive safe integer')\n}\n\nfunction validateEndpoint(endpoint: EndpointIdentity): void {\n nonEmpty(endpoint.id, 'endpoint.id')\n nonEmpty(endpoint.instanceId, 'endpoint.instanceId')\n}\n\nfunction validateOfferRevision(revision: number): void {\n if (!Number.isSafeInteger(revision) || revision < 0) throw new TypeError('offer revision must be a non-negative safe integer')\n}\n\nfunction nonEmpty(value: string, label: string): void {\n if (typeof value !== 'string' || value.trim() === '') throw new TypeError(`${label} must be a non-empty string`)\n}\n","import type { ApiReference, ProtocolSupport } from '@dsh-std/core'\nimport type { CapabilityBinding, ConnectionEndpointReference, ConnectionPlan, EndpointOffer } from './model.js'\n\nexport interface CapabilityHandlerContext<TProgress = unknown> {\n readonly connectionId: string\n readonly planRevision: number\n readonly invocationId: string\n readonly binding: CapabilityBinding\n readonly signal: AbortSignal\n progress(value: TProgress): void\n}\n\nexport type CapabilityHandler<TInput = unknown, TOutput = unknown, TProgress = unknown> = (\n operation: string, input: TInput, context: CapabilityHandlerContext<TProgress>,\n) => TOutput | Promise<TOutput>\n\nexport interface CapabilityImplementation<TInput = unknown, TOutput = unknown, TProgress = unknown> {\n readonly participantId: string\n readonly protocol: ProtocolSupport\n readonly handle: CapabilityHandler<TInput, TOutput, TProgress>\n}\n\nexport interface CapabilityDispatch<TInput = unknown, TProgress = unknown> {\n readonly connectionId: string\n readonly planRevision: number\n readonly invocationId: string\n readonly binding: CapabilityBinding\n readonly operation: string\n readonly input: TInput\n readonly signal: AbortSignal\n progress(value: TProgress): void\n}\n\nexport interface ConnectionEndpoint {\n readonly offer: EndpointOffer\n dispatch<TInput = unknown, TOutput = unknown, TProgress = unknown>(invocation: CapabilityDispatch<TInput, TProgress>): Promise<TOutput>\n onOfferChange(listener: (offer: EndpointOffer) => void): () => void\n}\n\nexport interface CapabilityCall<TOutput = unknown, TProgress = unknown> {\n readonly invocationId: string\n readonly result: Promise<TOutput>\n readonly progress: AsyncIterable<TProgress>\n cancel(reason?: string): void\n}\n\nexport interface CapabilityClient {\n readonly participantId: string\n binding(reference: ApiReference): CapabilityBinding | undefined\n invoke<TInput = unknown, TOutput = unknown, TProgress = unknown>(\n reference: ApiReference,\n operation: string,\n input: TInput,\n options?: { readonly signal?: AbortSignal },\n ): CapabilityCall<TOutput, TProgress>\n}\n\nexport interface StandardConnection {\n readonly id: string\n readonly local: ConnectionEndpointReference\n readonly remote: ConnectionEndpointReference\n readonly plan: ConnectionPlan\n client(participantId: string): CapabilityClient\n onPlanChange(listener: (plan: ConnectionPlan) => void): () => void\n close(reason?: string): void | Promise<void>\n}\n\nexport class ConnectionInvocationError extends Error {\n constructor(\n readonly code: 'connection-closed' | 'capability-unbound' | 'handler-missing' | 'cancelled' | 'handler-failed',\n message: string,\n options?: ErrorOptions,\n ) {\n super(message, options)\n this.name = 'ConnectionInvocationError'\n }\n}\n","import type {\n ProtocolDefinition,\n ProtocolIssue,\n ProtocolRequirement,\n ProtocolSupport,\n} from '@dsh-std/core'\nimport type { ConnectionNegotiationPolicy } from './model.js'\n\nexport interface CapabilityBindingDraft {\n readonly consumer: string\n readonly provider: string\n readonly requirement: ProtocolRequirement\n readonly support: ProtocolSupport\n}\n\nexport interface CapabilityAgreement {\n readonly kind: 'CapabilityBindings'\n readonly bindings: readonly CapabilityBindingDraft[]\n}\n\nexport interface CapabilityProtocolOptions {\n readonly apiVersion: string\n readonly kind: string\n readonly accepts?: readonly string[]\n readonly multipleProviders?: boolean\n validateRequirement?(spec: unknown): unknown\n validateSupport?(spec: unknown): unknown\n}\n\n/** Reusable RPC-shaped protocol definition. Domain packages opt into these semantics explicitly. */\nexport function defineCapabilityProtocol(options: CapabilityProtocolOptions): ProtocolDefinition {\n const definition: ProtocolDefinition = {\n apiVersion: options.apiVersion,\n kind: options.kind,\n ...(options.accepts === undefined ? {} : { accepts: Object.freeze([...options.accepts]) }),\n validateRequirement: options.validateRequirement ?? ((value: unknown) => value),\n validateSupport: options.validateSupport ?? ((value: unknown) => value),\n negotiate(input) {\n const issues: ProtocolIssue[] = []\n const bindings: CapabilityBindingDraft[] = []\n const connectionPolicy = isConnectionPolicy(input.policy) ? input.policy : undefined\n for (const row of input.requirements) {\n const consumerEndpoint = connectionPolicy?.endpointByParticipant[row.participant]\n const providers = input.supports.filter(candidate =>\n candidate.participant !== row.participant\n && (consumerEndpoint === undefined\n || connectionPolicy?.endpointByParticipant[candidate.participant] !== consumerEndpoint),\n )\n if (providers.length === 0) {\n issues.push(Object.freeze({\n code: row.requirement.optional === true ? 'optional-support-missing' : 'required-support-missing',\n severity: row.requirement.optional === true ? 'warning' : 'error',\n participant: row.participant,\n message: `no participant supports ${row.requirement.apiVersion} ${row.requirement.kind}`,\n }))\n continue\n }\n if (providers.length > 1 && options.multipleProviders !== true) {\n issues.push(Object.freeze({\n code: 'support-ambiguous', severity: 'error', participant: row.participant,\n message: `multiple participants support ${row.requirement.apiVersion} ${row.requirement.kind}`,\n }))\n continue\n }\n for (const provider of options.multipleProviders === true ? providers : providers.slice(0, 1)) {\n bindings.push(Object.freeze({\n consumer: row.participant,\n provider: provider.participant,\n requirement: row.requirement,\n support: provider.support,\n }))\n }\n }\n return {\n agreement: Object.freeze({ kind: 'CapabilityBindings' as const, bindings: Object.freeze(bindings) }),\n issues: Object.freeze(issues),\n }\n },\n }\n return Object.freeze(definition)\n}\n\nfunction isConnectionPolicy(value: unknown): value is ConnectionNegotiationPolicy {\n return typeof value === 'object' && value !== null\n && typeof (value as { endpointByParticipant?: unknown }).endpointByParticipant === 'object'\n && (value as { endpointByParticipant?: unknown }).endpointByParticipant !== null\n}\n\nexport function isCapabilityAgreement(value: unknown): value is CapabilityAgreement {\n return typeof value === 'object' && value !== null\n && (value as { kind?: unknown }).kind === 'CapabilityBindings'\n && Array.isArray((value as { bindings?: unknown }).bindings)\n}\n","import type { ProtocolIssue } from '@dsh-std/core'\nimport {\n CONNECTION_API_VERSION,\n freezeEndpoint,\n validateEndpointOffer,\n validatePlanCoordinates,\n type CapabilityBinding,\n type CapabilityParticipant,\n type ConnectionIssue,\n type ConnectionPlan,\n type ConnectionNegotiationPolicy,\n type EndpointOffer,\n type ResolveConnectionOptions,\n} from './model.js'\nimport { isCapabilityAgreement } from './rpc.js'\n\nexport function resolveConnection(left: EndpointOffer, right: EndpointOffer, options: ResolveConnectionOptions): ConnectionPlan {\n validateEndpointOffer(left)\n validateEndpointOffer(right)\n validatePlanCoordinates(options.connectionId, options.revision)\n if (left.endpoint.instanceId === right.endpoint.instanceId) throw new TypeError('connection endpoints must have distinct instanceId values')\n\n const owner = participantOwners(left, right)\n const endpointByParticipant = Object.freeze(Object.fromEntries(\n [...owner.entries()].map(([participant, row]) => [participant, row.endpoint.instanceId]),\n ))\n const policy: ConnectionNegotiationPolicy = Object.freeze({\n endpointByParticipant,\n ...(options.policy === undefined ? {} : { protocol: options.policy }),\n })\n const report = options.protocols.negotiate([...left.declarations, ...right.declarations], policy)\n const bindings: CapabilityBinding[] = []\n for (const protocol of report.protocols) {\n if (!isCapabilityAgreement(protocol.agreement)) continue\n for (const draft of protocol.agreement.bindings) {\n const consumer = owner.get(draft.consumer)\n const provider = owner.get(draft.provider)\n if (consumer === undefined || provider === undefined) continue\n bindings.push(Object.freeze({\n bindingId: '', agreementId: `${protocol.apiVersion}:${protocol.kind}`,\n planRevision: options.revision,\n consumer, provider,\n requirement: Object.freeze({ ...draft.requirement }),\n support: Object.freeze({ ...draft.support }),\n }))\n }\n }\n bindings.sort((a, b) => a.consumer.participantId.localeCompare(b.consumer.participantId)\n || a.requirement.apiVersion.localeCompare(b.requirement.apiVersion)\n || a.requirement.kind.localeCompare(b.requirement.kind)\n || a.provider.participantId.localeCompare(b.provider.participantId))\n const numbered = bindings.map((binding, index) => Object.freeze({ ...binding, bindingId: `binding-${String(index + 1)}` }))\n const issues = Object.freeze(report.issues.map(row => connectionIssue(row, owner)))\n const coordinates = Object.freeze([\n Object.freeze({ endpoint: freezeEndpoint(left.endpoint), revision: left.revision }),\n Object.freeze({ endpoint: freezeEndpoint(right.endpoint), revision: right.revision }),\n ])\n const digest = planDigest({ connectionId: options.connectionId, revision: options.revision, offers: coordinates, protocols: report.protocols })\n return Object.freeze({\n apiVersion: CONNECTION_API_VERSION,\n kind: 'ConnectionAgreement',\n connectionId: options.connectionId,\n revision: options.revision,\n digest,\n offers: coordinates,\n compatible: report.compatible,\n protocols: report.protocols,\n bindings: Object.freeze(numbered),\n issues,\n })\n}\n\nfunction planDigest(value: unknown): string {\n const input = canonical(value)\n let hash = 2166136261\n for (let index = 0; index < input.length; index += 1) hash = Math.imul(hash ^ input.charCodeAt(index), 16777619)\n return `fnv1a32:${(hash >>> 0).toString(16).padStart(8, '0')}`\n}\n\nfunction canonical(value: unknown): string {\n if (Array.isArray(value)) return `[${value.map(canonical).join(',')}]`\n if (typeof value === 'object' && value !== null) {\n return `{${Object.entries(value).sort(([a], [b]) => a.localeCompare(b)).map(([key, item]) => `${JSON.stringify(key)}:${canonical(item)}`).join(',')}}`\n }\n return JSON.stringify(value)\n}\n\nfunction participantOwners(left: EndpointOffer, right: EndpointOffer): Map<string, CapabilityParticipant> {\n const owners = new Map<string, CapabilityParticipant>()\n for (const offer of [left, right]) {\n for (const declaration of offer.declarations) {\n if (owners.has(declaration.participant.id)) throw new TypeError(`participant ${JSON.stringify(declaration.participant.id)} appears in both endpoint offers`)\n owners.set(declaration.participant.id, Object.freeze({\n endpoint: freezeEndpoint(offer.endpoint), participantId: declaration.participant.id,\n }))\n }\n }\n return owners\n}\n\nfunction connectionIssue(issue: ProtocolIssue, owners: ReadonlyMap<string, CapabilityParticipant>): ConnectionIssue {\n return Object.freeze({\n severity: issue.severity,\n code: issue.code,\n ...(issue.participant === undefined ? {} : {\n participant: owners.get(issue.participant) ?? Object.freeze({\n endpoint: Object.freeze({ id: 'unknown', instanceId: 'unknown' }), participantId: issue.participant,\n }),\n }),\n ...(issue.path === undefined ? {} : { path: issue.path }),\n message: issue.message,\n })\n}\n"],"mappings":";;AASA,MAAa,yBAAyB;AAqEtC,SAAgB,oBACd,UACA,UACA,cACe;CACf,iBAAiB,QAAQ;CACzB,sBAAsB,QAAQ;CAC9B,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,aAAa,aAAa,KAAI,gBAAe,0BAA0B,WAAW,CAAC;CACzF,KAAK,MAAM,eAAe,YAAY;EACpC,IAAI,KAAK,IAAI,YAAY,YAAY,EAAE,GAAG,MAAM,IAAI,UAAU,kCAAkC,KAAK,UAAU,YAAY,YAAY,EAAE,GAAG;EAC5I,KAAK,IAAI,YAAY,YAAY,EAAE;CACrC;CACA,OAAO,OAAO,OAAO;EACnB,YAAY;EACZ,MAAM;EACN,UAAU,eAAe,QAAQ;EACjC;EACA,cAAc,OAAO,OAAO,UAAU;CACxC,CAAC;AACH;AAEA,SAAgB,sBAAsB,OAA4B;CAChE,IAAI,MAAM,eAAA,6BAAyC,MAAM,SAAS,mBAAmB,MAAM,IAAI,UAAU,+CAA+C;CACxJ,iBAAiB,MAAM,QAAQ;CAC/B,sBAAsB,MAAM,QAAQ;CACpC,IAAI,CAAC,MAAM,QAAQ,MAAM,YAAY,GAAG,MAAM,IAAI,UAAU,8CAA8C;CAC1G,MAAM,uBAAO,IAAI,IA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ACH;EACA,GAAI,MAAM,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM,MAAM,KAAK;EACvD,SAAS,MAAM;CACjB,CAAC;AACH"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dsh-std/connection",
|
|
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
|
+
".": { "types": "./lib/index.d.ts", "default": "./lib/index.js" },
|
|
10
|
+
"./memory": { "types": "./lib/memory.d.ts", "default": "./lib/memory.js" }
|
|
11
|
+
},
|
|
12
|
+
"files": ["lib", "CHANGELOG.md"],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "pnpm run typecheck && tsdown",
|
|
15
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
16
|
+
"test": "vitest run"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": { "@dsh-std/core": "workspace:*" },
|
|
19
|
+
"engines": { "node": "^22.19 || >=24" }
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Changes to `@dsh-std/core` are recorded here.
|
|
4
|
+
|
|
5
|
+
## 0.1.0 (draft)
|
|
6
|
+
|
|
7
|
+
- Defined protocol coordinates, participant declarations, definition catalogs, and negotiation reports.
|
|
8
|
+
- Separated evaluator knowledge, requirements, potential support, and live support.
|
|
@@ -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,13 @@
|
|
|
1
|
+
# @dsh-std/core
|
|
2
|
+
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
The minimal meta-protocol for protocol declarations, definition registration, and negotiation. See the [Core Meta-protocol proposal](../../docs/proposals/core.zh.md).
|
|
6
|
+
|
|
7
|
+
Core understands only `apiVersion`, `kind`, participants, requirements, supports, protocol definitions, and their agreements. It does not prescribe resources, capabilities, providers, execution planes, locality, endpoints, or plugin lifecycle.
|
|
8
|
+
|
|
9
|
+
A `ProtocolCatalog` belongs to an evaluator. Each protocol definition explicitly lists accepted API versions, validates requirement/support `spec` values, and owns its negotiation logic. Core neither infers compatibility from a shared major version nor treats an installed definition as a live implementation.
|
|
10
|
+
|
|
11
|
+
`defineProtocolDeclaration()` validates and freezes the requirements and supports currently published by one participant. Static component bounds belong to `@dsh-std/manifest`, selection to `@dsh-std/composition`, activation and the publication barrier to `@dsh-std/lifecycle`, and cross-endpoint offers to `@dsh-std/connection`.
|
|
12
|
+
|
|
13
|
+
Provider selection, multi-party merging, catalogs, invocation bindings, and UI semantics remain owned by their protocol definitions or domain packages.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @dsh-std/core
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
协议声明、definition 注册与协商的最小元协议。设计见 [Core Meta-protocol](../../docs/proposals/core.zh.md)。
|
|
6
|
+
|
|
7
|
+
Core 只认识 `apiVersion`、`kind`、participant、requirement、support、协议 definition 及其 agreement。它不预设 resource、capability、provider、execution plane、locality、endpoint 或插件生命周期。
|
|
8
|
+
|
|
9
|
+
`ProtocolCatalog` 由评估器持有。每个协议 definition 明确列出接受的 API 版本,分别校验 requirement/support 的 `spec`,并拥有自己的协商逻辑。Core 不会从相同主版本推断兼容性,也不会把安装了一份 definition 当作已有 live implementation。
|
|
10
|
+
|
|
11
|
+
`defineProtocolDeclaration()` 校验并冻结一个 participant 当前实际发布的 requirements 与 supports。静态组件上限属于 `@dsh-std/manifest`,选择属于 `@dsh-std/composition`,激活与 publication barrier 属于 `@dsh-std/lifecycle`,跨端点 offer 属于 `@dsh-std/connection`。
|
|
12
|
+
|
|
13
|
+
协议专属的 provider 选择、多项合并、目录、调用绑定和 UI 语义均由相应 definition 或独立协议包定义。
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
//#region src/protocol.d.ts
|
|
2
|
+
/** Domain-neutral protocol identities and live participant declarations. */
|
|
3
|
+
interface ApiReference {
|
|
4
|
+
readonly apiVersion: string;
|
|
5
|
+
readonly kind: string;
|
|
6
|
+
}
|
|
7
|
+
interface ParticipantIdentity {
|
|
8
|
+
/** Unique within the negotiation scope that carries this declaration. */
|
|
9
|
+
readonly id: string;
|
|
10
|
+
}
|
|
11
|
+
interface ProtocolRequirement<Spec = unknown> extends ApiReference {
|
|
12
|
+
readonly optional?: boolean;
|
|
13
|
+
readonly spec?: Spec;
|
|
14
|
+
}
|
|
15
|
+
interface ProtocolSupport<Spec = unknown> extends ApiReference {
|
|
16
|
+
readonly spec?: Spec;
|
|
17
|
+
}
|
|
18
|
+
interface ProtocolDeclaration {
|
|
19
|
+
readonly participant: ParticipantIdentity;
|
|
20
|
+
readonly requires?: readonly ProtocolRequirement[];
|
|
21
|
+
readonly supports?: readonly ProtocolSupport[];
|
|
22
|
+
}
|
|
23
|
+
interface ParsedApiVersion {
|
|
24
|
+
readonly group: string;
|
|
25
|
+
readonly major: number;
|
|
26
|
+
readonly stability: 'alpha' | 'beta' | 'stable';
|
|
27
|
+
readonly revision: number;
|
|
28
|
+
}
|
|
29
|
+
declare function protocolKey(reference: ApiReference): string;
|
|
30
|
+
/** A grouping key only. It does not claim that versions in the family interoperate. */
|
|
31
|
+
declare function protocolFamilyKey(reference: ApiReference): string;
|
|
32
|
+
declare function sameProtocol(left: ApiReference, right: ApiReference): boolean;
|
|
33
|
+
declare function parseApiVersion(value: string): ParsedApiVersion;
|
|
34
|
+
declare function validateApiReference(value: unknown, label?: string): asserts value is ApiReference;
|
|
35
|
+
declare function validateProtocolDeclaration(value: unknown): asserts value is ProtocolDeclaration;
|
|
36
|
+
declare function defineProtocolDeclaration<const T extends ProtocolDeclaration>(declaration: T): T;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/negotiation.d.ts
|
|
39
|
+
interface EvaluatorIdentity {
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly version: string;
|
|
42
|
+
}
|
|
43
|
+
interface ProtocolRequirementEntry<Spec = unknown> {
|
|
44
|
+
readonly participant: string;
|
|
45
|
+
readonly requirement: ProtocolRequirement<Spec>;
|
|
46
|
+
}
|
|
47
|
+
interface ProtocolSupportEntry<Spec = unknown> {
|
|
48
|
+
readonly participant: string;
|
|
49
|
+
readonly support: ProtocolSupport<Spec>;
|
|
50
|
+
}
|
|
51
|
+
interface ProtocolIssue {
|
|
52
|
+
readonly code: string;
|
|
53
|
+
readonly severity: 'error' | 'warning';
|
|
54
|
+
readonly participant?: string;
|
|
55
|
+
readonly path?: string;
|
|
56
|
+
readonly message: string;
|
|
57
|
+
}
|
|
58
|
+
interface ProtocolNegotiationInput<RequirementSpec = unknown, SupportSpec = unknown, Policy = unknown> {
|
|
59
|
+
readonly requirements: readonly ProtocolRequirementEntry<RequirementSpec>[];
|
|
60
|
+
readonly supports: readonly ProtocolSupportEntry<SupportSpec>[];
|
|
61
|
+
readonly policy?: Policy;
|
|
62
|
+
}
|
|
63
|
+
interface ProtocolNegotiationOutcome<Agreement = unknown> {
|
|
64
|
+
readonly agreement?: Agreement;
|
|
65
|
+
readonly issues?: readonly ProtocolIssue[];
|
|
66
|
+
}
|
|
67
|
+
interface ProtocolDefinition<RequirementSpec = unknown, SupportSpec = unknown, Agreement = unknown, Policy = unknown> extends ApiReference {
|
|
68
|
+
/** Every accepted wire/static API version. No compatibility is inferred by core. */
|
|
69
|
+
readonly accepts?: readonly string[];
|
|
70
|
+
validateRequirement(spec: unknown): RequirementSpec;
|
|
71
|
+
validateSupport(spec: unknown): SupportSpec;
|
|
72
|
+
negotiate(input: ProtocolNegotiationInput<RequirementSpec, SupportSpec, Policy>): ProtocolNegotiationOutcome<Agreement>;
|
|
73
|
+
}
|
|
74
|
+
interface NegotiatedProtocol<Agreement = unknown> extends ApiReference {
|
|
75
|
+
readonly participants: readonly string[];
|
|
76
|
+
readonly agreement?: Agreement;
|
|
77
|
+
readonly issues: readonly ProtocolIssue[];
|
|
78
|
+
}
|
|
79
|
+
interface NegotiationReport {
|
|
80
|
+
readonly apiVersion: 'core.dsh/report/v1alpha1';
|
|
81
|
+
readonly evaluator: EvaluatorIdentity;
|
|
82
|
+
readonly compatible: boolean;
|
|
83
|
+
readonly protocols: readonly NegotiatedProtocol[];
|
|
84
|
+
readonly issues: readonly ProtocolIssue[];
|
|
85
|
+
}
|
|
86
|
+
declare class ProtocolCatalog {
|
|
87
|
+
readonly evaluator: EvaluatorIdentity;
|
|
88
|
+
private readonly definitions;
|
|
89
|
+
constructor(evaluator: EvaluatorIdentity);
|
|
90
|
+
register(definition: ProtocolDefinition): () => void;
|
|
91
|
+
list(): readonly ProtocolDefinition[];
|
|
92
|
+
resolve(reference: ApiReference): ProtocolDefinition | undefined;
|
|
93
|
+
understands(reference: ApiReference): boolean;
|
|
94
|
+
negotiate(declarations: readonly ProtocolDeclaration[], policy?: unknown): NegotiationReport;
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/version.d.ts
|
|
98
|
+
interface SemanticVersion {
|
|
99
|
+
readonly major: number;
|
|
100
|
+
readonly minor: number;
|
|
101
|
+
readonly patch: number;
|
|
102
|
+
readonly prerelease: readonly (string | number)[];
|
|
103
|
+
readonly build: readonly string[];
|
|
104
|
+
}
|
|
105
|
+
type VersionRange = string | readonly string[];
|
|
106
|
+
declare function parseSemanticVersion(value: string): SemanticVersion;
|
|
107
|
+
declare function compareSemanticVersions(leftValue: string | SemanticVersion, rightValue: string | SemanticVersion): number;
|
|
108
|
+
declare function assertVersionRange(range: VersionRange): void;
|
|
109
|
+
declare function satisfiesVersionRange(versionValue: string, range: VersionRange): boolean;
|
|
110
|
+
//#endregion
|
|
111
|
+
export { ApiReference, EvaluatorIdentity, NegotiatedProtocol, NegotiationReport, ParsedApiVersion, ParticipantIdentity, ProtocolCatalog, ProtocolDeclaration, ProtocolDefinition, ProtocolIssue, ProtocolNegotiationInput, ProtocolNegotiationOutcome, ProtocolRequirement, ProtocolRequirementEntry, ProtocolSupport, ProtocolSupportEntry, SemanticVersion, VersionRange, assertVersionRange, compareSemanticVersions, defineProtocolDeclaration, parseApiVersion, parseSemanticVersion, protocolFamilyKey, protocolKey, sameProtocol, satisfiesVersionRange, validateApiReference, validateProtocolDeclaration };
|
|
112
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/protocol.ts","../src/negotiation.ts","../src/version.ts"],"mappings":";;UAEiB;WACN;W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