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
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
import type { McpStatusPayload } from './mcp/mcp-status.js';
|
|
2
|
-
import type { ServerConfigPayload } from '
|
|
3
|
-
import type { Suite } from '
|
|
4
|
-
import type { McpBackend } from '
|
|
5
|
-
import type { McpMountDiagnostic } from '
|
|
2
|
+
import type { ServerConfigPayload } from '../../../market-contracts/src/contracts/market.js';
|
|
3
|
+
import type { Suite } from '../../../market-contracts/src/model/types.js';
|
|
4
|
+
import type { McpBackend } from '../../../market-contracts/src/contracts/mcp.js';
|
|
5
|
+
import type { McpMountDiagnostic } from '../../../market-contracts/src/contracts/mcp.js';
|
|
6
6
|
import { type McpServerOverride, type McpSuiteOverrides } from './mcp/mcp-overrides.js';
|
|
7
|
-
import type { CatalogContext } from '
|
|
8
|
-
import type { CatalogPorts, McpBackendInfo } from '
|
|
9
|
-
import type { SourceStore } from '
|
|
7
|
+
import type { CatalogContext } from '../../../market-catalog/src/index.js';
|
|
8
|
+
import type { CatalogPorts, LocalizeFields, McpBackendInfo } from '../../../market-contracts/src/ports/ports.js';
|
|
9
|
+
import type { SourceStore } from '../../../market-catalog/src/index.js';
|
|
10
10
|
export declare class McpService {
|
|
11
11
|
private readonly context;
|
|
12
12
|
private readonly ports;
|
|
13
13
|
private readonly sources;
|
|
14
|
+
private readonly localizeFields;
|
|
14
15
|
/** Latest MCP mount diagnostics (suiteId -> reasons), fed by host reconcile. */
|
|
15
16
|
diagnostics: McpMountDiagnostic[];
|
|
16
|
-
constructor(context: CatalogContext, ports: CatalogPorts, sources: SourceStore);
|
|
17
|
+
constructor(context: CatalogContext, ports: CatalogPorts, sources: SourceStore, localizeFields: LocalizeFields);
|
|
17
18
|
/** Build the flat MCP service inventory for the status surface. */
|
|
18
19
|
status(): Promise<McpStatusPayload>;
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Validate configuration and policy before publishing a user-owned service.
|
|
22
|
+
* Policy is saved first: interruption can leave an unused override, never a
|
|
23
|
+
* declaration missing its requested policy. A failed declaration write restores
|
|
24
|
+
* the previous override; the two files are not a cross-file transaction.
|
|
25
|
+
*/
|
|
26
|
+
addServer(name: string, server: unknown, policy?: unknown): Promise<void>;
|
|
27
|
+
/** Read one MCP service without credential literals, or an unsaved creation template. */
|
|
28
|
+
serverConfig(id: string, create?: boolean): Promise<ServerConfigPayload>;
|
|
23
29
|
/**
|
|
24
30
|
* Validate a complete replacement before writing; plugin checkouts remain
|
|
25
31
|
* untouched. `policy` carries what the portable document has no seat for —
|
|
26
32
|
* the two timeouts, the user's tool denials and the OAuth opt-in; an absent
|
|
27
33
|
* field keeps its stored value, `null` clears it.
|
|
28
34
|
*/
|
|
29
|
-
saveServerConfig(
|
|
35
|
+
saveServerConfig(id: string, config: unknown, policy?: unknown): Promise<void>;
|
|
30
36
|
/** One suite's persisted MCP overrides, addressed by qualified suite id. */
|
|
31
37
|
overrides(sourceId: string, suiteId: string): Promise<McpSuiteOverrides>;
|
|
32
38
|
/**
|
|
@@ -91,9 +97,9 @@ export declare class McpService {
|
|
|
91
97
|
/** MCP overrides for a supplied runtime selection, or the full market catalog when omitted. */
|
|
92
98
|
allOverrides(suites?: readonly Suite[]): Promise<Map<string, McpSuiteOverrides>>;
|
|
93
99
|
/**
|
|
94
|
-
* Resolve one editable server: its key, owning suite, root, and the
|
|
95
|
-
* document the editor renders. An MCP document carries the portable
|
|
96
|
-
* only; the client policy behind it rides `policy`.
|
|
100
|
+
* Resolve one editable MCP server: its key, owning suite, root, and the
|
|
101
|
+
* service document the editor renders. An MCP document carries the portable
|
|
102
|
+
* shape only; the client policy behind it rides `policy`.
|
|
97
103
|
*/
|
|
98
104
|
private resolveServerConfig;
|
|
99
105
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Explicit cross-domain entry surface. Internal modules are not import targets for siblings. */
|
|
2
|
+
export { McpConfigError, restoreRedactedConfig, validateServerMcp, type McpFieldError } from './application/mcp/validation.js';
|
|
3
|
+
export type { McpStatusPayload } from './application/mcp/mcp-status.js';
|
|
4
|
+
export { USER_MCP_SOURCE, USER_MCP_SUITE, loadUserMcpSuite } from './application/mcp/mcp-direct-config.js';
|
|
5
|
+
export { applyOverride, loadSuiteOverrides, sanitizeOverridePatch } from './application/mcp/mcp-overrides.js';
|
|
6
|
+
export type { McpServerOverride, McpSuiteOverrides } from './application/mcp/mcp-overrides.js';
|
|
7
|
+
export { McpService } from './application/mcp-service.js';
|
|
8
|
+
export { credentialRefsInServer, deriveServerName } from './application/mcp/mcp-config.js';
|
|
9
|
+
export { buildMcpStatus } from './application/mcp/mcp-status.js';
|
|
10
|
+
export { deleteMcpAuthGrant } from './runtime/mcp/mcp-auth-record.js';
|
|
11
|
+
export { platformBrowserOpener } from './runtime/mcp/bridge/oauth.js';
|
|
12
|
+
export { McpMountRegistry } from './runtime/mcp/mcp-mounts.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
export interface BridgeToolRegistration {
|
|
3
|
+
definition: {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
};
|
|
6
|
+
serverName: string;
|
|
7
|
+
scope: object | undefined;
|
|
8
|
+
}
|
|
9
|
+
/** Publish identity before tools/change can expose a new definition; remove it after unregistering. */
|
|
10
|
+
export declare function registerOwnedBridgeTool(ctx: Context, serverName: string, definition: {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
}, register: () => () => void): () => void;
|
|
13
|
+
/** Exact definitions owned by bridge instances in this registration scope, independent of presentation mode. */
|
|
14
|
+
export declare function bridgeToolRegistrations(ctx: Context): BridgeToolRegistration[];
|
|
@@ -16,6 +16,10 @@ export declare const MCP_AUTH_RECORD_SCOPE = "mcp-auth";
|
|
|
16
16
|
* `__` separators (e.g. `cloudflare__cloudflare-api`), and the key grammar
|
|
17
17
|
* admits only `[a-z0-9-]`, so non-conforming characters collapse to `-` —
|
|
18
18
|
* deterministic, so the same server always reads and writes one record.
|
|
19
|
+
*
|
|
20
|
+
* One pass over the characters: a name arrives from a third-party suite, and
|
|
21
|
+
* the previous `[^a-z0-9-]+` replace with an anchored trim cost time quadratic
|
|
22
|
+
* in the length of a separator-only name.
|
|
19
23
|
*/
|
|
20
24
|
export declare function mcpAuthRecordId(serverName: string): string;
|
|
21
25
|
/** The credential record key one MCP server's OAuth grant is stored under. */
|
|
@@ -9,11 +9,14 @@
|
|
|
9
9
|
* the manager's diagnostic list.
|
|
10
10
|
*/
|
|
11
11
|
import type { Context } from '@deepseek-ai/cordis';
|
|
12
|
-
import type {
|
|
12
|
+
import type { ExtensionMcpTool } from '../../../../market-runtime/src/index.js';
|
|
13
|
+
import type { McpBackend } from '../../../../market-contracts/src/contracts/mcp.js';
|
|
13
14
|
import type { McpSuiteOverrides } from '../../application/mcp/mcp-overrides.js';
|
|
14
|
-
import type { Suite } from '
|
|
15
|
-
import type { McpMountDiagnostic } from '
|
|
15
|
+
import type { Suite } from '../../../../market-contracts/src/model/types.js';
|
|
16
|
+
import type { McpMountDiagnostic } from '../../../../market-contracts/src/contracts/mcp.js';
|
|
16
17
|
export type { McpMountDiagnostic };
|
|
18
|
+
/** Host compatibility has no exact registration-ownership callback and remains globally managed. */
|
|
19
|
+
export declare function supportsMcpSessionControl(backend: McpBackend): boolean;
|
|
17
20
|
export declare class McpMountRegistry {
|
|
18
21
|
private readonly ctx;
|
|
19
22
|
private readonly pluginDataRoot;
|
|
@@ -25,6 +28,8 @@ export declare class McpMountRegistry {
|
|
|
25
28
|
private toolNamesProvider;
|
|
26
29
|
/** The active MCP mount backend ('builtin' bridge or host client compat mode). */
|
|
27
30
|
private backendProvider;
|
|
31
|
+
/** Per-workspace entry filter; an absent provider mounts everything wanted. */
|
|
32
|
+
private entryFilter;
|
|
28
33
|
/** Serialize mount and unmount passes so a disable cannot race an in-flight spawn. */
|
|
29
34
|
private readonly passes;
|
|
30
35
|
/** Delayed re-attempts for mounts that are not live yet. */
|
|
@@ -48,6 +53,15 @@ export declare class McpMountRegistry {
|
|
|
48
53
|
setToolNamesProvider(provider: () => string[]): void;
|
|
49
54
|
/** Install the backend provider deciding which client mounts each server. */
|
|
50
55
|
setBackendProvider(provider: () => Promise<McpBackend>): void;
|
|
56
|
+
/**
|
|
57
|
+
* Install the per-workspace entry filter read at wanted-row time. A filtered
|
|
58
|
+
* server simply never becomes wanted, which is the same unmount path a
|
|
59
|
+
* removed suite takes; the registry stays attached and reconciles normally
|
|
60
|
+
* when the filter changes.
|
|
61
|
+
*/
|
|
62
|
+
setEntryFilter(filter: () => {
|
|
63
|
+
allows(face: 'mcp', entryId: string): boolean;
|
|
64
|
+
}): void;
|
|
51
65
|
/** Whether the last catalog snapshot uses one credential reference. */
|
|
52
66
|
usesCredential(ref: string): boolean;
|
|
53
67
|
/**
|
|
@@ -68,6 +82,8 @@ export declare class McpMountRegistry {
|
|
|
68
82
|
suiteId: string;
|
|
69
83
|
serverKey: string;
|
|
70
84
|
} | undefined;
|
|
85
|
+
/** Current exact definitions, including an initializing bridge, independent of Native/PTC presentation. */
|
|
86
|
+
toolOwnership(): ExtensionMcpTool[];
|
|
71
87
|
/** Queue one reconciliation behind any in-flight mount/unmount pass. */
|
|
72
88
|
reconcile(enabledSuites: Suite[]): Promise<McpMountDiagnostic[]>;
|
|
73
89
|
/** Mount/unmount MCP servers to match the enabled suites exactly. */
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mount adapters the runtime coordinator drives, stated as structural ports.
|
|
3
|
+
*
|
|
4
|
+
* The coordinator owns ordering, containment and disposal; the MCP and LSP
|
|
5
|
+
* registries own their transports. Each port below lists exactly the members its
|
|
6
|
+
* consumer calls, with the signatures those registries already carry, so the
|
|
7
|
+
* composition root injects the implementations and no runtime module imports a
|
|
8
|
+
* transport package. Diagnostic values cross the seam as the shared wire
|
|
9
|
+
* contracts both registries re-export, so one failure keeps one type.
|
|
10
|
+
*
|
|
11
|
+
* @module adapter-contracts
|
|
12
|
+
*/
|
|
13
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
14
|
+
import type { McpBackend, McpMountDiagnostic } from '../../market-contracts/src/contracts/mcp.js';
|
|
15
|
+
import type { LspMountDiagnostic } from '../../market-contracts/src/contracts/lsp.js';
|
|
16
|
+
import type { LspMountStatusSource } from '../../market-contracts/src/ports/ports.js';
|
|
17
|
+
import type { LspServerSpec, Suite } from '../../market-contracts/src/model/types.js';
|
|
18
|
+
import type { ExtensionLspProvider, ExtensionMcpTool } from './runtime/host/extension-tool-gates.js';
|
|
19
|
+
/**
|
|
20
|
+
* One suite's MCP override table, narrowed to what the coordinator reads: it
|
|
21
|
+
* only marks a demanded server enabled. Every field of the registry's own row
|
|
22
|
+
* type is optional, so this port and `McpSuiteOverrides` stay mutually
|
|
23
|
+
* assignable and no cast is needed in either direction.
|
|
24
|
+
*/
|
|
25
|
+
export type McpOverridesPort = Record<string, {
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
/** The MCP mount surface the agent-scoped contributor drives over one context. */
|
|
29
|
+
export interface McpMountPort {
|
|
30
|
+
setOverridesProvider(provider: () => Promise<Map<string, McpOverridesPort>>): void;
|
|
31
|
+
setBackendProvider(provider: () => Promise<McpBackend>): void;
|
|
32
|
+
setToolNamesProvider(provider: () => string[]): void;
|
|
33
|
+
reconcile(enabledSuites: Suite[]): Promise<McpMountDiagnostic[]>;
|
|
34
|
+
disposeAll(): Promise<void>;
|
|
35
|
+
toolOwnership(): ExtensionMcpTool[];
|
|
36
|
+
}
|
|
37
|
+
/** The complete MCP mount adapter the shared-service coordinator drives. */
|
|
38
|
+
export interface SharedMcpMountPort extends McpMountPort {
|
|
39
|
+
setEntryFilter(filter: () => {
|
|
40
|
+
allows(face: 'mcp', entryId: string): boolean;
|
|
41
|
+
}): void;
|
|
42
|
+
usesCredential(ref: string): boolean;
|
|
43
|
+
forceRemount(suiteId: string, serverKey: string): void;
|
|
44
|
+
forceRemountAll(): void;
|
|
45
|
+
serverOwner(serverName: string): {
|
|
46
|
+
suiteId: string;
|
|
47
|
+
serverKey: string;
|
|
48
|
+
} | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Prove one suite's demanded servers are mounted by this adapter.
|
|
51
|
+
*
|
|
52
|
+
* Lives here rather than in the coordinator because the proof needs the mount
|
|
53
|
+
* key this adapter derives for a server, which is transport knowledge.
|
|
54
|
+
* @param suite - the suite whose demanded servers must be live.
|
|
55
|
+
* @param diagnostics - the mount diagnostics of the pass that just ran.
|
|
56
|
+
* @param failed - whether that pass already recorded an MCP mount error.
|
|
57
|
+
* @throws when a demanded server is not the exact live owner of its key.
|
|
58
|
+
*/
|
|
59
|
+
assertMounted(suite: Suite, diagnostics: readonly McpMountDiagnostic[], failed: boolean): void;
|
|
60
|
+
}
|
|
61
|
+
/** The LSP mount adapter the coordinator drives and the status surfaces read. */
|
|
62
|
+
export interface LspMountPort extends LspMountStatusSource {
|
|
63
|
+
setPluginDataRoot(root: string): void;
|
|
64
|
+
setDirectProvider(provider: () => Promise<Record<string, LspServerSpec>>): void;
|
|
65
|
+
setDisabledProvider(provider: () => Promise<Set<string>>): void;
|
|
66
|
+
setEntryFilter(filter: () => {
|
|
67
|
+
allows(face: 'lsp', entryId: string): boolean;
|
|
68
|
+
}): void;
|
|
69
|
+
setDemandedProviderIdsProvider(provider: () => ReadonlySet<string>): void;
|
|
70
|
+
/** Current global disabled ids, without merging session demand. */
|
|
71
|
+
globalDisabledProviderIds(): Promise<ReadonlySet<string>>;
|
|
72
|
+
providerOwnership(): ExtensionLspProvider[];
|
|
73
|
+
ownsTool(): boolean;
|
|
74
|
+
reconcile(enabledSuites: Suite[]): Promise<LspMountDiagnostic[]>;
|
|
75
|
+
disposeAll(): Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
/** The mount adapters one reconciler drives; the composition root builds both. */
|
|
78
|
+
export interface RuntimeMounts {
|
|
79
|
+
readonly mcp: SharedMcpMountPort;
|
|
80
|
+
readonly lsp: LspMountPort;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Create one MCP mount over a caller-supplied context.
|
|
84
|
+
*
|
|
85
|
+
* The agent-scoped contributor mounts project servers and the workspace-pooled
|
|
86
|
+
* host bridge into contexts it does not own, so it takes the factory rather than
|
|
87
|
+
* an instance; the composition root closes over the concrete registry.
|
|
88
|
+
*/
|
|
89
|
+
export type McpMountFactory = (ctx: Context, dataRoot: string) => McpMountPort;
|
|
@@ -6,6 +6,8 @@ export interface AgentRoleEntry {
|
|
|
6
6
|
path: string;
|
|
7
7
|
description: string;
|
|
8
8
|
disabled: boolean;
|
|
9
|
+
/** Server-owned grant from the current parent's selected-role reader, never accepted from tool input. Revalidated before spawn. */
|
|
10
|
+
selectionEnabled?: boolean;
|
|
9
11
|
title?: string;
|
|
10
12
|
rawText?: string;
|
|
11
13
|
/** Suite checkout root the card's `${PLUGIN_ROOT}` variables resolve to; absent for project-native files. */
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SuiteMarkdownResource } from '../../../market-contracts/src/model/types.js';
|
|
2
|
+
export interface CommandSpec {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
body: string;
|
|
6
|
+
hint?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The resource name as authored, before it was flattened into
|
|
9
|
+
* {@link CommandSpec.name} (`git/commit` where the call name is
|
|
10
|
+
* `git-commit`). The panel addresses the same document by this spelling, so
|
|
11
|
+
* it is the id the two surfaces have to agree on.
|
|
12
|
+
*/
|
|
13
|
+
resourceName: string;
|
|
14
|
+
/** Set when the command file belongs to a suite with a plugin root; absent for project-native files. */
|
|
15
|
+
suiteRoot?: string;
|
|
16
|
+
/** The suite's `${PLUGIN_DATA}` directory; absent for project-native files. */
|
|
17
|
+
suiteData?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CommandReadOptions {
|
|
20
|
+
/** Preserve valid disabled declarations without changing their document or the default runtime policy. */
|
|
21
|
+
includeDisabled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Parse one declared resource; resourceName retains its identity before call-name flattening. */
|
|
24
|
+
export declare function parseCommandResource(entry: SuiteMarkdownResource, text: string, options?: CommandReadOptions): CommandSpec | undefined;
|
|
25
|
+
/** Read declared commands, or discover the conventional directory when resources is omitted. */
|
|
26
|
+
export declare function readCommands(root: string, resources?: SuiteMarkdownResource[], options?: CommandReadOptions): Promise<CommandSpec[]>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ExtensionResource, ExtensionSelection } from '../../../market-contracts/src/contracts/extension-presets.js';
|
|
2
|
+
/**
|
|
3
|
+
* A resource must remain available and its suite must also be selected.
|
|
4
|
+
*
|
|
5
|
+
* A configuration parent (a `configuration` row, or any id in
|
|
6
|
+
* CONFIGURATION_PARENT_IDS) publishes no card anywhere, so a preset never
|
|
7
|
+
* carries its id: the grant is derived instead. When the row in question is
|
|
8
|
+
* the parent itself, any selected child grants it; when the row's parent is a
|
|
9
|
+
* configuration parent, the parent's availability and selection halves are
|
|
10
|
+
* skipped and the child's own id alone decides.
|
|
11
|
+
*/
|
|
12
|
+
export declare function extensionResourceEnabled(resource: ExtensionResource, selection: ExtensionSelection, resources: readonly ExtensionResource[]): boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ProjectHooks, Suite } from '../../../market-contracts/src/model/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The suites whose session inventory exposes one selectable row per command hook.
|
|
4
|
+
*
|
|
5
|
+
* Project-dimension suites and the user hooks configuration suite are the ones
|
|
6
|
+
* the session window lists hook rows for. An installed suite publishes no
|
|
7
|
+
* individual row, so its hooks stay governed by the parent suite grant.
|
|
8
|
+
* @param suite - the suite to classify.
|
|
9
|
+
* @returns whether this suite's hooks are addressed individually.
|
|
10
|
+
*/
|
|
11
|
+
export declare function exposesIndividualHooks(suite: Pick<Suite, 'sourceId' | 'id' | 'dimension'>): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether one declaration admits any hook under the exact published identities.
|
|
14
|
+
*
|
|
15
|
+
* A stale identity — an event the declaration no longer carries, or a position
|
|
16
|
+
* past the end of its hook list — admits nothing, so a preset saved against an
|
|
17
|
+
* older declaration grants no capability it does not name.
|
|
18
|
+
* @param suite - the suite whose declaration is being projected.
|
|
19
|
+
* @param hooks - the validated declaration, when it has one.
|
|
20
|
+
* @param enabledIds - the session selection's resource ids.
|
|
21
|
+
* @returns whether at least one command hook of the declaration is named.
|
|
22
|
+
*/
|
|
23
|
+
export declare function admitsAnyHook(suite: Pick<Suite, 'sourceId' | 'id'>, hooks: ProjectHooks | undefined, enabledIds: readonly string[]): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Validate local suite declarations without applying global enablement or mutating source files. */
|
|
2
|
+
import type { Suite } from '../../../market-contracts/src/model/types.js';
|
|
3
|
+
import type { ExtensionSuiteCandidate } from './extension-suite-selection.js';
|
|
4
|
+
/**
|
|
5
|
+
* Callers supply installed/local suites from catalog snapshots with validated skill, MCP, LSP and hook declarations.
|
|
6
|
+
* Markdown is revalidated from explicit resource lists; absent lists never trigger discovery.
|
|
7
|
+
* Returns detached declarations with valid disabled entries retained. Missing files and invalid markdown are omitted;
|
|
8
|
+
* other I/O failures reject the read rather than publishing a partial replacement.
|
|
9
|
+
*/
|
|
10
|
+
export declare function readExtensionSuiteDeclarations(suites: readonly Suite[]): Promise<ExtensionSuiteCandidate[]>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ExtensionSelection } from '../../../market-contracts/src/contracts/extension-presets.js';
|
|
2
|
+
import type { Suite, SuiteSurfaceKey } from '../../../market-contracts/src/model/types.js';
|
|
3
|
+
export interface ExtensionSuiteCandidate {
|
|
4
|
+
/** Already installed/local declarations, including parser-validated system prompts and materialized valid markdown lists. */
|
|
5
|
+
suite: Suite;
|
|
6
|
+
/** Evidence from the existing parse owner, not global toggles or an all-true fallback. Unknown/invalid surfaces are false. */
|
|
7
|
+
validSurfaces: Readonly<Record<SuiteSurfaceKey, boolean>>;
|
|
8
|
+
}
|
|
9
|
+
export interface ExtensionSuiteProjection {
|
|
10
|
+
suite: Suite;
|
|
11
|
+
globalEnabled: boolean;
|
|
12
|
+
globalSurfaces: Record<SuiteSurfaceKey, boolean>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Whether one resource id belongs to this suite's own selectable surface.
|
|
16
|
+
*
|
|
17
|
+
* The inventory addresses a suite's children with these exact spellings, so
|
|
18
|
+
* this one predicate decides both "the suite is selected" (the parent id, or
|
|
19
|
+
* any child id for a configuration parent whose card no client renders) and
|
|
20
|
+
* "this child is selected". It is the single derivation point the session
|
|
21
|
+
* selection and the shared reconciler share.
|
|
22
|
+
*/
|
|
23
|
+
export declare function suiteOwnsResourceId(suite: Pick<Suite, 'sourceId' | 'id'>, resourceId: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Project validated declarations without scanning, mounting, or changing global defaults.
|
|
26
|
+
* Callers retain credential, tool-policy and execution checks; this is not shared-service union ownership.
|
|
27
|
+
* Unmaterialized markdown is empty rather than a request for downstream filesystem discovery.
|
|
28
|
+
* Surface counts remain declaration metadata; activeSurfaces and filtered tables govern execution.
|
|
29
|
+
*/
|
|
30
|
+
export declare function projectExtensionSuites(candidates: readonly ExtensionSuiteCandidate[], selection: ExtensionSelection): ExtensionSuiteProjection[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a path is confirmed absent rather than unreadable.
|
|
3
|
+
*
|
|
4
|
+
* An error code alone cannot separate a removed entry from an unreadable
|
|
5
|
+
* source, because a platform can report `ENOENT` for a child of a file. The
|
|
6
|
+
* path ancestors answer the question instead: when the nearest existing
|
|
7
|
+
* ancestor is a directory, the entry is genuinely gone, and when it is not a
|
|
8
|
+
* directory, the source cannot be read and the caller must fail closed.
|
|
9
|
+
* @param path - the path to classify.
|
|
10
|
+
* @returns `true` only when the path is confirmed absent.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isAbsentPath(path: string): Promise<boolean>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { UserPanelEntryWire, UserPanelKind } from '../../../market-contracts/src/contracts/market.js';
|
|
2
|
+
import type { DocumentTranslation } from '../../../market-contracts/src/contracts/translation.js';
|
|
3
|
+
/**
|
|
4
|
+
* The user-panel store surface the panel resources drive (structural).
|
|
5
|
+
*
|
|
6
|
+
* The store always reads whole documents, and only the single-entry read hands
|
|
7
|
+
* one back over the wire; the raw text stays inside this module so the list
|
|
8
|
+
* view never serializes it.
|
|
9
|
+
*/
|
|
10
|
+
interface UserPanelEntries {
|
|
11
|
+
list(strict?: boolean): Promise<PanelEntryRecord[]>;
|
|
12
|
+
create(name: string, text: string): Promise<UserPanelEntryWire>;
|
|
13
|
+
update(name: string, text: string): Promise<void>;
|
|
14
|
+
remove(name: string): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
import type { CatalogPort as Catalog } from '../catalog-port.js';
|
|
17
|
+
/** One panel entry with its document, as this module keeps it in memory. */
|
|
18
|
+
interface PanelEntryRecord extends UserPanelEntryWire {
|
|
19
|
+
rawText: string;
|
|
20
|
+
}
|
|
21
|
+
/** The routes consume this structural surface, also implemented by user-only stores in tests. */
|
|
22
|
+
/** One panel read: the entries, and how many description fields it left in flight. */
|
|
23
|
+
export interface PanelRead {
|
|
24
|
+
entries: UserPanelEntryWire[];
|
|
25
|
+
/** Fields this read queued that have not landed yet; 0 means the text is settled. */
|
|
26
|
+
translationPending: number;
|
|
27
|
+
}
|
|
28
|
+
export interface PanelResourceStore {
|
|
29
|
+
/**
|
|
30
|
+
* Entries plus the translation work this read queued. A reader that wants the
|
|
31
|
+
* translated text polls this until the count reaches zero; one that only
|
|
32
|
+
* needs the rows calls {@link PanelResourceStore.list}.
|
|
33
|
+
*
|
|
34
|
+
* The rows carry no document text: it was the bulk of the response, and only
|
|
35
|
+
* the one entry a reader opens needs it — {@link PanelResourceStore.get}.
|
|
36
|
+
* @param strict - propagate I/O failures instead of skipping the entry.
|
|
37
|
+
* @param force - re-derive every row instead of answering from the row cache;
|
|
38
|
+
* the panel's Refresh button is what a user presses when they want the
|
|
39
|
+
* working tree as it stands now.
|
|
40
|
+
*/
|
|
41
|
+
read(strict?: boolean, force?: boolean): Promise<PanelRead>;
|
|
42
|
+
/** Strict runtime reads propagate I/O failures so catalogs cannot publish partial replacements. */
|
|
43
|
+
list(strict?: boolean): Promise<UserPanelEntryWire[]>;
|
|
44
|
+
/**
|
|
45
|
+
* One entry with the file's current document, for the surface that reads or
|
|
46
|
+
* rewrites it. Every field the document itself supplies comes from one read of
|
|
47
|
+
* it, so the answer is one revision of the entry rather than a fresh document
|
|
48
|
+
* beside cached metadata.
|
|
49
|
+
*/
|
|
50
|
+
get(id: string): Promise<UserPanelEntryWire | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* One entry's document translated for the panel's locale, chunk by chunk.
|
|
53
|
+
*
|
|
54
|
+
* The entry is re-read here rather than accepted from the caller: the route
|
|
55
|
+
* above it only names an entry, so a page cannot hand this layer arbitrary
|
|
56
|
+
* text to spend the operator's translation quota on. The body is split and
|
|
57
|
+
* the chunks this read could not answer for are queued; the caller polls
|
|
58
|
+
* until `pending` reaches zero.
|
|
59
|
+
*/
|
|
60
|
+
translateDocument(id: string, retry?: boolean): Promise<DocumentTranslation>;
|
|
61
|
+
create(name: string, text: string): Promise<UserPanelEntryWire>;
|
|
62
|
+
update(id: string, text: string): Promise<void>;
|
|
63
|
+
remove(id: string): Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Id of one suite-owned document, whichever surface addresses it. The leading
|
|
67
|
+
* `[` is what distinguishes a plugin entry from a user-authored one;
|
|
68
|
+
* `update`/`remove` use {@link isPluginResourceId} to tell them apart, and the
|
|
69
|
+
* market detail page keys its document translations by the same value so one
|
|
70
|
+
* file stays one cache entry across both surfaces.
|
|
71
|
+
*/
|
|
72
|
+
export declare function pluginResourceId(sourceId: string, suiteId: string, kind: UserPanelKind, name: string): string;
|
|
73
|
+
/** Whether a panel entry id addresses a file inside an installed suite. */
|
|
74
|
+
export declare function isPluginResourceId(id: string): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* How long one set of scanned rows may be reused.
|
|
77
|
+
*
|
|
78
|
+
* The memo exists to collapse the reads one interaction produces — the re-read
|
|
79
|
+
* after a mutation, the detail open, the next panel's read — and to absorb one
|
|
80
|
+
* tick of the client's 1.5 s translation poll. It must not outlive that: the
|
|
81
|
+
* scan reads file contents, so an out-of-band edit stays invisible to a reused
|
|
82
|
+
* row for as long as the bound allows. Ageing the rows on the snapshot object
|
|
83
|
+
* alone would inherit the user snapshot's 30 s TTL — the keep-warm refresh
|
|
84
|
+
* replaces that object only every 0.8 of it — leaving a hand edit invisible for
|
|
85
|
+
* tens of seconds. Two seconds is one poll interval plus the slack a slow read
|
|
86
|
+
* needs, so a poll landing a tick after the read that armed it is still free,
|
|
87
|
+
* while a hand edit is visible by the next poll at the latest — and Refresh
|
|
88
|
+
* re-reads unconditionally.
|
|
89
|
+
*/
|
|
90
|
+
export declare const ROW_CACHE_MAX_AGE_MS = 2000;
|
|
91
|
+
/**
|
|
92
|
+
* Build the three panel stores over one catalog.
|
|
93
|
+
*
|
|
94
|
+
* Translation reaches the panels as a callback rather than a direct
|
|
95
|
+
* collaborator: the catalog owns the localizer, and a panel only needs the
|
|
96
|
+
* resolved field set for one entry. Each panel binds its own kind, which is
|
|
97
|
+
* also the translation surface its entries belong to.
|
|
98
|
+
*/
|
|
99
|
+
export declare function createPanelResources(catalog: Catalog, users: Record<UserPanelKind, UserPanelEntries>, projectCwd?: string): Record<UserPanelKind, PanelResourceStore>;
|
|
100
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AgentRoleEntry } from './agent-roles.js';
|
|
2
|
+
import type { CatalogPort as Catalog } from '../catalog-port.js';
|
|
3
|
+
import type { Suite } from '../../../market-contracts/src/model/types.js';
|
|
4
|
+
export interface ProjectAgentRoleOptions {
|
|
5
|
+
/** Validated selected clones; absence preserves ordinary project discovery. */
|
|
6
|
+
suites?: () => Promise<Suite[]>;
|
|
7
|
+
/** Current parent-scoped grant, checked after parsing each document. */
|
|
8
|
+
selected?: (entry: AgentRoleEntry) => boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function projectAgentRoles(catalog: Catalog, parent: unknown, options?: ProjectAgentRoleOptions): Promise<AgentRoleEntry[]>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ExtensionPresetInput, type ExtensionPresetLibrary } from '../../../../market-contracts/src/contracts/extension-presets.js';
|
|
2
|
+
export declare class ExtensionPresetError extends Error {
|
|
3
|
+
readonly code: 'preset-conflict' | 'preset-not-found' | 'preset-name-conflict' | 'preset-state-invalid';
|
|
4
|
+
constructor(code: 'preset-conflict' | 'preset-not-found' | 'preset-name-conflict' | 'preset-state-invalid', message: string);
|
|
5
|
+
}
|
|
6
|
+
/** The workspace path is validated and hashed; names and clipboard data never determine a path. */
|
|
7
|
+
export declare function extensionPresetLibraryPath(dataRoot: string, workspace: string): string;
|
|
8
|
+
export declare class ExtensionPresetStore {
|
|
9
|
+
private readonly dataRoot;
|
|
10
|
+
constructor(dataRoot: string);
|
|
11
|
+
/** Read current disk state; corruption and access failures reject rather than erasing saved choices. */
|
|
12
|
+
read(workspace: string): Promise<ExtensionPresetLibrary>;
|
|
13
|
+
/** Create a named preset at the caller's observed library revision; configuration parents never persist. */
|
|
14
|
+
create(workspace: string, expectedRevision: number, input: ExtensionPresetInput): Promise<ExtensionPresetLibrary>;
|
|
15
|
+
/** Replace one preset and advance its revision; existing session snapshots are not touched. */
|
|
16
|
+
update(workspace: string, expectedRevision: number, id: string, input: ExtensionPresetInput): Promise<ExtensionPresetLibrary>;
|
|
17
|
+
/** Choose only the default for future sessions. Null captures global choices for new sessions. */
|
|
18
|
+
setDefault(workspace: string, expectedRevision: number, id: string | null): Promise<ExtensionPresetLibrary>;
|
|
19
|
+
/** Delete a preset and clear its default pointer atomically; sessions retain their copies. */
|
|
20
|
+
delete(workspace: string, expectedRevision: number, id: string): Promise<ExtensionPresetLibrary>;
|
|
21
|
+
private requirePreset;
|
|
22
|
+
private assertName;
|
|
23
|
+
private mutate;
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ResourceFavoriteInput, type ResourceFavoriteWire } from '../../../../market-contracts/src/contracts/resource-window.js';
|
|
2
|
+
/** The favorites file lives at the data root, beside the surface-toggles directory. */
|
|
3
|
+
export declare function resourceFavoritesPath(dataRoot: string): string;
|
|
4
|
+
/** Load the global favorite list; absent or malformed means none. */
|
|
5
|
+
export declare function loadResourceFavorites(dataRoot: string): Promise<ResourceFavoriteWire[]>;
|
|
6
|
+
/** Append one favorite and return the stored row. */
|
|
7
|
+
export declare function saveResourceFavorite(dataRoot: string, input: ResourceFavoriteInput): Promise<ResourceFavoriteWire>;
|
|
8
|
+
/** Drop one favorite by id; a missing id is a no-op. */
|
|
9
|
+
export declare function deleteResourceFavorite(dataRoot: string, id: string): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Legacy surface view over the canonical workspace policy document. */
|
|
2
|
+
import type { SurfaceToggles } from '../../../../market-contracts/src/contracts/surface-toggles.js';
|
|
3
|
+
export { surfaceTogglesPath } from './workspace-policy.js';
|
|
4
|
+
export declare function loadSurfaceToggles(dataRoot: string, workspace: string): Promise<SurfaceToggles>;
|
|
5
|
+
/** Replace surface choices while preserving the latest committed entry choices. */
|
|
6
|
+
export declare function saveSurfaceToggles(dataRoot: string, workspace: string, toggles: SurfaceToggles): Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type SurfaceToggleKey, type SurfaceToggles } from '../../../../market-contracts/src/contracts/surface-toggles.js';
|
|
2
|
+
export type FilterFace = SurfaceToggleKey;
|
|
3
|
+
export interface ResourceFilters {
|
|
4
|
+
toggles: SurfaceToggles;
|
|
5
|
+
offEntries: Partial<Record<FilterFace, string[]>>;
|
|
6
|
+
}
|
|
7
|
+
export declare function allFiltersOn(): ResourceFilters;
|
|
8
|
+
/** Preserve the existing workspace hash and file location. */
|
|
9
|
+
export declare function surfaceTogglesPath(dataRoot: string, workspace: string): string;
|
|
10
|
+
export declare function resolveOffEntries(value: unknown): Partial<Record<FilterFace, string[]>>;
|
|
11
|
+
/** v1 and v2 share field names. Invalid JSON and access failures still reject. */
|
|
12
|
+
export declare function loadResourceFilters(dataRoot: string, workspace: string): Promise<ResourceFilters>;
|
|
13
|
+
/**
|
|
14
|
+
* Re-read under the published host file lock, persist once, then return the committed snapshot.
|
|
15
|
+
* The mutation stays synchronous; no runtime refresh or caller callback runs under the file lock.
|
|
16
|
+
*/
|
|
17
|
+
export declare function mutateResourceFilters(dataRoot: string, workspace: string, mutate: (current: ResourceFilters) => ResourceFilters): Promise<ResourceFilters>;
|
|
18
|
+
/** Replace both policy sections as one transaction. */
|
|
19
|
+
export declare function saveResourceFilters(dataRoot: string, workspace: string, filters: ResourceFilters): Promise<void>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Read-only product queries required by session and content contributors. */
|
|
2
|
+
import type { CatalogSnapshot } from '../../market-catalog/src/index.js';
|
|
3
|
+
import type { Suite } from '../../market-contracts/src/model/types.js';
|
|
4
|
+
import type { OverviewPayload, SuiteDocumentText, UserPanelKind } from '../../market-contracts/src/contracts/market.js';
|
|
5
|
+
import type { McpStatusPayload } from '../../market-contracts/src/contracts/mcp-status.js';
|
|
6
|
+
import type { LspStatusPayload } from '../../market-contracts/src/contracts/lsp-status.js';
|
|
7
|
+
import type { McpBackend } from '../../market-contracts/src/contracts/mcp.js';
|
|
8
|
+
import type { LocalizeFields, LocalizeDocument } from '../../market-contracts/src/ports/ports.js';
|
|
9
|
+
import type { DocumentTranslation } from '../../market-contracts/src/contracts/translation.js';
|
|
10
|
+
import type { McpSuiteOverrides } from '../../market-contracts/src/contracts/mcp-overrides.js';
|
|
11
|
+
export interface CatalogPort {
|
|
12
|
+
readonly userRoot: string;
|
|
13
|
+
readonly dataRoot: string;
|
|
14
|
+
readonly agentsRoot: string;
|
|
15
|
+
readonly localePreference: string;
|
|
16
|
+
now(): number;
|
|
17
|
+
isInstalled(sourceId: string, suiteId: string): boolean;
|
|
18
|
+
readUserCatalog(): Promise<CatalogSnapshot>;
|
|
19
|
+
readProjectCatalog(cwd: string): Promise<CatalogSnapshot>;
|
|
20
|
+
enabledUserSuites(): Promise<Suite[]>;
|
|
21
|
+
overview(): Promise<OverviewPayload>;
|
|
22
|
+
mcpStatus(): Promise<McpStatusPayload>;
|
|
23
|
+
lspStatus(): Promise<LspStatusPayload>;
|
|
24
|
+
mcpBackend(): Promise<McpBackend>;
|
|
25
|
+
allMcpOverrides(suites?: readonly Suite[]): Promise<Map<string, McpSuiteOverrides>>;
|
|
26
|
+
translateFields: LocalizeFields;
|
|
27
|
+
translateDocument: LocalizeDocument;
|
|
28
|
+
suiteDocument(sourceId: string, suiteId: string, kind: UserPanelKind, name: string, cwd?: string): Promise<SuiteDocumentText>;
|
|
29
|
+
suiteDocumentTranslation(sourceId: string, suiteId: string, kind: UserPanelKind, name: string, retry?: boolean, cwd?: string): Promise<DocumentTranslation>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ExtensionHookRunInput, ExtensionHookRunResult, ExtensionHooksOverview, ExtensionWindowPayload, ExtensionPresetInput } from '../../market-contracts/src/contracts/extension-presets.js';
|
|
2
|
+
export interface ExtensionRouteService {
|
|
3
|
+
window(sessionId: string): Promise<ExtensionWindowPayload>;
|
|
4
|
+
create(sessionId: string, revision: number, input: ExtensionPresetInput): Promise<void>;
|
|
5
|
+
update(sessionId: string, revision: number, id: string, input: ExtensionPresetInput): Promise<void>;
|
|
6
|
+
delete(sessionId: string, revision: number, id: string): Promise<void>;
|
|
7
|
+
setDefault(sessionId: string, revision: number, id: string | null): Promise<void>;
|
|
8
|
+
select(sessionId: string, revision: number, id: string | null): Promise<void>;
|
|
9
|
+
recover?(sessionId: string, revision: number): Promise<void>;
|
|
10
|
+
/** The settings Hooks tab reads the configured declarations; no session owns them. */
|
|
11
|
+
hooksOverview?(): Promise<ExtensionHooksOverview>;
|
|
12
|
+
/** Run one declared hook as a dry run; the declaration is resolved server-side. */
|
|
13
|
+
hookRun?(input: ExtensionHookRunInput): Promise<ExtensionHookRunResult>;
|
|
14
|
+
}
|