0xray 2.2.4 ā 3.0.0
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/AGENTS.md +5 -5
- package/README.md +54 -16
- package/dist/AGENTS.md +5 -5
- package/dist/CHANGELOG.md +139 -0
- package/dist/README.md +54 -16
- package/dist/agents/architect.js +1 -0
- package/dist/agents/architect.js.map +1 -0
- package/dist/agents/backend-engineer.js +1 -0
- package/dist/agents/backend-engineer.js.map +1 -0
- package/dist/agents/bug-triage-specialist.js +1 -0
- package/dist/agents/bug-triage-specialist.js.map +1 -0
- package/dist/agents/code-analyzer.js +1 -0
- package/dist/agents/code-analyzer.js.map +1 -0
- package/dist/agents/code-reviewer.js +1 -0
- package/dist/agents/code-reviewer.js.map +1 -0
- package/dist/agents/content-creator.js +1 -0
- package/dist/agents/content-creator.js.map +1 -0
- package/dist/agents/database-engineer.js +1 -0
- package/dist/agents/database-engineer.js.map +1 -0
- package/dist/agents/devops-engineer.js +1 -0
- package/dist/agents/devops-engineer.js.map +1 -0
- package/dist/agents/frontend-engineer.js +1 -0
- package/dist/agents/frontend-engineer.js.map +1 -0
- package/dist/agents/frontend-ui-ux-engineer.js +1 -0
- package/dist/agents/frontend-ui-ux-engineer.js.map +1 -0
- package/dist/agents/growth-strategist.js +1 -0
- package/dist/agents/growth-strategist.js.map +1 -0
- package/dist/agents/index.js +1 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/librarian-agents-updater.js +1 -0
- package/dist/agents/librarian-agents-updater.js.map +1 -0
- package/dist/agents/log-monitor.js +1 -0
- package/dist/agents/log-monitor.js.map +1 -0
- package/dist/agents/mobile-developer.js +1 -0
- package/dist/agents/mobile-developer.js.map +1 -0
- package/dist/agents/performance-engineer.js +1 -0
- package/dist/agents/performance-engineer.js.map +1 -0
- package/dist/agents/refactorer.js +1 -0
- package/dist/agents/refactorer.js.map +1 -0
- package/dist/agents/registry.js +1 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/researcher.js +1 -0
- package/dist/agents/researcher.js.map +1 -0
- package/dist/agents/security-auditor.js +1 -0
- package/dist/agents/security-auditor.js.map +1 -0
- package/dist/agents/seo-consultant.js +1 -0
- package/dist/agents/seo-consultant.js.map +1 -0
- package/dist/agents/strategist.js +1 -0
- package/dist/agents/strategist.js.map +1 -0
- package/dist/agents/tech-writer.js +1 -0
- package/dist/agents/tech-writer.js.map +1 -0
- package/dist/agents/testing-lead.js +1 -0
- package/dist/agents/testing-lead.js.map +1 -0
- package/dist/agents/types.js +1 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/analytics/emerging-pattern-detector.js +1 -0
- package/dist/analytics/emerging-pattern-detector.js.map +1 -0
- package/dist/analytics/pattern-learning-engine.js +1 -0
- package/dist/analytics/pattern-learning-engine.js.map +1 -0
- package/dist/analytics/pattern-performance-tracker.js +1 -0
- package/dist/analytics/pattern-performance-tracker.js.map +1 -0
- package/dist/analytics/predictive-analytics.js +1 -0
- package/dist/analytics/predictive-analytics.js.map +1 -0
- package/dist/analytics/prompt-pattern-analyzer.js +1 -0
- package/dist/analytics/prompt-pattern-analyzer.js.map +1 -0
- package/dist/analytics/routing-performance-analyzer.js +1 -0
- package/dist/analytics/routing-performance-analyzer.js.map +1 -0
- package/dist/analytics/routing-refiner.js +1 -0
- package/dist/analytics/routing-refiner.js.map +1 -0
- package/dist/architect/architect-tools.js +1 -0
- package/dist/architect/architect-tools.js.map +1 -0
- package/dist/architect/architectural-integrity.js +1 -0
- package/dist/architect/architectural-integrity.js.map +1 -0
- package/dist/cli/commands/antigravity-status.js +1 -0
- package/dist/cli/commands/antigravity-status.js.map +1 -0
- package/dist/cli/commands/archive-logs.js +1 -0
- package/dist/cli/commands/archive-logs.js.map +1 -0
- package/dist/cli/commands/credible-init.js +1 -0
- package/dist/cli/commands/credible-init.js.map +1 -0
- package/dist/cli/commands/govern.js +1 -3
- package/dist/cli/commands/govern.js.map +1 -0
- package/dist/cli/commands/grok-install.js +1 -0
- package/dist/cli/commands/grok-install.js.map +1 -0
- package/dist/cli/commands/hermes-install.js +1 -0
- package/dist/cli/commands/hermes-install.js.map +1 -0
- package/dist/cli/commands/mcp-install.js +1 -0
- package/dist/cli/commands/mcp-install.js.map +1 -0
- package/dist/cli/commands/openclaw-install.js +1 -0
- package/dist/cli/commands/openclaw-install.js.map +1 -0
- package/dist/cli/commands/opencode-install.js +1 -0
- package/dist/cli/commands/opencode-install.js.map +1 -0
- package/dist/cli/commands/plugin-commands.js +1 -0
- package/dist/cli/commands/plugin-commands.js.map +1 -0
- package/dist/cli/commands/publish-agent.js +1 -0
- package/dist/cli/commands/publish-agent.js.map +1 -0
- package/dist/cli/commands/security-audit.js +1 -0
- package/dist/cli/commands/security-audit.js.map +1 -0
- package/dist/cli/commands/skill-install.js +1 -0
- package/dist/cli/commands/skill-install.js.map +1 -0
- package/dist/cli/commands/status.js +17 -2
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/storyteller.js +1 -0
- package/dist/cli/commands/storyteller.js.map +1 -0
- package/dist/cli/index.js +1 -4
- package/dist/cli/index.js.map +1 -0
- package/dist/config/default-agents.js +1 -0
- package/dist/config/default-agents.js.map +1 -0
- package/dist/config/routing-mappings.js +1 -0
- package/dist/config/routing-mappings.js.map +1 -0
- package/dist/core/activity-logger.js +1 -0
- package/dist/core/activity-logger.js.map +1 -0
- package/dist/core/adaptive-kernel.js +1 -0
- package/dist/core/adaptive-kernel.js.map +1 -0
- package/dist/core/agent-spawn-gate.js +1 -0
- package/dist/core/agent-spawn-gate.js.map +1 -0
- package/dist/core/boot-orchestrator.js +1 -0
- package/dist/core/boot-orchestrator.js.map +1 -0
- package/dist/core/codex-formatter.js +1 -0
- package/dist/core/codex-formatter.js.map +1 -0
- package/dist/core/codex-injector.js +1 -0
- package/dist/core/codex-injector.js.map +1 -0
- package/dist/core/config-loader.js +1 -0
- package/dist/core/config-loader.js.map +1 -0
- package/dist/core/config-paths.js +2 -1
- package/dist/core/config-paths.js.map +1 -0
- package/dist/core/context-loader.js +1 -0
- package/dist/core/context-loader.js.map +1 -0
- package/dist/core/context-validator.js +1 -0
- package/dist/core/context-validator.js.map +1 -0
- package/dist/core/features-config.js +1 -0
- package/dist/core/features-config.js.map +1 -0
- package/dist/core/framework-logger.js +1 -0
- package/dist/core/framework-logger.js.map +1 -0
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -0
- package/dist/core/kernel-patterns.js +1 -0
- package/dist/core/kernel-patterns.js.map +1 -0
- package/dist/core/model-router.js +1 -0
- package/dist/core/model-router.js.map +1 -0
- package/dist/core/orchestrator.d.ts +11 -10
- package/dist/core/orchestrator.js +27 -171
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/core/system-prompt-generator.js +1 -0
- package/dist/core/system-prompt-generator.js.map +1 -0
- package/dist/core/xray-activation.js +2 -1
- package/dist/core/xray-activation.js.map +1 -0
- package/dist/delegation/agent-delegator.js +1 -0
- package/dist/delegation/agent-delegator.js.map +1 -0
- package/dist/delegation/agent-expertise.js +1 -0
- package/dist/delegation/agent-expertise.js.map +1 -0
- package/dist/delegation/analytics/index.js +1 -0
- package/dist/delegation/analytics/index.js.map +1 -0
- package/dist/delegation/analytics/learning-engine.js +1 -0
- package/dist/delegation/analytics/learning-engine.js.map +1 -0
- package/dist/delegation/analytics/outcome-tracker.js +1 -0
- package/dist/delegation/analytics/outcome-tracker.js.map +1 -0
- package/dist/delegation/analytics/routing-analytics.js +1 -0
- package/dist/delegation/analytics/routing-analytics.js.map +1 -0
- package/dist/delegation/ast-code-parser.js +1 -0
- package/dist/delegation/ast-code-parser.js.map +1 -0
- package/dist/delegation/codebase-context-analyzer.js +1 -0
- package/dist/delegation/codebase-context-analyzer.js.map +1 -0
- package/dist/delegation/complexity-analyzer.js +1 -0
- package/dist/delegation/complexity-analyzer.js.map +1 -0
- package/dist/delegation/complexity-core.js +1 -0
- package/dist/delegation/complexity-core.js.map +1 -0
- package/dist/delegation/config/types.js +1 -0
- package/dist/delegation/config/types.js.map +1 -0
- package/dist/delegation/dependency-graph-builder.js +1 -0
- package/dist/delegation/dependency-graph-builder.js.map +1 -0
- package/dist/delegation/index.d.ts +3 -0
- package/dist/delegation/index.js +4 -0
- package/dist/delegation/index.js.map +1 -0
- package/dist/delegation/metrics-aggregator.js +1 -0
- package/dist/delegation/metrics-aggregator.js.map +1 -0
- package/dist/delegation/session-coordinator.js +1 -0
- package/dist/delegation/session-coordinator.js.map +1 -0
- package/dist/delegation/strategy-selector.js +1 -0
- package/dist/delegation/strategy-selector.js.map +1 -0
- package/dist/delegation/voting-types.js +1 -0
- package/dist/delegation/voting-types.js.map +1 -0
- package/dist/delegation/weighted-voting-aggregator.js +1 -0
- package/dist/delegation/weighted-voting-aggregator.js.map +1 -0
- package/dist/enforcement/core/index.js +1 -0
- package/dist/enforcement/core/index.js.map +1 -0
- package/dist/enforcement/core/rule-executor.js +1 -0
- package/dist/enforcement/core/rule-executor.js.map +1 -0
- package/dist/enforcement/core/rule-hierarchy.js +1 -0
- package/dist/enforcement/core/rule-hierarchy.js.map +1 -0
- package/dist/enforcement/core/rule-registry.js +1 -0
- package/dist/enforcement/core/rule-registry.js.map +1 -0
- package/dist/enforcement/core/violation-fixer.js +1 -0
- package/dist/enforcement/core/violation-fixer.js.map +1 -0
- package/dist/enforcement/enforcer-tools.js +1 -0
- package/dist/enforcement/enforcer-tools.js.map +1 -0
- package/dist/enforcement/index.js +1 -0
- package/dist/enforcement/index.js.map +1 -0
- package/dist/enforcement/loaders/agent-triage-loader.js +1 -0
- package/dist/enforcement/loaders/agent-triage-loader.js.map +1 -0
- package/dist/enforcement/loaders/agents-md-validation-loader.js +1 -0
- package/dist/enforcement/loaders/agents-md-validation-loader.js.map +1 -0
- package/dist/enforcement/loaders/base-loader.js +1 -0
- package/dist/enforcement/loaders/base-loader.js.map +1 -0
- package/dist/enforcement/loaders/codex-loader.js +1 -0
- package/dist/enforcement/loaders/codex-loader.js.map +1 -0
- package/dist/enforcement/loaders/index.js +1 -0
- package/dist/enforcement/loaders/index.js.map +1 -0
- package/dist/enforcement/loaders/loader-orchestrator.js +1 -0
- package/dist/enforcement/loaders/loader-orchestrator.js.map +1 -0
- package/dist/enforcement/loaders/processor-loader.js +1 -0
- package/dist/enforcement/loaders/processor-loader.js.map +1 -0
- package/dist/enforcement/rule-enforcer.js +1 -0
- package/dist/enforcement/rule-enforcer.js.map +1 -0
- package/dist/enforcement/types.js +1 -0
- package/dist/enforcement/types.js.map +1 -0
- package/dist/enforcement/validators/architecture-validators.d.ts +17 -0
- package/dist/enforcement/validators/architecture-validators.js +81 -0
- package/dist/enforcement/validators/architecture-validators.js.map +1 -0
- package/dist/enforcement/validators/base-validator.js +1 -0
- package/dist/enforcement/validators/base-validator.js.map +1 -0
- package/dist/enforcement/validators/code-quality-validators.d.ts +1 -0
- package/dist/enforcement/validators/code-quality-validators.js +46 -14
- package/dist/enforcement/validators/code-quality-validators.js.map +1 -0
- package/dist/enforcement/validators/index.js +1 -0
- package/dist/enforcement/validators/index.js.map +1 -0
- package/dist/enforcement/validators/security-validators.js +1 -0
- package/dist/enforcement/validators/security-validators.js.map +1 -0
- package/dist/enforcement/validators/testing-validators.js +1 -0
- package/dist/enforcement/validators/testing-validators.js.map +1 -0
- package/dist/enforcement/validators/validator-registry.js +3 -1
- package/dist/enforcement/validators/validator-registry.js.map +1 -0
- package/dist/execution/opencode-cli-invoker.js +6 -23
- package/dist/execution/opencode-cli-invoker.js.map +1 -0
- package/dist/execution/proposal-applier.js +1 -0
- package/dist/execution/proposal-applier.js.map +1 -0
- package/dist/governance/codex-policy.service.js +1 -0
- package/dist/governance/codex-policy.service.js.map +1 -0
- package/dist/governance/governance-core.js +1 -0
- package/dist/governance/governance-core.js.map +1 -0
- package/dist/governance/governance-service.d.ts +8 -2
- package/dist/governance/governance-service.js +64 -76
- package/dist/governance/governance-service.js.map +1 -0
- package/dist/governance/governance-types.d.ts +4 -0
- package/dist/governance/governance-types.js +1 -0
- package/dist/governance/governance-types.js.map +1 -0
- package/dist/index.d.ts +4 -6
- package/dist/index.js +4 -13
- package/dist/index.js.map +1 -0
- package/dist/inference/deploy-verifier.js +1 -0
- package/dist/inference/deploy-verifier.js.map +1 -0
- package/dist/inference/index.js +1 -0
- package/dist/inference/index.js.map +1 -0
- package/dist/inference/inference-accumulator.js +1 -0
- package/dist/inference/inference-accumulator.js.map +1 -0
- package/dist/inference/inference-cycle.d.ts +0 -6
- package/dist/inference/inference-cycle.js +76 -277
- package/dist/inference/inference-cycle.js.map +1 -0
- package/dist/inference/semantic-patterns.js +1 -0
- package/dist/inference/semantic-patterns.js.map +1 -0
- package/dist/inference/session-capture.js +1 -0
- package/dist/inference/session-capture.js.map +1 -0
- package/dist/integrations/base/Integration.js +1 -0
- package/dist/integrations/base/Integration.js.map +1 -0
- package/dist/integrations/base/index.js +1 -0
- package/dist/integrations/base/index.js.map +1 -0
- package/dist/integrations/base/registry.js +1 -0
- package/dist/integrations/base/registry.js.map +1 -0
- package/dist/integrations/base/types.js +1 -0
- package/dist/integrations/base/types.js.map +1 -0
- package/dist/integrations/enforcement-gate.d.ts +44 -0
- package/dist/integrations/enforcement-gate.js +351 -0
- package/dist/integrations/enforcement-gate.js.map +1 -0
- package/dist/integrations/governance/governance-client.d.ts +4 -1
- package/dist/integrations/governance/governance-client.js +8 -1
- package/dist/integrations/governance/governance-client.js.map +1 -0
- package/dist/integrations/governance/index.d.ts +2 -2
- package/dist/integrations/governance/index.js +26 -5
- package/dist/integrations/governance/index.js.map +1 -0
- package/dist/integrations/governance/types.d.ts +26 -0
- package/dist/integrations/governance/types.js +11 -5
- package/dist/integrations/governance/types.js.map +1 -0
- package/dist/integrations/grok/grok-cli.js +2 -1
- package/dist/integrations/grok/grok-cli.js.map +1 -0
- package/dist/integrations/grok/hooks/pre-tool-use.d.ts +18 -0
- package/dist/integrations/grok/hooks/pre-tool-use.js.map +1 -0
- package/dist/integrations/grok/plugin/0xray/.mcp.json +1 -4
- package/dist/integrations/hermes-agent/bridge.mjs +11 -34
- package/dist/integrations/hermes-agent/hermes-agent-integration.d.ts +133 -0
- package/dist/integrations/hermes-agent/hermes-agent-integration.js +504 -0
- package/dist/integrations/hermes-agent/hermes-agent-integration.js.map +1 -0
- package/dist/integrations/hermes-agent/index.d.ts +11 -0
- package/dist/integrations/hermes-agent/index.js +12 -0
- package/dist/integrations/hermes-agent/index.js.map +1 -0
- package/dist/integrations/hermes-agent/types.d.ts +227 -0
- package/dist/integrations/hermes-agent/types.js +11 -0
- package/dist/integrations/hermes-agent/types.js.map +1 -0
- package/dist/integrations/openclaw/api-server.js +1 -0
- package/dist/integrations/openclaw/api-server.js.map +1 -0
- package/dist/integrations/openclaw/client.js +1 -0
- package/dist/integrations/openclaw/client.js.map +1 -0
- package/dist/integrations/openclaw/config.js +1 -0
- package/dist/integrations/openclaw/config.js.map +1 -0
- package/dist/integrations/openclaw/hooks/xray-hooks.d.ts +11 -0
- package/dist/integrations/openclaw/hooks/xray-hooks.js +1 -0
- package/dist/integrations/openclaw/hooks/xray-hooks.js.map +1 -0
- package/dist/integrations/openclaw/index.js +24 -0
- package/dist/integrations/openclaw/index.js.map +1 -0
- package/dist/integrations/openclaw/types.js +1 -0
- package/dist/integrations/openclaw/types.js.map +1 -0
- package/dist/integrations/plugins/index.js +1 -0
- package/dist/integrations/plugins/index.js.map +1 -0
- package/dist/integrations/plugins/plugin-integration.js +1 -0
- package/dist/integrations/plugins/plugin-integration.js.map +1 -0
- package/dist/integrations/plugins/plugin-registry.js +1 -0
- package/dist/integrations/plugins/plugin-registry.js.map +1 -0
- package/dist/mcps/agent-resolver.js +1 -0
- package/dist/mcps/agent-resolver.js.map +1 -0
- package/dist/mcps/architect-tools.server.js +1 -0
- package/dist/mcps/architect-tools.server.js.map +1 -0
- package/dist/mcps/auto-format.server.js +1 -0
- package/dist/mcps/auto-format.server.js.map +1 -0
- package/dist/mcps/boot-orchestrator.server.d.ts +3 -30
- package/dist/mcps/boot-orchestrator.server.js +32 -537
- package/dist/mcps/boot-orchestrator.server.js.map +1 -0
- package/dist/mcps/config/config-loader.js +1 -0
- package/dist/mcps/config/config-loader.js.map +1 -0
- package/dist/mcps/config/config-validator.js +1 -0
- package/dist/mcps/config/config-validator.js.map +1 -0
- package/dist/mcps/config/index.js +1 -0
- package/dist/mcps/config/index.js.map +1 -0
- package/dist/mcps/config/plugin-server-registry.js +1 -0
- package/dist/mcps/config/plugin-server-registry.js.map +1 -0
- package/dist/mcps/config/server-config-registry.js +1 -0
- package/dist/mcps/config/server-config-registry.js.map +1 -0
- package/dist/mcps/connection/connection-pool.js +1 -0
- package/dist/mcps/connection/connection-pool.js.map +1 -0
- package/dist/mcps/connection/mcp-connection.js +1 -0
- package/dist/mcps/connection/mcp-connection.js.map +1 -0
- package/dist/mcps/connection/process-spawner.js +1 -0
- package/dist/mcps/connection/process-spawner.js.map +1 -0
- package/dist/mcps/enforcer-tools.server.js +1 -0
- package/dist/mcps/enforcer-tools.server.js.map +1 -0
- package/dist/mcps/estimation.server.js +1 -0
- package/dist/mcps/estimation.server.js.map +1 -0
- package/dist/mcps/framework-compliance-audit.server.js +1 -0
- package/dist/mcps/framework-compliance-audit.server.js.map +1 -0
- package/dist/mcps/framework-help.server.js +1 -0
- package/dist/mcps/framework-help.server.js.map +1 -0
- package/dist/mcps/governance.server.d.ts +2 -1
- package/dist/mcps/governance.server.js +67 -16
- package/dist/mcps/governance.server.js.map +1 -0
- package/dist/mcps/in-process-skill-registry.js +17 -0
- package/dist/mcps/in-process-skill-registry.js.map +1 -0
- package/dist/mcps/index.d.ts +17 -0
- package/dist/mcps/index.js +65 -0
- package/dist/mcps/index.js.map +1 -0
- package/dist/mcps/knowledge-skills/api-design.server.js +1 -0
- package/dist/mcps/knowledge-skills/api-design.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +1 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +1 -0
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +1 -0
- package/dist/mcps/knowledge-skills/code-analyzer.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/code-review.server.js +1 -0
- package/dist/mcps/knowledge-skills/code-review.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/content-creator.server.js +1 -0
- package/dist/mcps/knowledge-skills/content-creator.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/database-design.server.js +1 -0
- package/dist/mcps/knowledge-skills/database-design.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +1 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.js +1 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +1 -0
- package/dist/mcps/knowledge-skills/growth-strategist.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/log-monitor.server.js +1 -0
- package/dist/mcps/knowledge-skills/log-monitor.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/mobile-development.server.js +1 -0
- package/dist/mcps/knowledge-skills/mobile-development.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +1 -0
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +1 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.js +1 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +1 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/security-audit.server.js +1 -0
- package/dist/mcps/knowledge-skills/security-audit.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +1 -0
- package/dist/mcps/knowledge-skills/seo-consultant.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/session-management.server.js +1 -0
- package/dist/mcps/knowledge-skills/session-management.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +1 -0
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +16 -1
- package/dist/mcps/knowledge-skills/skill-invocation.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/strategist.server.js +1 -0
- package/dist/mcps/knowledge-skills/strategist.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/tech-writer.server.js +1 -0
- package/dist/mcps/knowledge-skills/tech-writer.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +1 -0
- package/dist/mcps/knowledge-skills/testing-strategy.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +1 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js.map +1 -0
- package/dist/mcps/lint.server.js +1 -0
- package/dist/mcps/lint.server.js.map +1 -0
- package/dist/mcps/mcp-client.js +3 -2
- package/dist/mcps/mcp-client.js.map +1 -0
- package/dist/mcps/model-health-check.server.js +1 -0
- package/dist/mcps/model-health-check.server.js.map +1 -0
- package/dist/mcps/orchestrator/config/agent-capabilities.js +1 -0
- package/dist/mcps/orchestrator/config/agent-capabilities.js.map +1 -0
- package/dist/mcps/orchestrator/execution/execution-planner.js +1 -0
- package/dist/mcps/orchestrator/execution/execution-planner.js.map +1 -0
- package/dist/mcps/orchestrator/handlers/complexity-handler.js +1 -0
- package/dist/mcps/orchestrator/handlers/complexity-handler.js.map +1 -0
- package/dist/mcps/orchestrator/handlers/status-handler.js +1 -0
- package/dist/mcps/orchestrator/handlers/status-handler.js.map +1 -0
- package/dist/mcps/orchestrator/handlers/task-handler.js +1 -0
- package/dist/mcps/orchestrator/handlers/task-handler.js.map +1 -0
- package/dist/mcps/orchestrator/server.js +1 -0
- package/dist/mcps/orchestrator/server.js.map +1 -0
- package/dist/mcps/orchestrator/types.js +1 -0
- package/dist/mcps/orchestrator/types.js.map +1 -0
- package/dist/mcps/performance-analysis.server.js +1 -0
- package/dist/mcps/performance-analysis.server.js.map +1 -0
- package/dist/mcps/processor-pipeline.server.js +1 -0
- package/dist/mcps/processor-pipeline.server.js.map +1 -0
- package/dist/mcps/protocol/protocol-constants.js +1 -0
- package/dist/mcps/protocol/protocol-constants.js.map +1 -0
- package/dist/mcps/researcher.server.js +1 -0
- package/dist/mcps/researcher.server.js.map +1 -0
- package/dist/mcps/security-scan.server.js +1 -0
- package/dist/mcps/security-scan.server.js.map +1 -0
- package/dist/mcps/shared/knowledge-skill-base.js +1 -0
- package/dist/mcps/shared/knowledge-skill-base.js.map +1 -0
- package/dist/mcps/shared/prompt-security-validator.js +1 -0
- package/dist/mcps/shared/prompt-security-validator.js.map +1 -0
- package/dist/mcps/shared/security-scanner.js +1 -0
- package/dist/mcps/shared/security-scanner.js.map +1 -0
- package/dist/mcps/simulation/index.js +1 -0
- package/dist/mcps/simulation/index.js.map +1 -0
- package/dist/mcps/simulation/server-simulations.js +1 -0
- package/dist/mcps/simulation/server-simulations.js.map +1 -0
- package/dist/mcps/simulation/simulation-engine.js +1 -0
- package/dist/mcps/simulation/simulation-engine.js.map +1 -0
- package/dist/mcps/state-manager.server.js +1 -0
- package/dist/mcps/state-manager.server.js.map +1 -0
- package/dist/mcps/tools/index.js +1 -0
- package/dist/mcps/tools/index.js.map +1 -0
- package/dist/mcps/tools/tool-cache.js +1 -0
- package/dist/mcps/tools/tool-cache.js.map +1 -0
- package/dist/mcps/tools/tool-discovery.js +1 -0
- package/dist/mcps/tools/tool-discovery.js.map +1 -0
- package/dist/mcps/tools/tool-executor.js +1 -0
- package/dist/mcps/tools/tool-executor.js.map +1 -0
- package/dist/mcps/tools/tool-registry.js +1 -0
- package/dist/mcps/tools/tool-registry.js.map +1 -0
- package/dist/mcps/types/index.js +1 -0
- package/dist/mcps/types/index.js.map +1 -0
- package/dist/mcps/types/json-rpc.types.js +1 -0
- package/dist/mcps/types/json-rpc.types.js.map +1 -0
- package/dist/mcps/types/mcp.types.js +1 -0
- package/dist/mcps/types/mcp.types.js.map +1 -0
- package/dist/metrics/agent-metrics.js +2 -1
- package/dist/metrics/agent-metrics.js.map +1 -0
- package/dist/metrics/index.js +1 -0
- package/dist/metrics/index.js.map +1 -0
- package/dist/monitoring/advanced-profiler.js +1 -0
- package/dist/monitoring/advanced-profiler.js.map +1 -0
- package/dist/monitoring/memory-monitor.js +1 -0
- package/dist/monitoring/memory-monitor.js.map +1 -0
- package/dist/monitoring/nudge-watchdog.js +1 -0
- package/dist/monitoring/nudge-watchdog.js.map +1 -0
- package/dist/monitoring/test-auto-generation-monitor.js +1 -0
- package/dist/monitoring/test-auto-generation-monitor.js.map +1 -0
- package/dist/nucleus/default-plugins.d.ts +17 -0
- package/dist/nucleus/default-plugins.js +146 -0
- package/dist/nucleus/default-plugins.js.map +1 -0
- package/dist/nucleus/govern-http.js +1 -0
- package/dist/nucleus/govern-http.js.map +1 -0
- package/dist/nucleus/index.d.ts +8 -4
- package/dist/nucleus/index.js +5 -1
- package/dist/nucleus/index.js.map +1 -0
- package/dist/nucleus/kernel.d.ts +1 -1
- package/dist/nucleus/kernel.js +1 -0
- package/dist/nucleus/kernel.js.map +1 -0
- package/dist/nucleus/orchestrator.d.ts +97 -0
- package/dist/nucleus/orchestrator.js +480 -0
- package/dist/nucleus/orchestrator.js.map +1 -0
- package/dist/nucleus/plugin-registry.d.ts +28 -0
- package/dist/nucleus/plugin-registry.js +33 -4
- package/dist/nucleus/plugin-registry.js.map +1 -0
- package/dist/nucleus/thin-dispatch.d.ts +28 -0
- package/dist/nucleus/thin-dispatch.js +58 -0
- package/dist/nucleus/thin-dispatch.js.map +1 -0
- package/dist/orchestrator/agent-spawn-governor.js +1 -0
- package/dist/orchestrator/agent-spawn-governor.js.map +1 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +1 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js.map +1 -0
- package/dist/orchestrator/intelligent-commit-batcher.js +1 -0
- package/dist/orchestrator/intelligent-commit-batcher.js.map +1 -0
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js +1 -0
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js.map +1 -0
- package/dist/orchestrator/orchestrator.js +1 -0
- package/dist/orchestrator/orchestrator.js.map +1 -0
- package/dist/plugin/xray-codex-injection.js +28 -262
- package/dist/plugin/xray-codex-injection.js.map +1 -0
- package/dist/postprocessor/PostProcessor.d.ts +1 -1
- package/dist/postprocessor/PostProcessor.js +79 -1
- package/dist/postprocessor/PostProcessor.js.map +1 -0
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.js +1 -0
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.js.map +1 -0
- package/dist/postprocessor/analysis/FailureAnalysisEngine.js +1 -0
- package/dist/postprocessor/analysis/FailureAnalysisEngine.js.map +1 -0
- package/dist/postprocessor/autofix/AutoFixEngine.js +1 -0
- package/dist/postprocessor/autofix/AutoFixEngine.js.map +1 -0
- package/dist/postprocessor/autofix/FixValidator.js +1 -0
- package/dist/postprocessor/autofix/FixValidator.js.map +1 -0
- package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.js +1 -0
- package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.js.map +1 -0
- package/dist/postprocessor/config/ProcessorConfigLoader.js +1 -0
- package/dist/postprocessor/config/ProcessorConfigLoader.js.map +1 -0
- package/dist/postprocessor/config.js +1 -0
- package/dist/postprocessor/config.js.map +1 -0
- package/dist/postprocessor/escalation/EscalationEngine.js +1 -0
- package/dist/postprocessor/escalation/EscalationEngine.js.map +1 -0
- package/dist/postprocessor/metamorphosis/SelfProposalEngine.d.ts +20 -1
- package/dist/postprocessor/metamorphosis/SelfProposalEngine.js +106 -4
- package/dist/postprocessor/metamorphosis/SelfProposalEngine.js.map +1 -0
- package/dist/postprocessor/metamorphosis/index.d.ts +2 -0
- package/dist/postprocessor/metamorphosis/index.js +2 -0
- package/dist/postprocessor/metamorphosis/index.js.map +1 -0
- package/dist/postprocessor/monitoring/MonitoringEngine.js +1 -0
- package/dist/postprocessor/monitoring/MonitoringEngine.js.map +1 -0
- package/dist/postprocessor/redeploy/RedeployCoordinator.js +1 -0
- package/dist/postprocessor/redeploy/RedeployCoordinator.js.map +1 -0
- package/dist/postprocessor/reporting/PostProcessorReporter.js +1 -0
- package/dist/postprocessor/reporting/PostProcessorReporter.js.map +1 -0
- package/dist/postprocessor/services/RegressionAnalysisService.js +1 -0
- package/dist/postprocessor/services/RegressionAnalysisService.js.map +1 -0
- package/dist/postprocessor/success/SuccessHandler.js +1 -0
- package/dist/postprocessor/success/SuccessHandler.js.map +1 -0
- package/dist/postprocessor/triggers/APITrigger.js +1 -0
- package/dist/postprocessor/triggers/APITrigger.js.map +1 -0
- package/dist/postprocessor/triggers/GitHookTrigger.js +1 -0
- package/dist/postprocessor/triggers/GitHookTrigger.js.map +1 -0
- package/dist/postprocessor/triggers/WebhookTrigger.js +1 -0
- package/dist/postprocessor/triggers/WebhookTrigger.js.map +1 -0
- package/dist/postprocessor/types.d.ts +6 -0
- package/dist/postprocessor/types.js +1 -0
- package/dist/postprocessor/types.js.map +1 -0
- package/dist/postprocessor/validation/HookMetricsCollector.d.ts +47 -0
- package/dist/postprocessor/validation/HookMetricsCollector.js +188 -0
- package/dist/postprocessor/validation/HookMetricsCollector.js.map +1 -0
- package/dist/postprocessor/validation/LightweightValidator.d.ts +46 -0
- package/dist/postprocessor/validation/LightweightValidator.js +271 -0
- package/dist/postprocessor/validation/LightweightValidator.js.map +1 -0
- package/dist/processors/doc-write-guard.js +1 -0
- package/dist/processors/doc-write-guard.js.map +1 -0
- package/dist/processors/implementations/agents-md-validation-processor.js +1 -0
- package/dist/processors/implementations/agents-md-validation-processor.js.map +1 -0
- package/dist/processors/implementations/async-pattern-processor.js +1 -0
- package/dist/processors/implementations/async-pattern-processor.js.map +1 -0
- package/dist/processors/implementations/codex-compliance-processor.js +1 -0
- package/dist/processors/implementations/codex-compliance-processor.js.map +1 -0
- package/dist/processors/implementations/commit-batcher-processor.js +1 -0
- package/dist/processors/implementations/commit-batcher-processor.js.map +1 -0
- package/dist/processors/implementations/console-log-guard-processor.js +1 -0
- package/dist/processors/implementations/console-log-guard-processor.js.map +1 -0
- package/dist/processors/implementations/coverage-analysis-processor.js +1 -0
- package/dist/processors/implementations/coverage-analysis-processor.js.map +1 -0
- package/dist/processors/implementations/error-boundary-processor.js +1 -0
- package/dist/processors/implementations/error-boundary-processor.js.map +1 -0
- package/dist/processors/implementations/inference-improvement-processor.js +1 -0
- package/dist/processors/implementations/inference-improvement-processor.js.map +1 -0
- package/dist/processors/implementations/log-protection-processor.js +1 -0
- package/dist/processors/implementations/log-protection-processor.js.map +1 -0
- package/dist/processors/implementations/nudge-processor.js +1 -0
- package/dist/processors/implementations/nudge-processor.js.map +1 -0
- package/dist/processors/implementations/performance-budget-processor.js +1 -0
- package/dist/processors/implementations/performance-budget-processor.js.map +1 -0
- package/dist/processors/implementations/postprocessor-chain-validator.js +1 -0
- package/dist/processors/implementations/postprocessor-chain-validator.js.map +1 -0
- package/dist/processors/implementations/pre-validate-processor.js +1 -0
- package/dist/processors/implementations/pre-validate-processor.js.map +1 -0
- package/dist/processors/implementations/publish-preflight-processor.js +1 -0
- package/dist/processors/implementations/publish-preflight-processor.js.map +1 -0
- package/dist/processors/implementations/refactoring-logging-processor-wrapper.js +1 -0
- package/dist/processors/implementations/refactoring-logging-processor-wrapper.js.map +1 -0
- package/dist/processors/implementations/regression-testing-processor.js +1 -0
- package/dist/processors/implementations/regression-testing-processor.js.map +1 -0
- package/dist/processors/implementations/session-summary-processor.js +1 -0
- package/dist/processors/implementations/session-summary-processor.js.map +1 -0
- package/dist/processors/implementations/spawn-governance-processor.js +1 -0
- package/dist/processors/implementations/spawn-governance-processor.js.map +1 -0
- package/dist/processors/implementations/state-validation-processor.js +1 -0
- package/dist/processors/implementations/state-validation-processor.js.map +1 -0
- package/dist/processors/implementations/storytelling-trigger-processor.js +1 -0
- package/dist/processors/implementations/storytelling-trigger-processor.js.map +1 -0
- package/dist/processors/implementations/test-auto-creation-processor.js +1 -0
- package/dist/processors/implementations/test-auto-creation-processor.js.map +1 -0
- package/dist/processors/implementations/test-execution-processor.js +1 -0
- package/dist/processors/implementations/test-execution-processor.js.map +1 -0
- package/dist/processors/implementations/typescript-compilation-processor.js +1 -0
- package/dist/processors/implementations/typescript-compilation-processor.js.map +1 -0
- package/dist/processors/implementations/version-compliance-processor.js +1 -0
- package/dist/processors/implementations/version-compliance-processor.js.map +1 -0
- package/dist/processors/processor-interfaces.js +1 -0
- package/dist/processors/processor-interfaces.js.map +1 -0
- package/dist/processors/processor-manager.js +1 -0
- package/dist/processors/processor-manager.js.map +1 -0
- package/dist/processors/processor-types.js +1 -0
- package/dist/processors/processor-types.js.map +1 -0
- package/dist/public/XrayService.d.ts +17 -0
- package/dist/public/XrayService.js +41 -0
- package/dist/public/XrayService.js.map +1 -0
- package/dist/public/index.d.ts +4 -0
- package/dist/public/index.js +3 -0
- package/dist/public/index.js.map +1 -0
- package/dist/reporting/framework-reporting-system.js +1 -0
- package/dist/reporting/framework-reporting-system.js.map +1 -0
- package/dist/reporting/log-parser.js +1 -0
- package/dist/reporting/log-parser.js.map +1 -0
- package/dist/reporting/metrics.js +1 -0
- package/dist/reporting/metrics.js.map +1 -0
- package/dist/reporting/report-formatter.js +1 -0
- package/dist/reporting/report-formatter.js.map +1 -0
- package/dist/reporting/types.js +1 -0
- package/dist/reporting/types.js.map +1 -0
- package/dist/scripts/integration.js +1 -0
- package/dist/scripts/integration.js.map +1 -0
- package/dist/security/comprehensive-security-audit.js +1 -0
- package/dist/security/comprehensive-security-audit.js.map +1 -0
- package/dist/security/security-hardener.js +1 -0
- package/dist/security/security-hardener.js.map +1 -0
- package/dist/security/security-headers.js +1 -0
- package/dist/security/security-headers.js.map +1 -0
- package/dist/services/inference-tuner.js +1 -0
- package/dist/services/inference-tuner.js.map +1 -0
- package/dist/session/index.js +1 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/session-cleanup-manager.js +1 -0
- package/dist/session/session-cleanup-manager.js.map +1 -0
- package/dist/session/session-monitor.js +1 -0
- package/dist/session/session-monitor.js.map +1 -0
- package/dist/session/session-state-manager.js +1 -0
- package/dist/session/session-state-manager.js.map +1 -0
- package/dist/skills/xray-orchestrator/index.js +1 -0
- package/dist/skills/xray-orchestrator/index.js.map +1 -0
- package/dist/state/index.js +1 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/state-manager.js +1 -0
- package/dist/state/state-manager.js.map +1 -0
- package/dist/tools/assess-complexity-tool.js +1 -0
- package/dist/tools/assess-complexity-tool.js.map +1 -0
- package/dist/tools/query-routing-tool.js +1 -0
- package/dist/tools/query-routing-tool.js.map +1 -0
- package/dist/{postprocessor/metamorphosis/MetamorphosisEngine.d.ts ā types/metamorphosis.d.ts} +2 -6
- package/dist/types/metamorphosis.js +7 -0
- package/dist/types/metamorphosis.js.map +1 -0
- package/dist/utils/codex-parser.js +1 -0
- package/dist/utils/codex-parser.js.map +1 -0
- package/dist/utils/command-runner.js +1 -0
- package/dist/utils/command-runner.js.map +1 -0
- package/dist/utils/import-resolver.js +1 -0
- package/dist/utils/import-resolver.js.map +1 -0
- package/dist/utils/language-detector.js +1 -0
- package/dist/utils/language-detector.js.map +1 -0
- package/dist/utils/path-resolver.js +1 -0
- package/dist/utils/path-resolver.js.map +1 -0
- package/dist/utils/shutdown-handler.js +1 -0
- package/dist/utils/shutdown-handler.js.map +1 -0
- package/dist/utils/task-graph.d.ts +29 -0
- package/dist/utils/task-graph.js +107 -0
- package/dist/utils/task-graph.js.map +1 -0
- package/dist/validation/estimation-validator.js +1 -0
- package/dist/validation/estimation-validator.js.map +1 -0
- package/dist/validation/report-content-validator.js +1 -0
- package/dist/validation/report-content-validator.js.map +1 -0
- package/package.json +25 -3
- package/scripts/hooks/install-hooks.cjs +100 -0
- package/scripts/hooks/run-hook.js +185 -72
- package/scripts/node/postinstall.cjs +21 -7
- package/scripts/node/prepare-consumer.cjs +6 -5
- package/scripts/node/setup.cjs +19 -6
- package/scripts/node/universal-version-manager.js +2 -2
- package/src/integrations/grok/plugin/0xray/.mcp.json +1 -4
- package/src/mcps/boot-orchestrator.server.ts +38 -690
- package/src/mcps/governance.server.ts +74 -17
- package/src/mcps/in-process-skill-registry.ts +16 -0
- package/src/mcps/index.ts +79 -0
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +13 -1
- package/src/mcps/mcp-client.ts +2 -2
- package/xray/features.json +17 -1
- package/dist/agents/multimodal-looker.d.ts +0 -9
- package/dist/agents/multimodal-looker.js +0 -93
- package/dist/benchmark/performance-benchmark.d.ts +0 -103
- package/dist/benchmark/performance-benchmark.js +0 -372
- package/dist/mcps/connection/connection-manager.d.ts +0 -39
- package/dist/mcps/connection/connection-manager.js +0 -79
- package/dist/postprocessor/metamorphosis/MetamorphosisEngine.js +0 -10
- package/dist/testing/memory-regression-suite.d.ts +0 -105
- package/dist/testing/memory-regression-suite.js +0 -258
- package/src/mcps/connection/connection-manager.ts +0 -91
|
@@ -1,41 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 0xRay Boot Orchestrator MCP Server
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Thin MCP surface over NucleusOrchestrator.
|
|
5
|
+
* All orchestration logic lives in src/nucleus/orchestrator.ts.
|
|
5
6
|
*/
|
|
6
|
-
import { execSync } from "child_process";
|
|
7
|
-
import fs from "fs";
|
|
8
|
-
import path from "path";
|
|
9
7
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
10
|
-
import { resolveLogDir, resolveStateDir } from "../core/config-paths.js";
|
|
11
8
|
import { XrayKnowledgeSkillBase } from "./shared/knowledge-skill-base.js";
|
|
9
|
+
import { NucleusOrchestrator, } from "../nucleus/orchestrator.js";
|
|
12
10
|
class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
13
|
-
|
|
14
|
-
// Boot sequence in dependency order
|
|
15
|
-
bootSequence = [
|
|
16
|
-
"configuration",
|
|
17
|
-
"logging",
|
|
18
|
-
"state-management",
|
|
19
|
-
"security",
|
|
20
|
-
"codex-loader",
|
|
21
|
-
"context-loader",
|
|
22
|
-
"processor-pipeline",
|
|
23
|
-
"agent-registry",
|
|
24
|
-
"orchestrator",
|
|
25
|
-
"mcp-servers",
|
|
26
|
-
"framework-hooks",
|
|
27
|
-
];
|
|
11
|
+
orchestrator;
|
|
28
12
|
constructor() {
|
|
29
13
|
super("boot-orchestrator", "2.0.1");
|
|
30
|
-
this.
|
|
31
|
-
initialized: false,
|
|
32
|
-
startTime: Date.now(),
|
|
33
|
-
components: new Map(),
|
|
34
|
-
dependencies: new Map(),
|
|
35
|
-
health: new Map(),
|
|
36
|
-
};
|
|
37
|
-
// Initialize dependency map
|
|
38
|
-
this.initializeDependencies();
|
|
14
|
+
this.orchestrator = new NucleusOrchestrator();
|
|
39
15
|
this.tools = [
|
|
40
16
|
{
|
|
41
17
|
name: "execute-boot-sequence",
|
|
@@ -68,11 +44,10 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
68
44
|
properties: {
|
|
69
45
|
component: {
|
|
70
46
|
type: "string",
|
|
71
|
-
enum: this.bootSequence,
|
|
47
|
+
enum: this.orchestrator.bootSequence,
|
|
72
48
|
},
|
|
73
49
|
force: { type: "boolean", default: false },
|
|
74
50
|
},
|
|
75
|
-
required: ["component"],
|
|
76
51
|
},
|
|
77
52
|
},
|
|
78
53
|
{
|
|
@@ -108,87 +83,29 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
108
83
|
this.setupToolHandlers();
|
|
109
84
|
void frameworkLogger.log("mcps/boot-orchestrator", "initialize", "info");
|
|
110
85
|
}
|
|
111
|
-
initializeDependencies() {
|
|
112
|
-
// Define component dependencies
|
|
113
|
-
this.bootStatus.dependencies.set("configuration", []);
|
|
114
|
-
this.bootStatus.dependencies.set("logging", ["configuration"]);
|
|
115
|
-
this.bootStatus.dependencies.set("state-management", [
|
|
116
|
-
"configuration",
|
|
117
|
-
"logging",
|
|
118
|
-
]);
|
|
119
|
-
this.bootStatus.dependencies.set("security", ["configuration"]);
|
|
120
|
-
this.bootStatus.dependencies.set("codex-loader", [
|
|
121
|
-
"configuration",
|
|
122
|
-
"logging",
|
|
123
|
-
]);
|
|
124
|
-
this.bootStatus.dependencies.set("context-loader", [
|
|
125
|
-
"configuration",
|
|
126
|
-
"codex-loader",
|
|
127
|
-
]);
|
|
128
|
-
this.bootStatus.dependencies.set("processor-pipeline", [
|
|
129
|
-
"state-management",
|
|
130
|
-
"security",
|
|
131
|
-
"codex-loader",
|
|
132
|
-
]);
|
|
133
|
-
this.bootStatus.dependencies.set("agent-registry", [
|
|
134
|
-
"configuration",
|
|
135
|
-
"state-management",
|
|
136
|
-
"processor-pipeline",
|
|
137
|
-
]);
|
|
138
|
-
this.bootStatus.dependencies.set("orchestrator", [
|
|
139
|
-
"agent-registry",
|
|
140
|
-
"processor-pipeline",
|
|
141
|
-
]);
|
|
142
|
-
this.bootStatus.dependencies.set("mcp-servers", [
|
|
143
|
-
"orchestrator",
|
|
144
|
-
"agent-registry",
|
|
145
|
-
]);
|
|
146
|
-
this.bootStatus.dependencies.set("framework-hooks", [
|
|
147
|
-
"mcp-servers",
|
|
148
|
-
"orchestrator",
|
|
149
|
-
]);
|
|
150
|
-
}
|
|
151
86
|
async handleExecuteBootSequence(args) {
|
|
152
|
-
const config = args.config || {};
|
|
153
87
|
const skipHealthChecks = args.skipHealthChecks || false;
|
|
154
88
|
const parallelInit = args.parallelInit !== false;
|
|
155
89
|
frameworkLogger.log("mcp-boot-orchestrator", "execute-boot-sequence", "info", {
|
|
156
90
|
skipHealthChecks,
|
|
157
91
|
parallelInit,
|
|
158
92
|
});
|
|
159
|
-
const results = {
|
|
160
|
-
success: true,
|
|
161
|
-
initializedComponents: [],
|
|
162
|
-
failedComponents: [],
|
|
163
|
-
duration: 0,
|
|
164
|
-
errors: [],
|
|
165
|
-
warnings: [],
|
|
166
|
-
};
|
|
167
|
-
const startTime = Date.now();
|
|
168
93
|
try {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
results.errors.push(...validationResults.errors);
|
|
174
|
-
return this.formatBootResults(results);
|
|
175
|
-
}
|
|
176
|
-
// Execute boot sequence
|
|
177
|
-
if (parallelInit) {
|
|
178
|
-
await this.executeParallelBoot(skipHealthChecks, results);
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
await this.executeSequentialBoot(skipHealthChecks, results);
|
|
182
|
-
}
|
|
183
|
-
results.duration = Date.now() - startTime;
|
|
184
|
-
this.bootStatus.initialized = results.success;
|
|
94
|
+
const results = await this.orchestrator.executeBootSequence({
|
|
95
|
+
skipHealthChecks,
|
|
96
|
+
parallelInit,
|
|
97
|
+
});
|
|
185
98
|
return this.formatBootResults(results);
|
|
186
99
|
}
|
|
187
100
|
catch (error) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
101
|
+
return {
|
|
102
|
+
content: [
|
|
103
|
+
{
|
|
104
|
+
type: "text",
|
|
105
|
+
text: `ā Boot sequence failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
};
|
|
192
109
|
}
|
|
193
110
|
}
|
|
194
111
|
async handleGetBootStatus(args) {
|
|
@@ -197,8 +114,7 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
197
114
|
frameworkLogger.log("mcp-boot-orchestrator", "get-boot-status", "info", { detailed, component });
|
|
198
115
|
try {
|
|
199
116
|
if (component) {
|
|
200
|
-
|
|
201
|
-
const status = await this.getComponentStatus(component);
|
|
117
|
+
const status = await this.orchestrator.getComponentStatus(component);
|
|
202
118
|
return {
|
|
203
119
|
content: [
|
|
204
120
|
{
|
|
@@ -209,8 +125,7 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
209
125
|
};
|
|
210
126
|
}
|
|
211
127
|
else {
|
|
212
|
-
|
|
213
|
-
const status = this.getOverallBootStatus();
|
|
128
|
+
const status = this.orchestrator.getOverallBootStatus();
|
|
214
129
|
return {
|
|
215
130
|
content: [
|
|
216
131
|
{
|
|
@@ -237,18 +152,18 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
237
152
|
const force = args.force || false;
|
|
238
153
|
frameworkLogger.log("mcp-boot-orchestrator", "initialize-component", "info", { component, force });
|
|
239
154
|
try {
|
|
240
|
-
if (!this.bootSequence.includes(component)) {
|
|
155
|
+
if (!this.orchestrator.bootSequence.includes(component)) {
|
|
241
156
|
return {
|
|
242
157
|
content: [
|
|
243
158
|
{
|
|
244
159
|
type: "text",
|
|
245
|
-
text: `ā Unknown component: ${component}\nAvailable: ${this.bootSequence.join(", ")}`,
|
|
160
|
+
text: `ā Unknown component: ${component}\nAvailable: ${this.orchestrator.bootSequence.join(", ")}`,
|
|
246
161
|
},
|
|
247
162
|
],
|
|
248
163
|
};
|
|
249
164
|
}
|
|
250
|
-
|
|
251
|
-
if (
|
|
165
|
+
const existing = this.orchestrator.getComponentResult(component);
|
|
166
|
+
if (existing && !force) {
|
|
252
167
|
return {
|
|
253
168
|
content: [
|
|
254
169
|
{
|
|
@@ -258,24 +173,7 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
258
173
|
],
|
|
259
174
|
};
|
|
260
175
|
}
|
|
261
|
-
|
|
262
|
-
const deps = this.bootStatus.dependencies.get(component) || [];
|
|
263
|
-
for (const dep of deps) {
|
|
264
|
-
if (!this.bootStatus.components.has(dep)) {
|
|
265
|
-
return {
|
|
266
|
-
content: [
|
|
267
|
-
{
|
|
268
|
-
type: "text",
|
|
269
|
-
text: `ā Dependency not met: ${component} requires ${dep}\nInitialize dependencies first`,
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
// Initialize component
|
|
276
|
-
const result = await this.initializeComponent(component);
|
|
277
|
-
this.bootStatus.components.set(component, result);
|
|
278
|
-
this.bootStatus.health.set(component, result.success);
|
|
176
|
+
const result = await this.orchestrator.initializeSingleComponent(component, force);
|
|
279
177
|
return {
|
|
280
178
|
content: [
|
|
281
179
|
{
|
|
@@ -301,7 +199,7 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
301
199
|
const verbose = args.verbose || false;
|
|
302
200
|
frameworkLogger.log("mcp-boot-orchestrator", "validate-boot-dependencies", "info", { fix, verbose });
|
|
303
201
|
try {
|
|
304
|
-
const results = await this.validateAllDependencies(fix, verbose);
|
|
202
|
+
const results = await this.orchestrator.validateAllDependencies(fix, verbose);
|
|
305
203
|
const response = `š Dependency Validation Results
|
|
306
204
|
|
|
307
205
|
**Total Components:** ${results.total}
|
|
@@ -333,7 +231,7 @@ ${results.fixes.length > 0 ? `**Fixes Applied:**\n${results.fixes.map((fix) => `
|
|
|
333
231
|
const saveState = args.saveState !== false;
|
|
334
232
|
frameworkLogger.log("mcps/boot-orchestrator", "shutdown", "info", { force, saveState });
|
|
335
233
|
try {
|
|
336
|
-
const results = await this.
|
|
234
|
+
const results = await this.orchestrator.shutdown(force, saveState);
|
|
337
235
|
return {
|
|
338
236
|
content: [
|
|
339
237
|
{
|
|
@@ -363,416 +261,12 @@ ${results.errors.length > 0 ? `**Errors:**\n${results.errors.map((e) => `⢠${e
|
|
|
363
261
|
};
|
|
364
262
|
}
|
|
365
263
|
}
|
|
366
|
-
async validatePrerequisites() {
|
|
367
|
-
const errors = [];
|
|
368
|
-
// Check Node.js version
|
|
369
|
-
try {
|
|
370
|
-
const nodeVersionOutput = execSync("node --version", { encoding: "utf8" })?.toString().trim() ||
|
|
371
|
-
"";
|
|
372
|
-
const nodeVersion = nodeVersionOutput || "v1.2.0";
|
|
373
|
-
const versionParts = nodeVersion.split(".");
|
|
374
|
-
const majorVersion = versionParts.length > 0 && versionParts[0]
|
|
375
|
-
? parseInt(versionParts[0].substring(1))
|
|
376
|
-
: 0;
|
|
377
|
-
if (majorVersion < 18) {
|
|
378
|
-
errors.push(`Node.js version ${nodeVersion} is too old. Requires 18+`);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
catch (error) {
|
|
382
|
-
errors.push("Cannot determine Node.js version");
|
|
383
|
-
}
|
|
384
|
-
// Check required directories
|
|
385
|
-
const requiredDirs = ["src", "src/agents", "src/mcps"];
|
|
386
|
-
for (const dir of requiredDirs) {
|
|
387
|
-
if (!fs.existsSync(dir)) {
|
|
388
|
-
errors.push(`Required directory missing: ${dir}`);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
// Check package.json
|
|
392
|
-
if (!fs.existsSync("package.json")) {
|
|
393
|
-
errors.push("package.json not found");
|
|
394
|
-
}
|
|
395
|
-
return {
|
|
396
|
-
valid: errors.length === 0,
|
|
397
|
-
errors,
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
async executeParallelBoot(skipHealthChecks, results) {
|
|
401
|
-
const componentPromises = this.bootSequence.map((component) => this.initializeComponent(component, skipHealthChecks));
|
|
402
|
-
const componentResults = await Promise.allSettled(componentPromises);
|
|
403
|
-
for (let i = 0; i < componentResults.length; i++) {
|
|
404
|
-
const component = this.bootSequence[i];
|
|
405
|
-
if (!component)
|
|
406
|
-
continue;
|
|
407
|
-
const result = componentResults[i];
|
|
408
|
-
if (!result)
|
|
409
|
-
continue;
|
|
410
|
-
if (result.status === "fulfilled") {
|
|
411
|
-
const fulfilledResult = result;
|
|
412
|
-
if (fulfilledResult.value.success) {
|
|
413
|
-
results.initializedComponents.push(component);
|
|
414
|
-
this.bootStatus.components.set(component, fulfilledResult.value);
|
|
415
|
-
this.bootStatus.health.set(component, true);
|
|
416
|
-
}
|
|
417
|
-
else {
|
|
418
|
-
results.failedComponents.push(component);
|
|
419
|
-
results.errors.push(`${component}: ${fulfilledResult.value.error || "Unknown error"}`);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
else {
|
|
423
|
-
results.failedComponents.push(component);
|
|
424
|
-
results.errors.push(`${component}: ${result.reason}`);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
results.success = results.failedComponents.length === 0;
|
|
428
|
-
}
|
|
429
|
-
async executeSequentialBoot(skipHealthChecks, results) {
|
|
430
|
-
for (const component of this.bootSequence) {
|
|
431
|
-
try {
|
|
432
|
-
const result = await this.initializeComponent(component, skipHealthChecks);
|
|
433
|
-
if (result.success) {
|
|
434
|
-
results.initializedComponents.push(component);
|
|
435
|
-
this.bootStatus.components.set(component, result);
|
|
436
|
-
this.bootStatus.health.set(component, true);
|
|
437
|
-
}
|
|
438
|
-
else {
|
|
439
|
-
results.failedComponents.push(component);
|
|
440
|
-
results.errors.push(`${component}: ${result.error}`);
|
|
441
|
-
break; // Stop on first failure in sequential mode
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
catch (error) {
|
|
445
|
-
results.failedComponents.push(component);
|
|
446
|
-
results.errors.push(`${component}: ${error instanceof Error ? error.message : String(error)}`);
|
|
447
|
-
break;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
results.success = results.failedComponents.length === 0;
|
|
451
|
-
}
|
|
452
|
-
async initializeComponent(component, skipHealthChecks = false) {
|
|
453
|
-
const startTime = Date.now();
|
|
454
|
-
try {
|
|
455
|
-
switch (component) {
|
|
456
|
-
case "configuration":
|
|
457
|
-
return await this.initConfiguration();
|
|
458
|
-
case "logging":
|
|
459
|
-
return await this.initLogging();
|
|
460
|
-
case "state-management":
|
|
461
|
-
return await this.initStateManagement();
|
|
462
|
-
case "security":
|
|
463
|
-
return await this.initSecurity();
|
|
464
|
-
case "codex-loader":
|
|
465
|
-
return await this.initCodexLoader();
|
|
466
|
-
case "context-loader":
|
|
467
|
-
return await this.initContextLoader();
|
|
468
|
-
case "processor-pipeline":
|
|
469
|
-
return await this.initProcessorPipeline();
|
|
470
|
-
case "agent-registry":
|
|
471
|
-
return await this.initAgentRegistry();
|
|
472
|
-
case "orchestrator":
|
|
473
|
-
return await this.initOrchestrator();
|
|
474
|
-
case "mcp-servers":
|
|
475
|
-
return await this.initMCPServers();
|
|
476
|
-
case "framework-hooks":
|
|
477
|
-
return await this.initFrameworkHooks();
|
|
478
|
-
default:
|
|
479
|
-
throw new Error(`Unknown component: ${component}`);
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
catch (error) {
|
|
483
|
-
return {
|
|
484
|
-
success: false,
|
|
485
|
-
duration: Date.now() - startTime,
|
|
486
|
-
error: error instanceof Error ? error.message : String(error),
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
async initConfiguration() {
|
|
491
|
-
return {
|
|
492
|
-
success: true,
|
|
493
|
-
duration: 10,
|
|
494
|
-
message: "Configuration initialized",
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
async initLogging() {
|
|
498
|
-
// Initialize logging system
|
|
499
|
-
const logDir = resolveLogDir();
|
|
500
|
-
if (!fs.existsSync(logDir)) {
|
|
501
|
-
fs.mkdirSync(logDir, { recursive: true });
|
|
502
|
-
}
|
|
503
|
-
return {
|
|
504
|
-
success: true,
|
|
505
|
-
duration: 5,
|
|
506
|
-
message: "Logging system initialized",
|
|
507
|
-
};
|
|
508
|
-
}
|
|
509
|
-
async initStateManagement() {
|
|
510
|
-
// Validate state management setup
|
|
511
|
-
const stateDir = resolveStateDir();
|
|
512
|
-
if (!fs.existsSync(stateDir)) {
|
|
513
|
-
fs.mkdirSync(stateDir, { recursive: true });
|
|
514
|
-
}
|
|
515
|
-
return {
|
|
516
|
-
success: true,
|
|
517
|
-
duration: 8,
|
|
518
|
-
message: "State management initialized",
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
async initSecurity() {
|
|
522
|
-
// Basic security initialization
|
|
523
|
-
return {
|
|
524
|
-
success: true,
|
|
525
|
-
duration: 3,
|
|
526
|
-
message: "Security framework initialized",
|
|
527
|
-
};
|
|
528
|
-
}
|
|
529
|
-
async initCodexLoader() {
|
|
530
|
-
return {
|
|
531
|
-
success: true,
|
|
532
|
-
duration: 12,
|
|
533
|
-
message: "Codex loader initialized",
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
async initContextLoader() {
|
|
537
|
-
return {
|
|
538
|
-
success: true,
|
|
539
|
-
duration: 8,
|
|
540
|
-
message: "Context loader initialized",
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
async initProcessorPipeline() {
|
|
544
|
-
// Validate processor pipeline
|
|
545
|
-
return {
|
|
546
|
-
success: true,
|
|
547
|
-
duration: 15,
|
|
548
|
-
message: "Processor pipeline initialized",
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
async initAgentRegistry() {
|
|
552
|
-
// Check agent files exist
|
|
553
|
-
const agentCount = this.countAgentFiles();
|
|
554
|
-
if (agentCount < 5) {
|
|
555
|
-
throw new Error(`Insufficient agents found: ${agentCount}`);
|
|
556
|
-
}
|
|
557
|
-
return {
|
|
558
|
-
success: true,
|
|
559
|
-
duration: 10,
|
|
560
|
-
message: `Agent registry initialized with ${agentCount} agents`,
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
async initOrchestrator() {
|
|
564
|
-
// Validate orchestrator setup
|
|
565
|
-
return {
|
|
566
|
-
success: true,
|
|
567
|
-
duration: 20,
|
|
568
|
-
message: "Orchestrator initialized",
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
async initMCPServers() {
|
|
572
|
-
// Check MCP servers
|
|
573
|
-
const mcpCount = this.countMCPFiles();
|
|
574
|
-
if (mcpCount < 3) {
|
|
575
|
-
throw new Error(`Insufficient MCP servers found: ${mcpCount}`);
|
|
576
|
-
}
|
|
577
|
-
return {
|
|
578
|
-
success: true,
|
|
579
|
-
duration: 15,
|
|
580
|
-
message: `MCP servers initialized (${mcpCount} servers)`,
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
async initFrameworkHooks() {
|
|
584
|
-
// Initialize framework hooks
|
|
585
|
-
return {
|
|
586
|
-
success: true,
|
|
587
|
-
duration: 5,
|
|
588
|
-
message: "Framework hooks initialized",
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
countAgentFiles() {
|
|
592
|
-
try {
|
|
593
|
-
const files = fs.readdirSync("src/agents");
|
|
594
|
-
return files.filter((f) => f.endsWith(".ts") && f !== "types.ts" && f !== "index.ts").length;
|
|
595
|
-
}
|
|
596
|
-
catch (error) {
|
|
597
|
-
return 0;
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
countMCPFiles() {
|
|
601
|
-
try {
|
|
602
|
-
const files = fs.readdirSync("src/mcps");
|
|
603
|
-
return files.filter((f) => f.endsWith(".server.ts")).length;
|
|
604
|
-
}
|
|
605
|
-
catch (error) {
|
|
606
|
-
return 0;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
async getComponentStatus(component) {
|
|
610
|
-
const initialized = this.bootStatus.components.has(component);
|
|
611
|
-
const healthy = this.bootStatus.health.get(component) || false;
|
|
612
|
-
const info = this.bootStatus.components.get(component);
|
|
613
|
-
return {
|
|
614
|
-
initialized,
|
|
615
|
-
healthy,
|
|
616
|
-
info,
|
|
617
|
-
dependencies: this.bootStatus.dependencies.get(component) || [],
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
getOverallBootStatus() {
|
|
621
|
-
const totalComponents = this.bootSequence.length;
|
|
622
|
-
const initializedComponents = Array.from(this.bootStatus.components.keys());
|
|
623
|
-
const healthyComponents = Array.from(this.bootStatus.health.values()).filter((h) => h).length;
|
|
624
|
-
return {
|
|
625
|
-
initialized: this.bootStatus.initialized,
|
|
626
|
-
uptime: Date.now() - this.bootStatus.startTime,
|
|
627
|
-
totalComponents,
|
|
628
|
-
initializedComponents: initializedComponents.length,
|
|
629
|
-
healthyComponents,
|
|
630
|
-
failedComponents: initializedComponents.length - healthyComponents,
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
async validateAllDependencies(fix, verbose) {
|
|
634
|
-
const results = {
|
|
635
|
-
total: this.bootSequence.length,
|
|
636
|
-
valid: 0,
|
|
637
|
-
missing: 0,
|
|
638
|
-
circular: 0,
|
|
639
|
-
issues: [],
|
|
640
|
-
fixes: [],
|
|
641
|
-
};
|
|
642
|
-
// Check for missing dependencies
|
|
643
|
-
for (const component of this.bootSequence) {
|
|
644
|
-
const deps = this.bootStatus.dependencies.get(component) || [];
|
|
645
|
-
const missingDeps = deps.filter((dep) => !this.checkComponentExists(dep));
|
|
646
|
-
if (missingDeps.length > 0) {
|
|
647
|
-
results.missing++;
|
|
648
|
-
results.issues.push(`${component} missing dependencies: ${missingDeps.join(", ")}`);
|
|
649
|
-
}
|
|
650
|
-
else {
|
|
651
|
-
results.valid++;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
// Check for circular dependencies (simplified)
|
|
655
|
-
const circularDeps = this.detectCircularDependencies();
|
|
656
|
-
if (circularDeps.length > 0) {
|
|
657
|
-
results.circular = circularDeps.length;
|
|
658
|
-
results.issues.push(`Circular dependencies detected: ${circularDeps.join(", ")}`);
|
|
659
|
-
}
|
|
660
|
-
// Apply fixes if requested
|
|
661
|
-
if (fix && results.issues.length > 0) {
|
|
662
|
-
results.fixes = await this.applyDependencyFixes(results.issues);
|
|
663
|
-
}
|
|
664
|
-
return results;
|
|
665
|
-
}
|
|
666
|
-
checkComponentExists(component) {
|
|
667
|
-
// Simplified check - in real implementation this would be more thorough
|
|
668
|
-
switch (component) {
|
|
669
|
-
case "configuration":
|
|
670
|
-
return fs.existsSync("opencode.json");
|
|
671
|
-
case "logging":
|
|
672
|
-
return fs.existsSync("src/framework-logger.ts");
|
|
673
|
-
case "state-management":
|
|
674
|
-
return fs.existsSync("src/state/state-manager.ts");
|
|
675
|
-
case "security":
|
|
676
|
-
return true;
|
|
677
|
-
case "codex-loader":
|
|
678
|
-
return true;
|
|
679
|
-
case "context-loader":
|
|
680
|
-
return true;
|
|
681
|
-
case "processor-pipeline":
|
|
682
|
-
return fs.existsSync("src/processors/processor-manager.ts");
|
|
683
|
-
case "agent-registry":
|
|
684
|
-
return fs.existsSync("src/agents");
|
|
685
|
-
case "orchestrator":
|
|
686
|
-
return fs.existsSync("src/delegation/agent-delegator.ts");
|
|
687
|
-
case "mcp-servers":
|
|
688
|
-
return fs.existsSync("src/mcps");
|
|
689
|
-
case "framework-hooks":
|
|
690
|
-
return fs.existsSync("src/core/xray-activation.ts");
|
|
691
|
-
default:
|
|
692
|
-
return false;
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
detectCircularDependencies() {
|
|
696
|
-
// Simplified circular dependency detection
|
|
697
|
-
const circular = [];
|
|
698
|
-
for (const [component, deps] of this.bootStatus.dependencies) {
|
|
699
|
-
for (const dep of deps) {
|
|
700
|
-
const depDeps = this.bootStatus.dependencies.get(dep) || [];
|
|
701
|
-
if (depDeps.includes(component)) {
|
|
702
|
-
circular.push(`${component} ā ${dep}`);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
return [...new Set(circular)]; // Remove duplicates
|
|
707
|
-
}
|
|
708
|
-
async applyDependencyFixes(issues) {
|
|
709
|
-
const fixes = [];
|
|
710
|
-
// Simplified fix application
|
|
711
|
-
for (const issue of issues) {
|
|
712
|
-
if (issue.includes("missing dependencies")) {
|
|
713
|
-
fixes.push("Dependency validation completed - manual fixes may be required");
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
return fixes;
|
|
717
|
-
}
|
|
718
|
-
async executeShutdownSequence(force, saveState) {
|
|
719
|
-
const results = {
|
|
720
|
-
success: true,
|
|
721
|
-
shutDown: 0,
|
|
722
|
-
stateSaved: saveState,
|
|
723
|
-
errors: [],
|
|
724
|
-
duration: 0,
|
|
725
|
-
};
|
|
726
|
-
const startTime = Date.now();
|
|
727
|
-
try {
|
|
728
|
-
// Shutdown in reverse order
|
|
729
|
-
const reverseSequence = [...this.bootSequence].reverse();
|
|
730
|
-
for (const component of reverseSequence) {
|
|
731
|
-
try {
|
|
732
|
-
await this.shutdownComponent(component, force);
|
|
733
|
-
results.shutDown++;
|
|
734
|
-
}
|
|
735
|
-
catch (error) {
|
|
736
|
-
results.errors.push(`${component}: ${error instanceof Error ? error.message : String(error)}`);
|
|
737
|
-
if (!force) {
|
|
738
|
-
results.success = false;
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
// Save state if requested
|
|
743
|
-
if (saveState) {
|
|
744
|
-
await this.saveShutdownState();
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
catch (error) {
|
|
748
|
-
results.success = false;
|
|
749
|
-
results.errors.push(`Shutdown error: ${error instanceof Error ? error.message : String(error)}`);
|
|
750
|
-
}
|
|
751
|
-
results.duration = Date.now() - startTime;
|
|
752
|
-
return results;
|
|
753
|
-
}
|
|
754
|
-
async shutdownComponent(component, force) {
|
|
755
|
-
// Simplified shutdown logic
|
|
756
|
-
frameworkLogger.log("mcps/boot-orchestrator", "shutdown-component", "info", { component });
|
|
757
|
-
// In real implementation, this would properly shut down each component
|
|
758
|
-
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
759
|
-
}
|
|
760
|
-
async saveShutdownState() {
|
|
761
|
-
// Save shutdown state
|
|
762
|
-
const shutdownState = {
|
|
763
|
-
timestamp: Date.now(),
|
|
764
|
-
components: Array.from(this.bootStatus.components.keys()),
|
|
765
|
-
health: Object.fromEntries(this.bootStatus.health),
|
|
766
|
-
};
|
|
767
|
-
const stateFile = path.join(".opencode", "state", "shutdown-state.json");
|
|
768
|
-
fs.writeFileSync(stateFile, JSON.stringify(shutdownState, null, 2));
|
|
769
|
-
}
|
|
770
264
|
formatBootResults(results) {
|
|
771
265
|
const response = `š Boot Sequence Results
|
|
772
266
|
|
|
773
267
|
**Success:** ${results.success ? "ā
COMPLETE" : "ā FAILED"}
|
|
774
268
|
**Duration:** ${results.duration}ms
|
|
775
|
-
**Components Initialized:** ${results.initializedComponents.length}/${this.bootSequence.length}
|
|
269
|
+
**Components Initialized:** ${results.initializedComponents.length}/${this.orchestrator.bootSequence.length}
|
|
776
270
|
**Components Failed:** ${results.failedComponents.length}
|
|
777
271
|
|
|
778
272
|
**Initialized Components:**
|
|
@@ -805,9 +299,9 @@ ${results.warnings.length > 0 ? `**Warnings:**\n${results.warnings.map((w) => `
|
|
|
805
299
|
**Failed:** ${status.failedComponents} failed`;
|
|
806
300
|
if (detailed) {
|
|
807
301
|
response += `\n\n**Component Details:**`;
|
|
808
|
-
for (const component of this.bootSequence) {
|
|
809
|
-
const
|
|
810
|
-
response += `\n⢠${component}: ${
|
|
302
|
+
for (const component of this.orchestrator.bootSequence) {
|
|
303
|
+
const compHealth = this.orchestrator.getComponentHealth(component);
|
|
304
|
+
response += `\n⢠${component}: ${compHealth ? "ā
" : "ā"}`;
|
|
811
305
|
}
|
|
812
306
|
}
|
|
813
307
|
return response;
|
|
@@ -819,3 +313,4 @@ if (import.meta.url === `file://${process.argv[1]}`) {
|
|
|
819
313
|
server.run("boot-orchestrator").catch((error) => frameworkLogger.log("mcps/boot-orchestrator", "run", "error", { error: String(error) }));
|
|
820
314
|
}
|
|
821
315
|
export { XrayBootOrchestratorServer };
|
|
316
|
+
//# sourceMappingURL=boot-orchestrator.server.js.map
|