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,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Suite presentation queries: one suite's detail, one suite document, and that
|
|
3
|
+
* document's translation.
|
|
4
|
+
*
|
|
5
|
+
* The three reads share one lookup — a source-qualified identity resolved in the
|
|
6
|
+
* user snapshot, or in one project's when the caller names a workspace — and one
|
|
7
|
+
* presentation composed over it. They live here rather than on the facade
|
|
8
|
+
* because the facade composes collaborators and forwards, while these reads
|
|
9
|
+
* carry the rule themselves: which snapshot answers, what the detail shows, and
|
|
10
|
+
* how a document's translation is keyed.
|
|
11
|
+
*
|
|
12
|
+
* Every dependency arrives as a function on {@link SuiteQueryPorts}. The facade
|
|
13
|
+
* passes closures, so a caller that replaces one of its own methods (a test
|
|
14
|
+
* stubbing the localization callbacks or the user snapshot read) is still the
|
|
15
|
+
* one called here.
|
|
16
|
+
* @module application/suite-queries
|
|
17
|
+
*/
|
|
18
|
+
import { type CatalogSnapshot } from '../../../market-catalog/src/index.js';
|
|
19
|
+
import type { InstalledEntry } from '../../../market-contracts/src/model/types.js';
|
|
20
|
+
import type { McpMountDiagnostic } from '../../../market-contracts/src/contracts/mcp.js';
|
|
21
|
+
import type { SuiteDetail, SuiteDocumentText, UserPanelKind } from '../../../market-contracts/src/contracts/market.js';
|
|
22
|
+
import type { DocumentTranslation } from '../../../market-contracts/src/contracts/translation.js';
|
|
23
|
+
import type { LocalizeDocument, LocalizeFields } from '../../../market-contracts/src/ports/ports.js';
|
|
24
|
+
/** The reads one suite query needs, each resolved per call. */
|
|
25
|
+
export interface SuiteQueryPorts {
|
|
26
|
+
/** The user-dimension snapshot this deployment serves. */
|
|
27
|
+
readUserCatalog(): Promise<CatalogSnapshot>;
|
|
28
|
+
/** One workspace's project snapshot. */
|
|
29
|
+
readProjectCatalog(cwd: string): Promise<CatalogSnapshot>;
|
|
30
|
+
/** Install entry of one suite; undefined while it is not installed. */
|
|
31
|
+
installed(sourceId: string, suiteId: string): InstalledEntry | undefined;
|
|
32
|
+
/** Plugin storage root holding per-suite overrides. */
|
|
33
|
+
dataRoot(): string;
|
|
34
|
+
/** Live MCP mount diagnostics, as the mount registry last reported them. */
|
|
35
|
+
mcpDiagnostics(): readonly McpMountDiagnostic[];
|
|
36
|
+
/** The host locale preference this read resolves once. */
|
|
37
|
+
localePreference(): string;
|
|
38
|
+
/** Resolve one entity's translated fields, on the facade's own callback. */
|
|
39
|
+
translateFields: LocalizeFields;
|
|
40
|
+
/** Resolve one document body, on the facade's own callback. */
|
|
41
|
+
translateDocument: LocalizeDocument;
|
|
42
|
+
}
|
|
43
|
+
export declare class SuiteQueries {
|
|
44
|
+
private readonly ports;
|
|
45
|
+
constructor(ports: SuiteQueryPorts);
|
|
46
|
+
/** One suite's full detail for the market detail modal. */
|
|
47
|
+
suiteDetail(sourceId: string, suiteId: string, projectCwd?: string): Promise<SuiteDetail>;
|
|
48
|
+
/**
|
|
49
|
+
* One suite document's authored text for the market detail modal — a skill, a
|
|
50
|
+
* command, or an agent, all through the one reader.
|
|
51
|
+
*
|
|
52
|
+
* The suite comes from the same snapshot {@link suiteDetail} answers from, and
|
|
53
|
+
* the text is re-read from the checkout the scan found it in: the request
|
|
54
|
+
* names an identity, never a path, so this route cannot be spent on a file of
|
|
55
|
+
* a page's choosing.
|
|
56
|
+
*/
|
|
57
|
+
suiteDocument(sourceId: string, suiteId: string, kind: UserPanelKind, name: string, projectCwd?: string): Promise<SuiteDocumentText>;
|
|
58
|
+
/**
|
|
59
|
+
* Translate one suite document for the market detail page.
|
|
60
|
+
*
|
|
61
|
+
* The suite comes from the same snapshot {@link suiteDetail} and
|
|
62
|
+
* {@link suiteDocument} answer from, and the document is re-read from the
|
|
63
|
+
* checkout the scan found it in: the request names an identity and never
|
|
64
|
+
* carries text, so this path cannot be spent on content of a page's choosing.
|
|
65
|
+
*
|
|
66
|
+
* The translation is keyed exactly as the user panel keys the same file
|
|
67
|
+
* ({@link pluginResourceId}, on the document's own surface), so one document
|
|
68
|
+
* is one cache entry however it was opened — whichever surface translated it
|
|
69
|
+
* first, the other reads it back without paying a provider again.
|
|
70
|
+
*
|
|
71
|
+
* Frontmatter is stripped for the reason the panel strips it: a provider
|
|
72
|
+
* asked to translate YAML answers with YAML that no longer parses. The reader
|
|
73
|
+
* still sees the authored block above the document, because the row renders
|
|
74
|
+
* the file and this section renders only its translation.
|
|
75
|
+
* @param sourceId - the source the suite belongs to.
|
|
76
|
+
* @param suiteId - the suite's id inside that source.
|
|
77
|
+
* @param kind - which document surface the name belongs to.
|
|
78
|
+
* @param name - the document's name inside that surface.
|
|
79
|
+
* @returns the assembled body and how many chunks are still in flight.
|
|
80
|
+
*/
|
|
81
|
+
suiteDocumentTranslation(sourceId: string, suiteId: string, kind: UserPanelKind, name: string, projectCwd?: string, retry?: boolean): Promise<DocumentTranslation>;
|
|
82
|
+
/** The normalized suite a source-qualified identity names, or a miss. */
|
|
83
|
+
private suiteOf;
|
|
84
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { type Context, type Volatile } from '@deepseek-ai/cordis';
|
|
2
|
+
import z from '@deepseek-ai/schemastery';
|
|
3
|
+
import type { DownloadRegionSetting } from '../../market-contracts/src/contracts/settings.js';
|
|
4
|
+
import type { SourceRef } from '../../market-contracts/src/model/types.js';
|
|
5
|
+
export declare const name = "dsh-agent-plugins-market";
|
|
6
|
+
export declare const inject: string[];
|
|
7
|
+
/** Host configuration. */
|
|
8
|
+
/** Host configuration; the five market settings arrive as volatile references the host updates in place. */
|
|
9
|
+
export interface Config {
|
|
10
|
+
/** User-dimension suite root; defaults to `~/.dsh/agent-plugins` (`$DSH_HOME/agent-plugins`). */
|
|
11
|
+
userRoot?: string;
|
|
12
|
+
/** Legacy mutable data root to migrate; writes always use the canonical root/data. */
|
|
13
|
+
dataRoot?: string;
|
|
14
|
+
/** Initial repository sources, merged into the persisted state on first load. */
|
|
15
|
+
sources?: SourceRef[];
|
|
16
|
+
/**
|
|
17
|
+
* Git/archive acquisition tuning: `proxy` (http/https proxy URL),
|
|
18
|
+
* `insteadOf` URL-prefix rewrites (mirror acceleration), `timeoutMs` per
|
|
19
|
+
* git invocation, `cloneRetry` (default true), `fallbackTarball` (retry a
|
|
20
|
+
* failed GitHub clone as a codeload tarball download; default false), and
|
|
21
|
+
* `allowHttpArchives` (permit plain-http archive URLs; default false).
|
|
22
|
+
*/
|
|
23
|
+
git?: {
|
|
24
|
+
proxy?: string;
|
|
25
|
+
insteadOf?: Record<string, string>;
|
|
26
|
+
timeoutMs?: number;
|
|
27
|
+
cloneRetry?: boolean;
|
|
28
|
+
fallbackTarball?: boolean;
|
|
29
|
+
allowHttpArchives?: boolean;
|
|
30
|
+
};
|
|
31
|
+
/** MCP mount backend switch; updated live through the host settings service. */
|
|
32
|
+
mcpEnhanced: Volatile<boolean | undefined>;
|
|
33
|
+
/** Project-layout discovery switch; updated live through the host settings service. */
|
|
34
|
+
scanProjectLayouts: Volatile<boolean | undefined>;
|
|
35
|
+
/** Download region choice; updated live through the host settings service. */
|
|
36
|
+
downloadRegion: Volatile<DownloadRegionSetting | undefined>;
|
|
37
|
+
/** Experience-feedback tool switch; updated live through the host settings service. */
|
|
38
|
+
feedbackEnabled: Volatile<boolean | undefined>;
|
|
39
|
+
/** Background source-update switch; updated live through the host settings service. */
|
|
40
|
+
autoUpdateSources: Volatile<boolean | undefined>;
|
|
41
|
+
/** UI translation switch; updated live through the host settings service. */
|
|
42
|
+
translationEnabled: Volatile<boolean | undefined>;
|
|
43
|
+
/** Agent preset manager switch (experimental); updated live through the host settings service. */
|
|
44
|
+
agentPresetsEnabled: Volatile<boolean | undefined>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Schemastery projection the host loader reads: the seven volatile fields become
|
|
48
|
+
* the `dsh-agent-plugins-market` settings namespace (the Plugins panel's
|
|
49
|
+
* configuration page reads it), while the startup fields stay plain.
|
|
50
|
+
*/
|
|
51
|
+
/** The schema's input face: every field optional, exactly what a profile patch may carry. */
|
|
52
|
+
export interface ConfigInput {
|
|
53
|
+
userRoot?: string | null;
|
|
54
|
+
dataRoot?: string | null;
|
|
55
|
+
sources?: unknown;
|
|
56
|
+
git?: {
|
|
57
|
+
proxy?: string | null;
|
|
58
|
+
insteadOf?: Record<string, unknown>;
|
|
59
|
+
timeoutMs?: number | null;
|
|
60
|
+
cloneRetry?: boolean | null;
|
|
61
|
+
fallbackTarball?: boolean | null;
|
|
62
|
+
allowHttpArchives?: boolean | null;
|
|
63
|
+
};
|
|
64
|
+
mcpEnhanced?: boolean | null;
|
|
65
|
+
scanProjectLayouts?: boolean | null;
|
|
66
|
+
downloadRegion?: 'auto' | 'global' | 'china' | null;
|
|
67
|
+
feedbackEnabled?: boolean | null;
|
|
68
|
+
autoUpdateSources?: boolean | null;
|
|
69
|
+
translationEnabled?: boolean | null;
|
|
70
|
+
agentPresetsEnabled?: boolean | null;
|
|
71
|
+
}
|
|
72
|
+
export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
73
|
+
userRoot: z<string | undefined, string | undefined, "plain">;
|
|
74
|
+
dataRoot: z<string | undefined, string | undefined, "plain">;
|
|
75
|
+
sources: z<any, any, "plain">;
|
|
76
|
+
git: z<Schemastery.ObjectS<NoInfer<{
|
|
77
|
+
proxy: z<string, string, "plain">;
|
|
78
|
+
insteadOf: z<import("@deepseek-ai/cosmokit").Dict<string, any>, import("@deepseek-ai/cosmokit").Dict<string, any>, "plain">;
|
|
79
|
+
timeoutMs: z<number, number, "plain">;
|
|
80
|
+
cloneRetry: z<boolean, boolean, "plain">;
|
|
81
|
+
fallbackTarball: z<boolean, boolean, "plain">;
|
|
82
|
+
allowHttpArchives: z<boolean, boolean, "plain">;
|
|
83
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
84
|
+
proxy: z<string, string, "plain">;
|
|
85
|
+
insteadOf: z<import("@deepseek-ai/cosmokit").Dict<string, any>, import("@deepseek-ai/cosmokit").Dict<string, any>, "plain">;
|
|
86
|
+
timeoutMs: z<number, number, "plain">;
|
|
87
|
+
cloneRetry: z<boolean, boolean, "plain">;
|
|
88
|
+
fallbackTarball: z<boolean, boolean, "plain">;
|
|
89
|
+
allowHttpArchives: z<boolean, boolean, "plain">;
|
|
90
|
+
}>>, "plain">;
|
|
91
|
+
mcpEnhanced: z<boolean, boolean, "volatile-defined">;
|
|
92
|
+
scanProjectLayouts: z<boolean, boolean, "volatile-defined">;
|
|
93
|
+
downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "volatile-defined">;
|
|
94
|
+
feedbackEnabled: z<boolean, boolean, "volatile-defined">;
|
|
95
|
+
autoUpdateSources: z<boolean, boolean, "volatile-defined">;
|
|
96
|
+
translationEnabled: z<boolean, boolean, "volatile">;
|
|
97
|
+
agentPresetsEnabled: z<boolean, boolean, "volatile-defined">;
|
|
98
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
99
|
+
userRoot: z<string | undefined, string | undefined, "plain">;
|
|
100
|
+
dataRoot: z<string | undefined, string | undefined, "plain">;
|
|
101
|
+
sources: z<any, any, "plain">;
|
|
102
|
+
git: z<Schemastery.ObjectS<NoInfer<{
|
|
103
|
+
proxy: z<string, string, "plain">;
|
|
104
|
+
insteadOf: z<import("@deepseek-ai/cosmokit").Dict<string, any>, import("@deepseek-ai/cosmokit").Dict<string, any>, "plain">;
|
|
105
|
+
timeoutMs: z<number, number, "plain">;
|
|
106
|
+
cloneRetry: z<boolean, boolean, "plain">;
|
|
107
|
+
fallbackTarball: z<boolean, boolean, "plain">;
|
|
108
|
+
allowHttpArchives: z<boolean, boolean, "plain">;
|
|
109
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
110
|
+
proxy: z<string, string, "plain">;
|
|
111
|
+
insteadOf: z<import("@deepseek-ai/cosmokit").Dict<string, any>, import("@deepseek-ai/cosmokit").Dict<string, any>, "plain">;
|
|
112
|
+
timeoutMs: z<number, number, "plain">;
|
|
113
|
+
cloneRetry: z<boolean, boolean, "plain">;
|
|
114
|
+
fallbackTarball: z<boolean, boolean, "plain">;
|
|
115
|
+
allowHttpArchives: z<boolean, boolean, "plain">;
|
|
116
|
+
}>>, "plain">;
|
|
117
|
+
mcpEnhanced: z<boolean, boolean, "volatile-defined">;
|
|
118
|
+
scanProjectLayouts: z<boolean, boolean, "volatile-defined">;
|
|
119
|
+
downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "volatile-defined">;
|
|
120
|
+
feedbackEnabled: z<boolean, boolean, "volatile-defined">;
|
|
121
|
+
autoUpdateSources: z<boolean, boolean, "volatile-defined">;
|
|
122
|
+
translationEnabled: z<boolean, boolean, "volatile">;
|
|
123
|
+
agentPresetsEnabled: z<boolean, boolean, "volatile-defined">;
|
|
124
|
+
}>>, "plain">;
|
|
125
|
+
export declare function apply(ctx: Context, config?: Config): Promise<void>;
|
package/lib/types/{runtime/host → packages/market-bundle/src/platform}/settings-namespace.d.ts
RENAMED
|
@@ -2,21 +2,23 @@
|
|
|
2
2
|
* The market settings the host carries in this plugin's own config: the loader
|
|
3
3
|
* projects the entry's `Config` schema into the `dsh-agent-plugins-market`
|
|
4
4
|
* settings namespace, so the Plugins panel's configuration page reads and
|
|
5
|
-
* writes these
|
|
5
|
+
* writes these seven fields, and the host updates the volatile references in
|
|
6
6
|
* place on every change (emitting `loader/volatile-update`).
|
|
7
7
|
*
|
|
8
8
|
* Every consumer reads through {@link MarketSettingsNamespace.settings} so
|
|
9
9
|
* "the field is absent" has exactly one answer —
|
|
10
10
|
* {@link resolveMarketSettings} — instead of each caller inventing its own
|
|
11
|
-
* fallback for the window before the host applies its first value.
|
|
11
|
+
* fallback for the window before the host applies its first value. That reader
|
|
12
|
+
* also takes the interface language, because one field's default follows it
|
|
13
|
+
* rather than a constant.
|
|
12
14
|
*
|
|
13
15
|
* @module runtime/settings-namespace
|
|
14
16
|
*/
|
|
15
17
|
import type { Context } from '@deepseek-ai/cordis';
|
|
16
|
-
import { type DownloadRegionSetting } from '
|
|
17
|
-
import type { HostTranslate } from '
|
|
18
|
-
import type { McpBackend } from '
|
|
19
|
-
/** The
|
|
18
|
+
import { type DownloadRegionSetting } from '../../../market-contracts/src/contracts/settings.js';
|
|
19
|
+
import type { HostTranslate } from '../../../market-runtime/src/index.js';
|
|
20
|
+
import type { McpBackend } from '../../../market-contracts/src/contracts/mcp.js';
|
|
21
|
+
/** The seven volatile references the entry's config carries for this namespace. */
|
|
20
22
|
export interface MarketSettingRefs {
|
|
21
23
|
mcpEnhanced: {
|
|
22
24
|
get(): boolean | undefined;
|
|
@@ -33,6 +35,12 @@ export interface MarketSettingRefs {
|
|
|
33
35
|
autoUpdateSources: {
|
|
34
36
|
get(): boolean | undefined;
|
|
35
37
|
};
|
|
38
|
+
translationEnabled: {
|
|
39
|
+
get(): boolean | undefined;
|
|
40
|
+
};
|
|
41
|
+
agentPresetsEnabled: {
|
|
42
|
+
get(): boolean | undefined;
|
|
43
|
+
};
|
|
36
44
|
}
|
|
37
45
|
/** Runtime reactions the namespace drives. */
|
|
38
46
|
export interface SettingsNamespaceHost {
|
|
@@ -42,13 +50,21 @@ export interface SettingsNamespaceHost {
|
|
|
42
50
|
refreshMcpMounts(): void;
|
|
43
51
|
/** Arm or disarm the background source updater. */
|
|
44
52
|
setAutoUpdateSources(enabled: boolean): void;
|
|
53
|
+
/** Stop queued work on disable; restore failed work eligibility on enable, without clearing cached results. */
|
|
54
|
+
syncTranslationEnabled(): void;
|
|
45
55
|
}
|
|
46
56
|
export declare class MarketSettingsNamespace {
|
|
47
57
|
private readonly ctx;
|
|
48
|
-
private readonly refs;
|
|
49
58
|
private readonly dataRoot;
|
|
50
59
|
private readonly locale;
|
|
51
60
|
private readonly host;
|
|
61
|
+
/**
|
|
62
|
+
* The host interface language, read per call. It is a reader rather than a
|
|
63
|
+
* captured string because a language switch must move the translation
|
|
64
|
+
* default without rebuilding this namespace.
|
|
65
|
+
*/
|
|
66
|
+
private readonly localePreference;
|
|
67
|
+
private readonly refs;
|
|
52
68
|
private readonly watchers;
|
|
53
69
|
private feedbackDisposer;
|
|
54
70
|
/**
|
|
@@ -60,13 +76,20 @@ export declare class MarketSettingsNamespace {
|
|
|
60
76
|
private feedbackMountState;
|
|
61
77
|
constructor(ctx: Context, refs: MarketSettingRefs, dataRoot: string, locale: {
|
|
62
78
|
t: HostTranslate;
|
|
63
|
-
}, host: SettingsNamespaceHost
|
|
79
|
+
}, host: SettingsNamespaceHost,
|
|
80
|
+
/**
|
|
81
|
+
* The host interface language, read per call. It is a reader rather than a
|
|
82
|
+
* captured string because a language switch must move the translation
|
|
83
|
+
* default without rebuilding this namespace.
|
|
84
|
+
*/
|
|
85
|
+
localePreference: () => string);
|
|
64
86
|
/** Subscribe the runtime reactions to live settings updates. */
|
|
65
87
|
mount(): void;
|
|
66
88
|
/** Release every watcher and unmount the feedback tool. */
|
|
67
89
|
dispose(): void;
|
|
68
90
|
/**
|
|
69
|
-
* The resolved settings, from the volatile references the host updates in
|
|
91
|
+
* The resolved settings, from the volatile references the host updates in
|
|
92
|
+
* place and the interface language they resolve over.
|
|
70
93
|
*/
|
|
71
94
|
private settings;
|
|
72
95
|
/** The persisted MCP backend choice; the built-in client until the host applies a value. */
|
|
@@ -79,6 +102,18 @@ export declare class MarketSettingsNamespace {
|
|
|
79
102
|
setBackend(backend: McpBackend): Promise<void>;
|
|
80
103
|
/** The persisted download-region setting. */
|
|
81
104
|
downloadRegion(): Promise<DownloadRegionSetting>;
|
|
105
|
+
/**
|
|
106
|
+
* Read the live translation switch: the stored preference while the user has
|
|
107
|
+
* one, the interface language's default otherwise.
|
|
108
|
+
*/
|
|
109
|
+
translationEnabled(): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Notify the translation owner on either effective preference edge. Unrelated
|
|
112
|
+
* writes do not reset failures or disturb cached results.
|
|
113
|
+
* @param previous - whether translation was on at the last look.
|
|
114
|
+
* @returns whether it is on now, for the next comparison.
|
|
115
|
+
*/
|
|
116
|
+
private syncTranslationProviders;
|
|
82
117
|
/** Apply the background source-update switch. */
|
|
83
118
|
private syncAutoUpdateSources;
|
|
84
119
|
private syncProjectLayouts;
|
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP backend selection: whether suite MCP servers mount through the
|
|
3
|
-
* market's self-built bridge (default — stdio, Streamable HTTP with OAuth,
|
|
4
|
-
* and legacy SSE) or through the host's `@deepseek-ai/dsh-mcp-client`
|
|
5
|
-
* (compatibility mode: no OAuth, no SSE, but the host-native implementation).
|
|
6
|
-
*
|
|
7
|
-
* The choice is the `mcpEnhanced` field of the market's host settings
|
|
8
|
-
* namespace (see `contracts/settings.ts`) registered by the plugin's node half:
|
|
9
|
-
* the registration is what makes the host 插件配置 tab serve our card, the
|
|
10
|
-
* client card binds it for state, and the node half watches it to remount
|
|
11
|
-
* servers when the switch flips.
|
|
12
|
-
*
|
|
13
|
-
* @module application/mcp-backend
|
|
14
|
-
*/
|
|
15
1
|
import z from '@deepseek-ai/schemastery';
|
|
16
|
-
import type { McpBackend } from '../../contracts/mcp.js';
|
|
17
|
-
export type { McpBackend };
|
|
18
2
|
/**
|
|
19
3
|
* Schema of the market settings namespace: the switches this plugin's config
|
|
20
4
|
* card serves, with the defaults declared to the host. The values themselves
|
|
21
5
|
* belong to {@link MARKET_SETTINGS_DEFAULTS}; this schema states them, it does
|
|
22
6
|
* not own them.
|
|
7
|
+
*
|
|
8
|
+
* `translationEnabled` deliberately declares no default. Its default follows
|
|
9
|
+
* the interface language, and a declared default would be materialized into the
|
|
10
|
+
* live config reference, where "the user never set this" and "the user turned it
|
|
11
|
+
* off" would both read `false` — the distinction the derivation rests on. With
|
|
12
|
+
* the field absent, the reference answers `undefined` until the user writes it,
|
|
13
|
+
* and {@link resolveMarketSettings} fills the language's own default in.
|
|
23
14
|
*/
|
|
24
15
|
export declare const MarketSettingsFields: {
|
|
25
16
|
readonly mcpEnhanced: z<boolean, boolean, "defined">;
|
|
@@ -27,6 +18,8 @@ export declare const MarketSettingsFields: {
|
|
|
27
18
|
readonly downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "defined">;
|
|
28
19
|
readonly feedbackEnabled: z<boolean, boolean, "defined">;
|
|
29
20
|
readonly autoUpdateSources: z<boolean, boolean, "defined">;
|
|
21
|
+
readonly translationEnabled: z<boolean, boolean, "plain">;
|
|
22
|
+
readonly agentPresetsEnabled: z<boolean, boolean, "defined">;
|
|
30
23
|
};
|
|
31
24
|
export declare const MarketSettingsSchema: z<Schemastery.ObjectS<NoInfer<{
|
|
32
25
|
readonly mcpEnhanced: z<boolean, boolean, "defined">;
|
|
@@ -34,22 +27,14 @@ export declare const MarketSettingsSchema: z<Schemastery.ObjectS<NoInfer<{
|
|
|
34
27
|
readonly downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "defined">;
|
|
35
28
|
readonly feedbackEnabled: z<boolean, boolean, "defined">;
|
|
36
29
|
readonly autoUpdateSources: z<boolean, boolean, "defined">;
|
|
30
|
+
readonly translationEnabled: z<boolean, boolean, "plain">;
|
|
31
|
+
readonly agentPresetsEnabled: z<boolean, boolean, "defined">;
|
|
37
32
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
38
33
|
readonly mcpEnhanced: z<boolean, boolean, "defined">;
|
|
39
34
|
readonly scanProjectLayouts: z<boolean, boolean, "defined">;
|
|
40
35
|
readonly downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "defined">;
|
|
41
36
|
readonly feedbackEnabled: z<boolean, boolean, "defined">;
|
|
42
37
|
readonly autoUpdateSources: z<boolean, boolean, "defined">;
|
|
38
|
+
readonly translationEnabled: z<boolean, boolean, "plain">;
|
|
39
|
+
readonly agentPresetsEnabled: z<boolean, boolean, "defined">;
|
|
43
40
|
}>>, "plain">;
|
|
44
|
-
/** What the host client probe reports: resolvability plus its version. */
|
|
45
|
-
export interface HostMcpClientProbe {
|
|
46
|
-
available: boolean;
|
|
47
|
-
version?: string;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Probe whether the host's `dsh-mcp-client` is resolvable from this plugin's
|
|
51
|
-
* module context, and at which version. Best effort: any failure reads as
|
|
52
|
-
* "unavailable", which the mount path surfaces as a per-server diagnostic
|
|
53
|
-
* when the host backend is selected.
|
|
54
|
-
*/
|
|
55
|
-
export declare function probeHostMcpClient(): Promise<HostMcpClientProbe>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Session-addressed extension APIs. Workspace authority comes from the live Agent, never request paths. */
|
|
2
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
|
+
import type { ExtensionRouteService } from '../../market-runtime/src/index.js';
|
|
4
|
+
export type { ExtensionRouteService } from '../../market-runtime/src/index.js';
|
|
5
|
+
interface WebHost {
|
|
6
|
+
webServer: {
|
|
7
|
+
register(route: {
|
|
8
|
+
kind: 'exact';
|
|
9
|
+
path: string;
|
|
10
|
+
handler(request: IncomingMessage, response: ServerResponse): Promise<void>;
|
|
11
|
+
}): () => void;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** Mount only after session initialization has an enforcement gate. */
|
|
15
|
+
export declare function mountExtensionPresetRoutes(host: WebHost, service: ExtensionRouteService): () => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ResourceFace } from '../../market-contracts/src/contracts/resource-window.js';
|
|
2
|
+
import { type ResourceInventoryDeps } from './application/resource-inventory.js';
|
|
3
|
+
/** What the window routes need from the composition root. */
|
|
4
|
+
export interface ResourceRouteDeps extends ResourceInventoryDeps {
|
|
5
|
+
/** Flip one entry; the service persists and reconciles. */
|
|
6
|
+
setEntry(face: ResourceFace, entryId: string, enabled: boolean): Promise<unknown>;
|
|
7
|
+
/** Apply one favorite's complete snapshot (six switches plus entry filters). */
|
|
8
|
+
applyFavorite(id: string): Promise<void>;
|
|
9
|
+
/** Save the current workspace state as one named favorite; returns its id. */
|
|
10
|
+
saveFavorite(name: string): Promise<string>;
|
|
11
|
+
/** Drop one favorite by id. */
|
|
12
|
+
deleteFavorite(id: string): Promise<void>;
|
|
13
|
+
/** Reset this workspace to the installed default: no entry filters, every surface switch on. */
|
|
14
|
+
resetWorkspace(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/** Mount the resource-window routes; returns the disposer releasing them all. */
|
|
17
|
+
export declare function mountResourceRoutes(hostCtx: unknown, deps: ResourceRouteDeps): () => void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
import type { MarketService } from '../../market-contracts/src/ports/queries.js';
|
|
3
|
+
import type { PanelResourceStore } from '../../market-runtime/src/index.js';
|
|
4
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
5
|
+
import type { ProjectExtensionReader } from './application/extension-project.js';
|
|
6
|
+
export interface WebServerService {
|
|
7
|
+
register(route: {
|
|
8
|
+
kind: 'exact' | 'prefix';
|
|
9
|
+
path: string;
|
|
10
|
+
handler: (request: IncomingMessage, response: ServerResponse) => void | Promise<void>;
|
|
11
|
+
}): () => void;
|
|
12
|
+
}
|
|
13
|
+
/** The live-session lookup a read route uses to answer for one session's workspace. */
|
|
14
|
+
export interface SuiteRouteSessionResolver {
|
|
15
|
+
/** The live agent for one session id; undefined when no such live session exists. */
|
|
16
|
+
agent(sessionId: string): Agent | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* That agent's project reader. The transport cannot build one itself: it holds
|
|
19
|
+
* the panel stores but not the panel sources or the full catalog they are read
|
|
20
|
+
* over. Omitted means session-scoped reads stay unavailable, never global.
|
|
21
|
+
*/
|
|
22
|
+
project?(agent: Agent): ProjectExtensionReader;
|
|
23
|
+
}
|
|
24
|
+
/** Mount every route; returns the disposer releasing them all. */
|
|
25
|
+
export declare function mountSuiteRoutes(hostCtx: unknown, manager: MarketService, panels?: {
|
|
26
|
+
skills: PanelResourceStore;
|
|
27
|
+
commands: PanelResourceStore;
|
|
28
|
+
agents: PanelResourceStore;
|
|
29
|
+
}, surfaceToggles?: {
|
|
30
|
+
currentToggles(): import('../../market-contracts/src/contracts/surface-toggles.js').SurfaceToggles;
|
|
31
|
+
set(key: import('../../market-contracts/src/contracts/surface-toggles.js').SurfaceToggleKey, enabled: boolean): Promise<unknown>;
|
|
32
|
+
}, session?: SuiteRouteSessionResolver): () => void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The composition root's mount adapters for the runtime coordinator.
|
|
3
|
+
*
|
|
4
|
+
* The runtime package drives MCP and LSP through structural ports; this module
|
|
5
|
+
* is the one place that knows which registries implement them, so the concrete
|
|
6
|
+
* transport packages stay out of the runtime's import graph. Construction here
|
|
7
|
+
* mirrors what the coordinator used to do itself: the same constructor
|
|
8
|
+
* arguments, and the plugin data root still set by the coordinator.
|
|
9
|
+
*
|
|
10
|
+
* @module runtime-adapters
|
|
11
|
+
*/
|
|
12
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
13
|
+
import type { McpMountFactory, RuntimeMounts, SharedMcpMountPort } from '../../market-runtime/src/index.js';
|
|
14
|
+
/**
|
|
15
|
+
* Build the shared-service MCP adapter over one context.
|
|
16
|
+
*
|
|
17
|
+
* The mount registry stays the sole owner of its transport state: this wrapper
|
|
18
|
+
* only adds the mount proof, which needs the registry's own server-name
|
|
19
|
+
* derivation, and forwards every other call unchanged.
|
|
20
|
+
* @param ctx - the context the registry mounts through.
|
|
21
|
+
* @param dataRoot - the plugin data root the registry stores overrides under.
|
|
22
|
+
* @returns the MCP adapter the coordinator drives.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createSharedMcpMount(ctx: Context, dataRoot: string): SharedMcpMountPort;
|
|
25
|
+
/**
|
|
26
|
+
* Create one MCP mount for an agent-scoped contributor.
|
|
27
|
+
*
|
|
28
|
+
* The contributor mounts into contexts it does not own, so it takes the factory
|
|
29
|
+
* and calls it per context; the adapter is the same object the coordinator
|
|
30
|
+
* drives, which keeps one registry implementation behind both seams.
|
|
31
|
+
* @param ctx - the context the mount registers into.
|
|
32
|
+
* @param dataRoot - the plugin data root the mount stores overrides under.
|
|
33
|
+
* @returns the MCP mount for that context.
|
|
34
|
+
*/
|
|
35
|
+
export declare const createMcpMount: McpMountFactory;
|
|
36
|
+
/**
|
|
37
|
+
* Build both mount adapters one reconciler drives.
|
|
38
|
+
* @param ctx - the context the registries mount through.
|
|
39
|
+
* @param dataRoot - the plugin data root the MCP registry stores overrides under.
|
|
40
|
+
* @returns the MCP and LSP adapters for that reconciler.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createRuntimeMounts(ctx: Context, dataRoot: string): RuntimeMounts;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { ExtensionHookRunInput, ExtensionHooksOverview } from '../../market-contracts/src/contracts/extension-presets.js';
|
|
3
|
+
import type { Suite } from '../../market-contracts/src/model/types.js';
|
|
4
|
+
import { ScopedExtensionContributors, projectAgentRoles, type ExtensionSuiteCandidate, type RuntimeReconciler, type HostTranslate, type createUserPanelStores, type createPanelResources } from '../../market-runtime/src/index.js';
|
|
5
|
+
import type { Catalog } from './application/catalog.js';
|
|
6
|
+
import type { SuiteRouteSessionResolver } from './routes.js';
|
|
7
|
+
interface SessionExtensionOptions {
|
|
8
|
+
ctx: Context;
|
|
9
|
+
dataRoot: string;
|
|
10
|
+
agentsRoot: string;
|
|
11
|
+
runtime: RuntimeReconciler;
|
|
12
|
+
hostLocale: {
|
|
13
|
+
t: HostTranslate;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface SessionExtensionSources {
|
|
17
|
+
catalog: Catalog;
|
|
18
|
+
panels: ReturnType<typeof createUserPanelStores>;
|
|
19
|
+
resources: ReturnType<typeof createPanelResources>;
|
|
20
|
+
readUserDeclarations: () => Promise<ExtensionSuiteCandidate[]>;
|
|
21
|
+
}
|
|
22
|
+
interface SessionExtensions {
|
|
23
|
+
mount(sources: SessionExtensionSources): void;
|
|
24
|
+
invalidate(invalidateDefaultSkills: () => void): void;
|
|
25
|
+
refresh(): Promise<void> | undefined;
|
|
26
|
+
commandRegistrations(): ReturnType<ScopedExtensionContributors['registrations']>;
|
|
27
|
+
roles: (parent?: unknown) => Promise<{
|
|
28
|
+
entries: Awaited<ReturnType<typeof projectAgentRoles>>;
|
|
29
|
+
complete: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
session(): SuiteRouteSessionResolver | undefined;
|
|
32
|
+
}
|
|
33
|
+
/** The catalog reads the settings Hooks page needs. */
|
|
34
|
+
type HooksOverviewCatalog = Pick<Catalog, 'enabledUserSuites' | 'overview' | 'mcpStatus' | 'lspStatus'>;
|
|
35
|
+
export declare function readHooksOverview(catalog: HooksOverviewCatalog): Promise<ExtensionHooksOverview>;
|
|
36
|
+
/** One dry run's resolved declaration: the command the catalog published, or the stable code that names why none resolved. */
|
|
37
|
+
export type HookDeclarationResolution = {
|
|
38
|
+
command: string;
|
|
39
|
+
timeoutSec?: number;
|
|
40
|
+
suite: Suite;
|
|
41
|
+
} | {
|
|
42
|
+
error: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Resolve one dry run's declaration from the same rows the Hooks overview
|
|
46
|
+
* publishes.
|
|
47
|
+
*
|
|
48
|
+
* The caller passes the suites to search, so a session's project hooks join
|
|
49
|
+
* user and installed rows without changing how identity is built. The command
|
|
50
|
+
* comes from the scanned declaration; the request carries identity only.
|
|
51
|
+
* @param catalog - the catalog status reads the overview uses.
|
|
52
|
+
* @param suites - the suites whose hook rows the lookup may match.
|
|
53
|
+
* @param input - the declaration address from the client.
|
|
54
|
+
* @returns the resolved command with its suite, or a stable error code.
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveHookDeclaration(catalog: HooksOverviewCatalog, suites: readonly Suite[], input: ExtensionHookRunInput): Promise<HookDeclarationResolution>;
|
|
57
|
+
/**
|
|
58
|
+
* Create the stable readers before catalog initialization. Mount only after its sources are loaded.
|
|
59
|
+
* Call mount once. Host injection owns start and disposal; construction registers nothing.
|
|
60
|
+
*/
|
|
61
|
+
export declare function createSessionExtensions({ ctx, dataRoot, runtime, hostLocale }: SessionExtensionOptions): SessionExtensions;
|
|
62
|
+
export {};
|
package/lib/types/{application → packages/market-catalog/src/application}/catalog-context.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { GitOptions } from '../
|
|
2
|
-
import { type DiscoveredSuite, type InstalledEntry, type Suite, type SuiteDimension, type SuiteState } from '
|
|
3
|
-
import type { CatalogPortsOverride } from '
|
|
1
|
+
import type { GitOptions } from '../scanning/git.js';
|
|
2
|
+
import { type DiscoveredSuite, type InstalledEntry, type Suite, type SuiteDimension, type SuiteState } from '../../../market-contracts/src/model/types.js';
|
|
3
|
+
import type { CatalogPortsOverride } from '../../../market-contracts/src/ports/ports.js';
|
|
4
4
|
import { SnapshotCache, type SnapshotHost } from './snapshot-cache.js';
|
|
5
5
|
/**
|
|
6
6
|
* Git network tuning, plumbed from the host config to every remote-touching
|
|
@@ -40,6 +40,12 @@ export interface CatalogOptions {
|
|
|
40
40
|
* staleness regressions need no real sleeps.
|
|
41
41
|
*/
|
|
42
42
|
userSnapshotTtlMs?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Clock seam for every TTL and window the snapshot cache keeps. Defaults to
|
|
45
|
+
* `Date.now`; a test injects a hand-driven clock so freshness, the scan
|
|
46
|
+
* cache, and the keep-warm window are asserted instead of waited for.
|
|
47
|
+
*/
|
|
48
|
+
now?: () => number;
|
|
43
49
|
}
|
|
44
50
|
/** Key of one install entry in the persisted `installed` record. */
|
|
45
51
|
export declare function installKey(sourceId: string, suiteId: string): string;
|
|
@@ -71,6 +77,8 @@ export declare class CatalogContext implements SnapshotHost {
|
|
|
71
77
|
readonly git: CatalogGitOptions;
|
|
72
78
|
/** Discovery scans and dimension snapshots derived from {@link state}. */
|
|
73
79
|
readonly snapshots: SnapshotCache;
|
|
80
|
+
/** The clock every TTL and window in this context is measured against. */
|
|
81
|
+
readonly now: () => number;
|
|
74
82
|
private readonly onChanged;
|
|
75
83
|
constructor(options: CatalogOptions);
|
|
76
84
|
get state(): SuiteState;
|
package/lib/types/{application → packages/market-catalog/src/application}/install-store.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SourceRef, type SuiteSurfaceKey } from '
|
|
1
|
+
import { type SourceRef, type SuiteSurfaceKey } from '../../../market-contracts/src/model/types.js';
|
|
2
2
|
import { type CatalogContext } from './catalog-context.js';
|
|
3
3
|
import { type SourceStore } from './source-store.js';
|
|
4
4
|
export declare class InstallStore {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @module application/regions
|
|
15
15
|
*/
|
|
16
|
-
import type { DownloadRegionSetting } from '
|
|
16
|
+
import type { DownloadRegionSetting } from '../../../market-contracts/src/contracts/settings.js';
|
|
17
17
|
/** The route downloads actually take. */
|
|
18
18
|
export type EffectiveRegion = 'global' | 'china';
|
|
19
19
|
/**
|