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,41 @@
|
|
|
1
|
+
/** Explicit cross-domain entry surface. Internal modules are not import targets for siblings. */
|
|
2
|
+
export { extensionResourceEnabled } from './application/extension-authorization.js';
|
|
3
|
+
export { exposesIndividualHooks } from './application/extension-hook-selection.js';
|
|
4
|
+
export { USER_HOOKS_SOURCE, USER_HOOKS_SUITE, loadUserHooksSuite } from './application/panels/user-hooks.js';
|
|
5
|
+
export { createPanelResources, pluginResourceId } from './application/panel-resources.js';
|
|
6
|
+
export { readExtensionSuiteDeclarations } from './application/extension-suite-declarations.js';
|
|
7
|
+
export type { ExtensionSuiteCandidate } from './application/extension-suite-selection.js';
|
|
8
|
+
export type { CatalogPort } from './catalog-port.js';
|
|
9
|
+
export type { PanelResourceStore } from './application/panel-resources.js';
|
|
10
|
+
export type { ResourceFilters } from './application/state/resource-filters.js';
|
|
11
|
+
export { RuntimeReconciler } from './runtime/core/reconciler.js';
|
|
12
|
+
export { ReconcileScheduler } from './runtime/core/reconcile-scheduler.js';
|
|
13
|
+
export { SurfaceToggleService } from './runtime/host/surface-toggle-service.js';
|
|
14
|
+
export { inspectToolRegistry, toolsServiceOf } from './runtime/host/tool-registry-observer.js';
|
|
15
|
+
export { mountAgentRoleTool } from './runtime/agents/agent-role-router.js';
|
|
16
|
+
export { mountUnlessAgentTeams } from './runtime/agents/agent-teams-seat.js';
|
|
17
|
+
export { mountTeammateRoleTool } from './runtime/agents/teammate-role-tool.js';
|
|
18
|
+
export { mountTeamCoordination } from './runtime/agents/team-coordination.js';
|
|
19
|
+
export { projectAgentRoles } from './application/project-agent-roles.js';
|
|
20
|
+
export { ExtensionRuntime, extensionWorkspace } from './runtime/host/extension-runtime.js';
|
|
21
|
+
export { attachExtensionToolGates } from './runtime/host/extension-tool-gates.js';
|
|
22
|
+
export type { ExtensionLspProvider, ExtensionMcpTool, ExtensionToolGates } from './runtime/host/extension-tool-gates.js';
|
|
23
|
+
export { ScopedExtensionContributors } from './runtime/host/scoped-contributors.js';
|
|
24
|
+
export { projectExtensionSuites, suiteOwnsResourceId } from './application/extension-suite-selection.js';
|
|
25
|
+
export { ResourceFilterService } from './runtime/host/resource-filter-service.js';
|
|
26
|
+
export { shellSeamOf } from './runtime/surfaces/dynamic-context.js';
|
|
27
|
+
export { HOOK_RUN_DEFAULT_TIMEOUT_SEC, HOOK_RUN_FAILED, HOOK_RUN_MAX_OUTPUT_CHARS, HOOK_RUN_MAX_TIMEOUT_MS, HOOK_RUN_NO_COMMAND, HOOK_RUN_SHELL_UNAVAILABLE, HOOK_RUN_UNKNOWN_DECLARATION, hookRunFailure, hookRunShellOf, hookRunStdin, runHookDryRun } from './runtime/surfaces/hook-dry-run.js';
|
|
28
|
+
export type { HookDryRunOptions, HookRunShell, HookRunShellRequest, HookRunShellResult } from './runtime/surfaces/hook-dry-run.js';
|
|
29
|
+
export { LOCALE_SETTINGS_ENTRY, bindHostLocale, readHostLocalePreference, readLocalePreference, setHostLocaleSource } from './runtime/host/host-locale.js';
|
|
30
|
+
export type { HostLocaleKey, HostTranslate, LocaleSettingsSource } from './runtime/host/host-locale.js';
|
|
31
|
+
export { UserPanelSkillProvider, createUserPanelStores } from './runtime/panels/user-panels.js';
|
|
32
|
+
export { SourceAutoUpdater } from './runtime/core/source-auto-update.js';
|
|
33
|
+
export { collectMenuRowIdentities } from './runtime/host/menu-row-identities.js';
|
|
34
|
+
export type { ExtensionRouteService } from './extension-service.js';
|
|
35
|
+
export { readModelCatalog } from './runtime/host/model-catalog.js';
|
|
36
|
+
export type { McpMountFactory, RuntimeMounts, SharedMcpMountPort } from './adapter-contracts.js';
|
|
37
|
+
export { RetryScheduler, SerialPassQueue } from './runtime/core/mount-lifecycle.js';
|
|
38
|
+
export type { MountPluginHandle, PluginMountContext } from './runtime/core/mount-lifecycle.js';
|
|
39
|
+
export { causeMessages } from './runtime/host/failure-detail.js';
|
|
40
|
+
export { resolveDeclaredCommand } from './runtime/host/shell-path.js';
|
|
41
|
+
export { optionalService } from './runtime/core/context.js';
|
package/lib/types/{runtime → packages/market-runtime/src/runtime}/agents/agent-role-router.d.ts
RENAMED
|
@@ -3,6 +3,10 @@ import { type SubagentCatalogEntry } from './subagent-catalog.js';
|
|
|
3
3
|
import { parseAgentRole, type AgentRoleEntry, type AgentRolePolicy } from '../../application/agent-roles.js';
|
|
4
4
|
export { parseAgentRole };
|
|
5
5
|
export type { AgentRoleEntry, AgentRolePolicy };
|
|
6
|
+
/** A declaration that has been through the call-name pass, so it answers exactly one callable name. */
|
|
7
|
+
export type NamedAgentRole = AgentRoleEntry & {
|
|
8
|
+
callName: string;
|
|
9
|
+
};
|
|
6
10
|
export declare const AGENT_ROLE_TOOL_NAME = "subagent_role";
|
|
7
11
|
/** Child LLM options this plugin sends; never carries inherited parent values. */
|
|
8
12
|
export interface AgentRoleOptions {
|
|
@@ -68,22 +72,22 @@ export interface AgentRoleRun {
|
|
|
68
72
|
}>;
|
|
69
73
|
dispose(): Promise<void>;
|
|
70
74
|
}
|
|
71
|
-
/**
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
75
|
+
/**
|
|
76
|
+
* The calling Agent as this plugin reads it: the route it would use and the
|
|
77
|
+
* working directory its session carries. One shape covers both reads, so no
|
|
78
|
+
* call site casts the parent for itself. The parent stays opaque to the host
|
|
79
|
+
* call, which receives the Agent itself and derives identity from it.
|
|
80
|
+
*/
|
|
81
|
+
export interface AgentRoleParent {
|
|
82
|
+
options?: AgentRoleOptions;
|
|
83
|
+
session?: {
|
|
84
|
+
requestHeader?(): {
|
|
85
|
+
config?: AgentRoleOptions;
|
|
86
|
+
} | undefined;
|
|
87
|
+
header?: {
|
|
88
|
+
cwd?: unknown;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
87
91
|
}
|
|
88
92
|
/**
|
|
89
93
|
* Resolve the child LLM options for one role call.
|
|
@@ -109,25 +113,40 @@ export declare function resolveAgentOptions(policy: AgentRolePolicy, requested:
|
|
|
109
113
|
export declare function agentRoleCatalog(entries: AgentRoleEntry[], signal: AbortSignal, diagnose?: (message: string) => void, projectDir?: string): Promise<SubagentCatalogEntry[]>;
|
|
110
114
|
/** Read the same declaration for catalog summaries and execution, including inline resources. */
|
|
111
115
|
export declare function readAgentRole(entry: AgentRoleEntry, projectDir?: string): Promise<AgentRolePolicy>;
|
|
116
|
+
/** The calling session's directory, which is what a card's `${CLAUDE_PROJECT_DIR}` names. */
|
|
117
|
+
export declare function sessionCwd(parent: unknown): string | undefined;
|
|
118
|
+
/** Resolve one current, enabled role for either host delegation surface. */
|
|
119
|
+
export declare function resolveRolePolicy(listRoles: (parent?: unknown) => Promise<AgentRoleEntry[]>, agentName: string, parent: unknown): Promise<{
|
|
120
|
+
entry: NamedAgentRole;
|
|
121
|
+
policy: AgentRolePolicy;
|
|
122
|
+
}>;
|
|
112
123
|
/**
|
|
113
|
-
*
|
|
124
|
+
* Prove the role this call resolved is still a current, enabled role.
|
|
114
125
|
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* before
|
|
120
|
-
*
|
|
121
|
-
*
|
|
126
|
+
* Route validation awaits the live LLM runtime, and a global disable or a
|
|
127
|
+
* session selection change can land while that await is in flight. A child
|
|
128
|
+
* created from a role the current catalog no longer authorizes would run
|
|
129
|
+
* instructions that were already revoked, so the catalog is re-read
|
|
130
|
+
* immediately before the spawn and compared by the stable role id parsed from
|
|
131
|
+
* the declaration, never by the display or call name: a role renamed underneath
|
|
132
|
+
* this call cannot be mistaken for the one it resolved.
|
|
133
|
+
* @param listRoles - the same parent-scoped catalog reader the call resolved from.
|
|
134
|
+
* @param resolved - the entry this call resolved before its asynchronous work began.
|
|
135
|
+
* @param parent - the calling agent, so a session-scoped catalog is re-read for that same session.
|
|
136
|
+
* @throws when the role is gone, disabled, ambiguous, or no longer answers its call name.
|
|
122
137
|
*/
|
|
123
|
-
export
|
|
138
|
+
export declare function requireCurrentRole(listRoles: (parent?: unknown) => Promise<AgentRoleEntry[]>, resolved: NamedAgentRole, parent: unknown): Promise<void>;
|
|
139
|
+
/**
|
|
140
|
+
* How one role call reaches a child, carrying the host delegation tool's own
|
|
141
|
+
* two-value semantics: `continuable` is the default, and only an explicit
|
|
142
|
+
* `false` asks for a `foreground` run. A call that passes `true` keeps the
|
|
143
|
+
* default, so one rule covers this tool and the host's `subagent` alike.
|
|
144
|
+
*/
|
|
145
|
+
export type AgentRoleRunMode = 'continuable' | 'foreground';
|
|
124
146
|
/** One role call's outcome, discriminated so the tool can render each channel. */
|
|
125
147
|
export type AgentRoleResult = {
|
|
126
148
|
kind: 'continuable';
|
|
127
149
|
subagentId: string;
|
|
128
|
-
} | {
|
|
129
|
-
kind: 'background';
|
|
130
|
-
jobId: string;
|
|
131
150
|
} | {
|
|
132
151
|
kind: 'foreground';
|
|
133
152
|
runId: string;
|
|
@@ -137,9 +156,8 @@ export type AgentRoleResult = {
|
|
|
137
156
|
* Run one role child through the requested channel.
|
|
138
157
|
* @param host - the exact live seams this executor owns: tools, llm and subagents.
|
|
139
158
|
* @param mode - which channel the call asked for.
|
|
140
|
-
* @param jobs - the host jobs registry; only the `background` channel needs it.
|
|
141
159
|
*/
|
|
142
|
-
export declare function executeAgentRole(host: AgentRoleHost, listRoles: (parent?: unknown) => Promise<AgentRoleEntry[]>, agentName: string, prompt: string, parent: unknown, requestedRoute: AgentRoleOptions, mode: AgentRoleRunMode, signal: AbortSignal, diagnose?: (message: string) => void
|
|
160
|
+
export declare function executeAgentRole(host: AgentRoleHost, listRoles: (parent?: unknown) => Promise<AgentRoleEntry[]>, agentName: string, prompt: string, parent: unknown, requestedRoute: AgentRoleOptions, mode: AgentRoleRunMode, signal: AbortSignal, diagnose?: (message: string) => void): Promise<AgentRoleResult>;
|
|
143
161
|
/**
|
|
144
162
|
* Mount once after tools, llm and subagents are available; the returned disposer belongs to the plugin lifecycle.
|
|
145
163
|
*
|
|
@@ -148,4 +166,21 @@ export declare function executeAgentRole(host: AgentRoleHost, listRoles: (parent
|
|
|
148
166
|
* re-published whenever roles change, so guidance kept out of the catalog is
|
|
149
167
|
* sent once and stays readable through compaction.
|
|
150
168
|
*/
|
|
151
|
-
|
|
169
|
+
/**
|
|
170
|
+
* One observation of the parent-scoped role source.
|
|
171
|
+
*
|
|
172
|
+
* The complete flag is the discovery contract the host skill registry uses: a
|
|
173
|
+
* reader that could not enumerate every source reports an incomplete
|
|
174
|
+
* observation, and the catalog publisher never replaces a published list from
|
|
175
|
+
* one, because a failed read is not evidence that its roles were removed. A
|
|
176
|
+
* bare entry list is the older protocol and means the read completed.
|
|
177
|
+
*/
|
|
178
|
+
export interface AgentRoleSnapshot {
|
|
179
|
+
entries: AgentRoleEntry[];
|
|
180
|
+
complete: boolean;
|
|
181
|
+
}
|
|
182
|
+
/** A role reader answers with entries directly or with an explicit snapshot. */
|
|
183
|
+
export type AgentRoleObservation = AgentRoleEntry[] | AgentRoleSnapshot;
|
|
184
|
+
/** Normalize one observation; a bare list means the read completed. */
|
|
185
|
+
export declare function roleSnapshot(observation: AgentRoleObservation): AgentRoleSnapshot;
|
|
186
|
+
export declare function mountAgentRoleTool(ctx: Context, listRoles: (parent?: unknown) => Promise<AgentRoleObservation>): () => void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which delegation surface a deployment runs.
|
|
3
|
+
*
|
|
4
|
+
* Team messaging addresses Team members, not standalone children created through
|
|
5
|
+
* `ctx.subagents`. Deployments can expose both creation paths. Host tool
|
|
6
|
+
* activation belongs to the local DSH profile, not this plugin.
|
|
7
|
+
*
|
|
8
|
+
* Two delegation surfaces in one session therefore compete for the same work
|
|
9
|
+
* and disagree about how to name a child. This module keeps one of them: the
|
|
10
|
+
* standalone role surface stays mounted only while Agent Teams is absent.
|
|
11
|
+
* Team deployments mount the role-aware teammate entry through a separate inject.
|
|
12
|
+
* @module runtime/agents/agent-teams-seat
|
|
13
|
+
*/
|
|
14
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
15
|
+
/**
|
|
16
|
+
* Whether this context's deployment activated Agent Teams.
|
|
17
|
+
*
|
|
18
|
+
* Presence of the service is the signal rather than a tool lookup: the service
|
|
19
|
+
* is what the Team tools are installed from, so a deployment cannot run them
|
|
20
|
+
* without it, and it is readable from any scope through `ctx.get`.
|
|
21
|
+
* @param ctx - any host context; the read tolerates strict mode and absence.
|
|
22
|
+
* @returns true when Agent Teams owns delegation in this deployment.
|
|
23
|
+
*/
|
|
24
|
+
export declare function agentTeamsActive(ctx: unknown): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Keep one model-facing surface mounted only while Agent Teams is absent.
|
|
27
|
+
*
|
|
28
|
+
* Presence can change after this plugin mounts: the deployment loads its
|
|
29
|
+
* bundles independently, so the Team service may register from a sibling fiber
|
|
30
|
+
* at any point in the boot. The registration event re-evaluates the seat, so a
|
|
31
|
+
* surface that was already published is withdrawn rather than left to compete.
|
|
32
|
+
*
|
|
33
|
+
* Withdrawal removes the tool and its catalog listener. Guidance already
|
|
34
|
+
* delivered earlier in a session is part of that session's history and stays
|
|
35
|
+
* there. The Team catalog publishes replacement guidance when its enhanced
|
|
36
|
+
* entry is ready; neither registration rewrites earlier session history.
|
|
37
|
+
* @param ctx - host context carrying the tools registry and the event bus.
|
|
38
|
+
* @param mount - mounts the surface and returns its disposer.
|
|
39
|
+
* @returns the disposer that unsubscribes and withdraws a mounted surface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function mountUnlessAgentTeams(ctx: Context, mount: () => () => void): () => void;
|
package/lib/types/{runtime → packages/market-runtime/src/runtime}/agents/subagent-catalog.d.ts
RENAMED
|
@@ -16,6 +16,10 @@ export interface SubagentCatalogSource {
|
|
|
16
16
|
form: 'catalog';
|
|
17
17
|
update?: true;
|
|
18
18
|
entries: readonly SubagentCatalogEntry[];
|
|
19
|
+
/** Omitted on historical standalone catalogs. */
|
|
20
|
+
tool?: 'spawn_teammate_role';
|
|
21
|
+
/** Fingerprint of the model-facing guidance, independent of the role entries. */
|
|
22
|
+
guidanceHash?: string;
|
|
19
23
|
}
|
|
20
24
|
declare module '@deepseek-ai/dsh-llm' {
|
|
21
25
|
interface MessageSourceMap {
|
|
@@ -47,10 +51,31 @@ export type CatalogStepListener = (payload: {
|
|
|
47
51
|
agent: CatalogAgent;
|
|
48
52
|
signal: AbortSignal;
|
|
49
53
|
}, next: () => Promise<CatalogStepDecision>) => Promise<CatalogStepDecision>;
|
|
50
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* One observation of the roles a session can delegate to.
|
|
56
|
+
*
|
|
57
|
+
* The complete flag is the discovery contract the host skill registry already
|
|
58
|
+
* uses: an observation that could not read every source carries no authority to
|
|
59
|
+
* replace the published list, because a failed read is not evidence that its
|
|
60
|
+
* roles were removed. Only a complete observation may publish, including a
|
|
61
|
+
* complete observation that is genuinely empty.
|
|
62
|
+
*/
|
|
63
|
+
export interface SubagentCatalogSnapshot {
|
|
64
|
+
entries: readonly SubagentCatalogEntry[];
|
|
65
|
+
complete: boolean;
|
|
66
|
+
}
|
|
67
|
+
/** A snapshot, or a bare entry list, which the protocol treats as complete. */
|
|
68
|
+
export type SubagentCatalogObservation = SubagentCatalogEntry[] | SubagentCatalogSnapshot;
|
|
69
|
+
/**
|
|
70
|
+
* Register after the exact tool definition; teardown removes guidance before execution.
|
|
71
|
+
*
|
|
72
|
+
* The snapshot callback follows the host skill registry's provider protocol: it may
|
|
73
|
+
* return the entries directly (meaning a complete read) or an explicit snapshot
|
|
74
|
+
* whose `complete` flag reports whether every source answered.
|
|
75
|
+
*/
|
|
51
76
|
export declare function mountSubagentCatalog(ctx: Context, tool: {
|
|
52
77
|
name: string;
|
|
53
|
-
}, snapshot: (agent: CatalogAgent, signal: AbortSignal) => Promise<
|
|
78
|
+
}, snapshot: (agent: CatalogAgent, signal: AbortSignal) => Promise<SubagentCatalogObservation>, mode?: 'subagent_role' | 'spawn_teammate_role'): () => void;
|
|
54
79
|
/**
|
|
55
80
|
* Model-facing catalog text: the delegation triggers, then the role list, then
|
|
56
81
|
* the same guidance on first publication and on every update, so a replacement
|
|
@@ -64,3 +89,10 @@ export declare function mountSubagentCatalog(ctx: Context, tool: {
|
|
|
64
89
|
* tell the model which model each role runs on without changing what it does.
|
|
65
90
|
*/
|
|
66
91
|
export declare function renderCatalogText(entries: readonly SubagentCatalogEntry[], update: boolean): string;
|
|
92
|
+
/**
|
|
93
|
+
* Discovery only: which roles exist and which entry point takes a given call.
|
|
94
|
+
* Authorization, briefing, coordination and shared-task practice stay with the
|
|
95
|
+
* host policy and the Team coordination section, so this text never restates
|
|
96
|
+
* them and never argues for a role on model grounds.
|
|
97
|
+
*/
|
|
98
|
+
export declare function renderTeamRoleCatalogText(entries: readonly SubagentCatalogEntry[]): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Role-aware Team workflow, independent of whether any specialty roles are installed. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the current Agent from each assembly, not from a retained parent scope.
|
|
5
|
+
* Native and role-created members share this section; missing/stale/non-Team scopes
|
|
6
|
+
* render nothing. Cordis owns registration cleanup through the returned disposer.
|
|
7
|
+
*/
|
|
8
|
+
export declare function mountTeamCoordination(ctx: Context): () => void;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { type Agent } from '@deepseek-ai/dsh-agent';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export declare const TEAM_ROLE_SOURCE = "teammate-role-binding";
|
|
5
|
+
declare const snapshotSchema: z.ZodObject<{
|
|
6
|
+
roleId: z.ZodString;
|
|
7
|
+
persona: z.ZodString;
|
|
8
|
+
route: z.ZodObject<{
|
|
9
|
+
provider: z.ZodString;
|
|
10
|
+
model: z.ZodString;
|
|
11
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
declare const bindingSchema: z.ZodObject<{
|
|
15
|
+
roleId: z.ZodString;
|
|
16
|
+
persona: z.ZodString;
|
|
17
|
+
route: z.ZodObject<{
|
|
18
|
+
provider: z.ZodString;
|
|
19
|
+
model: z.ZodString;
|
|
20
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
version: z.ZodLiteral<1>;
|
|
23
|
+
childId: z.ZodString;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export type TeammateRoleSnapshot = z.infer<typeof snapshotSchema>;
|
|
26
|
+
type Binding = z.infer<typeof bindingSchema>;
|
|
27
|
+
declare module '@deepseek-ai/dsh-llm' {
|
|
28
|
+
interface MessageSourceMap {
|
|
29
|
+
/** The known user/message envelope keeps this plugin-owned creation snapshot replayable. */
|
|
30
|
+
'teammate-role-binding': {
|
|
31
|
+
kind: 'teammate-role-binding';
|
|
32
|
+
form: 'context';
|
|
33
|
+
binding: Binding;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export interface RoleTeammateRequest {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
prompt: string;
|
|
41
|
+
/** Model-facing role name from the catalog, so the member reads a role rather than its encoded id. */
|
|
42
|
+
agent?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface RoleTeammateResult {
|
|
45
|
+
target: string;
|
|
46
|
+
roleId: string;
|
|
47
|
+
provider: string;
|
|
48
|
+
model: string;
|
|
49
|
+
reasoningEffort?: string;
|
|
50
|
+
}
|
|
51
|
+
/** Creation and replay keep role data out of task text and never mutate the Lead's route. */
|
|
52
|
+
export declare class TeammateRoleRuntime {
|
|
53
|
+
private readonly ctx;
|
|
54
|
+
private readonly teams;
|
|
55
|
+
private readonly subagents;
|
|
56
|
+
private readonly pending;
|
|
57
|
+
private readonly stop;
|
|
58
|
+
private readonly registrations;
|
|
59
|
+
private readonly compositions;
|
|
60
|
+
private readonly creations;
|
|
61
|
+
private readonly initializing;
|
|
62
|
+
private disposal?;
|
|
63
|
+
constructor(ctx: Context);
|
|
64
|
+
/** Reattach immutable role snapshots after a plugin reload, before exposing its creation tool. */
|
|
65
|
+
restore(): Promise<void>;
|
|
66
|
+
/** Resolve after native Team admission; use the returned target with native Team management tools. */
|
|
67
|
+
spawn(parent: Agent, request: RoleTeammateRequest, snapshot: TeammateRoleSnapshot, signal: AbortSignal): Promise<RoleTeammateResult>;
|
|
68
|
+
private initialize;
|
|
69
|
+
private initializeOnce;
|
|
70
|
+
/** Stop owned role work before removing its scoped configuration; native Team records stay authoritative. */
|
|
71
|
+
dispose(): Promise<void>;
|
|
72
|
+
private finishDisposal;
|
|
73
|
+
}
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Role-aware creation is an additional Team entry point, not another member manager. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import { type AgentRoleObservation } from './agent-role-router.js';
|
|
4
|
+
export declare const TEAMMATE_ROLE_TOOL_NAME = "spawn_teammate_role";
|
|
5
|
+
/** Install the enhanced tool after its replay listener is ready; teardown drains owned role creations. */
|
|
6
|
+
export declare function mountTeammateRoleTool(ctx: Context, listRoles: (parent?: unknown) => Promise<AgentRoleObservation>): Promise<() => Promise<void>>;
|
package/lib/types/{runtime → packages/market-runtime/src/runtime}/core/reconcile-scheduler.d.ts
RENAMED
|
@@ -10,13 +10,16 @@
|
|
|
10
10
|
* @module runtime/reconcile-scheduler
|
|
11
11
|
*/
|
|
12
12
|
import type { Context } from '@deepseek-ai/cordis';
|
|
13
|
-
import type { Suite } from '
|
|
14
|
-
import type {
|
|
13
|
+
import type { Suite } from '../../../../market-contracts/src/model/types.js';
|
|
14
|
+
import type { ExtensionSuiteCandidate } from '../../application/extension-suite-selection.js';
|
|
15
|
+
import type { McpMountDiagnostic } from '../../../../market-contracts/src/contracts/mcp.js';
|
|
15
16
|
import type { RuntimeReconciler } from './reconciler.js';
|
|
16
17
|
/** The catalog surface one reconcile pass reads from and publishes to. */
|
|
17
18
|
export interface ReconcileHost {
|
|
18
19
|
/** Enabled user-dimension suites to reconcile. */
|
|
19
20
|
enabledSuites(): Promise<Suite[]>;
|
|
21
|
+
/** Full validated installed declarations, including ordinary disabled resources. */
|
|
22
|
+
declarations?(): Promise<ExtensionSuiteCandidate[]>;
|
|
20
23
|
/** Publish the pass's MCP mount diagnostics for the status surface. */
|
|
21
24
|
publishMcpDiagnostics(diagnostics: McpMountDiagnostic[]): void;
|
|
22
25
|
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime reconciliation for enabled suites.
|
|
3
|
+
*
|
|
4
|
+
* One catalog snapshot is fanned out to the existing MCP, command, hook, and
|
|
5
|
+
* LSP mount adapters. The adapters remain separate because their host surfaces
|
|
6
|
+
* and failure semantics differ; this module owns ordering, containment, and
|
|
7
|
+
* disposal only.
|
|
8
|
+
*/
|
|
9
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
10
|
+
import type { McpBackend, McpMountDiagnostic } from '../../../../market-contracts/src/contracts/mcp.js';
|
|
11
|
+
import type { LspMountDiagnostic } from '../../../../market-contracts/src/contracts/lsp.js';
|
|
12
|
+
import type { Suite } from '../../../../market-contracts/src/model/types.js';
|
|
13
|
+
import { type CommandMountDiagnostic } from '../surfaces/commands-mounts.js';
|
|
14
|
+
import type { MenuRowRegistration } from '../host/menu-row-identities.js';
|
|
15
|
+
import { type HooksMountDiagnostic } from '../surfaces/hooks-mounts.js';
|
|
16
|
+
import { type ExtensionSuiteCandidate } from '../../application/extension-suite-selection.js';
|
|
17
|
+
import { type HostTranslate } from '../host/host-locale.js';
|
|
18
|
+
import type { LspMountPort, McpOverridesPort, RuntimeMounts } from '../../adapter-contracts.js';
|
|
19
|
+
/**
|
|
20
|
+
* The per-surface mount gates one reconcile pass reads.
|
|
21
|
+
*
|
|
22
|
+
* A switched-off surface is gated here rather than by filtering the suite
|
|
23
|
+
* snapshot: the reconciler owns both the MCP and the LSP mount branch, so
|
|
24
|
+
* dropping suites from the shared list would unmount a sibling surface's
|
|
25
|
+
* mounts along with it. Gating each branch instead keeps the two orthogonal —
|
|
26
|
+
* an off MCP mount reconciles to zero servers while the same suites keep their
|
|
27
|
+
* language servers.
|
|
28
|
+
*/
|
|
29
|
+
export interface RuntimeSurfaceGates {
|
|
30
|
+
/** Whether the named surface may mount on this pass. */
|
|
31
|
+
allows(surface: RuntimeSurfaceKey): boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The toggle keys the reconciler's own mount branches answer to.
|
|
35
|
+
*
|
|
36
|
+
* Hooks have no per-workspace switch, so that branch stays ungated; skills and
|
|
37
|
+
* agents mount through their own providers and the market through its routes.
|
|
38
|
+
*/
|
|
39
|
+
export type RuntimeSurfaceKey = 'commands' | 'mcp' | 'lsp';
|
|
40
|
+
/** Diagnostics returned by one runtime reconciliation pass. */
|
|
41
|
+
export interface RuntimeDiagnostics {
|
|
42
|
+
mcp: McpMountDiagnostic[];
|
|
43
|
+
commands: CommandMountDiagnostic[];
|
|
44
|
+
hooks: HooksMountDiagnostic[];
|
|
45
|
+
lsp: LspMountDiagnostic[];
|
|
46
|
+
errors: Array<{
|
|
47
|
+
surface: 'mcp' | 'commands' | 'hooks' | 'lsp';
|
|
48
|
+
reason: string;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
export interface SessionDemandReceipt {
|
|
52
|
+
/** Publish staged identities after durability; never throws, and revoked receipts are no-ops. */
|
|
53
|
+
commit(): void;
|
|
54
|
+
rollback(): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
export declare class RuntimeReconciler {
|
|
57
|
+
private readonly mcp;
|
|
58
|
+
private readonly commands;
|
|
59
|
+
private readonly hooks;
|
|
60
|
+
private readonly lspRegistry;
|
|
61
|
+
private readonly queues;
|
|
62
|
+
private gates;
|
|
63
|
+
private disposed;
|
|
64
|
+
private agentScopedContributors;
|
|
65
|
+
private authority;
|
|
66
|
+
private authorityEpoch;
|
|
67
|
+
private globalSuites;
|
|
68
|
+
private readonly committed;
|
|
69
|
+
private readonly staged;
|
|
70
|
+
private sharedQueue;
|
|
71
|
+
private demandedMcp;
|
|
72
|
+
private demandedLsp;
|
|
73
|
+
private overridesProvider;
|
|
74
|
+
private disposal?;
|
|
75
|
+
private readonly warn;
|
|
76
|
+
/**
|
|
77
|
+
* @param ctx - the context every mount registers through.
|
|
78
|
+
* @param dataRoot - the plugin data root the mount adapters store under.
|
|
79
|
+
* @param mounts - the transport adapters this coordinator drives. The
|
|
80
|
+
* composition root builds them, so no transport package is imported here.
|
|
81
|
+
* @param t - host translator for the command registry's own diagnostics.
|
|
82
|
+
*/
|
|
83
|
+
constructor(ctx: Context, dataRoot: string, mounts: RuntimeMounts, t?: HostTranslate);
|
|
84
|
+
/** Transfer commands and hooks to per-agent registries; call before the first reconcile. */
|
|
85
|
+
setAgentScopedContributors(): void;
|
|
86
|
+
/** Exact live MCP definitions and their owning extension resources. */
|
|
87
|
+
mcpToolOwnership(): import('../host/extension-tool-gates.js').ExtensionMcpTool[];
|
|
88
|
+
/** The LSP mount registry, consumed by the LSP status surface. */
|
|
89
|
+
get lsp(): LspMountPort;
|
|
90
|
+
/** The suite commands the global layer currently holds, for the slash menu's row faces. */
|
|
91
|
+
commandRegistrations(): MenuRowRegistration[];
|
|
92
|
+
/** Install the per-workspace entry filter on the MCP mount registry. */
|
|
93
|
+
setMcpEntryFilter(filter: () => {
|
|
94
|
+
allows(face: 'mcp', entryId: string): boolean;
|
|
95
|
+
}): void;
|
|
96
|
+
/** Install the per-workspace entry filter on the command mount registry. */
|
|
97
|
+
setCommandsEntryFilter(filter: () => {
|
|
98
|
+
allows(face: 'commands', entryId: string): boolean;
|
|
99
|
+
}): void;
|
|
100
|
+
/**
|
|
101
|
+
* Install the per-workspace surface gates, read on every pass.
|
|
102
|
+
*
|
|
103
|
+
* Set after construction because the toggle service is built later in
|
|
104
|
+
* composition; until then every surface mounts, which is the all-on default.
|
|
105
|
+
*/
|
|
106
|
+
setSurfaceGates(gates: RuntimeSurfaceGates): void;
|
|
107
|
+
/** Install the per-suite MCP overrides provider used at mount time. */
|
|
108
|
+
setMcpOverridesProvider(provider: () => Promise<Map<string, McpOverridesPort>>): void;
|
|
109
|
+
/** Install the live tool-name provider used for foreign-namespace mount guards. */
|
|
110
|
+
setMcpToolNamesProvider(provider: () => string[]): void;
|
|
111
|
+
/** Install the backend provider deciding which MCP client mounts each server. */
|
|
112
|
+
setMcpBackendProvider(provider: () => Promise<McpBackend>): void;
|
|
113
|
+
/** Whether the current MCP snapshot uses one credential reference. */
|
|
114
|
+
usesCredential(ref: string): boolean;
|
|
115
|
+
/** Flag one MCP mount for an explicit rebuild on the next reconcile. */
|
|
116
|
+
forceMcpRemount(suiteId: string, serverKey: string): void;
|
|
117
|
+
/** Flag every live MCP mount for a rebuild on the next reconcile. */
|
|
118
|
+
forceMcpRemountAll(): void;
|
|
119
|
+
/** The mount key owning one derived serverName; undefined when not mounted here. */
|
|
120
|
+
mcpServerOwner(serverName: string): {
|
|
121
|
+
suiteId: string;
|
|
122
|
+
serverKey: string;
|
|
123
|
+
} | undefined;
|
|
124
|
+
/** Publish fresh immutable authority without mounting or waiting behind network work. */
|
|
125
|
+
setCatalogAuthority(candidates: readonly ExtensionSuiteCandidate[], global: readonly Suite[]): void;
|
|
126
|
+
/** Update full validated authority and the ordinary global base in one shared-service pass. */
|
|
127
|
+
refreshCatalog(candidates: readonly ExtensionSuiteCandidate[], global: readonly Suite[]): Promise<RuntimeDiagnostics>;
|
|
128
|
+
/** Legacy enabled-only refresh never replaces full authority or session demand. */
|
|
129
|
+
reconcile(global: readonly Suite[]): Promise<RuntimeDiagnostics>;
|
|
130
|
+
private reconcileSnapshot;
|
|
131
|
+
private surface;
|
|
132
|
+
private enqueue;
|
|
133
|
+
/** Stage only identities; configuration always comes from current validated authority. */
|
|
134
|
+
stageSessionDemand(owner: object, requested: readonly Suite[], directLspIds?: readonly string[]): Promise<SessionDemandReceipt>;
|
|
135
|
+
releaseSessionDemand(owner: object): Promise<void>;
|
|
136
|
+
private project;
|
|
137
|
+
private reconcileShared;
|
|
138
|
+
private assertMounted;
|
|
139
|
+
/** Stop receipt admission before draining shared and independently queued local work. */
|
|
140
|
+
dispose(): Promise<void>;
|
|
141
|
+
}
|