0xray 3.4.2 → 3.4.3
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/.xray/features.json +13 -7
- package/README.md +2 -2
- package/dist/CHANGELOG.md +16 -0
- package/dist/README.md +2 -2
- package/dist/agents/architect.d.ts +2 -0
- package/dist/agents/backend-engineer.d.ts +8 -0
- package/dist/agents/bug-triage-specialist.d.ts +2 -0
- package/dist/agents/code-analyzer.d.ts +7 -0
- package/dist/agents/code-reviewer.d.ts +2 -0
- package/dist/agents/content-creator.d.ts +9 -0
- package/dist/agents/database-engineer.d.ts +8 -0
- package/dist/agents/devops-engineer.d.ts +8 -0
- package/dist/agents/frontend-engineer.d.ts +8 -0
- package/dist/agents/frontend-ui-ux-engineer.d.ts +8 -0
- package/dist/agents/growth-strategist.d.ts +8 -0
- package/dist/agents/index.d.ts +25 -0
- package/dist/agents/known-names.d.ts +26 -0
- package/dist/agents/librarian-agents-updater.d.ts +30 -0
- package/dist/agents/log-monitor.d.ts +2 -0
- package/dist/agents/mobile-developer.d.ts +9 -0
- package/dist/agents/multimodal-looker.d.ts +9 -0
- package/dist/agents/performance-engineer.d.ts +8 -0
- package/dist/agents/refactorer.d.ts +2 -0
- package/dist/agents/registry.d.ts +37 -0
- package/dist/agents/researcher.d.ts +2 -0
- package/dist/agents/security-auditor.d.ts +2 -0
- package/dist/agents/seo-consultant.d.ts +8 -0
- package/dist/agents/strategist.d.ts +7 -0
- package/dist/agents/tech-writer.d.ts +8 -0
- package/dist/agents/testing-lead.d.ts +2 -0
- package/dist/agents/types.d.ts +45 -0
- package/dist/analytics/consent-manager.d.ts +92 -0
- package/dist/analytics/emerging-pattern-detector.d.ts +66 -0
- package/dist/analytics/pattern-learning-engine.d.ts +79 -0
- package/dist/analytics/pattern-performance-tracker.d.ts +96 -0
- package/dist/analytics/predictive-analytics.d.ts +40 -0
- package/dist/analytics/prompt-pattern-analyzer.d.ts +98 -0
- package/dist/analytics/routing-performance-analyzer.d.ts +100 -0
- package/dist/analytics/routing-refiner.d.ts +102 -0
- package/dist/analytics/simple-pattern-analyzer.d.ts +79 -0
- package/dist/architect/architect-tools.d.ts +70 -0
- package/dist/architect/architectural-integrity.d.ts +20 -0
- package/dist/benchmark/performance-benchmark.d.ts +103 -0
- package/dist/cli/commands/analytics-disable.d.ts +9 -0
- package/dist/cli/commands/analytics-enable-action.d.ts +8 -0
- package/dist/cli/commands/analytics-preview.d.ts +9 -0
- package/dist/cli/commands/analytics-status.d.ts +9 -0
- package/dist/cli/commands/antigravity-status.d.ts +9 -0
- package/dist/cli/commands/archive-logs.d.ts +23 -0
- package/dist/cli/commands/credible-init.d.ts +11 -0
- package/dist/cli/commands/enforce.d.ts +12 -0
- package/dist/cli/commands/govern.d.ts +29 -0
- package/dist/cli/commands/grok-install.d.ts +7 -0
- package/dist/cli/commands/hermes-install.d.ts +2 -0
- package/dist/cli/commands/mcp-install.d.ts +4 -0
- package/dist/cli/commands/openclaw-install.d.ts +2 -0
- package/dist/cli/commands/opencode-install.d.ts +2 -0
- package/dist/cli/commands/plugin-commands.d.ts +18 -0
- package/dist/cli/commands/publish-agent.d.ts +15 -0
- package/dist/cli/commands/security-audit.d.ts +23 -0
- package/dist/cli/commands/skill-install.d.ts +6 -0
- package/dist/cli/commands/status.d.ts +41 -0
- package/dist/cli/commands/storyteller.d.ts +19 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/server.d.ts +1 -0
- package/dist/config/default-agents.d.ts +12 -0
- package/dist/config/routing-mappings.d.ts +26 -0
- package/dist/core/activity-logger.d.ts +71 -0
- package/dist/core/adaptive-kernel.d.ts +108 -0
- package/dist/core/agent-spawn-gate.d.ts +56 -0
- package/dist/core/boot-orchestrator.d.ts +99 -0
- package/dist/core/codex-formatter.d.ts +95 -0
- package/dist/core/codex-injector.d.ts +73 -0
- package/dist/core/config-loader.d.ts +59 -0
- package/dist/core/config-paths.d.ts +66 -0
- package/dist/core/context-loader.d.ts +120 -0
- package/dist/core/context-validator.d.ts +52 -0
- package/dist/core/features-config.d.ts +485 -0
- package/dist/core/framework-logger.d.ts +76 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/kernel-patterns.d.ts +129 -0
- package/dist/core/logging-config.d.ts +10 -0
- package/dist/core/model-router.d.ts +56 -0
- package/dist/core/orchestrator.d.ts +71 -0
- package/dist/core/system-prompt-generator.d.ts +34 -0
- package/dist/core/trace-context.d.ts +12 -0
- package/dist/core/xray-activation.d.ts +14 -0
- package/dist/delegation/agent-delegator.d.ts +185 -0
- package/dist/delegation/agent-expertise.d.ts +15 -0
- package/dist/delegation/analytics/index.d.ts +11 -0
- package/dist/delegation/analytics/learning-engine.d.ts +84 -0
- package/dist/delegation/analytics/outcome-tracker.d.ts +117 -0
- package/dist/delegation/analytics/routing-analytics.d.ts +60 -0
- package/dist/delegation/ast-code-parser.d.ts +173 -0
- package/dist/delegation/codebase-context-analyzer.d.ts +164 -0
- package/dist/delegation/complexity-analyzer.d.ts +110 -0
- package/dist/delegation/complexity-core.d.ts +119 -0
- package/dist/delegation/config/types.d.ts +247 -0
- package/dist/delegation/dependency-graph-builder.d.ts +94 -0
- package/dist/delegation/index.d.ts +25 -0
- package/dist/delegation/metrics-aggregator.d.ts +91 -0
- package/dist/delegation/session-coordinator.d.ts +132 -0
- package/dist/delegation/strategy-selector.d.ts +27 -0
- package/dist/delegation/voting-coordinator.d.ts +48 -0
- package/dist/delegation/voting-types.d.ts +154 -0
- package/dist/delegation/weighted-voting-aggregator.d.ts +36 -0
- package/dist/enforcement/core/index.d.ts +14 -0
- package/dist/enforcement/core/rule-executor.d.ts +157 -0
- package/dist/enforcement/core/rule-hierarchy.d.ts +145 -0
- package/dist/enforcement/core/rule-registry.d.ts +196 -0
- package/dist/enforcement/core/violation-fixer.d.ts +105 -0
- package/dist/enforcement/enforcer-tools.d.ts +78 -0
- package/dist/enforcement/index.d.ts +22 -0
- package/dist/enforcement/loaders/agent-triage-loader.d.ts +98 -0
- package/dist/enforcement/loaders/agents-md-validation-loader.d.ts +75 -0
- package/dist/enforcement/loaders/base-loader.d.ts +82 -0
- package/dist/enforcement/loaders/codex-loader.d.ts +76 -0
- package/dist/enforcement/loaders/index.d.ts +36 -0
- package/dist/enforcement/loaders/loader-orchestrator.d.ts +96 -0
- package/dist/enforcement/loaders/processor-loader.d.ts +59 -0
- package/dist/enforcement/rule-enforcer.d.ts +142 -0
- package/dist/enforcement/test-auto-healing.d.ts +83 -0
- package/dist/enforcement/types.d.ts +500 -0
- package/dist/enforcement/validators/architecture-validators.d.ts +154 -0
- package/dist/enforcement/validators/base-validator.d.ts +87 -0
- package/dist/enforcement/validators/code-quality-validators.d.ts +88 -0
- package/dist/enforcement/validators/index.d.ts +14 -0
- package/dist/enforcement/validators/security-validators.d.ts +52 -0
- package/dist/enforcement/validators/testing-validators.d.ts +80 -0
- package/dist/enforcement/validators/validator-registry.d.ts +91 -0
- package/dist/execution/opencode-cli-invoker.d.ts +8 -0
- package/dist/execution/proposal-applier.d.ts +24 -0
- package/dist/governance/codex-policy.service.d.ts +56 -0
- package/dist/governance/governance-core.d.ts +53 -0
- package/dist/governance/governance-service.d.ts +38 -0
- package/dist/governance/governance-types.d.ts +90 -0
- package/dist/governance/llm-governance-provider.d.ts +13 -0
- package/dist/index.d.ts +28 -0
- package/dist/inference/deploy-verifier.d.ts +26 -0
- package/dist/inference/index.d.ts +10 -0
- package/dist/inference/inference-accumulator.d.ts +29 -0
- package/dist/inference/inference-agent-invoker.d.ts +3 -0
- package/dist/inference/inference-applier.d.ts +4 -0
- package/dist/inference/inference-cycle.d.ts +70 -0
- package/dist/inference/inference-proposal-generator.d.ts +3 -0
- package/dist/inference/semantic-patterns.d.ts +7 -0
- package/dist/inference/session-capture.d.ts +32 -0
- package/dist/infrastructure/iac-validator.d.ts +150 -0
- package/dist/infrastructure/schemas/cloud-schemas.d.ts +482 -0
- package/dist/integrations/base/ExampleIntegration.d.ts +46 -0
- package/dist/integrations/base/Integration.d.ts +266 -0
- package/dist/integrations/base/index.d.ts +11 -0
- package/dist/integrations/base/registry.d.ts +272 -0
- package/dist/integrations/base/types.d.ts +167 -0
- package/dist/integrations/enforcement-gate.d.ts +44 -0
- package/dist/integrations/governance/governance-client.d.ts +75 -0
- package/dist/integrations/governance/index.d.ts +98 -0
- package/dist/integrations/governance/types.d.ts +238 -0
- package/dist/integrations/grok/grok-cli.d.ts +25 -0
- package/dist/integrations/openclaw/api-server.d.ts +86 -0
- package/dist/integrations/openclaw/client.d.ts +121 -0
- package/dist/integrations/openclaw/config.d.ts +95 -0
- package/dist/integrations/openclaw/hooks/xray-hooks.d.ts +123 -0
- package/dist/integrations/openclaw/index.d.ts +100 -0
- package/dist/integrations/openclaw/types.d.ts +425 -0
- package/dist/integrations/plugins/index.d.ts +9 -0
- package/dist/integrations/plugins/plugin-integration.d.ts +288 -0
- package/dist/integrations/plugins/plugin-registry.d.ts +223 -0
- package/dist/mcps/agent-resolver.d.ts +45 -0
- package/dist/mcps/architect-tools.server.d.ts +16 -0
- package/dist/mcps/auto-format.server.d.ts +18 -0
- package/dist/mcps/boot-orchestrator.server.d.ts +48 -0
- package/dist/mcps/config/config-loader.d.ts +56 -0
- package/dist/mcps/config/config-validator.d.ts +40 -0
- package/dist/mcps/config/index.d.ts +31 -0
- package/dist/mcps/config/plugin-server-registry.d.ts +126 -0
- package/dist/mcps/config/server-config-registry.d.ts +51 -0
- package/dist/mcps/connection/connection-manager.d.ts +39 -0
- package/dist/mcps/connection/connection-pool.d.ts +64 -0
- package/dist/mcps/connection/mcp-connection.d.ts +66 -0
- package/dist/mcps/connection/process-spawner.d.ts +24 -0
- package/dist/mcps/enforcer-tools.server.d.ts +26 -0
- package/dist/mcps/estimation.server.d.ts +19 -0
- package/dist/mcps/framework-compliance-audit.server.d.ts +20 -0
- package/dist/mcps/framework-help.server.d.ts +13 -0
- package/dist/mcps/governance.server.d.ts +35 -0
- package/dist/mcps/governance.server.js +14 -2
- package/dist/mcps/in-process-skill-registry.d.ts +20 -0
- package/dist/mcps/index.d.ts +17 -0
- package/dist/mcps/knowledge-skills/api-design.server.d.ts +13 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts +13 -0
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.d.ts +31 -0
- package/dist/mcps/knowledge-skills/code-analyzer.server.d.ts +29 -0
- package/dist/mcps/knowledge-skills/code-review.server.d.ts +44 -0
- package/dist/mcps/knowledge-skills/content-creator.server.d.ts +11 -0
- package/dist/mcps/knowledge-skills/database-design.server.d.ts +41 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts +41 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.d.ts +13 -0
- package/dist/mcps/knowledge-skills/growth-strategist.server.d.ts +11 -0
- package/dist/mcps/knowledge-skills/log-monitor.server.d.ts +22 -0
- package/dist/mcps/knowledge-skills/mobile-development.server.d.ts +17 -0
- package/dist/mcps/knowledge-skills/multimodal-looker.server.d.ts +53 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts +69 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.d.ts +35 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts +31 -0
- package/dist/mcps/knowledge-skills/security-audit.server.d.ts +46 -0
- package/dist/mcps/knowledge-skills/seo-consultant.server.d.ts +24 -0
- package/dist/mcps/knowledge-skills/session-management.server.d.ts +22 -0
- package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +32 -0
- package/dist/mcps/knowledge-skills/storyteller.server.d.ts +11 -0
- package/dist/mcps/knowledge-skills/strategist.server.d.ts +15 -0
- package/dist/mcps/knowledge-skills/tech-writer.server.d.ts +45 -0
- package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +34 -0
- package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts +45 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +67 -0
- package/dist/mcps/lint.server.d.ts +15 -0
- package/dist/mcps/mcp-client.d.ts +157 -0
- package/dist/mcps/model-health-check.server.d.ts +14 -0
- package/dist/mcps/orchestrator/aside-context.d.ts +21 -0
- package/dist/mcps/orchestrator/config/agent-capabilities.d.ts +39 -0
- package/dist/mcps/orchestrator/config/memory-routing-bridge.d.ts +12 -0
- package/dist/mcps/orchestrator/execution/execution-planner.d.ts +62 -0
- package/dist/mcps/orchestrator/handlers/complexity-handler.d.ts +32 -0
- package/dist/mcps/orchestrator/handlers/status-handler.d.ts +71 -0
- package/dist/mcps/orchestrator/handlers/task-handler.d.ts +53 -0
- package/dist/mcps/orchestrator/index.d.ts +6 -0
- package/dist/mcps/orchestrator/server.d.ts +38 -0
- package/dist/mcps/orchestrator/types.d.ts +128 -0
- package/dist/mcps/orchestrator.server.d.ts +10 -0
- package/dist/mcps/performance-analysis.server.d.ts +25 -0
- package/dist/mcps/processor-pipeline.server.d.ts +29 -0
- package/dist/mcps/protocol/protocol-constants.d.ts +46 -0
- package/dist/mcps/researcher-confidence.d.ts +21 -0
- package/dist/mcps/researcher.server.d.ts +29 -0
- package/dist/mcps/security-scan.server.d.ts +19 -0
- package/dist/mcps/shared/knowledge-skill-base.d.ts +17 -0
- package/dist/mcps/shared/prompt-security-validator.d.ts +44 -0
- package/dist/mcps/shared/security-scanner.d.ts +119 -0
- package/dist/mcps/simulation/index.d.ts +12 -0
- package/dist/mcps/simulation/server-simulations.d.ts +39 -0
- package/dist/mcps/simulation/simulation-engine.d.ts +51 -0
- package/dist/mcps/state-manager.server.d.ts +27 -0
- package/dist/mcps/tools/index.d.ts +14 -0
- package/dist/mcps/tools/tool-cache.d.ts +53 -0
- package/dist/mcps/tools/tool-discovery.d.ts +27 -0
- package/dist/mcps/tools/tool-executor.d.ts +41 -0
- package/dist/mcps/tools/tool-registry.d.ts +42 -0
- package/dist/mcps/types/index.d.ts +13 -0
- package/dist/mcps/types/json-rpc.types.d.ts +35 -0
- package/dist/mcps/types/mcp.types.d.ts +105 -0
- package/dist/memory-routing/index.d.ts +6 -0
- package/dist/memory-routing/null-provider.d.ts +14 -0
- package/dist/memory-routing/provider-loader.d.ts +2 -0
- package/dist/memory-routing/provider-registry.d.ts +8 -0
- package/dist/memory-routing/types.d.ts +104 -0
- package/dist/memory-routing/validate-config.d.ts +7 -0
- package/dist/metrics/agent-metrics.d.ts +169 -0
- package/dist/metrics/index.d.ts +6 -0
- package/dist/monitoring/advanced-profiler.d.ts +51 -0
- package/dist/monitoring/memory-monitor.d.ts +113 -0
- package/dist/monitoring/nudge-watchdog.d.ts +87 -0
- package/dist/monitoring/test-auto-generation-monitor.d.ts +64 -0
- package/dist/nucleus/autonomy-kernel.d.ts +48 -0
- package/dist/nucleus/default-plugins.d.ts +17 -0
- package/dist/nucleus/govern-http.d.ts +59 -0
- package/dist/nucleus/index.d.ts +17 -0
- package/dist/nucleus/kernel.d.ts +51 -0
- package/dist/nucleus/plugin-registry.d.ts +132 -0
- package/dist/nucleus/thin-dispatch.d.ts +33 -0
- package/dist/orchestrator/agent-spawn-governor.d.ts +126 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.d.ts +156 -0
- package/dist/orchestrator/intelligent-commit-batcher.d.ts +114 -0
- package/dist/orchestrator/multi-agent-orchestration-coordinator.d.ts +126 -0
- package/dist/orchestrator/orchestrator.d.ts +141 -0
- package/dist/orchestrator/self-direction-activation.d.ts +108 -0
- package/dist/orchestrator/universal-librarian-consultation.d.ts +98 -0
- package/dist/orchestrator/universal-registry-bridge.d.ts +84 -0
- package/dist/performance/performance-budget-enforcer.d.ts +157 -0
- package/dist/performance/performance-regression-tester.d.ts +107 -0
- package/dist/plugin/plugin-codex-context.d.ts +18 -0
- package/dist/plugin/plugin-helpers.d.ts +23 -0
- package/dist/plugin/plugin-logger.d.ts +8 -0
- package/dist/plugin/plugin-modules.d.ts +11 -0
- package/dist/plugin/plugin-quality-gate.d.ts +11 -0
- package/dist/plugin/plugin-types.d.ts +93 -0
- package/dist/plugin/xray-codex-injection.d.ts +39 -0
- package/dist/postprocessor/PostProcessor.d.ts +107 -0
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.d.ts +11 -0
- package/dist/postprocessor/analysis/FailureAnalysisEngine.d.ts +39 -0
- package/dist/postprocessor/autofix/AutoFixEngine.d.ts +48 -0
- package/dist/postprocessor/autofix/FixValidator.d.ts +23 -0
- package/dist/postprocessor/config/ProcessorConfigLoader.d.ts +44 -0
- package/dist/postprocessor/config.d.ts +6 -0
- package/dist/postprocessor/escalation/EscalationEngine.d.ts +154 -0
- package/dist/postprocessor/integration.d.ts +156 -0
- package/dist/postprocessor/metamorphosis/SelfProposalEngine.d.ts +87 -0
- package/dist/postprocessor/metamorphosis/index.d.ts +2 -0
- package/dist/postprocessor/monitoring/MonitoringEngine.d.ts +40 -0
- package/dist/postprocessor/redeploy/RedeployCoordinator.d.ts +91 -0
- package/dist/postprocessor/redeploy/RetryHandler.d.ts +49 -0
- package/dist/postprocessor/services/RegressionAnalysisService.d.ts +39 -0
- package/dist/postprocessor/success/SuccessHandler.d.ts +57 -0
- package/dist/postprocessor/triggers/APITrigger.d.ts +34 -0
- package/dist/postprocessor/triggers/GitHookTrigger.d.ts +38 -0
- package/dist/postprocessor/triggers/WebhookTrigger.d.ts +46 -0
- package/dist/postprocessor/types.d.ts +227 -0
- package/dist/processors/doc-write-guard.d.ts +6 -0
- package/dist/processors/implementations/agents-md-validation-processor.d.ts +62 -0
- package/dist/processors/implementations/async-pattern-processor.d.ts +47 -0
- package/dist/processors/implementations/codex-compliance-processor.d.ts +7 -0
- package/dist/processors/implementations/commit-batcher-processor.d.ts +13 -0
- package/dist/processors/implementations/console-log-guard-processor.d.ts +32 -0
- package/dist/processors/implementations/coverage-analysis-processor.d.ts +19 -0
- package/dist/processors/implementations/error-boundary-processor.d.ts +7 -0
- package/dist/processors/implementations/inference-improvement-processor.d.ts +36 -0
- package/dist/processors/implementations/log-protection-processor.d.ts +29 -0
- package/dist/processors/implementations/nudge-processor.d.ts +21 -0
- package/dist/processors/implementations/performance-budget-processor.d.ts +49 -0
- package/dist/processors/implementations/postprocessor-chain-validator.d.ts +45 -0
- package/dist/processors/implementations/pre-validate-processor.d.ts +7 -0
- package/dist/processors/implementations/publish-preflight-processor.d.ts +37 -0
- package/dist/processors/implementations/refactoring-logging-processor-wrapper.d.ts +7 -0
- package/dist/processors/implementations/refactoring-logging-processor.d.ts +31 -0
- package/dist/processors/implementations/regression-testing-processor.d.ts +20 -0
- package/dist/processors/implementations/session-capture-processor.d.ts +14 -0
- package/dist/processors/implementations/session-summary-processor.d.ts +26 -0
- package/dist/processors/implementations/spawn-governance-processor.d.ts +57 -0
- package/dist/processors/implementations/state-validation-processor.d.ts +11 -0
- package/dist/processors/implementations/storytelling-trigger-processor.d.ts +40 -0
- package/dist/processors/implementations/test-auto-creation-processor.d.ts +16 -0
- package/dist/processors/implementations/test-execution-processor.d.ts +11 -0
- package/dist/processors/implementations/typescript-compilation-processor.d.ts +37 -0
- package/dist/processors/implementations/version-compliance-processor.d.ts +111 -0
- package/dist/processors/processor-interfaces.d.ts +126 -0
- package/dist/processors/processor-manager.d.ts +80 -0
- package/dist/processors/processor-types.d.ts +189 -0
- package/dist/public/XrayService.d.ts +17 -0
- package/dist/public/index.d.ts +4 -0
- package/dist/reporting/framework-reporting-system.d.ts +19 -0
- package/dist/reporting/log-parser.d.ts +10 -0
- package/dist/reporting/metrics.d.ts +15 -0
- package/dist/reporting/report-formatter.d.ts +5 -0
- package/dist/reporting/types.d.ts +102 -0
- package/dist/scripts/activate-kernel-pipeline.d.ts +7 -0
- package/dist/scripts/integration.d.ts +36 -0
- package/dist/security/comprehensive-security-audit.d.ts +157 -0
- package/dist/security/index.d.ts +13 -0
- package/dist/security/prompt-security-validator.d.ts +44 -0
- package/dist/security/security-agent-coordinator.d.ts +71 -0
- package/dist/security/security-auditor.d.ts +55 -0
- package/dist/security/security-hardener.d.ts +61 -0
- package/dist/security/security-hardening-system.d.ts +238 -0
- package/dist/security/security-headers.d.ts +63 -0
- package/dist/security/security-orchestration-layer.d.ts +118 -0
- package/dist/security/security-scanner.d.ts +119 -0
- package/dist/services/inference-tuner.d.ts +76 -0
- package/dist/session/index.d.ts +3 -0
- package/dist/session/session-cleanup-manager.d.ts +117 -0
- package/dist/session/session-monitor.d.ts +132 -0
- package/dist/session/session-state-manager.d.ts +144 -0
- package/dist/skills/xray-orchestrator/index.d.ts +12 -0
- package/dist/state/context-providers.d.ts +4 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/state/state-manager.d.ts +41 -0
- package/dist/state/state-types.d.ts +5 -0
- package/dist/testing/memory-regression-suite.d.ts +105 -0
- package/dist/tools/assess-complexity-tool.d.ts +28 -0
- package/dist/tools/query-routing-tool.d.ts +17 -0
- package/dist/types/metamorphosis.d.ts +21 -0
- package/dist/utils/batch-operations.d.ts +25 -0
- package/dist/utils/codex-parser.d.ts +60 -0
- package/dist/utils/command-runner.d.ts +32 -0
- package/dist/utils/import-resolver.d.ts +54 -0
- package/dist/utils/language-detector.d.ts +43 -0
- package/dist/utils/path-resolver.d.ts +48 -0
- package/dist/utils/shutdown-handler.d.ts +26 -0
- package/dist/utils/task-graph.d.ts +29 -0
- package/dist/utils/test-template-generator.d.ts +25 -0
- package/dist/utils/token-manager.d.ts +48 -0
- package/dist/validation/agent-config-validator.d.ts +110 -0
- package/dist/validation/estimation-validator.d.ts +61 -0
- package/dist/validation/orchestration-flow-validator.d.ts +87 -0
- package/dist/validation/report-content-validator.d.ts +42 -0
- package/package.json +2 -2
- package/scripts/node/consumer-install-smoke.mjs +12 -1
- package/scripts/node/install-bridges.cjs +3 -2
- package/src/mcps/governance.server.ts +15 -2
- package/xray/features.json +13 -7
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Registry
|
|
3
|
+
*
|
|
4
|
+
* Industrial-grade plugin registry for managing 0xRay plugins.
|
|
5
|
+
* Provides discovery, loading, lifecycle management, dependency resolution,
|
|
6
|
+
* and comprehensive observability.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Auto-discovery from filesystem
|
|
10
|
+
* - Dependency resolution and validation
|
|
11
|
+
* - Plugin state management
|
|
12
|
+
* - Batch operations with error recovery
|
|
13
|
+
* - Comprehensive health monitoring
|
|
14
|
+
* - Metrics aggregation
|
|
15
|
+
* - Event-driven architecture
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
import { EventEmitter } from "events";
|
|
19
|
+
import { IntegrationRegistry } from "../base/registry.js";
|
|
20
|
+
import { PluginIntegration, PluginRoutingMapping, PluginType, PluginState } from "./plugin-integration.js";
|
|
21
|
+
export interface PluginRegistryConfig {
|
|
22
|
+
pluginsDir: string;
|
|
23
|
+
configPath?: string;
|
|
24
|
+
autoStart?: boolean;
|
|
25
|
+
enableMetrics?: boolean;
|
|
26
|
+
maxRestarts?: number;
|
|
27
|
+
restartDelayMs?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface PluginLoadResult {
|
|
30
|
+
name: string;
|
|
31
|
+
success: boolean;
|
|
32
|
+
error?: string;
|
|
33
|
+
plugin?: PluginIntegration;
|
|
34
|
+
}
|
|
35
|
+
export interface PluginStatus {
|
|
36
|
+
name: string;
|
|
37
|
+
type: string;
|
|
38
|
+
version: string;
|
|
39
|
+
state: PluginState;
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
healthy: boolean;
|
|
42
|
+
uptime: number;
|
|
43
|
+
restarts: number;
|
|
44
|
+
}
|
|
45
|
+
export interface RegistryMetrics {
|
|
46
|
+
totalPlugins: number;
|
|
47
|
+
activePlugins: number;
|
|
48
|
+
enabledPlugins: number;
|
|
49
|
+
errorPlugins: number;
|
|
50
|
+
totalToolCalls: number;
|
|
51
|
+
totalErrors: number;
|
|
52
|
+
pluginsByType: Record<string, number>;
|
|
53
|
+
}
|
|
54
|
+
export interface DependencyInfo {
|
|
55
|
+
name: string;
|
|
56
|
+
version: string;
|
|
57
|
+
satisfied: boolean;
|
|
58
|
+
optional: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Plugin Registry Events
|
|
62
|
+
*/
|
|
63
|
+
export type PluginRegistryEventType = "plugin-loaded" | "plugin-unloaded" | "plugin-enabled" | "plugin-disabled" | "plugin-reloaded" | "plugin-error" | "discovery-complete" | "dependency-resolved" | "dependency-missing" | "metrics-updated" | "error";
|
|
64
|
+
export interface PluginRegistryEvent {
|
|
65
|
+
type: PluginRegistryEventType;
|
|
66
|
+
timestamp: number;
|
|
67
|
+
pluginName?: string | undefined;
|
|
68
|
+
data?: Record<string, unknown> | undefined;
|
|
69
|
+
error?: Error | undefined;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Plugin Registry
|
|
73
|
+
*
|
|
74
|
+
* Manages plugins as integrations, leveraging:
|
|
75
|
+
* - IntegrationRegistry for lifecycle management
|
|
76
|
+
* - ServerConfigRegistry for MCP server registration
|
|
77
|
+
* - Enforcer routing for skill mappings
|
|
78
|
+
*/
|
|
79
|
+
export declare class PluginRegistry extends EventEmitter {
|
|
80
|
+
private pluginsDir;
|
|
81
|
+
private configPath;
|
|
82
|
+
private autoStart;
|
|
83
|
+
private enableMetrics;
|
|
84
|
+
private enableHotReload;
|
|
85
|
+
private maxRestarts;
|
|
86
|
+
private restartDelayMs;
|
|
87
|
+
private plugins;
|
|
88
|
+
private integrationRegistry;
|
|
89
|
+
private initialized;
|
|
90
|
+
private metricsInterval?;
|
|
91
|
+
private watcher?;
|
|
92
|
+
private reloadDebounce;
|
|
93
|
+
constructor(config?: Partial<PluginRegistryConfig & {
|
|
94
|
+
enableHotReload?: boolean;
|
|
95
|
+
}>);
|
|
96
|
+
/**
|
|
97
|
+
* Initialize the registry and discover plugins
|
|
98
|
+
*/
|
|
99
|
+
initialize(): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Ensure required directories exist
|
|
102
|
+
*/
|
|
103
|
+
private ensureDirectories;
|
|
104
|
+
/**
|
|
105
|
+
* Discover and load plugins from plugins directory
|
|
106
|
+
*/
|
|
107
|
+
private discoverPlugins;
|
|
108
|
+
/**
|
|
109
|
+
* Validate plugin dependencies
|
|
110
|
+
*/
|
|
111
|
+
private validateDependencies;
|
|
112
|
+
/**
|
|
113
|
+
* Load a single plugin
|
|
114
|
+
*/
|
|
115
|
+
loadPlugin(name: string): Promise<PluginIntegration | null>;
|
|
116
|
+
/**
|
|
117
|
+
* Parse plugin type from string
|
|
118
|
+
*/
|
|
119
|
+
private parsePluginType;
|
|
120
|
+
/**
|
|
121
|
+
* Unload a plugin
|
|
122
|
+
*/
|
|
123
|
+
unloadPlugin(name: string): Promise<boolean>;
|
|
124
|
+
/**
|
|
125
|
+
* Enable a plugin
|
|
126
|
+
*/
|
|
127
|
+
enablePlugin(name: string): Promise<boolean>;
|
|
128
|
+
/**
|
|
129
|
+
* Disable a plugin
|
|
130
|
+
*/
|
|
131
|
+
disablePlugin(name: string): Promise<boolean>;
|
|
132
|
+
/**
|
|
133
|
+
* Restart a plugin
|
|
134
|
+
*/
|
|
135
|
+
restartPlugin(name: string): Promise<boolean>;
|
|
136
|
+
/**
|
|
137
|
+
* Get a plugin by name
|
|
138
|
+
*/
|
|
139
|
+
getPlugin(name: string): PluginIntegration | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* Get all plugins
|
|
142
|
+
*/
|
|
143
|
+
getAllPlugins(): PluginIntegration[];
|
|
144
|
+
/**
|
|
145
|
+
* Get plugins by type
|
|
146
|
+
*/
|
|
147
|
+
getPluginsByType(type: PluginType): PluginIntegration[];
|
|
148
|
+
/**
|
|
149
|
+
* Get plugins by state
|
|
150
|
+
*/
|
|
151
|
+
getPluginsByState(state: PluginState): PluginIntegration[];
|
|
152
|
+
/**
|
|
153
|
+
* Get active MCP server configurations
|
|
154
|
+
*/
|
|
155
|
+
getMcpServerConfigs(): Array<{
|
|
156
|
+
serverName: string;
|
|
157
|
+
command: string;
|
|
158
|
+
args?: string[];
|
|
159
|
+
env?: Record<string, string>;
|
|
160
|
+
timeout?: number;
|
|
161
|
+
}>;
|
|
162
|
+
/**
|
|
163
|
+
* Get all routing mappings from plugins
|
|
164
|
+
*/
|
|
165
|
+
getAllRoutingMappings(): PluginRoutingMapping[];
|
|
166
|
+
/**
|
|
167
|
+
* Get all tools from plugins
|
|
168
|
+
*/
|
|
169
|
+
getAllTools(): Array<{
|
|
170
|
+
name: string;
|
|
171
|
+
description: string;
|
|
172
|
+
plugin: string;
|
|
173
|
+
}>;
|
|
174
|
+
/**
|
|
175
|
+
* Health check all plugins
|
|
176
|
+
*/
|
|
177
|
+
healthCheckAll(): Promise<Record<string, {
|
|
178
|
+
healthy: boolean;
|
|
179
|
+
message: string;
|
|
180
|
+
details?: Record<string, unknown>;
|
|
181
|
+
}>>;
|
|
182
|
+
/**
|
|
183
|
+
* Get aggregated metrics
|
|
184
|
+
*/
|
|
185
|
+
getMetrics(): RegistryMetrics;
|
|
186
|
+
/**
|
|
187
|
+
* Start metrics collection interval
|
|
188
|
+
*/
|
|
189
|
+
private startMetricsCollection;
|
|
190
|
+
/**
|
|
191
|
+
* Start file watcher for hot-reload
|
|
192
|
+
*/
|
|
193
|
+
private startFileWatcher;
|
|
194
|
+
/**
|
|
195
|
+
* Debounce plugin reload to avoid multiple reloads during file writes
|
|
196
|
+
*/
|
|
197
|
+
private debounceReload;
|
|
198
|
+
/**
|
|
199
|
+
* Hot-reload a single plugin
|
|
200
|
+
*/
|
|
201
|
+
private hotReloadPlugin;
|
|
202
|
+
/**
|
|
203
|
+
* Shutdown all plugins
|
|
204
|
+
*/
|
|
205
|
+
shutdown(): Promise<void>;
|
|
206
|
+
/**
|
|
207
|
+
* Get status summary
|
|
208
|
+
*/
|
|
209
|
+
getStatus(): {
|
|
210
|
+
initialized: boolean;
|
|
211
|
+
pluginCount: number;
|
|
212
|
+
plugins: PluginStatus[];
|
|
213
|
+
metrics: RegistryMetrics;
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Get the underlying IntegrationRegistry
|
|
217
|
+
*/
|
|
218
|
+
getIntegrationRegistry(): IntegrationRegistry;
|
|
219
|
+
/**
|
|
220
|
+
* Emit a registry event
|
|
221
|
+
*/
|
|
222
|
+
private emitEvent;
|
|
223
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Resolver
|
|
3
|
+
*
|
|
4
|
+
* Resolves agent configurations from the 0xRay registry.
|
|
5
|
+
* Used by the integration layer to programmatically access agent configs.
|
|
6
|
+
*
|
|
7
|
+
* @since 2026-02-14
|
|
8
|
+
*/
|
|
9
|
+
interface AgentConfig {
|
|
10
|
+
name: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
capabilities?: string[];
|
|
13
|
+
system?: string;
|
|
14
|
+
tools?: {
|
|
15
|
+
include?: string[];
|
|
16
|
+
exclude?: string[];
|
|
17
|
+
};
|
|
18
|
+
model?: string;
|
|
19
|
+
mode?: string;
|
|
20
|
+
temperature?: number;
|
|
21
|
+
maxComplexity?: number;
|
|
22
|
+
enabled?: boolean;
|
|
23
|
+
permission?: {
|
|
24
|
+
edit?: string;
|
|
25
|
+
bash?: string;
|
|
26
|
+
};
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Resolves an agent configuration by name from the 0xRay registry
|
|
31
|
+
*
|
|
32
|
+
* @param agentName - The name of the agent to resolve
|
|
33
|
+
* @returns The agent configuration object
|
|
34
|
+
* @throws Error if agent cannot be resolved
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolveAgent(agentName: string): Promise<AgentConfig>;
|
|
37
|
+
/**
|
|
38
|
+
* Gets all available agents from the registry
|
|
39
|
+
*/
|
|
40
|
+
export declare function getAllAgents(): Promise<string[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Checks if an agent exists in the registry
|
|
43
|
+
*/
|
|
44
|
+
export declare function agentExists(agentName: string): Promise<boolean>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0xRay Architect Tools MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Converts architect-tools.ts functions into MCP server tools
|
|
5
|
+
* Provides contextual analysis capabilities via MCP protocol
|
|
6
|
+
*/
|
|
7
|
+
import { XrayKnowledgeSkillBase } from "./shared/knowledge-skill-base.js";
|
|
8
|
+
declare class XrayArchitectToolsServer extends XrayKnowledgeSkillBase {
|
|
9
|
+
constructor();
|
|
10
|
+
setupToolHandlers(): void;
|
|
11
|
+
private contextAnalysis;
|
|
12
|
+
private codebaseStructure;
|
|
13
|
+
private dependencyAnalysis;
|
|
14
|
+
private architectureAssessment;
|
|
15
|
+
}
|
|
16
|
+
export default XrayArchitectToolsServer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0xRay Auto Format MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Automated code formatting hook with Prettier and framework-specific formatters
|
|
5
|
+
*/
|
|
6
|
+
import { XrayKnowledgeSkillBase } from "./shared/knowledge-skill-base.js";
|
|
7
|
+
declare class XrayAutoFormatServer extends XrayKnowledgeSkillBase {
|
|
8
|
+
constructor();
|
|
9
|
+
setupToolHandlers(): void;
|
|
10
|
+
private handleAutoFormat;
|
|
11
|
+
private handleFormatCheck;
|
|
12
|
+
private runPrettier;
|
|
13
|
+
private runEslintFix;
|
|
14
|
+
private runTypeScriptFormat;
|
|
15
|
+
private checkFormatting;
|
|
16
|
+
private generateFormatSummary;
|
|
17
|
+
}
|
|
18
|
+
export { XrayAutoFormatServer };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0xRay Boot Orchestrator MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Advanced initialization orchestration with dependency management and health monitoring
|
|
5
|
+
*/
|
|
6
|
+
import { XrayKnowledgeSkillBase } from "./shared/knowledge-skill-base.js";
|
|
7
|
+
declare class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
8
|
+
private bootStatus;
|
|
9
|
+
private bootSequence;
|
|
10
|
+
constructor();
|
|
11
|
+
private initializeDependencies;
|
|
12
|
+
setupToolHandlers(): void;
|
|
13
|
+
private handleExecuteBootSequence;
|
|
14
|
+
private handleGetBootStatus;
|
|
15
|
+
private handleInitializeComponent;
|
|
16
|
+
private handleValidateBootDependencies;
|
|
17
|
+
private handleShutdownFramework;
|
|
18
|
+
private validatePrerequisites;
|
|
19
|
+
private executeParallelBoot;
|
|
20
|
+
private executeSequentialBoot;
|
|
21
|
+
private initializeComponent;
|
|
22
|
+
private initConfiguration;
|
|
23
|
+
private initLogging;
|
|
24
|
+
private initStateManagement;
|
|
25
|
+
private initSecurity;
|
|
26
|
+
private initCodexLoader;
|
|
27
|
+
private initContextLoader;
|
|
28
|
+
private initProcessorPipeline;
|
|
29
|
+
private initAgentRegistry;
|
|
30
|
+
private initOrchestrator;
|
|
31
|
+
private initMCPServers;
|
|
32
|
+
private initFrameworkHooks;
|
|
33
|
+
private countAgentFiles;
|
|
34
|
+
private countMCPFiles;
|
|
35
|
+
private getComponentStatus;
|
|
36
|
+
private getOverallBootStatus;
|
|
37
|
+
private validateAllDependencies;
|
|
38
|
+
private checkComponentExists;
|
|
39
|
+
private detectCircularDependencies;
|
|
40
|
+
private applyDependencyFixes;
|
|
41
|
+
private executeShutdownSequence;
|
|
42
|
+
private shutdownComponent;
|
|
43
|
+
private saveShutdownState;
|
|
44
|
+
private formatBootResults;
|
|
45
|
+
private formatComponentStatus;
|
|
46
|
+
private formatOverallStatus;
|
|
47
|
+
}
|
|
48
|
+
export { XrayBootOrchestratorServer };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Loader
|
|
3
|
+
*
|
|
4
|
+
* Loads MCP server configurations from various sources including
|
|
5
|
+
* JSON configuration files.
|
|
6
|
+
*
|
|
7
|
+
* Extracted from mcp-client.ts as part of Phase 2 refactoring.
|
|
8
|
+
*/
|
|
9
|
+
import { IServerConfig } from '../types/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Result of a configuration load operation
|
|
12
|
+
*/
|
|
13
|
+
export interface ConfigLoadResult {
|
|
14
|
+
success: boolean;
|
|
15
|
+
configs?: IServerConfig[];
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Loads MCP server configurations from files
|
|
20
|
+
*/
|
|
21
|
+
export declare class ConfigLoader {
|
|
22
|
+
private configPaths;
|
|
23
|
+
/**
|
|
24
|
+
* Load configurations from available config files
|
|
25
|
+
* Returns empty array if no config file exists (this is valid)
|
|
26
|
+
*/
|
|
27
|
+
load(): Promise<ConfigLoadResult>;
|
|
28
|
+
/**
|
|
29
|
+
* Add a custom config path to search
|
|
30
|
+
*/
|
|
31
|
+
addConfigPath(configPath: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Get all configured config paths
|
|
34
|
+
*/
|
|
35
|
+
getConfigPaths(): string[];
|
|
36
|
+
/**
|
|
37
|
+
* Reset config paths to defaults
|
|
38
|
+
*/
|
|
39
|
+
resetConfigPaths(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Clear all config paths
|
|
42
|
+
*/
|
|
43
|
+
clearConfigPaths(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Load configuration from a specific file path
|
|
46
|
+
*/
|
|
47
|
+
loadFromPath(filePath: string): Promise<ConfigLoadResult>;
|
|
48
|
+
/**
|
|
49
|
+
* Check if any config file exists
|
|
50
|
+
*/
|
|
51
|
+
hasConfigFile(): boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Default singleton instance of the config loader
|
|
55
|
+
*/
|
|
56
|
+
export declare const defaultConfigLoader: ConfigLoader;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Validator
|
|
3
|
+
*
|
|
4
|
+
* Validates MCP server configurations for completeness and correctness.
|
|
5
|
+
*
|
|
6
|
+
* Extracted from mcp-client.ts as part of Phase 2 refactoring.
|
|
7
|
+
*/
|
|
8
|
+
import { IServerConfig } from '../types/index.js';
|
|
9
|
+
/**
|
|
10
|
+
* Result of a configuration validation
|
|
11
|
+
*/
|
|
12
|
+
export interface ValidationResult {
|
|
13
|
+
valid: boolean;
|
|
14
|
+
errors: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Validates MCP server configurations
|
|
18
|
+
*/
|
|
19
|
+
export declare class ConfigValidator {
|
|
20
|
+
/**
|
|
21
|
+
* Validate a single server configuration
|
|
22
|
+
*/
|
|
23
|
+
validate(config: IServerConfig): ValidationResult;
|
|
24
|
+
/**
|
|
25
|
+
* Validate multiple server configurations
|
|
26
|
+
*/
|
|
27
|
+
validateAll(configs: IServerConfig[]): ValidationResult;
|
|
28
|
+
/**
|
|
29
|
+
* Validate and filter - returns only valid configs
|
|
30
|
+
*/
|
|
31
|
+
filterValid(configs: IServerConfig[]): IServerConfig[];
|
|
32
|
+
/**
|
|
33
|
+
* Get validation errors for all invalid configs
|
|
34
|
+
*/
|
|
35
|
+
getValidationErrors(configs: IServerConfig[]): Record<string, string[]>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Default singleton instance of the config validator
|
|
39
|
+
*/
|
|
40
|
+
export declare const defaultConfigValidator: ConfigValidator;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Configuration Layer
|
|
3
|
+
*
|
|
4
|
+
* Centralized configuration management for MCP servers.
|
|
5
|
+
*
|
|
6
|
+
* This module provides:
|
|
7
|
+
* - ServerConfigRegistry: Manages server configurations
|
|
8
|
+
* - ConfigLoader: Loads configurations from files
|
|
9
|
+
* - ConfigValidator: Validates configuration correctness
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { defaultServerRegistry, ConfigLoader, ConfigValidator } from './config/index.js';
|
|
14
|
+
*
|
|
15
|
+
* // Get a server config
|
|
16
|
+
* const config = defaultServerRegistry.get('code-review');
|
|
17
|
+
*
|
|
18
|
+
* // Load from file
|
|
19
|
+
* const loader = new ConfigLoader();
|
|
20
|
+
* const result = await loader.load();
|
|
21
|
+
*
|
|
22
|
+
* // Validate
|
|
23
|
+
* const validator = new ConfigValidator();
|
|
24
|
+
* const validation = validator.validate(config);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export { ServerConfigRegistry, defaultServerRegistry } from './server-config-registry.js';
|
|
28
|
+
export { ConfigLoader, defaultConfigLoader } from './config-loader.js';
|
|
29
|
+
export { ConfigValidator, defaultConfigValidator } from './config-validator.js';
|
|
30
|
+
export { PluginServerConfigRegistry } from './plugin-server-registry.js';
|
|
31
|
+
export type { PluginServerConfig, PluginServerRegistrationOptions } from './plugin-server-registry.js';
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server Configuration Registry - Plugin Extension
|
|
3
|
+
*
|
|
4
|
+
* Extends ServerConfigRegistry with plugin support for Phase 2.
|
|
5
|
+
* Enables automatic MCP server registration from plugins.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import { ServerConfigRegistry } from "./server-config-registry.js";
|
|
9
|
+
import { IServerConfig } from "../types/mcp.types.js";
|
|
10
|
+
import type { PluginIntegration } from "../../integrations/plugins/plugin-integration.js";
|
|
11
|
+
import type { PluginRegistry } from "../../integrations/plugins/plugin-registry.js";
|
|
12
|
+
/**
|
|
13
|
+
* Plugin server configuration
|
|
14
|
+
*/
|
|
15
|
+
export interface PluginServerConfig extends IServerConfig {
|
|
16
|
+
pluginName: string;
|
|
17
|
+
pluginVersion: string;
|
|
18
|
+
autoReload?: boolean;
|
|
19
|
+
capabilities?: string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Plugin server registration options
|
|
23
|
+
*/
|
|
24
|
+
export interface PluginServerRegistrationOptions {
|
|
25
|
+
registry?: ServerConfigRegistry;
|
|
26
|
+
autoRegister?: boolean;
|
|
27
|
+
overwrite?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* ServerConfigRegistry with plugin support
|
|
31
|
+
*/
|
|
32
|
+
export declare class PluginServerConfigRegistry {
|
|
33
|
+
private registry;
|
|
34
|
+
private registeredPluginServers;
|
|
35
|
+
private pluginRegistryRef?;
|
|
36
|
+
constructor(registry?: ServerConfigRegistry);
|
|
37
|
+
/**
|
|
38
|
+
* Set the plugin registry reference for dynamic updates
|
|
39
|
+
*/
|
|
40
|
+
setPluginRegistry(registry: PluginRegistry): void;
|
|
41
|
+
/**
|
|
42
|
+
* Get the plugin registry reference
|
|
43
|
+
*/
|
|
44
|
+
getPluginRegistry(): PluginRegistry | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Register a plugin's MCP server configuration
|
|
47
|
+
*/
|
|
48
|
+
registerPluginServer(plugin: PluginIntegration, options?: PluginServerRegistrationOptions): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Register all MCP server plugins from a plugin registry
|
|
51
|
+
*/
|
|
52
|
+
registerAllPluginServers(pluginRegistry: PluginRegistry, options?: PluginServerRegistrationOptions): number;
|
|
53
|
+
/**
|
|
54
|
+
* Get a server configuration by name
|
|
55
|
+
*/
|
|
56
|
+
get(serverName: string): IServerConfig | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Check if a server configuration exists
|
|
59
|
+
*/
|
|
60
|
+
has(serverName: string): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Get all registered server configurations
|
|
63
|
+
*/
|
|
64
|
+
getAll(): IServerConfig[];
|
|
65
|
+
/**
|
|
66
|
+
* Get all registered server names
|
|
67
|
+
*/
|
|
68
|
+
getServerNames(): string[];
|
|
69
|
+
/**
|
|
70
|
+
* Get plugin server configuration by server name
|
|
71
|
+
*/
|
|
72
|
+
getPluginServer(serverName: string): PluginServerConfig | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Get all registered plugin servers
|
|
75
|
+
*/
|
|
76
|
+
getAllPluginServers(): PluginServerConfig[];
|
|
77
|
+
/**
|
|
78
|
+
* Check if a server is from a plugin
|
|
79
|
+
*/
|
|
80
|
+
isPluginServer(serverName: string): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Unregister a plugin server
|
|
83
|
+
*/
|
|
84
|
+
unregisterPluginServer(serverName: string): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Get servers by capability
|
|
87
|
+
*/
|
|
88
|
+
getServersByCapability(capability: string): PluginServerConfig[];
|
|
89
|
+
/**
|
|
90
|
+
* Get registry statistics
|
|
91
|
+
*/
|
|
92
|
+
getRegistryStats(): {
|
|
93
|
+
totalServers: number;
|
|
94
|
+
defaultServers: number;
|
|
95
|
+
pluginServers: number;
|
|
96
|
+
pluginServerDetails: Array<{
|
|
97
|
+
name: string;
|
|
98
|
+
plugin: string;
|
|
99
|
+
version: string;
|
|
100
|
+
}>;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Clear all plugin server registrations (keep default servers)
|
|
104
|
+
*/
|
|
105
|
+
clearPluginServers(): number;
|
|
106
|
+
/**
|
|
107
|
+
* Register a server configuration
|
|
108
|
+
*/
|
|
109
|
+
register(config: IServerConfig): void;
|
|
110
|
+
/**
|
|
111
|
+
* Clear all registrations
|
|
112
|
+
*/
|
|
113
|
+
clear(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Create dynamic config for unknown server
|
|
116
|
+
*/
|
|
117
|
+
createDynamicConfig(serverName: string): IServerConfig;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Default singleton instance
|
|
121
|
+
*/
|
|
122
|
+
export declare const defaultPluginServerRegistry: PluginServerConfigRegistry;
|
|
123
|
+
/**
|
|
124
|
+
* Create a new PluginServerConfigRegistry
|
|
125
|
+
*/
|
|
126
|
+
export declare function createPluginServerRegistry(baseRegistry?: ServerConfigRegistry): PluginServerConfigRegistry;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server Configuration Registry
|
|
3
|
+
*
|
|
4
|
+
* Manages server configurations with support for default servers
|
|
5
|
+
* and runtime configuration registration.
|
|
6
|
+
*
|
|
7
|
+
* Extracted from mcp-client.ts as part of Phase 2 refactoring.
|
|
8
|
+
*/
|
|
9
|
+
import { IServerConfig } from '../types/index.js';
|
|
10
|
+
export declare class ServerConfigRegistry {
|
|
11
|
+
private configs;
|
|
12
|
+
constructor();
|
|
13
|
+
/**
|
|
14
|
+
* Register all default server configurations
|
|
15
|
+
*/
|
|
16
|
+
private registerDefaultConfigs;
|
|
17
|
+
/**
|
|
18
|
+
* Register a new server configuration
|
|
19
|
+
*/
|
|
20
|
+
register(config: IServerConfig): void;
|
|
21
|
+
/**
|
|
22
|
+
* Get a server configuration by name
|
|
23
|
+
*/
|
|
24
|
+
get(serverName: string): IServerConfig | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Check if a server configuration exists
|
|
27
|
+
*/
|
|
28
|
+
has(serverName: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Get all registered server configurations
|
|
31
|
+
*/
|
|
32
|
+
getAll(): IServerConfig[];
|
|
33
|
+
/**
|
|
34
|
+
* Get all registered server names
|
|
35
|
+
*/
|
|
36
|
+
getServerNames(): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Clear all registered configurations
|
|
39
|
+
*/
|
|
40
|
+
clear(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Create a dynamic configuration for an unknown server
|
|
43
|
+
* Uses the knowledge-skills directory as default location.
|
|
44
|
+
* Now respects the "xray" field declared in package.json.
|
|
45
|
+
*/
|
|
46
|
+
createDynamicConfig(serverName: string): IServerConfig;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Default singleton instance of the server config registry
|
|
50
|
+
*/
|
|
51
|
+
export declare const defaultServerRegistry: ServerConfigRegistry;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IMcpConnection, IServerConfig } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Connection Manager
|
|
4
|
+
* Manages MCP connection lifecycle and provides centralized access to connections
|
|
5
|
+
*/
|
|
6
|
+
export declare class ConnectionManager {
|
|
7
|
+
private connections;
|
|
8
|
+
/**
|
|
9
|
+
* Get or create a connection for a server
|
|
10
|
+
* @param config - Server configuration
|
|
11
|
+
* @returns Promise resolving to an MCP connection
|
|
12
|
+
*/
|
|
13
|
+
getConnection(config: IServerConfig): Promise<IMcpConnection>;
|
|
14
|
+
/**
|
|
15
|
+
* Disconnect a specific server
|
|
16
|
+
* @param serverName - Name of the server to disconnect
|
|
17
|
+
*/
|
|
18
|
+
disconnect(serverName: string): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Disconnect all managed connections
|
|
21
|
+
*/
|
|
22
|
+
disconnectAll(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Check if a connection exists for a server
|
|
25
|
+
* @param serverName - Name of the server
|
|
26
|
+
* @returns True if connection exists and is connected
|
|
27
|
+
*/
|
|
28
|
+
hasConnection(serverName: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Get all connected server names
|
|
31
|
+
* @returns Array of server names
|
|
32
|
+
*/
|
|
33
|
+
getConnectedServers(): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Get the number of active connections
|
|
36
|
+
* @returns Number of connections
|
|
37
|
+
*/
|
|
38
|
+
getConnectionCount(): number;
|
|
39
|
+
}
|