dsh-agent-plugins-market 0.9.0 → 0.9.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 +64 -154
- package/README.zh.md +74 -164
- package/assets/dsh-agent-plugins.png +0 -0
- package/client/client.js +5371 -1085
- package/client/client.js.map +1 -1
- package/lib/index.js +2 -257
- package/lib/{application → packages/market-bundle/src/application}/catalog.js +207 -41
- package/lib/{application → packages/market-bundle/src/application}/details.js +73 -29
- package/lib/packages/market-bundle/src/application/extension-inventory.js +408 -0
- package/lib/packages/market-bundle/src/application/extension-project.js +64 -0
- package/lib/packages/market-bundle/src/application/resource-inventory.js +96 -0
- package/lib/packages/market-bundle/src/application/server-config.js +9 -0
- package/lib/packages/market-bundle/src/application/suite-queries.js +86 -0
- package/lib/packages/market-bundle/src/index.js +372 -0
- package/lib/{runtime/host → packages/market-bundle/src/platform}/feedback-tool.js +2 -2
- package/lib/{runtime/host → packages/market-bundle/src/platform}/settings-namespace.js +55 -7
- package/lib/packages/market-bundle/src/platform/settings-schema.js +25 -0
- package/lib/packages/market-bundle/src/routes-extension-presets.js +161 -0
- package/lib/packages/market-bundle/src/routes-resources.js +127 -0
- package/lib/{routes.js → packages/market-bundle/src/routes.js} +225 -21
- package/lib/packages/market-bundle/src/runtime-adapters.js +57 -0
- package/lib/packages/market-bundle/src/session-extension.js +337 -0
- package/lib/{application → packages/market-catalog/src/application}/catalog-context.js +7 -4
- package/lib/{application → packages/market-catalog/src/application}/install-store.js +3 -3
- package/lib/{application → packages/market-catalog/src/application}/snapshot-cache.js +100 -11
- package/lib/{application → packages/market-catalog/src/application}/source-store.js +24 -11
- package/lib/{application → packages/market-catalog/src/application}/state/state-store.js +1 -1
- package/lib/{application → packages/market-catalog/src/application}/state/storage-migration.js +1 -1
- package/lib/packages/market-catalog/src/index.js +19 -0
- package/lib/{catalog → packages/market-catalog/src/scanning}/archive.js +1 -1
- package/lib/{catalog → packages/market-catalog/src/scanning}/codex-mcp.js +1 -1
- package/lib/{catalog → packages/market-catalog/src/scanning}/component-files.js +2 -2
- package/lib/{catalog → packages/market-catalog/src/scanning}/manifests.js +2 -2
- package/lib/{catalog → packages/market-catalog/src/scanning}/native-project.js +1 -1
- package/lib/{catalog → packages/market-catalog/src/scanning}/paths.js +1 -1
- package/lib/{catalog → packages/market-catalog/src/scanning}/plugin-variables.js +21 -1
- package/lib/{catalog → packages/market-catalog/src/scanning}/scan-resolvers.js +35 -2
- package/lib/{catalog → packages/market-catalog/src/scanning}/skills-parse.js +40 -10
- package/lib/{catalog → packages/market-catalog/src/scanning}/validate.js +15 -2
- package/lib/packages/market-contracts/src/contracts/extension-presets.js +125 -0
- package/lib/{contracts → packages/market-contracts/src/contracts}/market.js +33 -5
- package/lib/packages/market-contracts/src/contracts/mcp-overrides.js +2 -0
- package/lib/packages/market-contracts/src/contracts/resource-window.js +29 -0
- package/lib/packages/market-contracts/src/contracts/settings.js +130 -0
- package/lib/packages/market-contracts/src/contracts/surface-toggles.js +29 -0
- package/lib/packages/market-contracts/src/contracts/translation.js +28 -0
- package/lib/packages/market-contracts/src/index.js +4 -0
- package/lib/{model → packages/market-contracts/src/model}/layouts.js +11 -0
- package/lib/{application → packages/market-contracts/src/ports}/ports.js +3 -0
- package/lib/{application/mcp/mcp-redaction.js → packages/market-contracts/src/redaction.js} +17 -1
- package/lib/{application → packages/market-lsp/src/application}/lsp/lsp-direct-config.js +2 -2
- package/lib/{application → packages/market-lsp/src/application}/lsp/lsp-server-state.js +1 -1
- package/lib/{application → packages/market-lsp/src/application}/lsp/lsp-status.js +20 -3
- package/lib/{application → packages/market-lsp/src/application}/lsp/profile-seam.js +1 -1
- package/lib/packages/market-lsp/src/application/lsp/validation.js +46 -0
- package/lib/{application → packages/market-lsp/src/application}/lsp-service.js +61 -3
- package/lib/packages/market-lsp/src/index.js +8 -0
- package/lib/{runtime → packages/market-lsp/src/runtime}/lsp/lsp-mounts.js +79 -40
- package/lib/{application → packages/market-mcp/src/application}/mcp/mcp-backend.js +0 -16
- package/lib/{application → packages/market-mcp/src/application}/mcp/mcp-config.js +104 -21
- package/lib/{application → packages/market-mcp/src/application}/mcp/mcp-direct-config.js +12 -4
- package/lib/{application → packages/market-mcp/src/application}/mcp/mcp-overrides.js +4 -4
- package/lib/{application → packages/market-mcp/src/application}/mcp/mcp-status.js +49 -10
- package/lib/packages/market-mcp/src/application/mcp/validation.js +63 -0
- package/lib/{application → packages/market-mcp/src/application}/mcp-service.js +111 -91
- package/lib/packages/market-mcp/src/index.js +10 -0
- package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/bridge.js +12 -9
- package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/connection.js +1 -1
- package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/oauth.js +1 -1
- package/lib/packages/market-mcp/src/runtime/mcp/bridge/tool-ownership.js +26 -0
- package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/tools.js +1 -1
- package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/mcp-auth-record.js +35 -4
- package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/mcp-mounts.js +35 -4
- package/lib/packages/market-runtime/src/adapter-contracts.js +1 -0
- package/lib/packages/market-runtime/src/application/command-resources.js +74 -0
- package/lib/packages/market-runtime/src/application/extension-authorization.js +27 -0
- package/lib/packages/market-runtime/src/application/extension-hook-selection.js +56 -0
- package/lib/packages/market-runtime/src/application/extension-suite-declarations.js +57 -0
- package/lib/packages/market-runtime/src/application/extension-suite-selection.js +84 -0
- package/lib/packages/market-runtime/src/application/fs-probe.js +43 -0
- package/lib/packages/market-runtime/src/application/panel-resources.js +370 -0
- package/lib/{application → packages/market-runtime/src/application}/panels/user-hooks.js +2 -2
- package/lib/{application → packages/market-runtime/src/application}/panels/user-store.js +53 -13
- package/lib/{application → packages/market-runtime/src/application}/project-agent-roles.js +20 -11
- package/lib/packages/market-runtime/src/application/state/extension-presets.js +144 -0
- package/lib/packages/market-runtime/src/application/state/resource-favorites.js +90 -0
- package/lib/packages/market-runtime/src/application/state/resource-filters.js +2 -0
- package/lib/packages/market-runtime/src/application/state/surface-toggles.js +10 -0
- package/lib/packages/market-runtime/src/application/state/workspace-policy.js +56 -0
- package/lib/packages/market-runtime/src/catalog-port.js +1 -0
- package/lib/packages/market-runtime/src/extension-service.js +1 -0
- package/lib/packages/market-runtime/src/index.js +31 -0
- package/lib/{runtime → packages/market-runtime/src/runtime}/agents/agent-role-router.js +74 -79
- package/lib/packages/market-runtime/src/runtime/agents/agent-teams-seat.js +58 -0
- package/lib/{runtime → packages/market-runtime/src/runtime}/agents/subagent-catalog.js +89 -21
- package/lib/packages/market-runtime/src/runtime/agents/team-coordination.js +51 -0
- package/lib/packages/market-runtime/src/runtime/agents/teammate-role-runtime.js +241 -0
- package/lib/packages/market-runtime/src/runtime/agents/teammate-role-tool.js +130 -0
- package/lib/{runtime → packages/market-runtime/src/runtime}/core/reconcile-scheduler.js +2 -2
- package/lib/packages/market-runtime/src/runtime/core/reconciler.js +457 -0
- package/lib/packages/market-runtime/src/runtime/host/command-name-allocator.js +168 -0
- package/lib/packages/market-runtime/src/runtime/host/extension-progress.js +120 -0
- package/lib/packages/market-runtime/src/runtime/host/extension-runtime.js +405 -0
- package/lib/packages/market-runtime/src/runtime/host/extension-session-state.js +839 -0
- package/lib/packages/market-runtime/src/runtime/host/extension-tool-gates.js +96 -0
- package/lib/{runtime → packages/market-runtime/src/runtime}/host/failure-detail.js +1 -1
- package/lib/{runtime → packages/market-runtime/src/runtime}/host/host-locale.js +2 -0
- package/lib/packages/market-runtime/src/runtime/host/menu-row-identities.js +38 -0
- package/lib/packages/market-runtime/src/runtime/host/resource-filter-service.js +81 -0
- package/lib/packages/market-runtime/src/runtime/host/scoped-contributors.js +304 -0
- package/lib/packages/market-runtime/src/runtime/host/surface-toggle-service.js +15 -0
- package/lib/packages/market-runtime/src/runtime/panels/user-commands.js +211 -0
- package/lib/{runtime → packages/market-runtime/src/runtime}/panels/user-panels.js +34 -14
- package/lib/packages/market-runtime/src/runtime/surfaces/commands-mounts.js +256 -0
- package/lib/packages/market-runtime/src/runtime/surfaces/extension-hooks.js +294 -0
- package/lib/packages/market-runtime/src/runtime/surfaces/hook-dry-run.js +122 -0
- package/lib/{runtime → packages/market-runtime/src/runtime}/surfaces/hooks-mounts.js +1 -1
- package/lib/{runtime → packages/market-runtime/src/runtime}/surfaces/project-runtime.js +23 -13
- package/lib/packages/market-runtime/src/runtime/surfaces/skills-provider.js +241 -0
- package/lib/packages/market-translation/src/application/state/translation-cache.js +122 -0
- package/lib/packages/market-translation/src/application/translation/chain.js +99 -0
- package/lib/packages/market-translation/src/application/translation/document.js +384 -0
- package/lib/packages/market-translation/src/application/translation/localizer.js +642 -0
- package/lib/packages/market-translation/src/application/translation/service.js +113 -0
- package/lib/packages/market-translation/src/application/translation/unit.js +19 -0
- package/lib/packages/market-translation/src/index.js +4 -0
- package/lib/packages/market-translation/src/runtime/host/llm-translator.js +278 -0
- package/lib/packages/market-translation/src/runtime/host/machine-translator.js +152 -0
- package/lib/packages/market-translation/src/runtime/host/text-masking.js +96 -0
- package/lib/packages/market-translation/src/runtime/host/translation-providers.js +116 -0
- package/lib/types/index.d.ts +2 -130
- package/lib/types/{application → packages/market-bundle/src/application}/catalog.d.ts +117 -22
- package/lib/types/packages/market-bundle/src/application/details.d.ts +24 -0
- package/lib/types/packages/market-bundle/src/application/extension-inventory.d.ts +45 -0
- package/lib/types/packages/market-bundle/src/application/extension-project.d.ts +26 -0
- package/lib/types/packages/market-bundle/src/application/resource-inventory.d.ts +42 -0
- package/lib/types/packages/market-bundle/src/application/server-config.d.ts +9 -0
- package/lib/types/packages/market-bundle/src/application/suite-queries.d.ts +84 -0
- package/lib/types/packages/market-bundle/src/index.d.ts +125 -0
- package/lib/types/{runtime/host → packages/market-bundle/src/platform}/settings-namespace.d.ts +44 -9
- package/lib/types/{application/mcp/mcp-backend.d.ts → packages/market-bundle/src/platform/settings-schema.d.ts} +13 -28
- package/lib/types/packages/market-bundle/src/routes-extension-presets.d.ts +15 -0
- package/lib/types/packages/market-bundle/src/routes-resources.d.ts +17 -0
- package/lib/types/packages/market-bundle/src/routes.d.ts +32 -0
- package/lib/types/packages/market-bundle/src/runtime-adapters.d.ts +42 -0
- package/lib/types/packages/market-bundle/src/session-extension.d.ts +62 -0
- package/lib/types/{application → packages/market-catalog/src/application}/catalog-context.d.ts +11 -3
- package/lib/types/{application → packages/market-catalog/src/application}/install-store.d.ts +1 -1
- package/lib/types/{application → packages/market-catalog/src/application}/regions.d.ts +1 -1
- package/lib/types/{application → packages/market-catalog/src/application}/snapshot-cache.d.ts +44 -2
- package/lib/types/{application → packages/market-catalog/src/application}/source-store.d.ts +12 -3
- package/lib/types/{application → packages/market-catalog/src/application}/state/state-store.d.ts +1 -1
- package/lib/types/packages/market-catalog/src/index.d.ts +22 -0
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/archive.d.ts +1 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/codex-mcp.d.ts +1 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/component-files.d.ts +1 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/lsp-spec.d.ts +1 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/manifests.d.ts +3 -3
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/native-project.d.ts +2 -2
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/plugin-variables.d.ts +12 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/project-config.d.ts +2 -2
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/project-hooks.d.ts +2 -2
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/scan-pipeline.d.ts +1 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/scan-resolvers.d.ts +3 -3
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/source-catalog.d.ts +1 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/suite-components.d.ts +1 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/suite-scanner.d.ts +1 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/surfaces.d.ts +1 -1
- package/lib/types/{catalog → packages/market-catalog/src/scanning}/validate.d.ts +1 -1
- package/lib/types/packages/market-contracts/src/contracts/extension-presets.d.ts +237 -0
- package/lib/types/{contracts → packages/market-contracts/src/contracts}/market.d.ts +87 -16
- package/lib/types/packages/market-contracts/src/contracts/mcp-overrides.d.ts +39 -0
- package/lib/types/{contracts → packages/market-contracts/src/contracts}/mcp-status.d.ts +9 -0
- package/lib/types/packages/market-contracts/src/contracts/resource-window.d.ts +70 -0
- package/lib/types/packages/market-contracts/src/contracts/settings.d.ts +121 -0
- package/lib/types/packages/market-contracts/src/contracts/surface-toggles.d.ts +28 -0
- package/lib/types/packages/market-contracts/src/contracts/translation.d.ts +81 -0
- package/lib/types/{runtime → packages/market-contracts/src}/host/plugin-message-source.d.ts +1 -1
- package/lib/types/packages/market-contracts/src/index.d.ts +5 -0
- package/lib/types/{model → packages/market-contracts/src/model}/layouts.d.ts +7 -0
- package/lib/types/{model → packages/market-contracts/src/model}/types.d.ts +2 -2
- package/lib/types/packages/market-contracts/src/ports/ports.d.ts +183 -0
- package/lib/types/{application → packages/market-contracts/src/ports}/queries.d.ts +27 -6
- package/lib/types/{application/mcp/mcp-redaction.d.ts → packages/market-contracts/src/redaction.d.ts} +2 -0
- package/lib/types/{application → packages/market-lsp/src/application}/lsp/lsp-direct-config.d.ts +1 -1
- package/lib/types/{application → packages/market-lsp/src/application}/lsp/lsp-status.d.ts +21 -5
- package/lib/types/packages/market-lsp/src/application/lsp/validation.d.ts +8 -0
- package/lib/types/{application → packages/market-lsp/src/application}/lsp-service.d.ts +19 -6
- package/lib/types/packages/market-lsp/src/index.d.ts +8 -0
- package/lib/types/{runtime → packages/market-lsp/src/runtime}/lsp/lsp-mounts.d.ts +26 -6
- package/lib/types/packages/market-mcp/src/application/mcp/mcp-backend.d.ts +28 -0
- package/lib/types/{application → packages/market-mcp/src/application}/mcp/mcp-bridge-config.d.ts +1 -1
- package/lib/types/{application → packages/market-mcp/src/application}/mcp/mcp-config.d.ts +2 -2
- package/lib/types/{application → packages/market-mcp/src/application}/mcp/mcp-direct-config.d.ts +6 -1
- package/lib/types/{application → packages/market-mcp/src/application}/mcp/mcp-overrides.d.ts +4 -38
- package/lib/types/packages/market-mcp/src/application/mcp/mcp-status.d.ts +40 -0
- package/lib/types/{application/server-config.d.ts → packages/market-mcp/src/application/mcp/validation.d.ts} +2 -10
- package/lib/types/{application → packages/market-mcp/src/application}/mcp-service.d.ts +22 -16
- package/lib/types/packages/market-mcp/src/index.d.ts +12 -0
- package/lib/types/packages/market-mcp/src/runtime/mcp/bridge/tool-ownership.d.ts +14 -0
- package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/mcp-auth-record.d.ts +4 -0
- package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/mcp-mounts.d.ts +19 -3
- package/lib/types/packages/market-runtime/src/adapter-contracts.d.ts +89 -0
- package/lib/types/{application → packages/market-runtime/src/application}/agent-roles.d.ts +2 -0
- package/lib/types/packages/market-runtime/src/application/command-resources.d.ts +26 -0
- package/lib/types/packages/market-runtime/src/application/extension-authorization.d.ts +12 -0
- package/lib/types/packages/market-runtime/src/application/extension-hook-selection.d.ts +23 -0
- package/lib/types/packages/market-runtime/src/application/extension-suite-declarations.d.ts +10 -0
- package/lib/types/packages/market-runtime/src/application/extension-suite-selection.d.ts +30 -0
- package/lib/types/packages/market-runtime/src/application/fs-probe.d.ts +12 -0
- package/lib/types/packages/market-runtime/src/application/panel-resources.d.ts +100 -0
- package/lib/types/{application → packages/market-runtime/src/application}/panels/user-hooks.d.ts +1 -1
- package/lib/types/packages/market-runtime/src/application/project-agent-roles.d.ts +10 -0
- package/lib/types/packages/market-runtime/src/application/state/extension-presets.d.ts +24 -0
- package/lib/types/packages/market-runtime/src/application/state/resource-favorites.d.ts +9 -0
- package/lib/types/packages/market-runtime/src/application/state/resource-filters.d.ts +2 -0
- package/lib/types/packages/market-runtime/src/application/state/surface-toggles.d.ts +6 -0
- package/lib/types/packages/market-runtime/src/application/state/workspace-policy.d.ts +19 -0
- package/lib/types/packages/market-runtime/src/catalog-port.d.ts +30 -0
- package/lib/types/packages/market-runtime/src/extension-service.d.ts +14 -0
- package/lib/types/packages/market-runtime/src/index.d.ts +41 -0
- package/lib/types/{runtime → packages/market-runtime/src/runtime}/agents/agent-role-router.d.ts +66 -31
- package/lib/types/packages/market-runtime/src/runtime/agents/agent-teams-seat.d.ts +41 -0
- package/lib/types/{runtime → packages/market-runtime/src/runtime}/agents/subagent-catalog.d.ts +34 -2
- package/lib/types/packages/market-runtime/src/runtime/agents/team-coordination.d.ts +8 -0
- package/lib/types/packages/market-runtime/src/runtime/agents/teammate-role-runtime.d.ts +74 -0
- package/lib/types/packages/market-runtime/src/runtime/agents/teammate-role-tool.d.ts +6 -0
- package/lib/types/{runtime → packages/market-runtime/src/runtime}/core/reconcile-scheduler.d.ts +5 -2
- package/lib/types/packages/market-runtime/src/runtime/core/reconciler.d.ts +141 -0
- package/lib/types/packages/market-runtime/src/runtime/host/command-name-allocator.d.ts +132 -0
- package/lib/types/packages/market-runtime/src/runtime/host/extension-progress.d.ts +91 -0
- package/lib/types/packages/market-runtime/src/runtime/host/extension-runtime.d.ts +77 -0
- package/lib/types/packages/market-runtime/src/runtime/host/extension-session-state.d.ts +242 -0
- package/lib/types/packages/market-runtime/src/runtime/host/extension-tool-gates.d.ts +38 -0
- package/lib/types/{runtime → packages/market-runtime/src/runtime}/host/host-locale.d.ts +1 -1
- package/lib/types/packages/market-runtime/src/runtime/host/menu-row-identities.d.ts +50 -0
- package/lib/types/{runtime → packages/market-runtime/src/runtime}/host/model-catalog.d.ts +1 -1
- package/lib/types/packages/market-runtime/src/runtime/host/resource-filter-service.d.ts +34 -0
- package/lib/types/packages/market-runtime/src/runtime/host/scoped-contributors.d.ts +58 -0
- package/lib/types/packages/market-runtime/src/runtime/host/surface-toggle-service.d.ts +10 -0
- package/lib/types/packages/market-runtime/src/runtime/panels/user-commands.d.ts +74 -0
- package/lib/types/{runtime → packages/market-runtime/src/runtime}/panels/user-panels.d.ts +7 -1
- package/lib/types/packages/market-runtime/src/runtime/surfaces/commands-mounts.d.ts +81 -0
- package/lib/types/packages/market-runtime/src/runtime/surfaces/extension-hooks.d.ts +59 -0
- package/lib/types/packages/market-runtime/src/runtime/surfaces/hook-dry-run.d.ts +91 -0
- package/lib/types/{runtime → packages/market-runtime/src/runtime}/surfaces/hooks-mounts.d.ts +1 -1
- package/lib/types/{runtime → packages/market-runtime/src/runtime}/surfaces/project-runtime.d.ts +8 -5
- package/lib/types/packages/market-runtime/src/runtime/surfaces/skills-provider.d.ts +71 -0
- package/lib/types/packages/market-translation/src/application/state/translation-cache.d.ts +56 -0
- package/lib/types/packages/market-translation/src/application/translation/chain.d.ts +47 -0
- package/lib/types/packages/market-translation/src/application/translation/document.d.ts +54 -0
- package/lib/types/packages/market-translation/src/application/translation/localizer.d.ts +325 -0
- package/lib/types/packages/market-translation/src/application/translation/service.d.ts +89 -0
- package/lib/types/packages/market-translation/src/application/translation/unit.d.ts +35 -0
- package/lib/types/packages/market-translation/src/index.d.ts +4 -0
- package/lib/types/packages/market-translation/src/runtime/host/llm-translator.d.ts +30 -0
- package/lib/types/packages/market-translation/src/runtime/host/machine-translator.d.ts +52 -0
- package/lib/types/packages/market-translation/src/runtime/host/text-masking.d.ts +42 -0
- package/lib/types/packages/market-translation/src/runtime/host/translation-providers.d.ts +42 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +47 -10
- package/schemas/README.md +4 -4
- package/schemas/agent-plugins/spec.md +2 -2
- package/schemas/com.deepseek.harness/spec.md +1 -1
- package/schemas/skill-collection/spec.md +10 -2
- package/lib/application/panel-resources.js +0 -161
- package/lib/application/server-config.js +0 -109
- package/lib/contracts/settings.js +0 -63
- package/lib/runtime/core/reconciler.js +0 -100
- package/lib/runtime/panels/user-commands.js +0 -105
- package/lib/runtime/surfaces/commands-mounts.js +0 -186
- package/lib/runtime/surfaces/skills-provider.js +0 -160
- package/lib/types/application/details.d.ts +0 -7
- package/lib/types/application/mcp/mcp-status.d.ts +0 -24
- package/lib/types/application/panel-resources.d.ts +0 -28
- package/lib/types/application/ports.d.ts +0 -86
- package/lib/types/application/project-agent-roles.d.ts +0 -3
- package/lib/types/contracts/settings.d.ts +0 -59
- package/lib/types/routes.d.ts +0 -16
- package/lib/types/runtime/core/reconciler.d.ts +0 -58
- package/lib/types/runtime/panels/user-commands.d.ts +0 -27
- package/lib/types/runtime/surfaces/commands-mounts.d.ts +0 -48
- package/lib/types/runtime/surfaces/skills-provider.d.ts +0 -23
- /package/lib/{application → packages/market-catalog/src/application}/deadline.js +0 -0
- /package/lib/{application → packages/market-catalog/src/application}/json-file.js +0 -0
- /package/lib/{application → packages/market-catalog/src/application}/regions.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/fs-probes.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/git.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/lsp-spec.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/project-config.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/project-hooks.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/scan-pipeline.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/source-catalog.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/suite-components.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/suite-scanner.js +0 -0
- /package/lib/{catalog → packages/market-catalog/src/scanning}/surfaces.js +0 -0
- /package/lib/{contracts → packages/market-contracts/src/contracts}/lsp-status.js +0 -0
- /package/lib/{contracts → packages/market-contracts/src/contracts}/lsp.js +0 -0
- /package/lib/{contracts → packages/market-contracts/src/contracts}/mcp-status.js +0 -0
- /package/lib/{contracts → packages/market-contracts/src/contracts}/mcp.js +0 -0
- /package/lib/{runtime → packages/market-contracts/src}/host/plugin-message-source.js +0 -0
- /package/lib/{model → packages/market-contracts/src/model}/command-names.js +0 -0
- /package/lib/{model → packages/market-contracts/src/model}/preset-source.js +0 -0
- /package/lib/{model → packages/market-contracts/src/model}/types.js +0 -0
- /package/lib/{application → packages/market-contracts/src/ports}/queries.js +0 -0
- /package/lib/{application → packages/market-mcp/src/application}/mcp/mcp-bridge-config.js +0 -0
- /package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/host-contract.js +0 -0
- /package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/host-seams.js +0 -0
- /package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/plugin-identity.js +0 -0
- /package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/projection.js +0 -0
- /package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/transport.js +0 -0
- /package/lib/{runtime → packages/market-mcp/src/runtime}/mcp/mcp-credentials.js +0 -0
- /package/lib/{application → packages/market-runtime/src/application}/agent-roles.js +0 -0
- /package/lib/{runtime → packages/market-runtime/src/runtime}/agents/agent-role-names.js +0 -0
- /package/lib/{runtime → packages/market-runtime/src/runtime}/core/context.js +0 -0
- /package/lib/{runtime → packages/market-runtime/src/runtime}/core/mount-lifecycle.js +0 -0
- /package/lib/{runtime → packages/market-runtime/src/runtime}/core/source-auto-update.js +0 -0
- /package/lib/{runtime → packages/market-runtime/src/runtime}/core/timer-seat.js +0 -0
- /package/lib/{runtime → packages/market-runtime/src/runtime}/host/model-catalog.js +0 -0
- /package/lib/{runtime → packages/market-runtime/src/runtime}/host/shell-path.js +0 -0
- /package/lib/{runtime → packages/market-runtime/src/runtime}/host/tool-registry-observer.js +0 -0
- /package/lib/{runtime → packages/market-runtime/src/runtime}/surfaces/dynamic-context.js +0 -0
- /package/lib/types/{runtime/host → packages/market-bundle/src/platform}/feedback-tool.d.ts +0 -0
- /package/lib/types/{application → packages/market-catalog/src/application}/deadline.d.ts +0 -0
- /package/lib/types/{application → packages/market-catalog/src/application}/json-file.d.ts +0 -0
- /package/lib/types/{application → packages/market-catalog/src/application}/state/storage-migration.d.ts +0 -0
- /package/lib/types/{catalog → packages/market-catalog/src/scanning}/fs-probes.d.ts +0 -0
- /package/lib/types/{catalog → packages/market-catalog/src/scanning}/git.d.ts +0 -0
- /package/lib/types/{catalog → packages/market-catalog/src/scanning}/paths.d.ts +0 -0
- /package/lib/types/{catalog → packages/market-catalog/src/scanning}/skills-parse.d.ts +0 -0
- /package/lib/types/{contracts → packages/market-contracts/src/contracts}/lsp-status.d.ts +0 -0
- /package/lib/types/{contracts → packages/market-contracts/src/contracts}/lsp.d.ts +0 -0
- /package/lib/types/{contracts → packages/market-contracts/src/contracts}/mcp.d.ts +0 -0
- /package/lib/types/{model → packages/market-contracts/src/model}/command-names.d.ts +0 -0
- /package/lib/types/{model → packages/market-contracts/src/model}/preset-source.d.ts +0 -0
- /package/lib/types/{application → packages/market-lsp/src/application}/lsp/lsp-server-state.d.ts +0 -0
- /package/lib/types/{application → packages/market-lsp/src/application}/lsp/profile-seam.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/bridge.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/connection.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/host-contract.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/host-seams.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/oauth.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/plugin-identity.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/projection.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/tools.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/bridge/transport.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-mcp/src/runtime}/mcp/mcp-credentials.d.ts +0 -0
- /package/lib/types/{application → packages/market-runtime/src/application}/panels/user-store.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-runtime/src/runtime}/agents/agent-role-names.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-runtime/src/runtime}/core/context.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-runtime/src/runtime}/core/mount-lifecycle.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-runtime/src/runtime}/core/source-auto-update.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-runtime/src/runtime}/core/timer-seat.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-runtime/src/runtime}/host/failure-detail.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-runtime/src/runtime}/host/shell-path.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-runtime/src/runtime}/host/tool-registry-observer.d.ts +0 -0
- /package/lib/types/{runtime → packages/market-runtime/src/runtime}/surfaces/dynamic-context.d.ts +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host's translation chain: the two keyless endpoints, then the user's model.
|
|
3
|
+
*
|
|
4
|
+
* The order is the market's quality order — a public endpoint answers in under
|
|
5
|
+
* a second and costs the operator nothing, while a model call spends the user's
|
|
6
|
+
* own quota, so it is asked last. The chain itself decides what a failure means;
|
|
7
|
+
* this module only supplies the hops.
|
|
8
|
+
*
|
|
9
|
+
* Masking is applied here rather than inside the endpoint adapters, so every
|
|
10
|
+
* hop in the returned array carries the same guarantee: what goes out is
|
|
11
|
+
* placeholders, and an answer that lost one is rejected instead of rendered.
|
|
12
|
+
* @module runtime/host/translation-providers
|
|
13
|
+
*/
|
|
14
|
+
import type { TranslationProvider } from '../../application/translation/chain.js';
|
|
15
|
+
/** Everything the chain needs to assemble its hops. */
|
|
16
|
+
export interface TranslationProviderOptions {
|
|
17
|
+
/** Host context; read structurally so tests can pass a stub. */
|
|
18
|
+
host: {
|
|
19
|
+
get?(name: string): unknown;
|
|
20
|
+
};
|
|
21
|
+
/** The LLM-backed provider, already built by the caller (may be undefined). */
|
|
22
|
+
llm?: TranslationProvider | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Build the ordered chain: google -> microsoft -> llm.
|
|
26
|
+
*
|
|
27
|
+
* The two public endpoints report themselves available unconditionally: they
|
|
28
|
+
* need no key, no registration and no configuration, which is what makes
|
|
29
|
+
* translation work out of the box on a fresh deployment. Whether one of them
|
|
30
|
+
* actually answers is settled by calling it, and the chain's circuit breaker is
|
|
31
|
+
* what stops a blocked network from costing a timeout per batch.
|
|
32
|
+
*
|
|
33
|
+
* The model hop is absent when the caller has none, so a deployment without a
|
|
34
|
+
* configured route gets a two-hop chain rather than a hop that always fails.
|
|
35
|
+
*
|
|
36
|
+
* The host context is accepted but unread: neither keyless endpoint needs a
|
|
37
|
+
* seam, and the field is part of the composition root's frozen call shape so a
|
|
38
|
+
* keyed provider can join the chain without changing that call.
|
|
39
|
+
* @param options - the host context and the already-built model provider.
|
|
40
|
+
* @returns the chain, best hop first.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createTranslationProviders(options: TranslationProviderOptions): TranslationProvider[];
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agent-plugins-market",
|
|
3
|
+
"icon": "./assets/dsh-agent-plugins.png",
|
|
3
4
|
"description": "One-stop skills, subagent, MCP and LSP manager inside DeepSeek Harness (DSH), compatible with Claude Code, Codex, Cursor, Kimi and other agent plugin layouts.",
|
|
4
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.2",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "lib/index.js",
|
|
7
8
|
"types": "lib/types/index.d.ts",
|
|
@@ -12,12 +13,15 @@
|
|
|
12
13
|
},
|
|
13
14
|
"./client": "./client/client.js",
|
|
14
15
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
15
|
-
"./package.json": "./package.json"
|
|
16
|
+
"./package.json": "./package.json",
|
|
17
|
+
"./locale/*.json": "./locale/*.json"
|
|
16
18
|
},
|
|
17
19
|
"files": [
|
|
18
20
|
"lib",
|
|
19
21
|
"client",
|
|
20
22
|
"schemas",
|
|
23
|
+
"locale",
|
|
24
|
+
"assets/dsh-agent-plugins.png",
|
|
21
25
|
"cordis.patch.yml",
|
|
22
26
|
"LICENSE",
|
|
23
27
|
"README.md",
|
|
@@ -75,25 +79,41 @@
|
|
|
75
79
|
],
|
|
76
80
|
"peerDependencies": {
|
|
77
81
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
82
|
+
"@deepseek-ai/dsh-agent": "^0.2.0-rc.2",
|
|
78
83
|
"@deepseek-ai/dsh-attachment": "^0.2.0-rc.2",
|
|
79
84
|
"@deepseek-ai/dsh-credentials": "^0.2.0-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-experimental-agent-team": "^0.2.0-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-hook-protocol": "^0.2.0-rc.2",
|
|
80
87
|
"@deepseek-ai/dsh-hooks-claude-code": "^0.2.0-rc.2",
|
|
81
88
|
"@deepseek-ai/dsh-llm": "^0.2.0-rc.2",
|
|
82
89
|
"@deepseek-ai/dsh-mcp-client": "^0.2.0-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-scope": "^0.2.0-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-session": "^0.2.0-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-session-projection": "^0.2.0-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-session-query": "^0.2.0-rc.2",
|
|
94
|
+
"@deepseek-ai/dsh-shell": "^0.2.0-rc.2",
|
|
83
95
|
"@deepseek-ai/dsh-skill": "^0.2.0-rc.2",
|
|
96
|
+
"@deepseek-ai/dsh-subagent": "^0.2.0-rc.2",
|
|
84
97
|
"@deepseek-ai/dsh-subprocess": "^0.2.0-rc.2",
|
|
98
|
+
"@deepseek-ai/dsh-system-prompt": "^0.2.0-rc.2",
|
|
85
99
|
"@deepseek-ai/dsh-timeout": "^0.2.0-rc.2",
|
|
86
100
|
"@deepseek-ai/dsh-tools": "^0.2.0-rc.2",
|
|
87
101
|
"@deepseek-ai/dsh-util-code-language": "^0.2.0-rc.2",
|
|
88
102
|
"@deepseek-ai/dsh-util-workspace-path": "^0.2.0-rc.2"
|
|
89
103
|
},
|
|
90
104
|
"peerDependenciesMeta": {
|
|
105
|
+
"@deepseek-ai/dsh-experimental-agent-team": {
|
|
106
|
+
"optional": true
|
|
107
|
+
},
|
|
91
108
|
"@deepseek-ai/dsh-hooks-claude-code": {
|
|
92
109
|
"optional": true
|
|
93
110
|
},
|
|
94
111
|
"@deepseek-ai/dsh-mcp-client": {
|
|
95
112
|
"optional": true
|
|
96
113
|
},
|
|
114
|
+
"@deepseek-ai/dsh-session-query": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
97
117
|
"@deepseek-ai/dsh-tools": {
|
|
98
118
|
"optional": true
|
|
99
119
|
}
|
|
@@ -108,6 +128,12 @@
|
|
|
108
128
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
109
129
|
"ajv": "^8.17.1",
|
|
110
130
|
"fflate": "^0.8.3",
|
|
131
|
+
"mdast-util-from-markdown": "^2.0.3",
|
|
132
|
+
"mdast-util-gfm": "^3.1.0",
|
|
133
|
+
"mdast-util-math": "^3.0.0",
|
|
134
|
+
"mdast-util-to-markdown": "^2.1.3",
|
|
135
|
+
"micromark-extension-gfm": "^3.0.0",
|
|
136
|
+
"micromark-extension-math": "^3.1.0",
|
|
111
137
|
"smol-toml": "^1.9.0",
|
|
112
138
|
"yaml": "^2.7.0",
|
|
113
139
|
"zod": "^4.6.5"
|
|
@@ -121,6 +147,9 @@
|
|
|
121
147
|
"@codemirror/view": "^6.43.12",
|
|
122
148
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
123
149
|
"@deepseek-ai/cosmokit": "^1.8.5",
|
|
150
|
+
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
151
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.0-rc.2",
|
|
152
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.0-rc.2",
|
|
124
153
|
"@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
|
|
125
154
|
"@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
|
|
126
155
|
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.0-rc.2",
|
|
@@ -128,11 +157,23 @@
|
|
|
128
157
|
"@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.2",
|
|
129
158
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
|
|
130
159
|
"@deepseek-ai/dsh-credentials": "0.2.0-rc.2",
|
|
160
|
+
"@deepseek-ai/dsh-experimental-agent-team": "0.2.0-rc.2",
|
|
161
|
+
"@deepseek-ai/dsh-experimental-tool-agent-team": "0.2.0-rc.2",
|
|
162
|
+
"@deepseek-ai/dsh-hook-protocol": "0.2.0-rc.2",
|
|
131
163
|
"@deepseek-ai/dsh-hooks-claude-code": "0.2.0-rc.2",
|
|
132
164
|
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
133
165
|
"@deepseek-ai/dsh-mcp-client": "0.2.0-rc.2",
|
|
166
|
+
"@deepseek-ai/dsh-scope": "0.2.0-rc.2",
|
|
167
|
+
"@deepseek-ai/dsh-session": "0.2.0-rc.2",
|
|
168
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.0-rc.2",
|
|
169
|
+
"@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
|
|
170
|
+
"@deepseek-ai/dsh-session-query": "0.2.0-rc.2",
|
|
171
|
+
"@deepseek-ai/dsh-shell": "0.2.0-rc.2",
|
|
134
172
|
"@deepseek-ai/dsh-skill": "0.2.0-rc.2",
|
|
173
|
+
"@deepseek-ai/dsh-subagent": "0.2.0-rc.2",
|
|
174
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.0-rc.2",
|
|
135
175
|
"@deepseek-ai/dsh-subprocess": "0.2.0-rc.2",
|
|
176
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
136
177
|
"@deepseek-ai/dsh-timeout": "0.2.0-rc.2",
|
|
137
178
|
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
|
|
138
179
|
"@deepseek-ai/dsh-util-code-language": "0.2.0-rc.2",
|
|
@@ -140,6 +181,7 @@
|
|
|
140
181
|
"@eslint/js": "^10.0.1",
|
|
141
182
|
"@shikijs/langs": "^4.4.3",
|
|
142
183
|
"@tsdown/css": "^0.22.14",
|
|
184
|
+
"@types/mdast": "^4.0.4",
|
|
143
185
|
"@types/node": "^22.15.0",
|
|
144
186
|
"@types/react": "~18.3.1",
|
|
145
187
|
"@types/react-dom": "~18.3.0",
|
|
@@ -150,14 +192,9 @@
|
|
|
150
192
|
"diff": "^9.0.0",
|
|
151
193
|
"eslint": "^10.11.0",
|
|
152
194
|
"immer": "^11.1.18",
|
|
153
|
-
"jsdom": "^30.
|
|
195
|
+
"jsdom": "^30.1.2",
|
|
154
196
|
"katex": "^0.16.47",
|
|
155
|
-
"mdast-util-from-markdown": "^2.0.3",
|
|
156
|
-
"mdast-util-gfm": "^3.1.0",
|
|
157
|
-
"mdast-util-math": "^3.0.0",
|
|
158
197
|
"micromark-core-commonmark": "^2.0.3",
|
|
159
|
-
"micromark-extension-gfm": "^3.0.0",
|
|
160
|
-
"micromark-extension-math": "^3.1.0",
|
|
161
198
|
"micromark-factory-space": "^2.0.1",
|
|
162
199
|
"micromark-util-character": "^2.1.1",
|
|
163
200
|
"micromark-util-classify-character": "^2.0.1",
|
|
@@ -188,10 +225,10 @@
|
|
|
188
225
|
"test": "vitest run",
|
|
189
226
|
"test:contract": "vitest run tests/market-contracts.test.ts tests/routes.test.ts",
|
|
190
227
|
"test:coverage": "vitest run --coverage",
|
|
191
|
-
"lint": "eslint
|
|
228
|
+
"lint": "eslint index.ts packages tests",
|
|
192
229
|
"format": "prettier --write .",
|
|
193
230
|
"format:check": "prettier --check .",
|
|
194
|
-
"check:architecture": "depcruise --validate .dependency-cruiser.cjs
|
|
231
|
+
"check:architecture": "depcruise --validate .dependency-cruiser.cjs index.ts packages",
|
|
195
232
|
"check:host-alignment": "node scripts/check-host-alignment.mjs",
|
|
196
233
|
"fix:host-alignment": "node scripts/check-host-alignment.mjs --fix",
|
|
197
234
|
"check:quick": "pnpm run typecheck && pnpm run lint",
|
package/schemas/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This directory is the specification library for the plugin layouts this manager reads. It holds three kinds of files:
|
|
4
4
|
|
|
5
|
-
1. **Vendored upstream schemas** in [`1.0.0/`](1.0.0/) and [`1.1.0/`](1.1.0/) — pinned copies of the official agent-plugins.org schemas (1.0.0 published, 1.1.0 the working draft this manager explicitly recognizes as compatible; the two releases' schemas differ only in the version string). These are bundled into the published package and loaded at runtime by [`
|
|
5
|
+
1. **Vendored upstream schemas** in [`1.0.0/`](1.0.0/) and [`1.1.0/`](1.1.0/) — pinned copies of the official agent-plugins.org schemas (1.0.0 published, 1.1.0 the working draft this manager explicitly recognizes as compatible; the two releases' schemas differ only in the version string). These are bundled into the published package and loaded at runtime by [`packages/market-catalog/src/scanning/validate.ts`](../packages/market-catalog/src/scanning/validate.ts), because the specification requires clients to validate plugin packages without retrieving schemas at load time (§7.2.1: "Clients MUST NOT retrieve a schema while loading a plugin").
|
|
6
6
|
2. **Reference contracts** in `<dialect>/` — an authored JSON Schema pair plus a `spec.md` for each layout the manager recognizes. **These are documentation, not runtime validators**: the scanner still applies the strategy-chain rules in `src/catalog/`. They exist so a dialect's field set, file locations, and evidence are pinned in one place.
|
|
7
7
|
3. **The client extension namespace contract** in [`com.deepseek.harness/`](com.deepseek.harness/) — the authored schema and rules for this manager's own §8 namespace: manifest data under `extensions["com.deepseek.harness"]` and the top-level `com.deepseek.harness/` extension directory.
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ schemas/
|
|
|
29
29
|
|
|
30
30
|
## Dialect index
|
|
31
31
|
|
|
32
|
-
This table records **upstream client conventions**, including their own fallback orders; it does not define this plugin's discovery priority. DSH uses one shared layout order for suite manifests and Marketplace catalogs, shown
|
|
32
|
+
This table records **upstream client conventions**, including their own fallback orders; it does not define this plugin's discovery priority. DSH uses one shared layout order for suite manifests and Marketplace catalogs, shown on the [compatible plugins page](https://sivan757.github.io/dsh-agent-plugins-market/compatible-plugins/#shared-layout-precedence). Catalogs without a dedicated layout use root `marketplace.json` as the final fallback.
|
|
33
33
|
|
|
34
34
|
| Dialect | Upstream plugin manifest conventions | Upstream marketplace conventions | Upstream schema |
|
|
35
35
|
| --- | --- | --- | --- |
|
|
@@ -69,11 +69,11 @@ All ten active layouts are covered by [offline README repository tests](../tests
|
|
|
69
69
|
|
|
70
70
|
## Provenance and update policy
|
|
71
71
|
|
|
72
|
-
- `1.0.0/*.schema.json` and `1.1.0/*.schema.json` are vendored. Replace the files from [`agentplugins/agent-plugins-spec`](https://github.com/agentplugins/agent-plugins-spec) at the pinned spec versions and bump the spec-version references in `
|
|
72
|
+
- `1.0.0/*.schema.json` and `1.1.0/*.schema.json` are vendored. Replace the files from [`agentplugins/agent-plugins-spec`](https://github.com/agentplugins/agent-plugins-spec) at the pinned spec versions and bump the spec-version references in `packages/market-catalog/src/scanning/validate.ts`. Never edit them by hand.
|
|
73
73
|
- `<dialect>/*.schema.json` and `spec.md` are authored here. They are **not** upstream copies and carry no upstream compatibility guarantee. When a cited source changes, re-verify and update the schema, the `spec.md`, and the `$comment` provenance line together.
|
|
74
74
|
- `agent-plugins/spec.md` documents the published standard but deliberately keeps its schemas in `1.0.0/` and `1.1.0/` so there is exactly one copy of each release in the tree.
|
|
75
75
|
- `com.deepseek.harness/` is authored here and owned here: it defines this manager's own §8 namespace, so its evolution is governed by the namespace `schemaVersion`, not by upstream releases.
|
|
76
76
|
|
|
77
77
|
## Validation
|
|
78
78
|
|
|
79
|
-
`tests/schemas.test.ts` compiles every schema with Ajv 2020-12, asserts `$id` uniqueness, pins the vendored ids to the runtime constants in `
|
|
79
|
+
`tests/schemas.test.ts` compiles every schema with Ajv 2020-12, asserts `$id` uniqueness, pins the vendored ids to the runtime constants in `packages/market-catalog/src/scanning/validate.ts`, and requires each dialect to keep a `spec.md` and a paired marketplace schema (the vendored release directories and the namespace contract keep their own documented shape instead). Run `pnpm run test` after touching this directory; run `pnpm run format:check` for formatting.
|
|
@@ -6,7 +6,7 @@ The only published cross-vendor plugin format in this directory. Unlike the othe
|
|
|
6
6
|
- **Specification:** https://agent-plugins.org/specification
|
|
7
7
|
- **Repository:** [`agentplugins/agent-plugins-spec`](https://github.com/agentplugins/agent-plugins-spec) (`spec/1.0.0.md`, `spec/1.1.0.md`, `schemas/1.0.0/`, `schemas/1.1.0/`)
|
|
8
8
|
- **Status:** 1.0.0 published; 1.1.0 is a working draft whose schemas differ from 1.0.0 only in the version string (verified 2026-09-17 at upstream `ff8ab5e`); the spec text additionally renames two phrasings ("claiming conformance to Agent Plugins v1" → "claiming conformance", "Agent Plugins v1 defines no OAuth" → "This specification defines no OAuth"). This manager explicitly recognizes 1.1.0 as compatible (§5.2) and validates each version against its own vendored schemas.
|
|
9
|
-
- **Runtime use:** `
|
|
9
|
+
- **Runtime use:** `packages/market-catalog/src/scanning/validate.ts` loads all four vendored schemas through Ajv and selects the validator by the manifest's declared `$schema`; `packages/market-catalog/src/scanning/manifests.ts` selects this dialect only when a root `plugin.json` declares a recognized `$schema`. Client-specific behavior beyond the portable core lives in the [`com.deepseek.harness` namespace](../com.deepseek.harness/spec.md).
|
|
10
10
|
|
|
11
11
|
## Manifest location
|
|
12
12
|
|
|
@@ -59,4 +59,4 @@ The technical steering committee is Amazon, Cursor, Microsoft, OpenAI, and Verce
|
|
|
59
59
|
|
|
60
60
|
## Update procedure
|
|
61
61
|
|
|
62
|
-
Replace the vendored files from the upstream repository at the pinned spec versions and bump the spec-version references in `
|
|
62
|
+
Replace the vendored files from the upstream repository at the pinned spec versions and bump the spec-version references in `packages/market-catalog/src/scanning/validate.ts`. Do not edit the vendored files by hand.
|
|
@@ -47,6 +47,6 @@ Values inside the namespace seats expand `${PLUGIN_ROOT}`, `${PLUGIN_DATA}`, and
|
|
|
47
47
|
|
|
48
48
|
## Provenance
|
|
49
49
|
|
|
50
|
-
- Sources: [Agent Plugins specification](https://agent-plugins.org/specification) §8 (client extensions), §9.2 (placeholder expansion), and the runtime behavior of `
|
|
50
|
+
- Sources: [Agent Plugins specification](https://agent-plugins.org/specification) §8 (client extensions), §9.2 (placeholder expansion), and the runtime behavior of `packages/market-catalog/src/scanning/manifests.ts` (manifest seat) and `packages/market-catalog/src/scanning/scan-resolvers.ts` (directory seat).
|
|
51
51
|
- Verified: 2026-09-17 against `agentplugins/agent-plugins-spec` `ff8ab5e` (1.0.0 published, 1.1.0 working draft).
|
|
52
52
|
- Unresolved: none. The specification assigns no semantics to namespace contents, so every rule above is this client's own contract and can evolve by bumping `schemaVersion`.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Reference contract for repositories that ship skills without any plugin manifest.
|
|
4
4
|
|
|
5
|
-
- **Schema:** none, because there is no manifest to validate. The unit of validation is the `SKILL.md` frontmatter, which is parsed by `
|
|
5
|
+
- **Schema:** none, because there is no manifest to validate. The unit of validation is the `SKILL.md` frontmatter, which is parsed by `packages/market-catalog/src/scanning/skills-parse.ts`.
|
|
6
6
|
- **Status:** this is a discovery convention of this plugin and of the Agent Skills ecosystem, not a vendor-published plugin format.
|
|
7
|
-
- **Evidence:** the shared scanning rules in `
|
|
7
|
+
- **Evidence:** the shared scanning rules in `packages/market-catalog/src/scanning/scan-resolvers.ts`; upstream Agent Skills documentation at https://code.claude.com/docs/en/skills and https://developers.openai.com/codex/skills.
|
|
8
8
|
|
|
9
9
|
## Qualification
|
|
10
10
|
|
|
@@ -20,6 +20,14 @@ A source directory qualifies as a manifest-less skill collection only after skil
|
|
|
20
20
|
|
|
21
21
|
`SKILL.md` frontmatter carries `name` and `description`; user-invocable skills surface as `/` entries in chat, and skills may restrict manual invocation.
|
|
22
22
|
|
|
23
|
+
## Source grouping
|
|
24
|
+
|
|
25
|
+
Without productive marketplace entries, discovered skill-only roots form one suite at the source checkout root. This includes `<root>/<name>/SKILL.md` and nested collections. Explicit plugin manifests and roots with other runtime surfaces keep their existing identities and relative paths. A source that already resolves at its checkout root keeps that suite identity.
|
|
26
|
+
|
|
27
|
+
The aggregate uses the reserved ID `@skills`, qualified by the source ID, and the checkout basename as its display name. Individual skill IDs cannot grant installation permission to the aggregate. Install the aggregate separately to enable its skills. Existing install records remain unchanged.
|
|
28
|
+
|
|
29
|
+
Skill names, documents, and resource directories remain attached to their original files. Duplicate names keep the first discovered skill. Invalid skills produce diagnostics and stay excluded. An entirely invalid collection produces no suite.
|
|
30
|
+
|
|
23
31
|
## Surfaces
|
|
24
32
|
|
|
25
33
|
Because there is no manifest, component locations are the shared scanning conventions only: files directly under `agents/*.md` and `commands/*.md`, `hooks/hooks.json` or root `hooks.json` (Claude Code command-hook subset), and MCP files (`mcp.json`, `.mcp.json`, or inline manifest `mcpServers`, which does not exist here). LSP is preview-only because there is no manifest `lspServers` to validate.
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
/** Installed suite and user resources share one inventory; paths never come from HTTP callers. */
|
|
2
|
-
import { realpath, stat } from 'node:fs/promises';
|
|
3
|
-
import { isDeepStrictEqual as deepEqual } from 'node:util';
|
|
4
|
-
import { writeFileAtomic } from '@deepseek-ai/dsh-atomic-write';
|
|
5
|
-
import { defaultMarkdownResources, resourceText } from '../catalog/component-files.js';
|
|
6
|
-
import { pluginRootOf } from '../catalog/plugin-variables.js';
|
|
7
|
-
import { isWithin, suiteDataDir } from '../catalog/paths.js';
|
|
8
|
-
import { stripFrontmatter } from '../catalog/skills-parse.js';
|
|
9
|
-
import { parseFrontmatterRecord } from './panels/user-store.js';
|
|
10
|
-
/**
|
|
11
|
-
* Id of one panel entry backed by a file inside an installed suite's checkout.
|
|
12
|
-
* The leading `[` is what distinguishes a plugin entry from a user-authored
|
|
13
|
-
* one; `update`/`remove` use {@link isPluginResourceId} to tell them apart.
|
|
14
|
-
*/
|
|
15
|
-
export function pluginResourceId(sourceId, suiteId, kind, name) {
|
|
16
|
-
return JSON.stringify([sourceId, suiteId, kind, name]);
|
|
17
|
-
}
|
|
18
|
-
/** Whether a panel entry id addresses a file inside an installed suite. */
|
|
19
|
-
export function isPluginResourceId(id) {
|
|
20
|
-
return id.startsWith('[');
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Frontmatter keys beyond the enable switch that a panel control may diff on a
|
|
24
|
-
* plugin document, per kind: the harness invocation pair on skills, and the
|
|
25
|
-
* model-routing keys the persona form edits on agents.
|
|
26
|
-
*/
|
|
27
|
-
const FLIPPABLE_KEYS = {
|
|
28
|
-
skills: ['disable-model-invocation', 'user-invocable'],
|
|
29
|
-
commands: [],
|
|
30
|
-
agents: ['model', 'provider', 'reasoning_effort', 'reasoningEffort']
|
|
31
|
-
};
|
|
32
|
-
export function createPanelResources(catalog, users) {
|
|
33
|
-
return {
|
|
34
|
-
skills: new PanelResources(catalog, users.skills, 'skills'),
|
|
35
|
-
commands: new PanelResources(catalog, users.commands, 'commands'),
|
|
36
|
-
agents: new PanelResources(catalog, users.agents, 'agents')
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
class PanelResources {
|
|
40
|
-
catalog;
|
|
41
|
-
users;
|
|
42
|
-
kind;
|
|
43
|
-
constructor(catalog, users, kind) {
|
|
44
|
-
this.catalog = catalog;
|
|
45
|
-
this.users = users;
|
|
46
|
-
this.kind = kind;
|
|
47
|
-
}
|
|
48
|
-
async list(strict = false) {
|
|
49
|
-
const entries = await this.users.list(strict);
|
|
50
|
-
const snapshot = await this.catalog.readUserCatalog();
|
|
51
|
-
for (const suite of snapshot.suites) {
|
|
52
|
-
if (!this.catalog.isInstalled(suite.sourceId, suite.id) || suite.remote !== undefined)
|
|
53
|
-
continue;
|
|
54
|
-
const files = this.kind === 'skills'
|
|
55
|
-
? suite.skills.map(skill => ({ name: skill.name, file: skill.file }))
|
|
56
|
-
: (suite.resources?.[this.kind] ?? (await defaultMarkdownResources(suite.root, this.kind)));
|
|
57
|
-
for (const resource of files) {
|
|
58
|
-
const { name, file } = resource;
|
|
59
|
-
const rawText = await resourceText(resource).catch(error => {
|
|
60
|
-
if (strict && error.code !== 'ENOENT')
|
|
61
|
-
throw error;
|
|
62
|
-
return undefined;
|
|
63
|
-
});
|
|
64
|
-
if (rawText === undefined)
|
|
65
|
-
continue;
|
|
66
|
-
let metadata;
|
|
67
|
-
try {
|
|
68
|
-
metadata = parseFrontmatterRecord(rawText);
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
metadata = { disabled: true, validationError: String(error) };
|
|
72
|
-
}
|
|
73
|
-
entries.push({
|
|
74
|
-
id: pluginResourceId(suite.sourceId, suite.id, this.kind, name),
|
|
75
|
-
name,
|
|
76
|
-
origin: 'plugin',
|
|
77
|
-
suiteName: suite.manifest.name,
|
|
78
|
-
disabled: !suite.enabled || suite.activeSurfaces[this.kind] === false || metadata.disabled === true,
|
|
79
|
-
metadata,
|
|
80
|
-
rawText,
|
|
81
|
-
content: stripFrontmatter(rawText),
|
|
82
|
-
path: file,
|
|
83
|
-
description: typeof metadata.description === 'string' ? metadata.description : '',
|
|
84
|
-
...(pluginRootOf(suite) === undefined ? {} : { suiteRoot: suite.root, suiteData: suiteDataDir(this.catalog.dataRoot, suite.sourceId, suite.id) })
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
// One pass stamps each entry's own last modification: the panel reads every
|
|
89
|
-
// file's text anyway, and both origins get the same treatment here.
|
|
90
|
-
return await Promise.all(entries.map(async (entry) => {
|
|
91
|
-
try {
|
|
92
|
-
const stats = await stat(entry.path);
|
|
93
|
-
return { ...entry, updatedAt: new Date(stats.mtimeMs).toISOString() };
|
|
94
|
-
}
|
|
95
|
-
catch {
|
|
96
|
-
return entry;
|
|
97
|
-
}
|
|
98
|
-
}));
|
|
99
|
-
}
|
|
100
|
-
async get(id) {
|
|
101
|
-
return (await this.list()).find(entry => (entry.id ?? entry.name) === id);
|
|
102
|
-
}
|
|
103
|
-
create(name, text) {
|
|
104
|
-
return this.users.create(name, text);
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* A plugin resource is writable only when it sits inside the user dimension
|
|
108
|
-
* root; suite checkouts elsewhere on disk stay read-only. The user-panel
|
|
109
|
-
* store lives in the shared Agent layout root instead, so containment is
|
|
110
|
-
* measured against the catalog's root, not the panel directory. Callers pass
|
|
111
|
-
* the entry they already fetched: a full inventory scan per call would read
|
|
112
|
-
* every suite document twice per write.
|
|
113
|
-
*/
|
|
114
|
-
async pluginPath(entry) {
|
|
115
|
-
if (entry.origin !== 'plugin')
|
|
116
|
-
throw new Error('Unknown installed plugin resource');
|
|
117
|
-
if (entry.path.endsWith('.json'))
|
|
118
|
-
throw new Error('Inline manifest resources are read-only; edit their source manifest');
|
|
119
|
-
const root = await realpath(this.catalog.userRoot);
|
|
120
|
-
const path = await realpath(entry.path);
|
|
121
|
-
if (!isWithin(root, path))
|
|
122
|
-
throw new Error('External source files are read-only; create a user resource to customize them');
|
|
123
|
-
return path;
|
|
124
|
-
}
|
|
125
|
-
async update(id, text) {
|
|
126
|
-
if (!isPluginResourceId(id))
|
|
127
|
-
return this.users.update(id, text);
|
|
128
|
-
const previous = await this.get(id);
|
|
129
|
-
if (previous === undefined)
|
|
130
|
-
throw new Error('Unknown installed plugin resource');
|
|
131
|
-
this.assertStateFlipOnly(previous.rawText, text);
|
|
132
|
-
await writeFileAtomic(await this.pluginPath(previous), text, { mode: 0o644 });
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* A suite owns its files' content: the panel may only flip state frontmatter.
|
|
136
|
-
* The document body must stay byte-identical, and the frontmatter diff is
|
|
137
|
-
* confined to `disabled` everywhere, plus {@link FLIPPABLE_KEYS}'s per-kind
|
|
138
|
-
* control keys — the harness invocation pair on skills, model routing on
|
|
139
|
-
* agents.
|
|
140
|
-
*/
|
|
141
|
-
assertStateFlipOnly(previousText, text) {
|
|
142
|
-
if (stripFrontmatter(previousText) !== stripFrontmatter(text))
|
|
143
|
-
throw new Error('plugin resources are read-only; the suite owns their content');
|
|
144
|
-
const before = parseFrontmatterRecord(previousText);
|
|
145
|
-
const after = parseFrontmatterRecord(text);
|
|
146
|
-
const flippable = new Set(['disabled', ...FLIPPABLE_KEYS[this.kind]]);
|
|
147
|
-
for (const key of new Set([...Object.keys(before), ...Object.keys(after)])) {
|
|
148
|
-
if (flippable.has(key))
|
|
149
|
-
continue;
|
|
150
|
-
if (!deepEqual(before[key], after[key])) {
|
|
151
|
-
throw new Error('plugin resources are read-only; only the enable state can be changed');
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
async remove(id) {
|
|
156
|
-
// Plugin files belong to their suite checkout; install/uninstall manages them.
|
|
157
|
-
if (isPluginResourceId(id))
|
|
158
|
-
throw new Error('plugin resources are managed by their suite; uninstall the suite instead');
|
|
159
|
-
return this.users.remove(id);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { join } from 'node:path';
|
|
2
|
-
import { readJsonFile, writeJsonDocument } from './json-file.js';
|
|
3
|
-
import { MCP_SCHEMA_ID, validateAgainstSchema, validateMcpJson } from '../catalog/validate.js';
|
|
4
|
-
import { parseLspServers } from '../catalog/lsp-spec.js';
|
|
5
|
-
import { qualifiedSuiteId } from '../catalog/paths.js';
|
|
6
|
-
import { redactMcpConfig } from './mcp/mcp-redaction.js';
|
|
7
|
-
import { REDACTED_VALUE } from '../contracts/mcp.js';
|
|
8
|
-
/**
|
|
9
|
-
* The errors the closed-set package shape produces. A user-owned service does
|
|
10
|
-
* not obey that shape, and the per-transport checks still require what it needs.
|
|
11
|
-
*/
|
|
12
|
-
const PACKAGE_SHAPE_KEYWORDS = new Set(['additionalProperties', 'oneOf', 'required', 'const']);
|
|
13
|
-
/**
|
|
14
|
-
* A rejected MCP configuration. The message keeps the flat form the API has
|
|
15
|
-
* always returned, and `fields` carries the same reasons keyed by field so the
|
|
16
|
-
* editor can put each one beside its input.
|
|
17
|
-
*/
|
|
18
|
-
export class McpConfigError extends Error {
|
|
19
|
-
fields;
|
|
20
|
-
constructor(fields) {
|
|
21
|
-
super(`invalid MCP configuration: ${fields.map(entry => (entry.field === '' ? entry.message : `${entry.field} ${entry.message}`)).join('; ')}`);
|
|
22
|
-
this.fields = fields;
|
|
23
|
-
this.name = 'McpConfigError';
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/** Restore only unchanged redacted leaves, rejecting invented masked values. */
|
|
27
|
-
export function restoreRedactedConfig(input, original, redacted = redactMcpConfig(original)) {
|
|
28
|
-
if (typeof input === 'string' && input.includes(REDACTED_VALUE)) {
|
|
29
|
-
if (input !== redacted)
|
|
30
|
-
throw new Error('masked values must remain unchanged or be replaced');
|
|
31
|
-
return original;
|
|
32
|
-
}
|
|
33
|
-
if (Array.isArray(input))
|
|
34
|
-
return input.map((value, index) => restoreRedactedConfig(value, Array.isArray(original) ? original[index] : undefined, Array.isArray(redacted) ? redacted[index] : undefined));
|
|
35
|
-
if (typeof input === 'object' && input !== null) {
|
|
36
|
-
const source = typeof original === 'object' && original !== null ? original : {};
|
|
37
|
-
const safe = typeof redacted === 'object' && redacted !== null ? redacted : {};
|
|
38
|
-
return Object.fromEntries(Object.entries(input).map(([key, value]) => [key, restoreRedactedConfig(value, source[key], safe[key])]));
|
|
39
|
-
}
|
|
40
|
-
return input;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Validate one service definition before it is stored.
|
|
44
|
-
*
|
|
45
|
-
* A service the user declared themselves is local data rather than a
|
|
46
|
-
* distributable package: keys this client does not know are kept as written
|
|
47
|
-
* instead of being rejected by the closed-set package schema, and the
|
|
48
|
-
* package-only rules (bare command names, plugin-relative paths) stay off.
|
|
49
|
-
*/
|
|
50
|
-
export async function validateServerMcp(root, key, config, options) {
|
|
51
|
-
const userOwned = options?.userOwned === true;
|
|
52
|
-
const document = { $schema: MCP_SCHEMA_ID, mcpServers: { [key]: config } };
|
|
53
|
-
// A JSON pointer needs its own escapes so a server key containing `/` or `~`
|
|
54
|
-
// still yields the right prefix for the field paths below.
|
|
55
|
-
const pointer = `/mcpServers/${key.replaceAll('~', '~0').replaceAll('/', '~1')}`;
|
|
56
|
-
const structural = (await validateAgainstSchema(MCP_SCHEMA_ID, document))
|
|
57
|
-
.filter(error => error.instancePath === pointer || error.instancePath.startsWith(`${pointer}/`))
|
|
58
|
-
// The closed-set package shape reports `additionalProperties` plus the
|
|
59
|
-
// `oneOf`/`required` pair its failure produces; user-owned data does not
|
|
60
|
-
// obey it, and the per-transport checks below still require what it needs.
|
|
61
|
-
.filter(error => !(userOwned && PACKAGE_SHAPE_KEYWORDS.has(error.keyword)))
|
|
62
|
-
.map(error => ({
|
|
63
|
-
field: error.instancePath.slice(pointer.length).replace(/^\//, '').replaceAll('/', '.'),
|
|
64
|
-
message: error.message
|
|
65
|
-
}));
|
|
66
|
-
if (structural.length > 0)
|
|
67
|
-
throw new McpConfigError(structural);
|
|
68
|
-
const result = await validateMcpJson(root, document, userOwned ? { packageRules: false } : undefined);
|
|
69
|
-
if (result.config === undefined || result.errors.length > 0)
|
|
70
|
-
throw new McpConfigError(result.errors.map(message => ({ field: '', message })));
|
|
71
|
-
const server = result.config.servers[key];
|
|
72
|
-
if (server === undefined)
|
|
73
|
-
throw new McpConfigError([{ field: '', message: `server "${key}" was rejected` }]);
|
|
74
|
-
return server;
|
|
75
|
-
}
|
|
76
|
-
export function validateServerLsp(key, config) {
|
|
77
|
-
const errors = [];
|
|
78
|
-
const server = parseLspServers({ [key]: config }, errors)[key];
|
|
79
|
-
if (server === undefined || errors.length > 0)
|
|
80
|
-
throw new Error(`invalid LSP configuration: ${errors.join('; ')}`);
|
|
81
|
-
return server;
|
|
82
|
-
}
|
|
83
|
-
/** Public configuration excludes the parser's derived identity. */
|
|
84
|
-
export function lspConfig(spec) {
|
|
85
|
-
return Object.fromEntries(Object.entries(spec).filter(([key]) => key !== 'key'));
|
|
86
|
-
}
|
|
87
|
-
export async function loadLspOverrides(root) {
|
|
88
|
-
const raw = await readJsonFile(join(root, 'lsp-overrides.json'));
|
|
89
|
-
if (typeof raw !== 'object' || raw === null)
|
|
90
|
-
return {};
|
|
91
|
-
return Object.fromEntries(Object.entries(raw).map(([id, config]) => [id, validateServerLsp(id.slice(id.lastIndexOf('/') + 1), config)]));
|
|
92
|
-
}
|
|
93
|
-
export async function saveLspOverride(root, id, config) {
|
|
94
|
-
const overrides = await loadLspOverrides(root);
|
|
95
|
-
overrides[id] = config;
|
|
96
|
-
await writeJsonDocument(join(root, 'lsp-overrides.json'), Object.fromEntries(Object.entries(overrides).map(([key, value]) => [key, lspConfig(value)])));
|
|
97
|
-
}
|
|
98
|
-
export async function applyLspOverrides(root, suites) {
|
|
99
|
-
const overrides = await loadLspOverrides(root);
|
|
100
|
-
return suites.map(suite => suite.lsp === undefined
|
|
101
|
-
? suite
|
|
102
|
-
: {
|
|
103
|
-
...suite,
|
|
104
|
-
lsp: {
|
|
105
|
-
...suite.lsp,
|
|
106
|
-
servers: Object.fromEntries(Object.entries(suite.lsp.servers).map(([key, spec]) => [key, overrides[`${qualifiedSuiteId(suite.sourceId, suite.id)}/${key}`] ?? spec]))
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser-safe settings contract of the market's host settings namespace: the
|
|
3
|
-
* namespace key, the fields with their defaults, and the one reader that turns
|
|
4
|
-
* a stored section into resolved values.
|
|
5
|
-
*
|
|
6
|
-
* The defaults live here and nowhere else. The namespace schema declares them
|
|
7
|
-
* to the host, the node half reads them back through {@link resolveMarketSettings},
|
|
8
|
-
* and the browser half — which cannot import `src/runtime` — reads the same
|
|
9
|
-
* resolved values off the settings snapshot it is handed. Changing a default is
|
|
10
|
-
* therefore a one-line edit in this module.
|
|
11
|
-
*
|
|
12
|
-
* @module contracts/settings
|
|
13
|
-
*/
|
|
14
|
-
/** Settings namespace this plugin registers; the key the plugin-config tab pairs our card by. */
|
|
15
|
-
export const MARKET_SETTINGS_NAMESPACE = 'dsh-agent-plugins-market';
|
|
16
|
-
/**
|
|
17
|
-
* The default of every market setting — the single place one is written.
|
|
18
|
-
*
|
|
19
|
-
* These are user-visible behavior: a flip here is a behavior change that ships
|
|
20
|
-
* with its documentation, not a private implementation detail.
|
|
21
|
-
*/
|
|
22
|
-
export const MARKET_SETTINGS_DEFAULTS = {
|
|
23
|
-
mcpEnhanced: true,
|
|
24
|
-
scanProjectLayouts: false,
|
|
25
|
-
downloadRegion: 'auto',
|
|
26
|
-
feedbackEnabled: true,
|
|
27
|
-
autoUpdateSources: false
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Narrow an untrusted stored region to a setting; anything else reads as the
|
|
31
|
-
* declared default.
|
|
32
|
-
* @param value - the stored `downloadRegion` value.
|
|
33
|
-
* @param fallback - the value an unrecognized input reads as.
|
|
34
|
-
*/
|
|
35
|
-
export function narrowDownloadRegion(value, fallback = MARKET_SETTINGS_DEFAULTS.downloadRegion) {
|
|
36
|
-
return value === 'auto' || value === 'global' || value === 'china' ? value : fallback;
|
|
37
|
-
}
|
|
38
|
-
/** One boolean field: a stored boolean, else the field's default. */
|
|
39
|
-
function narrowBoolean(value, fallback) {
|
|
40
|
-
return typeof value === 'boolean' ? value : fallback;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Resolve a stored settings section the way the host resolves it: each field
|
|
44
|
-
* takes its stored value when it is one this field accepts, and its declared
|
|
45
|
-
* default otherwise.
|
|
46
|
-
*
|
|
47
|
-
* The host hands the resolved section back on its own, but not every caller has
|
|
48
|
-
* one — the plugin's own halves read a section they may not have received yet,
|
|
49
|
-
* and a test hands in a bare literal. Funnelling all of them through this
|
|
50
|
-
* function is what keeps a second reading of "what does missing mean" from
|
|
51
|
-
* growing somewhere else.
|
|
52
|
-
* @param section - the stored (or absent) namespace section, untrusted.
|
|
53
|
-
*/
|
|
54
|
-
export function resolveMarketSettings(section) {
|
|
55
|
-
const stored = (typeof section === 'object' && section !== null ? section : {});
|
|
56
|
-
return {
|
|
57
|
-
mcpEnhanced: narrowBoolean(stored['mcpEnhanced'], MARKET_SETTINGS_DEFAULTS.mcpEnhanced),
|
|
58
|
-
scanProjectLayouts: narrowBoolean(stored['scanProjectLayouts'], MARKET_SETTINGS_DEFAULTS.scanProjectLayouts),
|
|
59
|
-
downloadRegion: narrowDownloadRegion(stored['downloadRegion']),
|
|
60
|
-
feedbackEnabled: narrowBoolean(stored['feedbackEnabled'], MARKET_SETTINGS_DEFAULTS.feedbackEnabled),
|
|
61
|
-
autoUpdateSources: narrowBoolean(stored['autoUpdateSources'], MARKET_SETTINGS_DEFAULTS.autoUpdateSources)
|
|
62
|
-
};
|
|
63
|
-
}
|