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,64 +1,18 @@
|
|
|
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
7
|
|
|
7
|
-
import { execSync } from "child_process";
|
|
8
|
-
import fs from "fs";
|
|
9
|
-
import path from "path";
|
|
10
8
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
11
|
-
import { resolveLogDir, resolveStateDir } from "../core/config-paths.js";
|
|
12
9
|
import { XrayKnowledgeSkillBase } from "./shared/knowledge-skill-base.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface BootResults {
|
|
22
|
-
success: boolean;
|
|
23
|
-
initializedComponents: string[];
|
|
24
|
-
failedComponents: string[];
|
|
25
|
-
duration: number;
|
|
26
|
-
errors: string[];
|
|
27
|
-
warnings: string[];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface ComponentStatus {
|
|
31
|
-
initialized: boolean;
|
|
32
|
-
healthy: boolean;
|
|
33
|
-
info: ComponentInitResult | undefined;
|
|
34
|
-
dependencies: string[];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
interface OverallBootStatus {
|
|
38
|
-
initialized: boolean;
|
|
39
|
-
uptime: number;
|
|
40
|
-
totalComponents: number;
|
|
41
|
-
initializedComponents: number;
|
|
42
|
-
healthyComponents: number;
|
|
43
|
-
failedComponents: number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
interface DependencyValidationResult {
|
|
47
|
-
total: number;
|
|
48
|
-
valid: number;
|
|
49
|
-
missing: number;
|
|
50
|
-
circular: number;
|
|
51
|
-
issues: string[];
|
|
52
|
-
fixes: string[];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
interface ShutdownResult {
|
|
56
|
-
success: boolean;
|
|
57
|
-
shutDown: number;
|
|
58
|
-
stateSaved: boolean;
|
|
59
|
-
errors: string[];
|
|
60
|
-
duration: number;
|
|
61
|
-
}
|
|
10
|
+
import {
|
|
11
|
+
NucleusOrchestrator,
|
|
12
|
+
type BootResults,
|
|
13
|
+
type ComponentStatus,
|
|
14
|
+
type OverallBootStatus,
|
|
15
|
+
} from "../nucleus/orchestrator.js";
|
|
62
16
|
|
|
63
17
|
interface ExecuteBootSequenceArgs {
|
|
64
18
|
config?: Record<string, unknown>;
|
|
@@ -87,42 +41,12 @@ interface ShutdownFrameworkArgs {
|
|
|
87
41
|
}
|
|
88
42
|
|
|
89
43
|
class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
90
|
-
private
|
|
91
|
-
initialized: boolean;
|
|
92
|
-
startTime: number;
|
|
93
|
-
components: Map<string, ComponentInitResult>;
|
|
94
|
-
dependencies: Map<string, string[]>;
|
|
95
|
-
health: Map<string, boolean>;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
// Boot sequence in dependency order
|
|
99
|
-
private bootSequence = [
|
|
100
|
-
"configuration",
|
|
101
|
-
"logging",
|
|
102
|
-
"state-management",
|
|
103
|
-
"security",
|
|
104
|
-
"codex-loader",
|
|
105
|
-
"context-loader",
|
|
106
|
-
"processor-pipeline",
|
|
107
|
-
"agent-registry",
|
|
108
|
-
"orchestrator",
|
|
109
|
-
"mcp-servers",
|
|
110
|
-
"framework-hooks",
|
|
111
|
-
];
|
|
44
|
+
private orchestrator: NucleusOrchestrator;
|
|
112
45
|
|
|
113
46
|
constructor() {
|
|
114
47
|
super("boot-orchestrator", "2.0.1");
|
|
115
48
|
|
|
116
|
-
this.
|
|
117
|
-
initialized: false,
|
|
118
|
-
startTime: Date.now(),
|
|
119
|
-
components: new Map(),
|
|
120
|
-
dependencies: new Map(),
|
|
121
|
-
health: new Map(),
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
// Initialize dependency map
|
|
125
|
-
this.initializeDependencies();
|
|
49
|
+
this.orchestrator = new NucleusOrchestrator();
|
|
126
50
|
|
|
127
51
|
this.tools = [
|
|
128
52
|
{
|
|
@@ -158,11 +82,10 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
158
82
|
properties: {
|
|
159
83
|
component: {
|
|
160
84
|
type: "string",
|
|
161
|
-
enum: this.bootSequence,
|
|
85
|
+
enum: this.orchestrator.bootSequence,
|
|
162
86
|
},
|
|
163
87
|
force: { type: "boolean", default: false },
|
|
164
88
|
},
|
|
165
|
-
required: ["component"],
|
|
166
89
|
},
|
|
167
90
|
},
|
|
168
91
|
{
|
|
@@ -188,6 +111,7 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
188
111
|
},
|
|
189
112
|
},
|
|
190
113
|
];
|
|
114
|
+
|
|
191
115
|
this.handlers = {
|
|
192
116
|
"execute-boot-sequence": async (args) => this.handleExecuteBootSequence(args as unknown as ExecuteBootSequenceArgs),
|
|
193
117
|
"get-boot-status": async (args) => this.handleGetBootStatus(args as unknown as GetBootStatusArgs),
|
|
@@ -195,53 +119,12 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
195
119
|
"validate-boot-dependencies": async (args) => this.handleValidateBootDependencies(args as unknown as ValidateBootDependenciesArgs),
|
|
196
120
|
"shutdown-framework": async (args) => this.handleShutdownFramework(args as unknown as ShutdownFrameworkArgs),
|
|
197
121
|
};
|
|
122
|
+
|
|
198
123
|
this.setupToolHandlers();
|
|
199
124
|
void frameworkLogger.log("mcps/boot-orchestrator", "initialize", "info");
|
|
200
125
|
}
|
|
201
126
|
|
|
202
|
-
private initializeDependencies() {
|
|
203
|
-
// Define component dependencies
|
|
204
|
-
this.bootStatus.dependencies.set("configuration", []);
|
|
205
|
-
this.bootStatus.dependencies.set("logging", ["configuration"]);
|
|
206
|
-
this.bootStatus.dependencies.set("state-management", [
|
|
207
|
-
"configuration",
|
|
208
|
-
"logging",
|
|
209
|
-
]);
|
|
210
|
-
this.bootStatus.dependencies.set("security", ["configuration"]);
|
|
211
|
-
this.bootStatus.dependencies.set("codex-loader", [
|
|
212
|
-
"configuration",
|
|
213
|
-
"logging",
|
|
214
|
-
]);
|
|
215
|
-
this.bootStatus.dependencies.set("context-loader", [
|
|
216
|
-
"configuration",
|
|
217
|
-
"codex-loader",
|
|
218
|
-
]);
|
|
219
|
-
this.bootStatus.dependencies.set("processor-pipeline", [
|
|
220
|
-
"state-management",
|
|
221
|
-
"security",
|
|
222
|
-
"codex-loader",
|
|
223
|
-
]);
|
|
224
|
-
this.bootStatus.dependencies.set("agent-registry", [
|
|
225
|
-
"configuration",
|
|
226
|
-
"state-management",
|
|
227
|
-
"processor-pipeline",
|
|
228
|
-
]);
|
|
229
|
-
this.bootStatus.dependencies.set("orchestrator", [
|
|
230
|
-
"agent-registry",
|
|
231
|
-
"processor-pipeline",
|
|
232
|
-
]);
|
|
233
|
-
this.bootStatus.dependencies.set("mcp-servers", [
|
|
234
|
-
"orchestrator",
|
|
235
|
-
"agent-registry",
|
|
236
|
-
]);
|
|
237
|
-
this.bootStatus.dependencies.set("framework-hooks", [
|
|
238
|
-
"mcp-servers",
|
|
239
|
-
"orchestrator",
|
|
240
|
-
]);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
127
|
private async handleExecuteBootSequence(args: ExecuteBootSequenceArgs) {
|
|
244
|
-
const config = args.config || {};
|
|
245
128
|
const skipHealthChecks = args.skipHealthChecks || false;
|
|
246
129
|
const parallelInit = args.parallelInit !== false;
|
|
247
130
|
|
|
@@ -250,45 +133,21 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
250
133
|
parallelInit,
|
|
251
134
|
});
|
|
252
135
|
|
|
253
|
-
const results = {
|
|
254
|
-
success: true,
|
|
255
|
-
initializedComponents: [] as string[],
|
|
256
|
-
failedComponents: [] as string[],
|
|
257
|
-
duration: 0,
|
|
258
|
-
errors: [] as string[],
|
|
259
|
-
warnings: [] as string[],
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
const startTime = Date.now();
|
|
263
|
-
|
|
264
136
|
try {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
results.errors.push(...validationResults.errors);
|
|
270
|
-
return this.formatBootResults(results);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// Execute boot sequence
|
|
274
|
-
if (parallelInit) {
|
|
275
|
-
await this.executeParallelBoot(skipHealthChecks, results);
|
|
276
|
-
} else {
|
|
277
|
-
await this.executeSequentialBoot(skipHealthChecks, results);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
results.duration = Date.now() - startTime;
|
|
281
|
-
this.bootStatus.initialized = results.success;
|
|
282
|
-
|
|
137
|
+
const results = await this.orchestrator.executeBootSequence({
|
|
138
|
+
skipHealthChecks,
|
|
139
|
+
parallelInit,
|
|
140
|
+
});
|
|
283
141
|
return this.formatBootResults(results);
|
|
284
142
|
} catch (error) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
143
|
+
return {
|
|
144
|
+
content: [
|
|
145
|
+
{
|
|
146
|
+
type: "text",
|
|
147
|
+
text: `ā Boot sequence failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
};
|
|
292
151
|
}
|
|
293
152
|
}
|
|
294
153
|
|
|
@@ -300,8 +159,7 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
300
159
|
|
|
301
160
|
try {
|
|
302
161
|
if (component) {
|
|
303
|
-
|
|
304
|
-
const status = await this.getComponentStatus(component);
|
|
162
|
+
const status = await this.orchestrator.getComponentStatus(component);
|
|
305
163
|
return {
|
|
306
164
|
content: [
|
|
307
165
|
{
|
|
@@ -311,8 +169,7 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
311
169
|
],
|
|
312
170
|
};
|
|
313
171
|
} else {
|
|
314
|
-
|
|
315
|
-
const status = this.getOverallBootStatus();
|
|
172
|
+
const status = this.orchestrator.getOverallBootStatus();
|
|
316
173
|
return {
|
|
317
174
|
content: [
|
|
318
175
|
{
|
|
@@ -341,19 +198,19 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
341
198
|
frameworkLogger.log("mcp-boot-orchestrator", "initialize-component", "info", { component, force });
|
|
342
199
|
|
|
343
200
|
try {
|
|
344
|
-
if (!this.bootSequence.includes(component)) {
|
|
201
|
+
if (!this.orchestrator.bootSequence.includes(component)) {
|
|
345
202
|
return {
|
|
346
203
|
content: [
|
|
347
204
|
{
|
|
348
205
|
type: "text",
|
|
349
|
-
text: `ā Unknown component: ${component}\nAvailable: ${this.bootSequence.join(", ")}`,
|
|
206
|
+
text: `ā Unknown component: ${component}\nAvailable: ${this.orchestrator.bootSequence.join(", ")}`,
|
|
350
207
|
},
|
|
351
208
|
],
|
|
352
209
|
};
|
|
353
210
|
}
|
|
354
211
|
|
|
355
|
-
|
|
356
|
-
if (
|
|
212
|
+
const existing = this.orchestrator.getComponentResult(component);
|
|
213
|
+
if (existing && !force) {
|
|
357
214
|
return {
|
|
358
215
|
content: [
|
|
359
216
|
{
|
|
@@ -364,25 +221,7 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
364
221
|
};
|
|
365
222
|
}
|
|
366
223
|
|
|
367
|
-
|
|
368
|
-
const deps = this.bootStatus.dependencies.get(component) || [];
|
|
369
|
-
for (const dep of deps) {
|
|
370
|
-
if (!this.bootStatus.components.has(dep)) {
|
|
371
|
-
return {
|
|
372
|
-
content: [
|
|
373
|
-
{
|
|
374
|
-
type: "text",
|
|
375
|
-
text: `ā Dependency not met: ${component} requires ${dep}\nInitialize dependencies first`,
|
|
376
|
-
},
|
|
377
|
-
],
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
// Initialize component
|
|
383
|
-
const result = await this.initializeComponent(component);
|
|
384
|
-
this.bootStatus.components.set(component, result);
|
|
385
|
-
this.bootStatus.health.set(component, result.success);
|
|
224
|
+
const result = await this.orchestrator.initializeSingleComponent(component, force);
|
|
386
225
|
|
|
387
226
|
return {
|
|
388
227
|
content: [
|
|
@@ -411,7 +250,7 @@ class XrayBootOrchestratorServer extends XrayKnowledgeSkillBase {
|
|
|
411
250
|
frameworkLogger.log("mcp-boot-orchestrator", "validate-boot-dependencies", "info", { fix, verbose });
|
|
412
251
|
|
|
413
252
|
try {
|
|
414
|
-
const results = await this.validateAllDependencies(fix, verbose);
|
|
253
|
+
const results = await this.orchestrator.validateAllDependencies(fix, verbose);
|
|
415
254
|
|
|
416
255
|
const response = `š Dependency Validation Results
|
|
417
256
|
|
|
@@ -447,7 +286,7 @@ ${results.fixes.length > 0 ? `**Fixes Applied:**\n${results.fixes.map((fix: stri
|
|
|
447
286
|
frameworkLogger.log("mcps/boot-orchestrator", "shutdown", "info", { force, saveState });
|
|
448
287
|
|
|
449
288
|
try {
|
|
450
|
-
const results = await this.
|
|
289
|
+
const results = await this.orchestrator.shutdown(force, saveState);
|
|
451
290
|
|
|
452
291
|
return {
|
|
453
292
|
content: [
|
|
@@ -478,503 +317,12 @@ ${results.errors.length > 0 ? `**Errors:**\n${results.errors.map((e: string) =>
|
|
|
478
317
|
}
|
|
479
318
|
}
|
|
480
319
|
|
|
481
|
-
private async validatePrerequisites(): Promise<{
|
|
482
|
-
valid: boolean;
|
|
483
|
-
errors: string[];
|
|
484
|
-
}> {
|
|
485
|
-
const errors: string[] = [];
|
|
486
|
-
|
|
487
|
-
// Check Node.js version
|
|
488
|
-
try {
|
|
489
|
-
const nodeVersionOutput =
|
|
490
|
-
execSync("node --version", { encoding: "utf8" })?.toString().trim() ||
|
|
491
|
-
"";
|
|
492
|
-
const nodeVersion = nodeVersionOutput || "v1.2.0";
|
|
493
|
-
const versionParts = nodeVersion.split(".");
|
|
494
|
-
const majorVersion =
|
|
495
|
-
versionParts.length > 0 && versionParts[0]
|
|
496
|
-
? parseInt(versionParts[0].substring(1))
|
|
497
|
-
: 0;
|
|
498
|
-
if (majorVersion < 18) {
|
|
499
|
-
errors.push(`Node.js version ${nodeVersion} is too old. Requires 18+`);
|
|
500
|
-
}
|
|
501
|
-
} catch (error) {
|
|
502
|
-
errors.push("Cannot determine Node.js version");
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
// Check required directories
|
|
506
|
-
const requiredDirs = ["src", "src/agents", "src/mcps"];
|
|
507
|
-
for (const dir of requiredDirs) {
|
|
508
|
-
if (!fs.existsSync(dir)) {
|
|
509
|
-
errors.push(`Required directory missing: ${dir}`);
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
// Check package.json
|
|
514
|
-
if (!fs.existsSync("package.json")) {
|
|
515
|
-
errors.push("package.json not found");
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
return {
|
|
519
|
-
valid: errors.length === 0,
|
|
520
|
-
errors,
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
private async executeParallelBoot(skipHealthChecks: boolean, results: BootResults) {
|
|
525
|
-
const componentPromises = this.bootSequence.map((component) =>
|
|
526
|
-
this.initializeComponent(component, skipHealthChecks),
|
|
527
|
-
);
|
|
528
|
-
|
|
529
|
-
const componentResults = await Promise.allSettled(componentPromises);
|
|
530
|
-
|
|
531
|
-
for (let i = 0; i < componentResults.length; i++) {
|
|
532
|
-
const component = this.bootSequence[i];
|
|
533
|
-
if (!component) continue;
|
|
534
|
-
const result = componentResults[i];
|
|
535
|
-
if (!result) continue;
|
|
536
|
-
|
|
537
|
-
if (result.status === "fulfilled") {
|
|
538
|
-
const fulfilledResult = result as PromiseFulfilledResult<ComponentInitResult>;
|
|
539
|
-
if (fulfilledResult.value.success) {
|
|
540
|
-
results.initializedComponents.push(component);
|
|
541
|
-
this.bootStatus.components.set(component, fulfilledResult.value);
|
|
542
|
-
this.bootStatus.health.set(component, true);
|
|
543
|
-
} else {
|
|
544
|
-
results.failedComponents.push(component);
|
|
545
|
-
results.errors.push(
|
|
546
|
-
`${component}: ${fulfilledResult.value.error || "Unknown error"}`,
|
|
547
|
-
);
|
|
548
|
-
}
|
|
549
|
-
} else {
|
|
550
|
-
results.failedComponents.push(component);
|
|
551
|
-
results.errors.push(
|
|
552
|
-
`${component}: ${(result as PromiseRejectedResult).reason}`,
|
|
553
|
-
);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
results.success = results.failedComponents.length === 0;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
private async executeSequentialBoot(skipHealthChecks: boolean, results: BootResults) {
|
|
561
|
-
for (const component of this.bootSequence) {
|
|
562
|
-
try {
|
|
563
|
-
const result = await this.initializeComponent(
|
|
564
|
-
component,
|
|
565
|
-
skipHealthChecks,
|
|
566
|
-
);
|
|
567
|
-
|
|
568
|
-
if (result.success) {
|
|
569
|
-
results.initializedComponents.push(component);
|
|
570
|
-
this.bootStatus.components.set(component, result);
|
|
571
|
-
this.bootStatus.health.set(component, true);
|
|
572
|
-
} else {
|
|
573
|
-
results.failedComponents.push(component);
|
|
574
|
-
results.errors.push(`${component}: ${result.error}`);
|
|
575
|
-
break; // Stop on first failure in sequential mode
|
|
576
|
-
}
|
|
577
|
-
} catch (error) {
|
|
578
|
-
results.failedComponents.push(component);
|
|
579
|
-
results.errors.push(
|
|
580
|
-
`${component}: ${error instanceof Error ? error.message : String(error)}`,
|
|
581
|
-
);
|
|
582
|
-
break;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
results.success = results.failedComponents.length === 0;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
private async initializeComponent(
|
|
590
|
-
component: string,
|
|
591
|
-
skipHealthChecks = false,
|
|
592
|
-
): Promise<ComponentInitResult> {
|
|
593
|
-
const startTime = Date.now();
|
|
594
|
-
|
|
595
|
-
try {
|
|
596
|
-
switch (component) {
|
|
597
|
-
case "configuration":
|
|
598
|
-
return await this.initConfiguration();
|
|
599
|
-
case "logging":
|
|
600
|
-
return await this.initLogging();
|
|
601
|
-
case "state-management":
|
|
602
|
-
return await this.initStateManagement();
|
|
603
|
-
case "security":
|
|
604
|
-
return await this.initSecurity();
|
|
605
|
-
case "codex-loader":
|
|
606
|
-
return await this.initCodexLoader();
|
|
607
|
-
case "context-loader":
|
|
608
|
-
return await this.initContextLoader();
|
|
609
|
-
case "processor-pipeline":
|
|
610
|
-
return await this.initProcessorPipeline();
|
|
611
|
-
case "agent-registry":
|
|
612
|
-
return await this.initAgentRegistry();
|
|
613
|
-
case "orchestrator":
|
|
614
|
-
return await this.initOrchestrator();
|
|
615
|
-
case "mcp-servers":
|
|
616
|
-
return await this.initMCPServers();
|
|
617
|
-
case "framework-hooks":
|
|
618
|
-
return await this.initFrameworkHooks();
|
|
619
|
-
default:
|
|
620
|
-
throw new Error(`Unknown component: ${component}`);
|
|
621
|
-
}
|
|
622
|
-
} catch (error) {
|
|
623
|
-
return {
|
|
624
|
-
success: false,
|
|
625
|
-
duration: Date.now() - startTime,
|
|
626
|
-
error: error instanceof Error ? error.message : String(error),
|
|
627
|
-
};
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
private async initConfiguration(): Promise<ComponentInitResult> {
|
|
632
|
-
return {
|
|
633
|
-
success: true,
|
|
634
|
-
duration: 10,
|
|
635
|
-
message: "Configuration initialized",
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
private async initLogging(): Promise<ComponentInitResult> {
|
|
640
|
-
// Initialize logging system
|
|
641
|
-
const logDir = resolveLogDir();
|
|
642
|
-
if (!fs.existsSync(logDir)) {
|
|
643
|
-
fs.mkdirSync(logDir, { recursive: true });
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
return {
|
|
647
|
-
success: true,
|
|
648
|
-
duration: 5,
|
|
649
|
-
message: "Logging system initialized",
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
private async initStateManagement(): Promise<ComponentInitResult> {
|
|
654
|
-
// Validate state management setup
|
|
655
|
-
const stateDir = resolveStateDir();
|
|
656
|
-
if (!fs.existsSync(stateDir)) {
|
|
657
|
-
fs.mkdirSync(stateDir, { recursive: true });
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
return {
|
|
661
|
-
success: true,
|
|
662
|
-
duration: 8,
|
|
663
|
-
message: "State management initialized",
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
private async initSecurity(): Promise<ComponentInitResult> {
|
|
668
|
-
// Basic security initialization
|
|
669
|
-
return {
|
|
670
|
-
success: true,
|
|
671
|
-
duration: 3,
|
|
672
|
-
message: "Security framework initialized",
|
|
673
|
-
};
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
private async initCodexLoader(): Promise<ComponentInitResult> {
|
|
677
|
-
return {
|
|
678
|
-
success: true,
|
|
679
|
-
duration: 12,
|
|
680
|
-
message: "Codex loader initialized",
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
private async initContextLoader(): Promise<ComponentInitResult> {
|
|
685
|
-
return {
|
|
686
|
-
success: true,
|
|
687
|
-
duration: 8,
|
|
688
|
-
message: "Context loader initialized",
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
private async initProcessorPipeline(): Promise<ComponentInitResult> {
|
|
693
|
-
// Validate processor pipeline
|
|
694
|
-
return {
|
|
695
|
-
success: true,
|
|
696
|
-
duration: 15,
|
|
697
|
-
message: "Processor pipeline initialized",
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
private async initAgentRegistry(): Promise<ComponentInitResult> {
|
|
702
|
-
// Check agent files exist
|
|
703
|
-
const agentCount = this.countAgentFiles();
|
|
704
|
-
if (agentCount < 5) {
|
|
705
|
-
throw new Error(`Insufficient agents found: ${agentCount}`);
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
return {
|
|
709
|
-
success: true,
|
|
710
|
-
duration: 10,
|
|
711
|
-
message: `Agent registry initialized with ${agentCount} agents`,
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
private async initOrchestrator(): Promise<ComponentInitResult> {
|
|
716
|
-
// Validate orchestrator setup
|
|
717
|
-
return {
|
|
718
|
-
success: true,
|
|
719
|
-
duration: 20,
|
|
720
|
-
message: "Orchestrator initialized",
|
|
721
|
-
};
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
private async initMCPServers(): Promise<ComponentInitResult> {
|
|
725
|
-
// Check MCP servers
|
|
726
|
-
const mcpCount = this.countMCPFiles();
|
|
727
|
-
if (mcpCount < 3) {
|
|
728
|
-
throw new Error(`Insufficient MCP servers found: ${mcpCount}`);
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
return {
|
|
732
|
-
success: true,
|
|
733
|
-
duration: 15,
|
|
734
|
-
message: `MCP servers initialized (${mcpCount} servers)`,
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
private async initFrameworkHooks(): Promise<ComponentInitResult> {
|
|
739
|
-
// Initialize framework hooks
|
|
740
|
-
return {
|
|
741
|
-
success: true,
|
|
742
|
-
duration: 5,
|
|
743
|
-
message: "Framework hooks initialized",
|
|
744
|
-
};
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
private countAgentFiles(): number {
|
|
748
|
-
try {
|
|
749
|
-
const files = fs.readdirSync("src/agents");
|
|
750
|
-
return files.filter(
|
|
751
|
-
(f) => f.endsWith(".ts") && f !== "types.ts" && f !== "index.ts",
|
|
752
|
-
).length;
|
|
753
|
-
} catch (error) {
|
|
754
|
-
return 0;
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
private countMCPFiles(): number {
|
|
759
|
-
try {
|
|
760
|
-
const files = fs.readdirSync("src/mcps");
|
|
761
|
-
return files.filter((f) => f.endsWith(".server.ts")).length;
|
|
762
|
-
} catch (error) {
|
|
763
|
-
return 0;
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
private async getComponentStatus(component: string) {
|
|
768
|
-
const initialized = this.bootStatus.components.has(component);
|
|
769
|
-
const healthy = this.bootStatus.health.get(component) || false;
|
|
770
|
-
const info = this.bootStatus.components.get(component);
|
|
771
|
-
|
|
772
|
-
return {
|
|
773
|
-
initialized,
|
|
774
|
-
healthy,
|
|
775
|
-
info,
|
|
776
|
-
dependencies: this.bootStatus.dependencies.get(component) || [],
|
|
777
|
-
};
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
private getOverallBootStatus() {
|
|
781
|
-
const totalComponents = this.bootSequence.length;
|
|
782
|
-
const initializedComponents = Array.from(this.bootStatus.components.keys());
|
|
783
|
-
const healthyComponents = Array.from(
|
|
784
|
-
this.bootStatus.health.values(),
|
|
785
|
-
).filter((h) => h).length;
|
|
786
|
-
|
|
787
|
-
return {
|
|
788
|
-
initialized: this.bootStatus.initialized,
|
|
789
|
-
uptime: Date.now() - this.bootStatus.startTime,
|
|
790
|
-
totalComponents,
|
|
791
|
-
initializedComponents: initializedComponents.length,
|
|
792
|
-
healthyComponents,
|
|
793
|
-
failedComponents: initializedComponents.length - healthyComponents,
|
|
794
|
-
};
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
private async validateAllDependencies(
|
|
798
|
-
fix: boolean,
|
|
799
|
-
verbose: boolean,
|
|
800
|
-
): Promise<DependencyValidationResult> {
|
|
801
|
-
const results = {
|
|
802
|
-
total: this.bootSequence.length,
|
|
803
|
-
valid: 0,
|
|
804
|
-
missing: 0,
|
|
805
|
-
circular: 0,
|
|
806
|
-
issues: [] as string[],
|
|
807
|
-
fixes: [] as string[],
|
|
808
|
-
};
|
|
809
|
-
|
|
810
|
-
// Check for missing dependencies
|
|
811
|
-
for (const component of this.bootSequence) {
|
|
812
|
-
const deps = this.bootStatus.dependencies.get(component) || [];
|
|
813
|
-
const missingDeps = deps.filter((dep) => !this.checkComponentExists(dep));
|
|
814
|
-
|
|
815
|
-
if (missingDeps.length > 0) {
|
|
816
|
-
results.missing++;
|
|
817
|
-
results.issues.push(
|
|
818
|
-
`${component} missing dependencies: ${missingDeps.join(", ")}`,
|
|
819
|
-
);
|
|
820
|
-
} else {
|
|
821
|
-
results.valid++;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
// Check for circular dependencies (simplified)
|
|
826
|
-
const circularDeps = this.detectCircularDependencies();
|
|
827
|
-
if (circularDeps.length > 0) {
|
|
828
|
-
results.circular = circularDeps.length;
|
|
829
|
-
results.issues.push(
|
|
830
|
-
`Circular dependencies detected: ${circularDeps.join(", ")}`,
|
|
831
|
-
);
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
// Apply fixes if requested
|
|
835
|
-
if (fix && results.issues.length > 0) {
|
|
836
|
-
results.fixes = await this.applyDependencyFixes(results.issues);
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
return results;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
private checkComponentExists(component: string): boolean {
|
|
843
|
-
// Simplified check - in real implementation this would be more thorough
|
|
844
|
-
switch (component) {
|
|
845
|
-
case "configuration":
|
|
846
|
-
return fs.existsSync("opencode.json");
|
|
847
|
-
case "logging":
|
|
848
|
-
return fs.existsSync("src/framework-logger.ts");
|
|
849
|
-
case "state-management":
|
|
850
|
-
return fs.existsSync("src/state/state-manager.ts");
|
|
851
|
-
case "security":
|
|
852
|
-
return true;
|
|
853
|
-
case "codex-loader":
|
|
854
|
-
return true;
|
|
855
|
-
case "context-loader":
|
|
856
|
-
return true;
|
|
857
|
-
case "processor-pipeline":
|
|
858
|
-
return fs.existsSync("src/processors/processor-manager.ts");
|
|
859
|
-
case "agent-registry":
|
|
860
|
-
return fs.existsSync("src/agents");
|
|
861
|
-
case "orchestrator":
|
|
862
|
-
return fs.existsSync("src/delegation/agent-delegator.ts");
|
|
863
|
-
case "mcp-servers":
|
|
864
|
-
return fs.existsSync("src/mcps");
|
|
865
|
-
case "framework-hooks":
|
|
866
|
-
return fs.existsSync("src/core/xray-activation.ts");
|
|
867
|
-
default:
|
|
868
|
-
return false;
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
private detectCircularDependencies(): string[] {
|
|
873
|
-
// Simplified circular dependency detection
|
|
874
|
-
const circular: string[] = [];
|
|
875
|
-
|
|
876
|
-
for (const [component, deps] of this.bootStatus.dependencies) {
|
|
877
|
-
for (const dep of deps) {
|
|
878
|
-
const depDeps = this.bootStatus.dependencies.get(dep) || [];
|
|
879
|
-
if (depDeps.includes(component)) {
|
|
880
|
-
circular.push(`${component} ā ${dep}`);
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
return [...new Set(circular)]; // Remove duplicates
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
private async applyDependencyFixes(issues: string[]): Promise<string[]> {
|
|
889
|
-
const fixes: string[] = [];
|
|
890
|
-
|
|
891
|
-
// Simplified fix application
|
|
892
|
-
for (const issue of issues) {
|
|
893
|
-
if (issue.includes("missing dependencies")) {
|
|
894
|
-
fixes.push(
|
|
895
|
-
"Dependency validation completed - manual fixes may be required",
|
|
896
|
-
);
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
return fixes;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
private async executeShutdownSequence(
|
|
904
|
-
force: boolean,
|
|
905
|
-
saveState: boolean,
|
|
906
|
-
): Promise<ShutdownResult> {
|
|
907
|
-
const results: ShutdownResult = {
|
|
908
|
-
success: true,
|
|
909
|
-
shutDown: 0,
|
|
910
|
-
stateSaved: saveState,
|
|
911
|
-
errors: [] as string[],
|
|
912
|
-
duration: 0,
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
const startTime = Date.now();
|
|
916
|
-
|
|
917
|
-
try {
|
|
918
|
-
// Shutdown in reverse order
|
|
919
|
-
const reverseSequence = [...this.bootSequence].reverse();
|
|
920
|
-
|
|
921
|
-
for (const component of reverseSequence) {
|
|
922
|
-
try {
|
|
923
|
-
await this.shutdownComponent(component, force);
|
|
924
|
-
results.shutDown++;
|
|
925
|
-
} catch (error) {
|
|
926
|
-
results.errors.push(
|
|
927
|
-
`${component}: ${error instanceof Error ? error.message : String(error)}`,
|
|
928
|
-
);
|
|
929
|
-
if (!force) {
|
|
930
|
-
results.success = false;
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
// Save state if requested
|
|
936
|
-
if (saveState) {
|
|
937
|
-
await this.saveShutdownState();
|
|
938
|
-
}
|
|
939
|
-
} catch (error) {
|
|
940
|
-
results.success = false;
|
|
941
|
-
results.errors.push(
|
|
942
|
-
`Shutdown error: ${error instanceof Error ? error.message : String(error)}`,
|
|
943
|
-
);
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
results.duration = Date.now() - startTime;
|
|
947
|
-
return results;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
private async shutdownComponent(
|
|
951
|
-
component: string,
|
|
952
|
-
force: boolean,
|
|
953
|
-
): Promise<void> {
|
|
954
|
-
// Simplified shutdown logic
|
|
955
|
-
frameworkLogger.log("mcps/boot-orchestrator", "shutdown-component", "info", { component });
|
|
956
|
-
// In real implementation, this would properly shut down each component
|
|
957
|
-
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
private async saveShutdownState(): Promise<void> {
|
|
961
|
-
// Save shutdown state
|
|
962
|
-
const shutdownState = {
|
|
963
|
-
timestamp: Date.now(),
|
|
964
|
-
components: Array.from(this.bootStatus.components.keys()),
|
|
965
|
-
health: Object.fromEntries(this.bootStatus.health),
|
|
966
|
-
};
|
|
967
|
-
|
|
968
|
-
const stateFile = path.join(".opencode", "state", "shutdown-state.json");
|
|
969
|
-
fs.writeFileSync(stateFile, JSON.stringify(shutdownState, null, 2));
|
|
970
|
-
}
|
|
971
|
-
|
|
972
320
|
private formatBootResults(results: BootResults) {
|
|
973
321
|
const response = `š Boot Sequence Results
|
|
974
322
|
|
|
975
323
|
**Success:** ${results.success ? "ā
COMPLETE" : "ā FAILED"}
|
|
976
324
|
**Duration:** ${results.duration}ms
|
|
977
|
-
**Components Initialized:** ${results.initializedComponents.length}/${this.bootSequence.length}
|
|
325
|
+
**Components Initialized:** ${results.initializedComponents.length}/${this.orchestrator.bootSequence.length}
|
|
978
326
|
**Components Failed:** ${results.failedComponents.length}
|
|
979
327
|
|
|
980
328
|
**Initialized Components:**
|
|
@@ -1017,9 +365,9 @@ ${results.warnings.length > 0 ? `**Warnings:**\n${results.warnings.map((w: strin
|
|
|
1017
365
|
|
|
1018
366
|
if (detailed) {
|
|
1019
367
|
response += `\n\n**Component Details:**`;
|
|
1020
|
-
for (const component of this.bootSequence) {
|
|
1021
|
-
const
|
|
1022
|
-
response += `\n⢠${component}: ${
|
|
368
|
+
for (const component of this.orchestrator.bootSequence) {
|
|
369
|
+
const compHealth = this.orchestrator.getComponentHealth(component);
|
|
370
|
+
response += `\n⢠${component}: ${compHealth ? "ā
" : "ā"}`;
|
|
1023
371
|
}
|
|
1024
372
|
}
|
|
1025
373
|
|