0xray 2.0.1 → 2.1.1
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/.opencode/codex.codex +1 -1
- package/.opencode/commands/dependency-audit.md +3 -3
- package/.opencode/enforcer-config.json +2 -2
- package/.opencode/hooks/post-commit +1 -1
- package/.opencode/init.sh +2 -2
- package/AGENTS.md +1 -1
- package/README.md +2 -2
- package/dist/AGENTS.md +1 -1
- package/dist/CHANGELOG.md +10 -0
- package/dist/README.md +2 -2
- package/dist/analytics/routing-refiner.js +1 -1
- package/dist/benchmark/performance-benchmark.d.ts +2 -2
- package/dist/benchmark/performance-benchmark.js +3 -3
- package/dist/cli/commands/hermes-install.js +4 -4
- package/dist/cli/commands/mcp-install.js +1 -1
- package/dist/cli/commands/openclaw-install.js +1 -1
- package/dist/cli/commands/plugin-commands.js +2 -2
- package/dist/cli/commands/publish-agent.js +5 -5
- package/dist/cli/commands/skill-install.js +1 -1
- package/dist/cli/commands/status.js +3 -3
- package/dist/cli/commands/storyteller.js +2 -2
- package/dist/cli/index.js +8 -8
- package/dist/cli/server.js +1 -1
- package/dist/core/agent-spawn-gate.d.ts +1 -1
- package/dist/core/agent-spawn-gate.js +1 -1
- package/dist/core/boot-orchestrator.d.ts +4 -4
- package/dist/core/boot-orchestrator.js +27 -27
- package/dist/core/bridge.mjs +22 -22
- package/dist/core/codex-formatter.js +2 -2
- package/dist/core/codex-injector.d.ts +4 -3
- package/dist/core/codex-injector.js +11 -10
- package/dist/core/config-loader.d.ts +5 -4
- package/dist/core/config-loader.js +4 -2
- package/dist/core/config-paths.d.ts +9 -8
- package/dist/core/config-paths.js +24 -23
- package/dist/core/context-loader.d.ts +4 -3
- package/dist/core/context-loader.js +7 -5
- package/dist/core/features-config.js +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/orchestrator.d.ts +1 -0
- package/dist/core/orchestrator.js +3 -2
- package/dist/core/system-prompt-generator.js +2 -2
- package/dist/core/xray-activation.d.ts +4 -4
- package/dist/core/xray-activation.js +29 -24
- package/dist/delegation/agent-delegator.d.ts +3 -3
- package/dist/delegation/agent-delegator.js +3 -3
- package/dist/delegation/metrics-aggregator.d.ts +11 -11
- package/dist/delegation/session-coordinator.d.ts +3 -3
- package/dist/delegation/voting-coordinator.d.ts +3 -3
- package/dist/enforcement/enforcer-tools.js +2 -2
- package/dist/enforcement/loaders/codex-loader.d.ts +1 -1
- package/dist/enforcement/loaders/codex-loader.js +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/inference/deploy-verifier.js +1 -1
- package/dist/inference/inference-cycle.js +7 -7
- package/dist/integrations/base/README.md +2 -2
- package/dist/integrations/governance/index.js +1 -1
- package/dist/integrations/grok/grok-cli.d.ts +1 -1
- package/dist/integrations/grok/grok-cli.js +6 -6
- package/dist/integrations/grok/hooks/pre-tool-use.js +1 -1
- package/dist/integrations/grok/plugin/0xray/.mcp.json +3 -3
- package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
- package/dist/integrations/hermes-agent/__init__.py +77 -71
- package/dist/integrations/hermes-agent/__pycache__/__init__.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/conftest.cpython-313-pytest-9.0.2.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/schemas.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313-pytest-9.0.2.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/tools.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/after-install.md +14 -14
- package/dist/integrations/hermes-agent/bridge.mjs +14 -14
- package/dist/integrations/hermes-agent/logs/framework/routing-outcomes.json +1 -0
- package/dist/integrations/hermes-agent/plugin.yaml +5 -5
- package/dist/integrations/hermes-agent/schemas.py +12 -12
- package/dist/integrations/hermes-agent/test_plugin.py +128 -125
- package/dist/integrations/hermes-agent/tools.py +85 -23
- package/dist/integrations/openclaw/README.md +16 -16
- package/dist/integrations/openclaw/api-server.d.ts +4 -4
- package/dist/integrations/openclaw/api-server.js +9 -9
- package/dist/integrations/openclaw/config.js +1 -1
- package/dist/integrations/openclaw/hooks/{strray-hooks.d.ts → xray-hooks.d.ts} +4 -4
- package/dist/integrations/openclaw/index.d.ts +4 -4
- package/dist/integrations/openclaw/index.js +4 -4
- package/dist/integrations/openclaw/types.d.ts +1 -1
- package/dist/integrations/plugins/plugin-registry.js +2 -2
- package/dist/mcps/architect-tools.server.d.ts +2 -2
- package/dist/mcps/architect-tools.server.js +4 -4
- package/dist/mcps/auto-format.server.d.ts +2 -2
- package/dist/mcps/auto-format.server.js +4 -4
- package/dist/mcps/boot-orchestrator.server.d.ts +2 -2
- package/dist/mcps/boot-orchestrator.server.js +4 -4
- package/dist/mcps/config/server-config-registry.d.ts +1 -1
- package/dist/mcps/config/server-config-registry.js +7 -7
- package/dist/mcps/connection/mcp-connection.js +1 -1
- package/dist/mcps/enforcer-tools.server.d.ts +2 -2
- package/dist/mcps/enforcer-tools.server.js +4 -4
- package/dist/mcps/estimation.server.js +1 -1
- package/dist/mcps/framework-compliance-audit.server.d.ts +2 -2
- package/dist/mcps/framework-compliance-audit.server.js +4 -4
- package/dist/mcps/framework-help.server.js +7 -7
- package/dist/mcps/governance.server.js +1 -1
- package/dist/mcps/in-process-skill-registry.js +6 -6
- package/dist/mcps/knowledge-skills/api-design.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/api-design.server.js +4 -4
- package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +4 -4
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +1 -1
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +1 -1
- package/dist/mcps/knowledge-skills/code-review.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/code-review.server.js +4 -4
- package/dist/mcps/knowledge-skills/content-creator.server.js +1 -1
- package/dist/mcps/knowledge-skills/database-design.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/database-design.server.js +4 -4
- package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +4 -4
- package/dist/mcps/knowledge-skills/git-workflow.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/git-workflow.server.js +4 -4
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +1 -1
- package/dist/mcps/knowledge-skills/log-monitor.server.js +1 -1
- package/dist/mcps/knowledge-skills/mobile-development.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/mobile-development.server.js +4 -4
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +1 -1
- package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +4 -4
- package/dist/mcps/knowledge-skills/project-analysis.server.js +1 -1
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +4 -4
- package/dist/mcps/knowledge-skills/security-audit.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/security-audit.server.js +4 -4
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +1 -1
- package/dist/mcps/knowledge-skills/session-management.server.js +1 -1
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +1 -1
- package/dist/mcps/knowledge-skills/strategist.server.js +1 -1
- package/dist/mcps/knowledge-skills/tech-writer.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/tech-writer.server.js +5 -5
- package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js +4 -4
- package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +4 -4
- package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +6 -6
- package/dist/mcps/lint.server.d.ts +2 -2
- package/dist/mcps/lint.server.js +6 -6
- package/dist/mcps/mcp-client.js +3 -3
- package/dist/mcps/model-health-check.server.d.ts +2 -2
- package/dist/mcps/model-health-check.server.js +4 -4
- package/dist/mcps/orchestrator/server.js +2 -2
- package/dist/mcps/performance-analysis.server.d.ts +2 -2
- package/dist/mcps/performance-analysis.server.js +4 -4
- package/dist/mcps/processor-pipeline.server.d.ts +2 -2
- package/dist/mcps/processor-pipeline.server.js +4 -4
- package/dist/mcps/registry.json +1 -1
- package/dist/mcps/researcher.server.d.ts +3 -3
- package/dist/mcps/researcher.server.js +5 -5
- package/dist/mcps/security-scan.server.d.ts +2 -2
- package/dist/mcps/security-scan.server.js +4 -4
- package/dist/mcps/simulation/server-simulations.js +3 -3
- package/dist/mcps/state-manager.server.js +1 -1
- package/dist/metrics/agent-metrics.d.ts +4 -4
- package/dist/metrics/agent-metrics.js +1 -1
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.d.ts +2 -2
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +2 -2
- package/dist/orchestrator/intelligent-commit-batcher.d.ts +1 -1
- package/dist/orchestrator/intelligent-commit-batcher.js +3 -3
- package/dist/orchestrator/multi-agent-orchestration-coordinator.d.ts +3 -3
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js +9 -9
- package/dist/orchestrator/orchestrator.d.ts +3 -2
- package/dist/orchestrator/orchestrator.js +8 -6
- package/dist/orchestrator/universal-registry-bridge.js +1 -1
- package/dist/plugin/xray-codex-injection.d.ts +1 -1
- package/dist/plugin/xray-codex-injection.js +8 -7
- package/dist/postprocessor/PostProcessor.d.ts +2 -2
- package/dist/postprocessor/PostProcessor.js +1 -1
- package/dist/postprocessor/monitoring/MonitoringEngine.d.ts +2 -2
- package/dist/postprocessor/services/RegressionAnalysisService.js +2 -2
- package/dist/postprocessor/triggers/GitHookTrigger.js +14 -14
- package/dist/processors/implementations/agents-md-validation-processor.js +2 -2
- package/dist/processors/implementations/inference-improvement-processor.js +2 -2
- package/dist/processors/implementations/log-protection-processor.d.ts +1 -1
- package/dist/processors/implementations/log-protection-processor.js +2 -2
- package/dist/processors/implementations/publish-preflight-processor.d.ts +1 -1
- package/dist/processors/implementations/publish-preflight-processor.js +3 -3
- package/dist/processors/implementations/regression-testing-processor.js +2 -2
- package/dist/processors/implementations/session-summary-processor.js +2 -2
- package/dist/processors/implementations/storytelling-trigger-processor.js +2 -2
- package/dist/processors/processor-manager.d.ts +2 -2
- package/dist/public/about.html +6 -6
- package/dist/public/enterprise.html +1 -1
- package/dist/public/features.html +2 -2
- package/dist/public/index.html +4 -4
- package/dist/reporting/report-formatter.js +1 -1
- package/dist/scripts/activate-kernel-pipeline.js +2 -2
- package/dist/scripts/pre-command +1 -1
- package/dist/services/inference-tuner.js +2 -2
- package/dist/session/session-cleanup-manager.d.ts +3 -3
- package/dist/session/session-monitor.d.ts +3 -3
- package/dist/session/session-state-manager.d.ts +3 -3
- package/dist/skills/hermes-agent/SKILL.md +12 -12
- package/dist/skills/registry.json +1 -1
- package/dist/skills/storyteller/SKILL.md +1 -1
- package/dist/skills/xray-orchestrator/SKILL.md +141 -0
- package/dist/skills/xray-orchestrator/index.d.ts +13 -0
- package/dist/skills/xray-orchestrator/index.js +224 -0
- package/dist/state/index.d.ts +2 -1
- package/dist/state/index.js +2 -1
- package/dist/state/state-manager.d.ts +2 -2
- package/dist/state/state-manager.js +5 -4
- package/dist/utils/import-resolver.js +1 -1
- package/dist/utils/path-resolver.js +2 -2
- package/dist/utils/token-manager.js +1 -1
- package/dist/validation/estimation-validator.js +1 -1
- package/package.json +2 -2
- package/scripts/hooks/pre-command +1 -1
- package/scripts/hooks/run-hook.js +2 -2
- package/scripts/node/auto-reflection-generator.mjs +2 -2
- package/scripts/node/postinstall.cjs +1 -1
- package/scripts/node/pre-publish-guard.js +16 -10
- package/scripts/node/release.js +6 -6
- package/scripts/node/release.mjs +11 -11
- package/scripts/node/universal-version-manager.js +2 -2
- package/scripts/node/version-manager.mjs +1 -1
- package/src/integrations/grok/plugin/0xray/.mcp.json +3 -3
- package/src/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
- package/src/mcps/architect-tools.server.ts +4 -4
- package/src/mcps/auto-format.server.ts +4 -4
- package/src/mcps/boot-orchestrator.server.ts +4 -4
- package/src/mcps/config/server-config-registry.ts +7 -7
- package/src/mcps/connection/mcp-connection.ts +1 -1
- package/src/mcps/enforcer-tools.server.ts +4 -4
- package/src/mcps/estimation.server.ts +1 -1
- package/src/mcps/framework-compliance-audit.server.ts +4 -4
- package/src/mcps/framework-help.server.ts +7 -7
- package/src/mcps/governance.server.ts +1 -1
- package/src/mcps/in-process-skill-registry.ts +6 -6
- package/src/mcps/knowledge-skills/api-design.server.test.ts +8 -8
- package/src/mcps/knowledge-skills/api-design.server.ts +4 -4
- package/src/mcps/knowledge-skills/architecture-patterns.server.ts +4 -4
- package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +1 -1
- package/src/mcps/knowledge-skills/code-analyzer.server.ts +1 -1
- package/src/mcps/knowledge-skills/code-review.server.ts +4 -4
- package/src/mcps/knowledge-skills/content-creator.server.ts +1 -1
- package/src/mcps/knowledge-skills/database-design.server.ts +4 -4
- package/src/mcps/knowledge-skills/devops-deployment.server.ts +4 -4
- package/src/mcps/knowledge-skills/git-workflow.server.ts +4 -4
- package/src/mcps/knowledge-skills/growth-strategist.server.ts +1 -1
- package/src/mcps/knowledge-skills/log-monitor.server.ts +1 -1
- package/src/mcps/knowledge-skills/mobile-development.server.ts +4 -4
- package/src/mcps/knowledge-skills/multimodal-looker.server.ts +1 -1
- package/src/mcps/knowledge-skills/performance-optimization.server.ts +4 -4
- package/src/mcps/knowledge-skills/project-analysis.server.ts +1 -1
- package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +4 -4
- package/src/mcps/knowledge-skills/security-audit.server.test.ts +23 -23
- package/src/mcps/knowledge-skills/security-audit.server.ts +4 -4
- package/src/mcps/knowledge-skills/seo-consultant.server.ts +1 -1
- package/src/mcps/knowledge-skills/session-management.server.ts +1 -1
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +1 -1
- package/src/mcps/knowledge-skills/strategist.server.ts +1 -1
- package/src/mcps/knowledge-skills/tech-writer.server.ts +5 -5
- package/src/mcps/knowledge-skills/testing-best-practices.server.test.ts +28 -28
- package/src/mcps/knowledge-skills/testing-best-practices.server.ts +4 -4
- package/src/mcps/knowledge-skills/testing-strategy.server.test.ts +19 -19
- package/src/mcps/knowledge-skills/testing-strategy.server.ts +4 -4
- package/src/mcps/knowledge-skills/ui-ux-design.server.ts +6 -6
- package/src/mcps/lint.server.ts +6 -6
- package/src/mcps/mcp-client.ts +3 -3
- package/src/mcps/model-health-check.server.ts +4 -4
- package/src/mcps/orchestrator/server.ts +2 -2
- package/src/mcps/performance-analysis.server.ts +4 -4
- package/src/mcps/processor-pipeline.server.ts +4 -4
- package/src/mcps/registry.json +1 -1
- package/src/mcps/researcher.server.ts +5 -5
- package/src/mcps/security-scan.server.ts +4 -4
- package/src/mcps/simulation/server-simulations.ts +3 -3
- package/src/mcps/state-manager.server.ts +1 -1
- package/src/opencode/codex.codex +1 -1
- package/src/opencode/commands/dependency-audit.md +3 -3
- package/src/opencode/enforcer-config.json +2 -2
- package/src/skills/hermes-agent/SKILL.md +12 -12
- package/src/skills/registry.json +1 -1
- package/src/skills/storyteller/SKILL.md +1 -1
- package/src/skills/xray-orchestrator/SKILL.md +141 -0
- package/src/skills/xray-orchestrator/index.ts +268 -0
- package/scripts/validate-stringray-comprehensive.js +0 -636
- /package/dist/integrations/openclaw/hooks/{strray-hooks.js → xray-hooks.js} +0 -0
package/.opencode/codex.codex
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.0.
|
|
2
|
+
"version": "2.0.1",
|
|
3
3
|
"terms": [
|
|
4
4
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68
|
|
5
5
|
],
|
|
@@ -69,7 +69,7 @@ Comprehensive dependency analysis and security audit for all project dependencie
|
|
|
69
69
|
"vulnerabilities": [
|
|
70
70
|
{
|
|
71
71
|
"package": "lodash",
|
|
72
|
-
"version": "2.0.
|
|
72
|
+
"version": "2.0.1",
|
|
73
73
|
"severity": "high",
|
|
74
74
|
"cve": "CVE-2021-23337",
|
|
75
75
|
"description": "Command injection vulnerability"
|
|
@@ -85,14 +85,14 @@ Security-focused format for CI/CD integration:
|
|
|
85
85
|
|
|
86
86
|
```json
|
|
87
87
|
{
|
|
88
|
-
"version": "2.0.
|
|
88
|
+
"version": "2.0.1",
|
|
89
89
|
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
|
90
90
|
"runs": [
|
|
91
91
|
{
|
|
92
92
|
"tool": {
|
|
93
93
|
"driver": {
|
|
94
94
|
"name": "Dependency Audit",
|
|
95
|
-
"version": "2.0.
|
|
95
|
+
"version": "2.0.1"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"results": [...]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "xray 2.0",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Codex-compliant framework configuration for Credible UI project",
|
|
5
5
|
"thresholds": {
|
|
6
6
|
"bundleSize": {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
"codex": {
|
|
223
|
-
"version": "2.0.
|
|
223
|
+
"version": "2.0.1",
|
|
224
224
|
"terms": [
|
|
225
225
|
1,
|
|
226
226
|
2,
|
|
@@ -21,7 +21,7 @@ BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
|
21
21
|
) &
|
|
22
22
|
|
|
23
23
|
# Load auto_reflection config from features.json
|
|
24
|
-
CONFIG_FILE="$PROJECT_ROOT/.opencode/
|
|
24
|
+
CONFIG_FILE="$PROJECT_ROOT/.opencode/xray/features.json"
|
|
25
25
|
MODE="minimal"
|
|
26
26
|
COMMIT_THRESHOLD=25
|
|
27
27
|
DAYS_THRESHOLD=14
|
package/.opencode/init.sh
CHANGED
|
@@ -90,10 +90,10 @@ if [ "$AGENTS_COUNT" -eq 0 ]; then
|
|
|
90
90
|
AGENTS_COUNT=$(ls -1 "$PROJECT_ROOT/node_modules/0xray/.opencode/agents/"*.yml 2>/dev/null | wc -l | tr -d ' ')
|
|
91
91
|
fi
|
|
92
92
|
|
|
93
|
-
# Skills - check .opencode/skills, then .
|
|
93
|
+
# Skills - check .opencode/skills, then .xray/skills (Hermes), then node_modules
|
|
94
94
|
SKILLS_COUNT=$(ls -1d "$PROJECT_ROOT/.opencode/skills/"* 2>/dev/null | wc -l | tr -d ' ')
|
|
95
95
|
if [ "$SKILLS_COUNT" -eq 0 ]; then
|
|
96
|
-
SKILLS_COUNT=$(ls -1d "$PROJECT_ROOT/.
|
|
96
|
+
SKILLS_COUNT=$(ls -1d "$PROJECT_ROOT/.xray/skills/"* 2>/dev/null | wc -l | tr -d ' ')
|
|
97
97
|
fi
|
|
98
98
|
if [ "$SKILLS_COUNT" -eq 0 ]; then
|
|
99
99
|
SKILLS_COUNT=$(ls -1d "$PROJECT_ROOT/node_modules/0xray/.opencode/skills/"* 2>/dev/null | wc -l | tr -d ' ')
|
package/AGENTS.md
CHANGED
|
@@ -86,7 +86,7 @@ xray enforces the Universal Development Codex (60 terms) via Dynamo governance.
|
|
|
86
86
|
|
|
87
87
|
Pure v16 MCPs. Clean. Complete.
|
|
88
88
|
|
|
89
|
-
## Session: v2.
|
|
89
|
+
## Session: v2.1.0 Release Polish
|
|
90
90
|
|
|
91
91
|
- Package: `0xray` (npm), `github.com/0xRayAI/xray`. Version `2.0.0`.
|
|
92
92
|
- Renamed `strray-ai` → `0xray` across 60+ source files, CLI help text, grok plugin, hermes-agent bridge (Python + JS), docusaurus config.
|
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ Routes tasks to the right agents based on complexity (simple tasks go to a singl
|
|
|
89
89
|
| **OpenCode** | `npx 0xray opencode install` | Installs as native plugin, seeds YML agent surfaces, merges configuration |
|
|
90
90
|
| **Grok CLI** | `npx 0xray grok install` | Registers plugin + 16 MCPs servers (governance, skills, orchestrator, enforcer) |
|
|
91
91
|
| **Hermes Agent** | `npx 0xray hermes install` | Copies bridge plugin to `~/.hermes/plugins/` |
|
|
92
|
-
| **OpenClaw** | `npx 0xray openclaw install` | Creates integration config at `.
|
|
92
|
+
| **OpenClaw** | `npx 0xray openclaw install` | Creates integration config at `.xray/config/openclaw.json` |
|
|
93
93
|
|
|
94
94
|
Postinstall automatically registers MCP servers with Grok CLI when `grok` is available on your PATH.
|
|
95
95
|
|
|
@@ -178,7 +178,7 @@ Every subsystem is configurable via `features.json` (located at `.opencode/xray/
|
|
|
178
178
|
|
|
179
179
|
```json
|
|
180
180
|
{
|
|
181
|
-
"version": "2.0.
|
|
181
|
+
"version": "2.0.1",
|
|
182
182
|
"token_optimization": {
|
|
183
183
|
"enabled": true,
|
|
184
184
|
"max_context_tokens": 20000,
|
package/dist/AGENTS.md
CHANGED
|
@@ -86,7 +86,7 @@ xray enforces the Universal Development Codex (60 terms) via Dynamo governance.
|
|
|
86
86
|
|
|
87
87
|
Pure v16 MCPs. Clean. Complete.
|
|
88
88
|
|
|
89
|
-
## Session: v2.
|
|
89
|
+
## Session: v2.1.0 Release Polish
|
|
90
90
|
|
|
91
91
|
- Package: `0xray` (npm), `github.com/0xRayAI/xray`. Version `2.0.0`.
|
|
92
92
|
- Renamed `strray-ai` → `0xray` across 60+ source files, CLI help text, grok plugin, hermes-agent bridge (Python + JS), docusaurus config.
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Conventional Commits](https://www.conventionalcommits.org/).
|
|
6
6
|
|
|
7
|
+
## [2.1.1] - 2026-06-08
|
|
8
|
+
|
|
9
|
+
### 🔄 Changes
|
|
10
|
+
|
|
11
|
+
### 🐛 Bug Fixes
|
|
12
|
+
- fix: sweep remaining .strray → .xray references in source files (12b992206)
|
|
13
|
+
- fix: pre-publish-guard handles missing features.json, release.mjs uses --ignore-scripts (cd65f6309)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
7
17
|
## [2.0.1] - 2026-06-08
|
|
8
18
|
|
|
9
19
|
### 🔄 Changes
|
package/dist/README.md
CHANGED
|
@@ -89,7 +89,7 @@ Routes tasks to the right agents based on complexity (simple tasks go to a singl
|
|
|
89
89
|
| **OpenCode** | `npx 0xray opencode install` | Installs as native plugin, seeds YML agent surfaces, merges configuration |
|
|
90
90
|
| **Grok CLI** | `npx 0xray grok install` | Registers plugin + 16 MCPs servers (governance, skills, orchestrator, enforcer) |
|
|
91
91
|
| **Hermes Agent** | `npx 0xray hermes install` | Copies bridge plugin to `~/.hermes/plugins/` |
|
|
92
|
-
| **OpenClaw** | `npx 0xray openclaw install` | Creates integration config at `.
|
|
92
|
+
| **OpenClaw** | `npx 0xray openclaw install` | Creates integration config at `.xray/config/openclaw.json` |
|
|
93
93
|
|
|
94
94
|
Postinstall automatically registers MCP servers with Grok CLI when `grok` is available on your PATH.
|
|
95
95
|
|
|
@@ -178,7 +178,7 @@ Every subsystem is configurable via `features.json` (located at `.opencode/xray/
|
|
|
178
178
|
|
|
179
179
|
```json
|
|
180
180
|
{
|
|
181
|
-
"version": "2.0.
|
|
181
|
+
"version": "2.0.1",
|
|
182
182
|
"token_optimization": {
|
|
183
183
|
"enabled": true,
|
|
184
184
|
"max_context_tokens": 20000,
|
|
@@ -36,7 +36,7 @@ class RoutingRefiner {
|
|
|
36
36
|
const optimizations = this.suggestMappingOptimizations(promptAnalysis, performanceReport);
|
|
37
37
|
const warnings = this.generateWarnings(newMappings, optimizations);
|
|
38
38
|
return {
|
|
39
|
-
version: "2.0.
|
|
39
|
+
version: "2.0.1",
|
|
40
40
|
generatedAt: new Date(),
|
|
41
41
|
summary: {
|
|
42
42
|
newMappings: newMappings.length,
|
|
@@ -54,7 +54,7 @@ export interface SessionBenchmarkResult {
|
|
|
54
54
|
failoverTimes: number[];
|
|
55
55
|
concurrentSessionOperations: number;
|
|
56
56
|
}
|
|
57
|
-
export declare class
|
|
57
|
+
export declare class XrayPerformanceBenchmark {
|
|
58
58
|
private results;
|
|
59
59
|
private activeBenchmarks;
|
|
60
60
|
/**
|
|
@@ -100,4 +100,4 @@ export declare class StringRayPerformanceBenchmark {
|
|
|
100
100
|
*/
|
|
101
101
|
exportResults(): BenchmarkResult[];
|
|
102
102
|
}
|
|
103
|
-
export declare const performanceBenchmark:
|
|
103
|
+
export declare const performanceBenchmark: XrayPerformanceBenchmark;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .
|
|
1
|
+
// Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .xray fallbacks)
|
|
2
2
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
3
3
|
import crypto from "crypto";
|
|
4
|
-
export class
|
|
4
|
+
export class XrayPerformanceBenchmark {
|
|
5
5
|
results = [];
|
|
6
6
|
activeBenchmarks = new Map();
|
|
7
7
|
/**
|
|
@@ -369,4 +369,4 @@ export class StringRayPerformanceBenchmark {
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
// Export singleton instance
|
|
372
|
-
export const performanceBenchmark = new
|
|
372
|
+
export const performanceBenchmark = new XrayPerformanceBenchmark();
|
|
@@ -16,14 +16,14 @@ export function registerHermesCommands(hermesCmd) {
|
|
|
16
16
|
async function installForHermes(options = {}) {
|
|
17
17
|
frameworkLogger.log('hermes-integration', 'install-start', 'info', { options });
|
|
18
18
|
const home = homedir();
|
|
19
|
-
const targetPluginDir = path.join(home, '.hermes/plugins/
|
|
19
|
+
const targetPluginDir = path.join(home, '.hermes/plugins/xray-hermes');
|
|
20
20
|
const possibleSources = [
|
|
21
21
|
path.join(__dirname, '..', '..', '..', 'dist/integrations/hermes-agent'),
|
|
22
22
|
path.join(__dirname, '..', '..', '..', 'src/integrations/hermes-agent'),
|
|
23
23
|
];
|
|
24
24
|
let sourceDir = possibleSources.find(p => fs.existsSync(p));
|
|
25
25
|
if (!sourceDir) {
|
|
26
|
-
console.error('[Hermes] Could not locate the
|
|
26
|
+
console.error('[Hermes] Could not locate the xray-hermes plugin inside the package.');
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
if (options.dryRun) {
|
|
@@ -32,7 +32,7 @@ async function installForHermes(options = {}) {
|
|
|
32
32
|
}
|
|
33
33
|
try {
|
|
34
34
|
if (fs.existsSync(targetPluginDir) && !options.force) {
|
|
35
|
-
console.log('[Hermes]
|
|
35
|
+
console.log('[Hermes] xray-hermes plugin is already installed.');
|
|
36
36
|
console.log('Use --force to reinstall.');
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
@@ -56,7 +56,7 @@ async function installForHermes(options = {}) {
|
|
|
56
56
|
}
|
|
57
57
|
console.log('\n✅ 0xRay is now installed as a Hermes Agent plugin!');
|
|
58
58
|
console.log('Restart Hermes to load the plugin and its tools.');
|
|
59
|
-
console.log(' Run:
|
|
59
|
+
console.log(' Run: npx 0xray status (to verify)');
|
|
60
60
|
}
|
|
61
61
|
catch (err) {
|
|
62
62
|
frameworkLogger.log('hermes-integration', 'install-error', 'error', { error: err.message });
|
|
@@ -3,7 +3,7 @@ import { join, dirname } from "path";
|
|
|
3
3
|
import { execSync } from "child_process";
|
|
4
4
|
import { getConfigDir } from "../../core/config-paths.js";
|
|
5
5
|
function getMCPConfigPath() {
|
|
6
|
-
return join(process.cwd(), ".opencode", "
|
|
6
|
+
return join(process.cwd(), ".opencode", "xray", "mcp-registry.json");
|
|
7
7
|
}
|
|
8
8
|
function getBundledMCPRegistry() {
|
|
9
9
|
const paths = [
|
|
@@ -14,7 +14,7 @@ export function registerOpenClawCommands(openclawCmd) {
|
|
|
14
14
|
}
|
|
15
15
|
async function installForOpenClaw(options = {}) {
|
|
16
16
|
frameworkLogger.log('openclaw-integration', 'install-start', 'info', { options });
|
|
17
|
-
const configPath = path.join(process.cwd(), '.
|
|
17
|
+
const configPath = path.join(process.cwd(), '.xray', 'config', 'openclaw.json');
|
|
18
18
|
if (options.dryRun) {
|
|
19
19
|
console.log(`[OpenClaw] Dry run: Would create config at ${configPath}`);
|
|
20
20
|
return;
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
import * as fs from "fs";
|
|
15
15
|
import * as path from "path";
|
|
16
16
|
import { spawnSync } from "child_process";
|
|
17
|
-
const PLUGINS_DIR = ".
|
|
18
|
-
const CONFIG_PATH = ".
|
|
17
|
+
const PLUGINS_DIR = ".xray/plugins";
|
|
18
|
+
const CONFIG_PATH = ".xray/config/plugin-config.json";
|
|
19
19
|
export async function pluginListCommand() {
|
|
20
20
|
console.log("\n📦 0xRay Plugins\n");
|
|
21
21
|
console.log("═".repeat(60));
|
|
@@ -69,10 +69,10 @@ function getPackageVersion(cwd) {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
catch { /* ignore */ }
|
|
72
|
-
const
|
|
72
|
+
const xrayPkgPath = join(cwd, ".opencode", "package.json");
|
|
73
73
|
try {
|
|
74
|
-
if (existsSync(
|
|
75
|
-
const pkg = JSON.parse(readFileSync(
|
|
74
|
+
if (existsSync(xrayPkgPath)) {
|
|
75
|
+
const pkg = JSON.parse(readFileSync(xrayPkgPath, "utf-8"));
|
|
76
76
|
if (pkg.version)
|
|
77
77
|
return pkg.version;
|
|
78
78
|
}
|
|
@@ -89,7 +89,7 @@ function createAgentManifest(agentName, configPath, version, cwd) {
|
|
|
89
89
|
author: extractYamlField(content, "author") || extractYamlField(content, "maintainer") || "0xRay User",
|
|
90
90
|
license: extractYamlField(content, "license") || "MIT",
|
|
91
91
|
source: extractYamlField(content, "source") || "custom",
|
|
92
|
-
framework: "
|
|
92
|
+
framework: "xray",
|
|
93
93
|
frameworkVersion: getPackageVersion(cwd),
|
|
94
94
|
publishedAt: new Date().toISOString(),
|
|
95
95
|
skills: [],
|
|
@@ -98,7 +98,7 @@ function createAgentManifest(agentName, configPath, version, cwd) {
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
function packageAgent(agentName, configPath, version, cwd) {
|
|
101
|
-
const outputDir = join(cwd, ".
|
|
101
|
+
const outputDir = join(cwd, ".xray", "publish", agentName);
|
|
102
102
|
mkdirSync(outputDir, { recursive: true });
|
|
103
103
|
const manifest = createAgentManifest(agentName, configPath, version, cwd);
|
|
104
104
|
writeFileSync(join(outputDir, "agent.json"), JSON.stringify(manifest, null, 2));
|
|
@@ -2,7 +2,7 @@ import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, cpSync
|
|
|
2
2
|
import { join, basename, dirname } from "path";
|
|
3
3
|
import { execSync } from "child_process";
|
|
4
4
|
function getLocalRegistryPath() {
|
|
5
|
-
return join(process.cwd(), ".opencode", "
|
|
5
|
+
return join(process.cwd(), ".opencode", "xray", "skill-registry.json");
|
|
6
6
|
}
|
|
7
7
|
function getBundledRegistry() {
|
|
8
8
|
const paths = [
|
|
@@ -41,7 +41,7 @@ function getAgentsList(cwd) {
|
|
|
41
41
|
];
|
|
42
42
|
const configuredAgents = [];
|
|
43
43
|
const configDir = getConfigDir(cwd);
|
|
44
|
-
const agentsConfigPath = join(configDir, "
|
|
44
|
+
const agentsConfigPath = join(configDir, "xray", "agents.json");
|
|
45
45
|
if (existsSync(agentsConfigPath)) {
|
|
46
46
|
try {
|
|
47
47
|
const config = JSON.parse(readFileSync(agentsConfigPath, "utf-8"));
|
|
@@ -51,7 +51,7 @@ function getAgentsList(cwd) {
|
|
|
51
51
|
}
|
|
52
52
|
catch { /* ignore */ }
|
|
53
53
|
}
|
|
54
|
-
const featuresPath = join(configDir, "
|
|
54
|
+
const featuresPath = join(configDir, "xray", "features.json");
|
|
55
55
|
if (existsSync(featuresPath)) {
|
|
56
56
|
try {
|
|
57
57
|
const features = JSON.parse(readFileSync(featuresPath, "utf-8"));
|
|
@@ -93,7 +93,7 @@ function getInferenceStatus(cwd) {
|
|
|
93
93
|
let outcomesCount = 0;
|
|
94
94
|
let patternsCount = 0;
|
|
95
95
|
try {
|
|
96
|
-
const inferenceDir = join(getConfigDir(cwd), "
|
|
96
|
+
const inferenceDir = join(getConfigDir(cwd), "xray", "inference");
|
|
97
97
|
const tunerStatusPath = join(inferenceDir, "tuner-status.json");
|
|
98
98
|
if (existsSync(tunerStatusPath)) {
|
|
99
99
|
const status = JSON.parse(readFileSync(tunerStatusPath, "utf-8"));
|
|
@@ -16,8 +16,8 @@ import { execSync } from "child_process";
|
|
|
16
16
|
const STORY_TYPES = ["reflection", "saga", "journey", "narrative"];
|
|
17
17
|
function loadConfig(cwd) {
|
|
18
18
|
const candidates = [
|
|
19
|
-
join(cwd, ".opencode", "
|
|
20
|
-
join(cwd, ".
|
|
19
|
+
join(cwd, ".opencode", "xray", "features.json"),
|
|
20
|
+
join(cwd, ".xray", "features.json"),
|
|
21
21
|
];
|
|
22
22
|
for (const path of candidates) {
|
|
23
23
|
if (existsSync(path)) {
|
package/dist/cli/index.js
CHANGED
|
@@ -385,7 +385,7 @@ program
|
|
|
385
385
|
const path = await import("path");
|
|
386
386
|
let defaultLimit = 500;
|
|
387
387
|
try {
|
|
388
|
-
const featuresPath = path.join(process.cwd(), ".opencode", "plugins", "features.json"); // plain xray primary (min compat .
|
|
388
|
+
const featuresPath = path.join(process.cwd(), ".opencode", "plugins", "features.json"); // plain xray primary (min compat .xray/ handled in getConfigDir per Scope Rule)
|
|
389
389
|
if (fs.existsSync(featuresPath)) {
|
|
390
390
|
const features = JSON.parse(fs.readFileSync(featuresPath, "utf-8"));
|
|
391
391
|
defaultLimit = features.analytics?.default_limit || 500;
|
|
@@ -450,17 +450,17 @@ program
|
|
|
450
450
|
else {
|
|
451
451
|
console.log("✅ xray package installed");
|
|
452
452
|
}
|
|
453
|
-
// Check configuration - check for opencode.json or .
|
|
453
|
+
// Check configuration - check for opencode.json or .xray/ (min compat .xray/ fallback for prior StringRay consumer runtime per Scope Rule; plain xray primary)
|
|
454
454
|
const cwd = process.cwd();
|
|
455
455
|
const opencodeConfigPath = path.join(cwd, "opencode.json");
|
|
456
|
-
const
|
|
456
|
+
const xrayDir = getConfigDir(cwd);
|
|
457
457
|
const opencodeExists = fs.existsSync(opencodeConfigPath);
|
|
458
|
-
const
|
|
458
|
+
const xrayDirExists = fs.existsSync(xrayDir);
|
|
459
459
|
if (opencodeExists) {
|
|
460
460
|
console.log("✅ opencode configuration found");
|
|
461
461
|
}
|
|
462
|
-
else if (
|
|
463
|
-
console.log(`✅ Configuration directory found: ${
|
|
462
|
+
else if (xrayDirExists) {
|
|
463
|
+
console.log(`✅ Configuration directory found: ${xrayDir}`);
|
|
464
464
|
}
|
|
465
465
|
else {
|
|
466
466
|
console.log("ℹ️ No opencode.json or config directory found (run: npx xray fix to create)");
|
|
@@ -684,13 +684,13 @@ program
|
|
|
684
684
|
}
|
|
685
685
|
else {
|
|
686
686
|
console.log('Inference feature is disabled in features.json.');
|
|
687
|
-
console.log('Enable it by setting inference.enabled = true in .opencode/plugins/features.json (min compat .
|
|
687
|
+
console.log('Enable it by setting inference.enabled = true in .opencode/plugins/features.json (min compat .xray/ fallback for prior StringRay consumer runtime per Scope Rule)');
|
|
688
688
|
}
|
|
689
689
|
return;
|
|
690
690
|
}
|
|
691
691
|
const projectRoot = process.cwd();
|
|
692
692
|
const inferenceDir = `${projectRoot}/docs/inference`;
|
|
693
|
-
const stateDir = `${projectRoot}/.
|
|
693
|
+
const stateDir = `${projectRoot}/.xray/inference`;
|
|
694
694
|
const stateFile = `${stateDir}/inference-cycle-state.json`;
|
|
695
695
|
if (!options.json) {
|
|
696
696
|
console.log('xray Inference Cycle');
|
package/dist/cli/server.js
CHANGED
|
@@ -112,7 +112,7 @@ app.get("/", (req, res) => {
|
|
|
112
112
|
});
|
|
113
113
|
// Add route for refactoring logs
|
|
114
114
|
app.get("/logs", requireAuth, async (req, res) => {
|
|
115
|
-
const logPath = resolveConfigPath("REFACTORING_LOG.md") || join(__dirname, "..", ".
|
|
115
|
+
const logPath = resolveConfigPath("REFACTORING_LOG.md") || join(__dirname, "..", ".xray", "REFACTORING_LOG.md");
|
|
116
116
|
// Server debug logging - remove for production
|
|
117
117
|
try {
|
|
118
118
|
if (fs.existsSync(logPath)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent Spawn Gate — Singleton (provider-agnostic)
|
|
3
3
|
*
|
|
4
|
-
* CENTRALIZED CONTROL for all agent process spawning across
|
|
4
|
+
* CENTRALIZED CONTROL for all agent process spawning across Xray
|
|
5
5
|
* (OpenCode, Hermes, or any other MCP-compatible host).
|
|
6
6
|
*
|
|
7
7
|
* Purpose:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent Spawn Gate — Singleton (provider-agnostic)
|
|
3
3
|
*
|
|
4
|
-
* CENTRALIZED CONTROL for all agent process spawning across
|
|
4
|
+
* CENTRALIZED CONTROL for all agent process spawning across Xray
|
|
5
5
|
* (OpenCode, Hermes, or any other MCP-compatible host).
|
|
6
6
|
*
|
|
7
7
|
* Purpose:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Boot Orchestrator (min documented consumer runtime compat shim from prior StringRay releases; primary Xray* paths + XRAY_||STRRAY_ env + .
|
|
2
|
+
* Boot Orchestrator (min documented consumer runtime compat shim from prior StringRay releases; primary Xray* paths + XRAY_||STRRAY_ env + .xray fallbacks only; 1-line per Scope Rule).
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { XrayStateManager } from "../state/state-manager.js";
|
|
5
5
|
import { type MemoryStats } from "../monitoring/memory-monitor.js";
|
|
6
6
|
export interface BootSequenceConfig {
|
|
7
7
|
enableEnforcement: boolean;
|
|
@@ -28,7 +28,7 @@ export declare class BootOrchestrator {
|
|
|
28
28
|
private pluginRegistry?;
|
|
29
29
|
private pluginServerRegistry?;
|
|
30
30
|
private shutdownInitialized;
|
|
31
|
-
constructor(config?: Partial<BootSequenceConfig>, stateManager?:
|
|
31
|
+
constructor(config?: Partial<BootSequenceConfig>, stateManager?: XrayStateManager);
|
|
32
32
|
/**
|
|
33
33
|
* Initialize delegation system components
|
|
34
34
|
*/
|
|
@@ -94,6 +94,6 @@ export declare class BootOrchestrator {
|
|
|
94
94
|
* Execute the boot sequence (internal framework initialization)
|
|
95
95
|
*/
|
|
96
96
|
executeBootSequence(): Promise<BootResult>;
|
|
97
|
-
private
|
|
97
|
+
private loadXrayConfiguration;
|
|
98
98
|
}
|
|
99
99
|
export declare const bootOrchestrator: BootOrchestrator;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Boot Orchestrator (min documented consumer runtime compat shim from prior StringRay releases; primary Xray* paths + XRAY_||STRRAY_ env + .
|
|
2
|
+
* Boot Orchestrator (min documented consumer runtime compat shim from prior StringRay releases; primary Xray* paths + XRAY_||STRRAY_ env + .xray fallbacks only; 1-line per Scope Rule).
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { XrayContextLoader } from "./context-loader.js";
|
|
5
|
+
import { XrayStateManager } from "../state/state-manager.js";
|
|
6
6
|
import { ProcessorManager } from "../processors/processor-manager.js";
|
|
7
7
|
import { pathResolver } from "../utils/path-resolver.js";
|
|
8
8
|
import * as fs from "fs";
|
|
@@ -20,7 +20,7 @@ import { frameworkLogger } from "../core/framework-logger.js";
|
|
|
20
20
|
import { featuresConfigLoader } from "../core/features-config.js";
|
|
21
21
|
import { memoryMonitor } from "../monitoring/memory-monitor.js";
|
|
22
22
|
import { advancedProfiler } from "../monitoring/advanced-profiler.js";
|
|
23
|
-
import {
|
|
23
|
+
import { xrayConfigLoader } from "./config-loader.js";
|
|
24
24
|
import { PluginRegistry } from "../integrations/plugins/index.js";
|
|
25
25
|
import { PluginServerConfigRegistry } from "../mcps/config/index.js";
|
|
26
26
|
import { initializeGovernanceIntegration } from "../integrations/governance/index.js";
|
|
@@ -30,10 +30,10 @@ import { initializeGovernanceIntegration } from "../integrations/governance/inde
|
|
|
30
30
|
*/
|
|
31
31
|
function setupGracefulShutdown() {
|
|
32
32
|
// Prevent duplicate listeners
|
|
33
|
-
if (process.
|
|
33
|
+
if (process._xrayShutdownSetup) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
process.
|
|
36
|
+
process._xrayShutdownSetup = true;
|
|
37
37
|
let isShuttingDown = false;
|
|
38
38
|
process.on("SIGINT", async () => {
|
|
39
39
|
if (isShuttingDown) {
|
|
@@ -98,8 +98,8 @@ export class BootOrchestrator {
|
|
|
98
98
|
shutdownInitialized = false;
|
|
99
99
|
constructor(config = {}, stateManager) {
|
|
100
100
|
// Initialize components first for state management
|
|
101
|
-
this.contextLoader =
|
|
102
|
-
this.stateManager = stateManager || new
|
|
101
|
+
this.contextLoader = XrayContextLoader.getInstance();
|
|
102
|
+
this.stateManager = stateManager || new XrayStateManager();
|
|
103
103
|
this.processorManager = new ProcessorManager(this.stateManager);
|
|
104
104
|
this.config = {
|
|
105
105
|
enableEnforcement: true,
|
|
@@ -115,7 +115,7 @@ export class BootOrchestrator {
|
|
|
115
115
|
*/
|
|
116
116
|
async initializeDelegationSystem() {
|
|
117
117
|
try {
|
|
118
|
-
const agentDelegator = createAgentDelegator(this.stateManager,
|
|
118
|
+
const agentDelegator = createAgentDelegator(this.stateManager, xrayConfigLoader);
|
|
119
119
|
this.stateManager.set("delegation:agent_delegator", agentDelegator);
|
|
120
120
|
const sessionCoordinator = createSessionCoordinator(this.stateManager);
|
|
121
121
|
this.stateManager.set("delegation:session_coordinator", sessionCoordinator);
|
|
@@ -131,8 +131,8 @@ export class BootOrchestrator {
|
|
|
131
131
|
loadProcessorsConfig() {
|
|
132
132
|
try {
|
|
133
133
|
const configPaths = [
|
|
134
|
-
path.join(process.cwd(), ".
|
|
135
|
-
path.join(process.cwd(), ".opencode", "
|
|
134
|
+
path.join(process.cwd(), ".xray", "features.json"),
|
|
135
|
+
path.join(process.cwd(), ".opencode", "xray", "features.json"),
|
|
136
136
|
];
|
|
137
137
|
for (const configPath of configPaths) {
|
|
138
138
|
if (existsSync(configPath)) {
|
|
@@ -152,7 +152,7 @@ export class BootOrchestrator {
|
|
|
152
152
|
async initializePluginSystem(jobId) {
|
|
153
153
|
try {
|
|
154
154
|
frameworkLogger.log("boot-orchestrator", "initializing plugin system", "info", { jobId });
|
|
155
|
-
const pluginsDir = path.join(process.cwd(), ".
|
|
155
|
+
const pluginsDir = path.join(process.cwd(), ".xray", "plugins");
|
|
156
156
|
this.pluginRegistry = new PluginRegistry({
|
|
157
157
|
pluginsDir,
|
|
158
158
|
autoStart: true,
|
|
@@ -189,7 +189,7 @@ export class BootOrchestrator {
|
|
|
189
189
|
});
|
|
190
190
|
return false;
|
|
191
191
|
}
|
|
192
|
-
const orchestratorInstance = orchestratorModule.strRayOrchestrator;
|
|
192
|
+
const orchestratorInstance = orchestratorModule.xrayOrchestrator || orchestratorModule.strRayOrchestrator;
|
|
193
193
|
if (!orchestratorInstance) {
|
|
194
194
|
frameworkLogger.log("boot-orchestrator", "orchestrator-not-found", "error", { message: "Orchestrator instance not found in module" });
|
|
195
195
|
return false;
|
|
@@ -596,8 +596,8 @@ export class BootOrchestrator {
|
|
|
596
596
|
};
|
|
597
597
|
try {
|
|
598
598
|
frameworkLogger.log("boot-orchestrator", "loading xray configuration", "info", { jobId });
|
|
599
|
-
// Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .
|
|
600
|
-
await this.
|
|
599
|
+
// Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .xray fallbacks)
|
|
600
|
+
await this.loadXrayConfiguration(jobId);
|
|
601
601
|
frameworkLogger.log("boot-orchestrator", "xray configuration loaded", "success", { jobId });
|
|
602
602
|
// Phase 1: Initialize core systems
|
|
603
603
|
frameworkLogger.log("boot-orchestrator", "initializing core systems", "info", { jobId });
|
|
@@ -727,12 +727,12 @@ export class BootOrchestrator {
|
|
|
727
727
|
this.stateManager.set("boot:errors", result.errors);
|
|
728
728
|
return result;
|
|
729
729
|
}
|
|
730
|
-
// Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .
|
|
731
|
-
async
|
|
730
|
+
// Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .xray fallbacks)
|
|
731
|
+
async loadXrayConfiguration(jobId) {
|
|
732
732
|
try {
|
|
733
|
-
// Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .
|
|
734
|
-
const
|
|
735
|
-
version: "2.0.
|
|
733
|
+
// Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .xray fallbacks)
|
|
734
|
+
const xrayConfig = {
|
|
735
|
+
version: "2.0.1",
|
|
736
736
|
codex_enabled: true,
|
|
737
737
|
codex_version: "v2.0.0",
|
|
738
738
|
codex_terms: [
|
|
@@ -793,13 +793,13 @@ export class BootOrchestrator {
|
|
|
793
793
|
},
|
|
794
794
|
};
|
|
795
795
|
// Store configuration in state manager for use by other components
|
|
796
|
-
this.stateManager.set("
|
|
797
|
-
this.stateManager.set("
|
|
798
|
-
this.stateManager.set("
|
|
799
|
-
this.stateManager.set("
|
|
800
|
-
this.stateManager.set("
|
|
801
|
-
this.stateManager.set("
|
|
802
|
-
this.stateManager.set("
|
|
796
|
+
this.stateManager.set("xray:config", xrayConfig);
|
|
797
|
+
this.stateManager.set("xray:version", xrayConfig.version);
|
|
798
|
+
this.stateManager.set("xray:codex_enabled", xrayConfig.codex_enabled);
|
|
799
|
+
this.stateManager.set("xray:codex_terms", xrayConfig.codex_terms);
|
|
800
|
+
this.stateManager.set("xray:monitoring_metrics", xrayConfig.monitoring_metrics);
|
|
801
|
+
this.stateManager.set("xray:monitoring_alerts", xrayConfig.monitoring_alerts);
|
|
802
|
+
this.stateManager.set("xray:agent_capabilities", xrayConfig.agent_capabilities);
|
|
803
803
|
await frameworkLogger.log("boot-orchestrator", "configuration-loaded", "success", { jobId });
|
|
804
804
|
}
|
|
805
805
|
catch (error) {
|