0xray 3.1.0 → 3.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/.gitignore.default +59 -0
- package/.mcp.json +35 -0
- package/.opencode/codex.codex +1 -1
- package/.opencode/commands/dependency-audit.md +3 -3
- package/.opencode/commands/summary-logger.md +4 -4
- package/.opencode/enforcer-config.json +2 -2
- package/.opencode/hooks/post-commit +1 -1
- package/.opencode/init.sh +6 -0
- package/.plugin/plugin.json +11 -0
- package/AGENTS-consumer.md +46 -0
- package/AGENTS.md +8 -8
- package/LICENSE +1 -1
- package/README.md +8 -8
- package/SKILLS.md +140 -0
- package/dist/.gitignore.default +59 -0
- package/dist/AGENTS.md +8 -8
- package/dist/CHANGELOG.md +25 -0
- package/dist/LICENSE +1 -1
- package/dist/README.md +8 -8
- package/dist/SKILLS.md +140 -0
- package/dist/agents/index.js +3 -1
- package/dist/agents/registry.js +13 -0
- package/dist/analytics/routing-refiner.js +1 -1
- package/dist/architect/architectural-integrity.js +3 -3
- package/dist/benchmark/performance-benchmark.js +1 -2
- package/dist/cli/commands/antigravity-status.js +23 -23
- package/dist/cli/commands/credible-init.js +1 -1
- package/dist/cli/commands/hermes-install.js +8 -0
- package/dist/cli/commands/mcp-install.js +1 -1
- package/dist/cli/commands/openclaw-install.js +9 -0
- package/dist/cli/commands/opencode-install.js +22 -0
- package/dist/cli/commands/skill-install.js +39 -2
- package/dist/cli/commands/status.js +5 -0
- package/dist/cli/commands/storyteller.js +1 -1
- package/dist/cli/index.js +12 -6
- package/dist/core/activity-logger.js +4 -4
- package/dist/core/agent-spawn-gate.js +1 -1
- package/dist/core/boot-orchestrator.js +12 -13
- package/dist/core/bridge.mjs +4 -4
- package/dist/core/codex-formatter.js +1 -2
- package/dist/core/codex-injector.js +3 -3
- package/dist/core/config-loader.js +1 -2
- package/dist/core/config-paths.js +30 -23
- package/dist/core/context-loader.js +0 -3
- package/dist/core/features-config.js +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/logging-config.js +7 -7
- package/dist/core/orchestrator.js +1 -1
- package/dist/core/xray-activation.js +3 -4
- package/dist/delegation/agent-delegator.js +2 -2
- package/dist/enforcement/enforcer-tools.js +2 -2
- package/dist/enforcement/loaders/codex-loader.js +2 -2
- package/dist/execution/opencode-cli-invoker.js +1 -1
- package/dist/governance/governance-service.js +1 -1
- package/dist/governance/llm-governance-provider.js +14 -1
- package/dist/index.js +3 -5
- package/dist/inference/inference-cycle.js +11 -11
- package/dist/integrations/base/README.md +1 -1
- package/dist/integrations/enforcement-gate.js +2 -2
- package/dist/integrations/governance/index.js +1 -1
- package/dist/integrations/grok/grok-cli.js +20 -6
- package/dist/integrations/grok/hooks/pre-tool-use.js +3 -3
- package/dist/integrations/grok/plugin/0xray/.mcp.json +16 -4
- package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
- package/dist/integrations/hermes-agent/__init__.py +25 -14
- package/dist/integrations/hermes-agent/bridge.mjs +39 -4
- package/dist/integrations/hermes-agent/schemas.py +49 -0
- package/dist/integrations/hermes-agent/test_plugin.py +7 -7
- package/dist/integrations/hermes-agent/tools.py +107 -3
- package/dist/integrations/openclaw/README.md +6 -6
- package/dist/integrations/openclaw/config.js +1 -1
- package/dist/integrations/openclaw/index.js +2 -2
- package/dist/integrations/openclaw/types.js +3 -3
- package/dist/integrations/plugins/plugin-integration.js +1 -1
- package/dist/integrations/plugins/plugin-registry.js +1 -1
- package/dist/mcps/architect-tools.server.js +3 -2
- package/dist/mcps/auto-format.server.js +2 -2
- package/dist/mcps/boot-orchestrator.server.js +2 -2
- package/dist/mcps/config/config-loader.js +40 -9
- package/dist/mcps/enforcer-tools.server.js +2 -2
- package/dist/mcps/estimation.server.js +3 -2
- package/dist/mcps/framework-compliance-audit.server.js +2 -2
- package/dist/mcps/framework-help.server.js +3 -2
- package/dist/mcps/governance.server.js +8 -4
- package/dist/mcps/knowledge-skills/api-design.server.js +3 -2
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +3 -2
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +3 -3
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +2 -2
- package/dist/mcps/knowledge-skills/code-review.server.js +2 -2
- package/dist/mcps/knowledge-skills/content-creator.server.js +3 -3
- package/dist/mcps/knowledge-skills/database-design.server.js +2 -2
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +3 -2
- package/dist/mcps/knowledge-skills/git-workflow.server.js +3 -2
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +3 -3
- package/dist/mcps/knowledge-skills/log-monitor.server.js +3 -3
- package/dist/mcps/knowledge-skills/mobile-development.server.js +3 -3
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +3 -3
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +2 -2
- package/dist/mcps/knowledge-skills/project-analysis.server.js +2 -2
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +3 -2
- package/dist/mcps/knowledge-skills/security-audit.server.js +2 -2
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +3 -2
- package/dist/mcps/knowledge-skills/session-management.server.js +3 -2
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +105 -3
- package/dist/mcps/knowledge-skills/strategist.server.js +3 -3
- package/dist/mcps/knowledge-skills/tech-writer.server.js +3 -3
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js +3 -2
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +2 -2
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +3 -2
- package/dist/mcps/lint.server.js +2 -2
- package/dist/mcps/model-health-check.server.js +3 -2
- package/dist/mcps/orchestrator/server.js +2 -1
- package/dist/mcps/orchestrator.server.js +2 -1
- package/dist/mcps/performance-analysis.server.js +2 -2
- package/dist/mcps/processor-pipeline.server.js +3 -2
- package/dist/mcps/registry.json +1 -1
- package/dist/mcps/researcher.server.js +2 -2
- package/dist/mcps/security-scan.server.js +2 -2
- package/dist/mcps/state-manager.server.js +5 -5
- package/dist/metrics/agent-metrics.js +1 -1
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +2 -2
- package/dist/orchestrator/intelligent-commit-batcher.js +0 -1
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js +1 -1
- package/dist/orchestrator/orchestrator.js +1 -2
- package/dist/orchestrator/universal-registry-bridge.js +1 -1
- package/dist/postprocessor/PostProcessor.js +5 -5
- package/dist/postprocessor/services/RegressionAnalysisService.js +2 -2
- package/dist/postprocessor/triggers/GitHookTrigger.js +4 -4
- package/dist/processors/implementations/inference-improvement-processor.js +0 -1
- package/dist/processors/implementations/publish-preflight-processor.js +0 -1
- package/dist/processors/implementations/session-summary-processor.js +2 -2
- package/dist/processors/implementations/storytelling-trigger-processor.js +0 -1
- 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 +1 -1
- package/dist/skills/api-design/SKILL.md +1 -1
- package/dist/skills/architect-tools/SKILL.md +1 -1
- package/dist/skills/architecture-patterns/SKILL.md +1 -1
- package/dist/skills/auto-format/SKILL.md +1 -1
- package/dist/skills/boot-orchestrator/SKILL.md +1 -1
- package/dist/skills/bug-triage/SKILL.md +1 -1
- package/dist/skills/code-analyzer/SKILL.md +1 -1
- package/dist/skills/code-review/SKILL.md +1 -1
- package/dist/skills/enforcer/SKILL.md +1 -1
- package/dist/skills/framework-compliance-audit/SKILL.md +1 -1
- package/dist/skills/git-workflow/SKILL.md +1 -1
- package/dist/skills/hermes-agent/SKILL.md +2 -2
- package/dist/skills/inference-improve/SKILL.md +1 -1
- package/dist/skills/lint/SKILL.md +1 -1
- package/dist/skills/log-monitor/SKILL.md +1 -1
- package/dist/skills/model-health-check/SKILL.md +1 -1
- package/dist/skills/multimodal-looker/SKILL.md +1 -1
- package/dist/skills/orchestrator/SKILL.md +1 -1
- package/dist/skills/performance-analysis/SKILL.md +1 -1
- package/dist/skills/performance-optimization/SKILL.md +1 -1
- package/dist/skills/processor-pipeline/SKILL.md +1 -1
- package/dist/skills/project-analysis/SKILL.md +1 -1
- package/dist/skills/refactoring-strategies/SKILL.md +1 -1
- package/dist/skills/registry.json +1 -1
- package/dist/skills/researcher/SKILL.md +1 -1
- package/dist/skills/security-audit/SKILL.md +1 -1
- package/dist/skills/security-scan/SKILL.md +1 -1
- package/dist/skills/session-management/SKILL.md +1 -1
- package/dist/skills/state-manager/SKILL.md +1 -1
- package/dist/skills/storyteller/SKILL.md +1 -1
- package/dist/skills/testing-best-practices/SKILL.md +1 -1
- package/dist/skills/testing-strategy/SKILL.md +1 -1
- package/dist/skills/ui-ux-design/SKILL.md +1 -1
- package/dist/state/index.js +0 -1
- package/dist/state/state-manager.js +1 -2
- package/dist/utils/import-resolver.js +1 -1
- package/dist/utils/path-resolver.js +2 -2
- package/package.json +10 -3
- package/scripts/hooks/pre-command +1 -1
- package/scripts/hooks/run-hook.js +2 -2
- package/scripts/node/auto-reflection-generator.mjs +30 -36
- package/scripts/node/govern-reflection.mjs +1 -1
- package/scripts/node/postinstall.cjs +37 -2
- package/scripts/node/setup-xai-oauth.mjs +244 -0
- package/scripts/node/universal-version-manager.js +8 -8
- package/scripts/node/version-manager.mjs +1 -1
- package/src/integrations/grok/plugin/0xray/.mcp.json +16 -4
- package/src/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
- package/src/mcps/architect-tools.server.ts +2 -2
- package/src/mcps/auto-format.server.ts +2 -2
- package/src/mcps/boot-orchestrator.server.ts +2 -2
- package/src/mcps/config/__tests__/config-loader.test.ts +29 -33
- package/src/mcps/config/config-loader.ts +50 -11
- package/src/mcps/enforcer-tools.server.ts +2 -2
- package/src/mcps/estimation.server.ts +3 -2
- package/src/mcps/framework-compliance-audit.server.ts +2 -2
- package/src/mcps/framework-help.server.ts +3 -2
- package/src/mcps/governance.server.ts +8 -3
- package/src/mcps/knowledge-skills/api-design.server.ts +3 -2
- package/src/mcps/knowledge-skills/architecture-patterns.server.ts +2 -2
- package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +2 -2
- package/src/mcps/knowledge-skills/code-analyzer.server.ts +2 -2
- package/src/mcps/knowledge-skills/code-review.server.ts +2 -2
- package/src/mcps/knowledge-skills/content-creator.server.ts +3 -3
- package/src/mcps/knowledge-skills/database-design.server.ts +2 -2
- package/src/mcps/knowledge-skills/devops-deployment.server.ts +3 -2
- package/src/mcps/knowledge-skills/git-workflow.server.ts +3 -2
- package/src/mcps/knowledge-skills/growth-strategist.server.ts +3 -3
- package/src/mcps/knowledge-skills/log-monitor.server.ts +3 -3
- package/src/mcps/knowledge-skills/mobile-development.server.ts +3 -3
- package/src/mcps/knowledge-skills/multimodal-looker.server.ts +3 -3
- package/src/mcps/knowledge-skills/performance-optimization.server.ts +2 -2
- package/src/mcps/knowledge-skills/project-analysis.server.ts +2 -2
- package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +3 -2
- package/src/mcps/knowledge-skills/security-audit.server.ts +2 -2
- package/src/mcps/knowledge-skills/seo-consultant.server.ts +3 -2
- package/src/mcps/knowledge-skills/session-management.server.ts +3 -2
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +113 -3
- package/src/mcps/knowledge-skills/strategist.server.ts +3 -3
- package/src/mcps/knowledge-skills/tech-writer.server.ts +3 -3
- package/src/mcps/knowledge-skills/testing-best-practices.server.ts +3 -2
- package/src/mcps/knowledge-skills/testing-strategy.server.ts +2 -2
- package/src/mcps/knowledge-skills/ui-ux-design.server.ts +3 -2
- package/src/mcps/lint.server.ts +2 -2
- package/src/mcps/model-health-check.server.ts +2 -2
- package/src/mcps/orchestrator/server.ts +2 -1
- package/src/mcps/orchestrator.server.ts +2 -1
- package/src/mcps/performance-analysis.server.ts +2 -2
- package/src/mcps/processor-pipeline.server.ts +3 -2
- package/src/mcps/registry.json +1 -1
- package/src/mcps/researcher.server.ts +2 -2
- package/src/mcps/security-scan.server.ts +2 -2
- package/src/mcps/state-manager.server.ts +5 -5
- package/src/opencode/codex.codex +1 -1
- package/src/opencode/commands/dependency-audit.md +3 -3
- package/src/opencode/commands/summary-logger.md +4 -4
- package/src/opencode/enforcer-config.json +2 -2
- package/src/skills/api-design/SKILL.md +1 -1
- package/src/skills/architect-tools/SKILL.md +1 -1
- package/src/skills/architecture-patterns/SKILL.md +1 -1
- package/src/skills/auto-format/SKILL.md +1 -1
- package/src/skills/boot-orchestrator/SKILL.md +1 -1
- package/src/skills/bug-triage/SKILL.md +1 -1
- package/src/skills/code-analyzer/SKILL.md +1 -1
- package/src/skills/code-review/SKILL.md +1 -1
- package/src/skills/enforcer/SKILL.md +1 -1
- package/src/skills/framework-compliance-audit/SKILL.md +1 -1
- package/src/skills/git-workflow/SKILL.md +1 -1
- package/src/skills/hermes-agent/SKILL.md +2 -2
- package/src/skills/inference-improve/SKILL.md +1 -1
- package/src/skills/lint/SKILL.md +1 -1
- package/src/skills/log-monitor/SKILL.md +1 -1
- package/src/skills/model-health-check/SKILL.md +1 -1
- package/src/skills/multimodal-looker/SKILL.md +1 -1
- package/src/skills/orchestrator/SKILL.md +1 -1
- package/src/skills/performance-analysis/SKILL.md +1 -1
- package/src/skills/performance-optimization/SKILL.md +1 -1
- package/src/skills/processor-pipeline/SKILL.md +1 -1
- package/src/skills/project-analysis/SKILL.md +1 -1
- package/src/skills/refactoring-strategies/SKILL.md +1 -1
- package/src/skills/registry.json +1 -1
- package/src/skills/researcher/SKILL.md +1 -1
- package/src/skills/security-audit/SKILL.md +1 -1
- package/src/skills/security-scan/SKILL.md +1 -1
- package/src/skills/session-management/SKILL.md +1 -1
- package/src/skills/state-manager/SKILL.md +1 -1
- package/src/skills/storyteller/SKILL.md +1 -1
- package/src/skills/testing-best-practices/SKILL.md +1 -1
- package/src/skills/testing-strategy/SKILL.md +1 -1
- package/src/skills/ui-ux-design/SKILL.md +1 -1
- package/xray/agents_template.md +46 -0
- package/xray/codex.json +598 -0
- package/dist/plugin/xray-codex-injection.js +0 -857
- /package/dist/integrations/openclaw/hooks/{strray-hooks.js → xray-hooks.js} +0 -0
package/dist/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# xray — MCP-Centric AI Governance OS
|
|
2
2
|
|
|
3
|
-
**v2.0.0** — 9 agents · 44 skills ·
|
|
3
|
+
**v2.0.0** — 9 agents · 44 skills · 1 MCPs governance servers · 60 codex terms · 2,2500 tests
|
|
4
4
|
|
|
5
5
|
xray is the pure v2 three-subsystem AI orchestration framework, now **MCP-centric** with dedicated skill servers for governance deliberation:
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ The installation seeds YML surfaces and MCP servers. Place agent definitions in
|
|
|
32
32
|
├─────────────────────────────────────────────────┤
|
|
33
33
|
│ External Governance (Dynamo) │
|
|
34
34
|
│ Codex enforcement · Resonance/Isotopic · SSOT │
|
|
35
|
-
│
|
|
35
|
+
│ 1 MCPs skill servers deliberate proposals │
|
|
36
36
|
├─────────────────────────────────────────────────┤
|
|
37
37
|
│ Autonomous Engine (thinDispatch) │
|
|
38
38
|
│ 7-flow MCP · Delegation · Governance gate │
|
|
@@ -94,21 +94,21 @@ Codex enforcement is integrated at every level:
|
|
|
94
94
|
- **60 terms** across categories: core, architecture, testing, performance, security, operations, governance
|
|
95
95
|
- CodexPolicyService — canonical Governance-owned SSOT for Codex loading
|
|
96
96
|
- Pre-governance gate blocks non-compliant proposals before execution
|
|
97
|
-
-
|
|
97
|
+
- 1 MCPs skill servers deliberate each proposal
|
|
98
98
|
- frameworkLogger structured logging throughout (never console.*)
|
|
99
99
|
- Active codex snapshot available via `get_active_codex` MCP tool
|
|
100
100
|
|
|
101
|
-
## Testing (2,
|
|
101
|
+
## Testing (2,2500 tests)
|
|
102
102
|
|
|
103
103
|
| Suite | Status |
|
|
104
104
|
|-------|--------|
|
|
105
105
|
| Unit / Integration | 158 files, all pass |
|
|
106
|
-
| Performance |
|
|
107
|
-
| Infrastructure |
|
|
106
|
+
| Performance | 2500 tests, all pass |
|
|
107
|
+
| Infrastructure | 2500 tests, all pass |
|
|
108
108
|
| Consumer E2E | 4 platforms, all pass |
|
|
109
109
|
| OpenCode E2E | 42/42 solo, 34/34 orchestrator, all pass |
|
|
110
|
-
| OpenClaw E2E |
|
|
111
|
-
| Hermes E2E |
|
|
110
|
+
| OpenClaw E2E | 2500 tests, all pass |
|
|
111
|
+
| Hermes E2E | 2500 tests, all pass |
|
|
112
112
|
| Grok CLI E2E | 60/60 solo, 59/59 orchestrator, all pass |
|
|
113
113
|
|
|
114
114
|
## Release
|
package/dist/SKILLS.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# 0xray Skills
|
|
2
|
+
|
|
3
|
+
xray ships **46 skills** that provide domain expertise across the full software lifecycle. Skills are loaded on demand and invoked via MCP servers, agents, or direct API.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Governance & Compliance
|
|
8
|
+
|
|
9
|
+
| Skill | Agent | Description |
|
|
10
|
+
|-------|-------|-------------|
|
|
11
|
+
| `code-review` | @code-reviewer | Proposal quality, code analysis, best practices |
|
|
12
|
+
| `security-audit` | @security-auditor | Vulnerability detection, threat modeling |
|
|
13
|
+
| `security-scan` | — | Security vulnerability scanning and assessment |
|
|
14
|
+
| `enforcer` | @enforcer | Codex compliance validation and error prevention |
|
|
15
|
+
| `framework-compliance-audit` | — | Framework compliance auditing and validation |
|
|
16
|
+
|
|
17
|
+
## Architecture & Design
|
|
18
|
+
|
|
19
|
+
| Skill | Agent | Description |
|
|
20
|
+
|-------|-------|-------------|
|
|
21
|
+
| `architect-tools` | — | System design and technical architecture tools |
|
|
22
|
+
| `architecture-patterns` | — | Software architecture patterns and best practices |
|
|
23
|
+
| `api-design` | — | RESTful API design and validation |
|
|
24
|
+
| `database-engineer` | — | SQL/NoSQL schema design, query optimization, migrations |
|
|
25
|
+
| `state-manager` | — | Application state management and persistence |
|
|
26
|
+
| `session-management` | — | Manage user sessions and persistent state |
|
|
27
|
+
|
|
28
|
+
## Engineering
|
|
29
|
+
|
|
30
|
+
| Skill | Agent | Description |
|
|
31
|
+
|-------|-------|-------------|
|
|
32
|
+
| `backend-engineer` | — | REST/GraphQL APIs, microservices, auth, server architecture |
|
|
33
|
+
| `frontend-engineer` | — | React/Vue/Angular/Svelte, responsive design, accessibility |
|
|
34
|
+
| `frontend-ui-ux-engineer` | — | Visual design, CSS systems, accessibility, UX |
|
|
35
|
+
| `mobile-developer` | — | iOS (Swift/SwiftUI), Android (Kotlin/Compose), RN, Flutter |
|
|
36
|
+
| `devops-engineer` | — | CI/CD, IaaC, containers, cloud deployment, reliability |
|
|
37
|
+
|
|
38
|
+
## Code Quality & Analysis
|
|
39
|
+
|
|
40
|
+
| Skill | Agent | Description |
|
|
41
|
+
|-------|-------|-------------|
|
|
42
|
+
| `code-analyzer` | — | Deep code analysis, metrics extraction, pattern detection |
|
|
43
|
+
| `project-analysis` | — | Analyze project structure, complexity, and health metrics |
|
|
44
|
+
| `lint` | — | Code linting and static analysis |
|
|
45
|
+
| `auto-format` | — | Automated code formatting and style consistency |
|
|
46
|
+
| `refactoring-strategies` | @refactorer | Code refactoring techniques and strategies |
|
|
47
|
+
|
|
48
|
+
## Testing
|
|
49
|
+
|
|
50
|
+
| Skill | Agent | Description |
|
|
51
|
+
|-------|-------|-------------|
|
|
52
|
+
| `testing-strategy` | @testing-lead | Comprehensive testing strategies and coverage |
|
|
53
|
+
| `testing-best-practices` | — | Testing best practices and patterns |
|
|
54
|
+
|
|
55
|
+
## Performance
|
|
56
|
+
|
|
57
|
+
| Skill | Agent | Description |
|
|
58
|
+
|-------|-------|-------------|
|
|
59
|
+
| `performance-analysis` | — | System performance analysis and optimization |
|
|
60
|
+
| `performance-engineer` | — | Profiling, benchmarking, load testing, optimization |
|
|
61
|
+
| `performance-optimization` | — | Application performance optimization and tuning |
|
|
62
|
+
|
|
63
|
+
## Debugging & Monitoring
|
|
64
|
+
|
|
65
|
+
| Skill | Agent | Description |
|
|
66
|
+
|-------|-------|-------------|
|
|
67
|
+
| `bug-triage` | @bug-triage-specialist | Bug triage, debugging analysis, issue prioritization |
|
|
68
|
+
| `log-monitor` | — | Log analysis, pattern detection, alerting |
|
|
69
|
+
| `model-health-check` | — | AI model health monitoring and diagnostics |
|
|
70
|
+
|
|
71
|
+
## Orchestration & Workflow
|
|
72
|
+
|
|
73
|
+
| Skill | Agent | Description |
|
|
74
|
+
|-------|-------|-------------|
|
|
75
|
+
| `orchestrator` | @orchestrator | Multi-agent workflow coordination and task delegation |
|
|
76
|
+
| `xray-orchestrator` | — | Main orchestration skill for xray agents |
|
|
77
|
+
| `processor-pipeline` | — | Data processing pipeline management |
|
|
78
|
+
| `boot-orchestrator` | — | Framework initialization and boot orchestration |
|
|
79
|
+
|
|
80
|
+
## Research & Content
|
|
81
|
+
|
|
82
|
+
| Skill | Agent | Description |
|
|
83
|
+
|-------|-------|-------------|
|
|
84
|
+
| `researcher` | @researcher | Codebase exploration, implementation lookup |
|
|
85
|
+
| `content-creator` | — | Marketing copy, technical docs, blog posts, social media |
|
|
86
|
+
| `tech-writer` | — | API docs, READMEs, ADRs, changelogs, DX |
|
|
87
|
+
| `storyteller` | — | Deep narrative reflections, sagas, technical stories |
|
|
88
|
+
| `seo-consultant` | — | Technical SEO, schema markup, Core Web Vitals |
|
|
89
|
+
| `growth-strategist` | — | Campaign strategy, market analysis, brand positioning |
|
|
90
|
+
|
|
91
|
+
## UX & Design
|
|
92
|
+
|
|
93
|
+
| Skill | Agent | Description |
|
|
94
|
+
|-------|-------|-------------|
|
|
95
|
+
| `ui-ux-design` | — | Mobile-first, cognitive simplicity, accessibility-first |
|
|
96
|
+
| `multimodal-looker` | — | Visual content analysis for diagrams, screenshots, UI mockups |
|
|
97
|
+
|
|
98
|
+
## Strategy
|
|
99
|
+
|
|
100
|
+
| Skill | Agent | Description |
|
|
101
|
+
|-------|-------|-------------|
|
|
102
|
+
| `strategist` | @strategist | Strategic guidance, architectural decisions, risk analysis |
|
|
103
|
+
| `inference-improve` | — | Autonomous inference improvement through collaborative analysis |
|
|
104
|
+
|
|
105
|
+
## Git & Workflow
|
|
106
|
+
|
|
107
|
+
| Skill | Agent | Description |
|
|
108
|
+
|-------|-------|-------------|
|
|
109
|
+
| `git-workflow` | — | Git workflow management and collaboration tools |
|
|
110
|
+
|
|
111
|
+
## Integration
|
|
112
|
+
|
|
113
|
+
| Skill | Agent | Description |
|
|
114
|
+
|-------|-------|-------------|
|
|
115
|
+
| `hermes-agent` | — | Manage xray from Hermes Agent via native plugin |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Invoking Skills
|
|
120
|
+
|
|
121
|
+
Skills are invoked automatically by agents or via MCP:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Via agent mention (in any chat)
|
|
125
|
+
@code-reviewer review this PR
|
|
126
|
+
|
|
127
|
+
# Via MCP tool call
|
|
128
|
+
npx xray mcp call code-review analyze_code_quality --args '{"path": "src/"}'
|
|
129
|
+
|
|
130
|
+
# Via direct agent
|
|
131
|
+
npx xray agent run @refactorer "optimize src/core/"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Skill Locations
|
|
135
|
+
|
|
136
|
+
Each skill has a `SKILL.md` with full reference:
|
|
137
|
+
|
|
138
|
+
- **Source**: `src/skills/<name>/SKILL.md`
|
|
139
|
+
- **Consumer**: `node_modules/0xray/dist/skills/<name>/SKILL.md`
|
|
140
|
+
- **Opend**: `.opencode/skills/<name>/SKILL.md` (copied on `npx xray setup`)
|
package/dist/agents/index.js
CHANGED
|
@@ -19,6 +19,7 @@ import { performanceEngineer } from "./performance-engineer.js";
|
|
|
19
19
|
import { seoConsultant } from "./seo-consultant.js";
|
|
20
20
|
import { strategist } from "./strategist.js";
|
|
21
21
|
import { techWriter } from "./tech-writer.js";
|
|
22
|
+
import { multimodalLooker } from "./multimodal-looker.js";
|
|
22
23
|
export const builtinAgents = {
|
|
23
24
|
architect,
|
|
24
25
|
"bug-triage-specialist": bugTriageSpecialist,
|
|
@@ -41,5 +42,6 @@ export const builtinAgents = {
|
|
|
41
42
|
"seo-consultant": seoConsultant,
|
|
42
43
|
strategist,
|
|
43
44
|
"tech-writer": techWriter,
|
|
45
|
+
"multimodal-looker": multimodalLooker,
|
|
44
46
|
};
|
|
45
|
-
export { architect, bugTriageSpecialist, codeReviewer, securityAuditor, refactorer, testingLead, logMonitor, researcher, codeAnalyzer, backendEngineer, contentCreator, databaseEngineer, devopsEngineer, frontendEngineer, frontendUiUxEngineer, growthStrategist, mobileDeveloper, performanceEngineer, seoConsultant, strategist, techWriter, };
|
|
47
|
+
export { architect, bugTriageSpecialist, codeReviewer, securityAuditor, refactorer, testingLead, logMonitor, researcher, codeAnalyzer, backendEngineer, contentCreator, databaseEngineer, devopsEngineer, frontendEngineer, frontendUiUxEngineer, growthStrategist, mobileDeveloper, performanceEngineer, seoConsultant, strategist, techWriter, multimodalLooker, };
|
package/dist/agents/registry.js
CHANGED
|
@@ -285,6 +285,19 @@ export const AGENT_REGISTRY = {
|
|
|
285
285
|
performance: 85,
|
|
286
286
|
expertise: "technical documentation and writing",
|
|
287
287
|
},
|
|
288
|
+
"multimodal-looker": {
|
|
289
|
+
name: "multimodal-looker",
|
|
290
|
+
description: "Visual content analysis for images, diagrams, PDFs, and screenshots",
|
|
291
|
+
capabilities: ["visual-analysis", "image-processing", "document-analysis", "multimodal-data-processing"],
|
|
292
|
+
capacity: 60,
|
|
293
|
+
specialties: ["image", "visual", "diagram", "screenshot", "pdf"],
|
|
294
|
+
mode: "subagent",
|
|
295
|
+
maxComplexity: 35,
|
|
296
|
+
concurrentTasks: 2,
|
|
297
|
+
status: "active",
|
|
298
|
+
performance: 80,
|
|
299
|
+
expertise: "multimodal content analysis and interpretation",
|
|
300
|
+
},
|
|
288
301
|
};
|
|
289
302
|
export function getActiveAgents() {
|
|
290
303
|
return Object.values(AGENT_REGISTRY)
|
|
@@ -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: "1.
|
|
39
|
+
version: "3.1.0",
|
|
40
40
|
generatedAt: new Date(),
|
|
41
41
|
summary: {
|
|
42
42
|
newMappings: newMappings.length,
|
|
@@ -20,17 +20,17 @@ export async function verifyArchitecturalIntegrity() {
|
|
|
20
20
|
const issues = [];
|
|
21
21
|
const recommendations = [];
|
|
22
22
|
// Check state manager
|
|
23
|
-
const stateManager = globalThis.
|
|
23
|
+
const stateManager = globalThis.xrayStateManager;
|
|
24
24
|
if (!stateManager) {
|
|
25
25
|
issues.push("State manager not initialized");
|
|
26
26
|
recommendations.push("Ensure boot orchestrator runs before framework activation");
|
|
27
27
|
}
|
|
28
|
-
const postProcessor = globalThis.
|
|
28
|
+
const postProcessor = globalThis.xrayPostProcessor;
|
|
29
29
|
if (!postProcessor) {
|
|
30
30
|
issues.push("Post-processor not activated");
|
|
31
31
|
recommendations.push("Add post-processor activation to xray-activation.ts");
|
|
32
32
|
}
|
|
33
|
-
const codexInjector = globalThis.
|
|
33
|
+
const codexInjector = globalThis.xrayCodexInjector;
|
|
34
34
|
if (!codexInjector) {
|
|
35
35
|
issues.push("Codex injector not initialized");
|
|
36
36
|
recommendations.push("Ensure codex injection is active in plugin context");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Consumer runtime compat shim from prior
|
|
1
|
+
// Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + .xray fallbacks)
|
|
2
2
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
3
3
|
import crypto from "crypto";
|
|
4
4
|
export class XrayPerformanceBenchmark {
|
|
@@ -371,4 +371,3 @@ export class XrayPerformanceBenchmark {
|
|
|
371
371
|
// Export singleton instance
|
|
372
372
|
export const performanceBenchmark = new XrayPerformanceBenchmark();
|
|
373
373
|
// Backward compat alias
|
|
374
|
-
export { XrayPerformanceBenchmark as StringRayPerformanceBenchmark };
|
|
@@ -10,30 +10,30 @@ import { join } from "path";
|
|
|
10
10
|
import { getConfigDir } from "../../core/config-paths.js";
|
|
11
11
|
function getSkillsFromSkills(cwd) {
|
|
12
12
|
const skills = [];
|
|
13
|
-
const skillsPath
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return existsSync(skillPath);
|
|
20
|
-
});
|
|
21
|
-
for (const dir of dirs) {
|
|
22
|
-
const skillPath = join(skillsPath, dir, "SKILL.md");
|
|
23
|
-
const content = readFileSync(skillPath, "utf-8");
|
|
24
|
-
const sourceMatch = content.match(/^source:\s*(.+)/m);
|
|
25
|
-
const sourceNameMatch = content.match(/^source_name:\s*(.+)/m);
|
|
26
|
-
const licenseMatch = content.match(/License:\s*(.+)/m);
|
|
27
|
-
const rawName = dir.includes("--") ? dir.split("--").slice(1).join("--") : dir;
|
|
28
|
-
const communitySource = sourceNameMatch ? sourceNameMatch[1].trim() : null;
|
|
29
|
-
skills.push({
|
|
30
|
-
name: rawName,
|
|
31
|
-
source: sourceMatch && sourceMatch[1] ? sourceMatch[1].trim() : "custom",
|
|
32
|
-
communitySource,
|
|
33
|
-
license: licenseMatch ? licenseMatch[1].trim() : "unknown",
|
|
34
|
-
category: extractCategory(content),
|
|
35
|
-
path: skillPath,
|
|
13
|
+
for (const skillsPath of [join(getConfigDir(cwd), "skills"), join(cwd, ".opencode", "skills")]) {
|
|
14
|
+
if (!existsSync(skillsPath))
|
|
15
|
+
continue;
|
|
16
|
+
const dirs = readdirSync(skillsPath).filter((f) => {
|
|
17
|
+
const skillPath = join(skillsPath, f, "SKILL.md");
|
|
18
|
+
return existsSync(skillPath);
|
|
36
19
|
});
|
|
20
|
+
for (const dir of dirs) {
|
|
21
|
+
const skillPath = join(skillsPath, dir, "SKILL.md");
|
|
22
|
+
const content = readFileSync(skillPath, "utf-8");
|
|
23
|
+
const sourceMatch = content.match(/^source:\s*(.+)/m);
|
|
24
|
+
const sourceNameMatch = content.match(/^source_name:\s*(.+)/m);
|
|
25
|
+
const licenseMatch = content.match(/License:\s*(.+)/m);
|
|
26
|
+
const rawName = dir.includes("--") ? dir.split("--").slice(1).join("--") : dir;
|
|
27
|
+
const communitySource = sourceNameMatch ? sourceNameMatch[1].trim() : null;
|
|
28
|
+
skills.push({
|
|
29
|
+
name: rawName,
|
|
30
|
+
source: sourceMatch && sourceMatch[1] ? sourceMatch[1].trim() : "custom",
|
|
31
|
+
communitySource,
|
|
32
|
+
license: licenseMatch ? licenseMatch[1].trim() : "unknown",
|
|
33
|
+
category: extractCategory(content),
|
|
34
|
+
path: skillPath,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
37
|
}
|
|
38
38
|
return skills;
|
|
39
39
|
}
|
|
@@ -60,7 +60,7 @@ function showNotImplemented() {
|
|
|
60
60
|
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
|
|
61
61
|
console.log("");
|
|
62
62
|
console.log("💡 To be notified when this feature is available:");
|
|
63
|
-
console.log(" Track the evolution spec at docs/roadmap/
|
|
63
|
+
console.log(" Track the evolution spec at docs/roadmap/XRAY_EVOLUTION_SPEC.md");
|
|
64
64
|
console.log("");
|
|
65
65
|
console.log("🔜 Roadmap: Phase 3 (Polishing & Release)");
|
|
66
66
|
console.log("");
|
|
@@ -2,6 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { homedir } from 'os';
|
|
4
4
|
import { frameworkLogger } from '../../core/framework-logger.js';
|
|
5
|
+
import { syncBuiltinSkills } from './skill-install.js';
|
|
5
6
|
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
6
7
|
export function registerHermesCommands(hermesCmd) {
|
|
7
8
|
hermesCmd
|
|
@@ -49,6 +50,13 @@ async function installForHermes(options = {}) {
|
|
|
49
50
|
}
|
|
50
51
|
frameworkLogger.log('hermes-integration', 'plugin-copied', 'info', { destination: targetPluginDir });
|
|
51
52
|
console.log(`\x1b[32m✓ Copied Hermes plugin to ${targetPluginDir}\x1b[0m`);
|
|
53
|
+
// Sync builtin skills to Hermes plugin skills dir
|
|
54
|
+
const hermesSkillsDir = path.join(targetPluginDir, 'skills');
|
|
55
|
+
const skillsCopied = syncBuiltinSkills(hermesSkillsDir);
|
|
56
|
+
if (skillsCopied > 0) {
|
|
57
|
+
console.log(`\x1b[32m✓ Synced ${skillsCopied} builtin skills to Hermes plugin\x1b[0m`);
|
|
58
|
+
}
|
|
59
|
+
frameworkLogger.log('hermes-integration', 'skills-synced', 'info', { count: skillsCopied });
|
|
52
60
|
// Write after-install instructions
|
|
53
61
|
const afterInstallPath = path.join(targetPluginDir, 'after-install.md');
|
|
54
62
|
if (fs.existsSync(afterInstallPath)) {
|
|
@@ -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(), ".
|
|
6
|
+
return join(process.cwd(), ".xray", "mcp-registry.json");
|
|
7
7
|
}
|
|
8
8
|
function getBundledMCPRegistry() {
|
|
9
9
|
const paths = [
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
import { homedir } from 'os';
|
|
3
4
|
import { frameworkLogger } from '../../core/framework-logger.js';
|
|
5
|
+
import { syncBuiltinSkills } from './skill-install.js';
|
|
4
6
|
import { OpenClawConfigLoader } from '../../integrations/openclaw/config.js';
|
|
5
7
|
export function registerOpenClawCommands(openclawCmd) {
|
|
6
8
|
openclawCmd
|
|
@@ -29,6 +31,13 @@ async function installForOpenClaw(options = {}) {
|
|
|
29
31
|
loader.createSampleConfig();
|
|
30
32
|
const relative = path.relative(process.cwd(), configPath);
|
|
31
33
|
console.log(`\x1b[32m✓ Created OpenClaw config at ${relative}\x1b[0m`);
|
|
34
|
+
// Sync builtin skills to ~/.openclaw/skills/
|
|
35
|
+
const openclawSkillsDir = path.join(homedir(), '.openclaw', 'skills');
|
|
36
|
+
const skillsCopied = syncBuiltinSkills(openclawSkillsDir);
|
|
37
|
+
if (skillsCopied > 0) {
|
|
38
|
+
console.log(`\x1b[32m✓ Synced ${skillsCopied} builtin skills to ~/.openclaw/skills/\x1b[0m`);
|
|
39
|
+
}
|
|
40
|
+
frameworkLogger.log('openclaw-integration', 'skills-synced', 'info', { count: skillsCopied });
|
|
32
41
|
console.log('\n✅ 0xRay OpenClaw integration configured!');
|
|
33
42
|
console.log('Edit the config file to set your gateway URL, auth token, and device ID.');
|
|
34
43
|
console.log('');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { frameworkLogger } from '../../core/framework-logger.js';
|
|
4
|
+
import { syncBuiltinSkills } from './skill-install.js';
|
|
4
5
|
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
5
6
|
export function registerOpencodeCommands(opencodeCmd) {
|
|
6
7
|
opencodeCmd
|
|
@@ -80,6 +81,20 @@ async function installForOpencode(options = {}) {
|
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
83
|
try {
|
|
84
|
+
// Auto-create package.json if missing (OpenCode requires it)
|
|
85
|
+
const consumerPkgPath = path.join(process.cwd(), 'package.json');
|
|
86
|
+
if (!fs.existsSync(consumerPkgPath)) {
|
|
87
|
+
const pkg = {
|
|
88
|
+
name: path.basename(process.cwd()),
|
|
89
|
+
version: '1.0.0',
|
|
90
|
+
private: true,
|
|
91
|
+
dependencies: {
|
|
92
|
+
'0xray': '*',
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
fs.writeFileSync(consumerPkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
96
|
+
console.log(`\x1b[32m✓ Created package.json with 0xray dependency\x1b[0m`);
|
|
97
|
+
}
|
|
83
98
|
if (fs.existsSync(opencodeDest) && !options.force) {
|
|
84
99
|
console.log('[Opencode] .opencode/ directory already exists.');
|
|
85
100
|
console.log('Use --force to reinstall.');
|
|
@@ -87,6 +102,13 @@ async function installForOpencode(options = {}) {
|
|
|
87
102
|
}
|
|
88
103
|
copyDir(opencodeSource, opencodeDest);
|
|
89
104
|
frameworkLogger.log('opencode-integration', 'opencode-copied', 'info', { destination: opencodeDest });
|
|
105
|
+
// Sync builtin skills to .opencode/skills/
|
|
106
|
+
const opencodeSkillsDir = path.join(opencodeDest, 'skills');
|
|
107
|
+
const skillsCopied = syncBuiltinSkills(opencodeSkillsDir);
|
|
108
|
+
if (skillsCopied > 0) {
|
|
109
|
+
console.log(`\x1b[32m✓ Synced ${skillsCopied} builtin skills to .opencode/skills/\x1b[0m`);
|
|
110
|
+
}
|
|
111
|
+
frameworkLogger.log('opencode-integration', 'skills-synced', 'info', { count: skillsCopied });
|
|
90
112
|
console.log(`\x1b[32m✓ Copied OpenCode config to .opencode/\x1b[0m`);
|
|
91
113
|
console.log('\n✅ 0xRay OpenCode plugin installed!');
|
|
92
114
|
console.log('Restart OpenCode or run `opencode` to load the plugin.');
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, cpSync, rmSync, statSync, unlinkSync } from "fs";
|
|
1
|
+
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, cpSync, rmSync, statSync, unlinkSync, copyFileSync } from "fs";
|
|
2
2
|
import { join, basename, dirname } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
3
4
|
import { execSync } from "child_process";
|
|
4
5
|
function getLocalRegistryPath() {
|
|
5
|
-
return join(process.cwd(), ".
|
|
6
|
+
return join(process.cwd(), ".xray", "skill-registry.json");
|
|
6
7
|
}
|
|
7
8
|
function getBundledRegistry() {
|
|
8
9
|
const paths = [
|
|
@@ -479,3 +480,39 @@ export async function skillRegistryCommand(action, args) {
|
|
|
479
480
|
console.log(` Unknown action: ${action}`);
|
|
480
481
|
console.log(" Usage: npx 0xray skill:registry [list|add|remove]");
|
|
481
482
|
}
|
|
483
|
+
// ── Cross-platform builtin skill sync ────────────────────────────────
|
|
484
|
+
// Each platform's install command calls this to copy framework skills.
|
|
485
|
+
export function syncBuiltinSkills(targetSkillsDir, packageRoot) {
|
|
486
|
+
const root = packageRoot ?? join(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
|
|
487
|
+
const candidateDirs = [
|
|
488
|
+
join(root, "dist", "skills"),
|
|
489
|
+
join(root, "src", "skills"),
|
|
490
|
+
];
|
|
491
|
+
const sourceDir = candidateDirs.find(existsSync);
|
|
492
|
+
if (!sourceDir)
|
|
493
|
+
return 0;
|
|
494
|
+
let copied = 0;
|
|
495
|
+
try {
|
|
496
|
+
if (!existsSync(targetSkillsDir))
|
|
497
|
+
mkdirSync(targetSkillsDir, { recursive: true });
|
|
498
|
+
for (const entry of readdirSync(sourceDir, { withFileTypes: true })) {
|
|
499
|
+
if (!entry.isDirectory())
|
|
500
|
+
continue;
|
|
501
|
+
const skillMd = join(sourceDir, entry.name, "SKILL.md");
|
|
502
|
+
if (!existsSync(skillMd))
|
|
503
|
+
continue;
|
|
504
|
+
const destMd = join(targetSkillsDir, entry.name, "SKILL.md");
|
|
505
|
+
const destDir = dirname(destMd);
|
|
506
|
+
if (!existsSync(destDir))
|
|
507
|
+
mkdirSync(destDir, { recursive: true });
|
|
508
|
+
if (existsSync(destMd) && statSync(skillMd).mtime <= statSync(destMd).mtime)
|
|
509
|
+
continue;
|
|
510
|
+
copyFileSync(skillMd, destMd);
|
|
511
|
+
copied++;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
catch {
|
|
515
|
+
// best-effort
|
|
516
|
+
}
|
|
517
|
+
return copied;
|
|
518
|
+
}
|
|
@@ -26,6 +26,11 @@ function getSkillsList(cwd) {
|
|
|
26
26
|
const skillDirs = readdirSync(skillsPath).filter((f) => existsSync(join(skillsPath, f, "SKILL.md")));
|
|
27
27
|
skills.push(...skillDirs);
|
|
28
28
|
}
|
|
29
|
+
const opencodeSkillsPath = join(cwd, ".opencode", "skills");
|
|
30
|
+
if (existsSync(opencodeSkillsPath)) {
|
|
31
|
+
const skillDirs = readdirSync(opencodeSkillsPath).filter((f) => existsSync(join(opencodeSkillsPath, f, "SKILL.md")));
|
|
32
|
+
skills.push(...skillDirs);
|
|
33
|
+
}
|
|
29
34
|
const uniqueSkills = [...new Set(skills)];
|
|
30
35
|
return { count: uniqueSkills.length, names: uniqueSkills.sort() };
|
|
31
36
|
}
|
|
@@ -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", "strray", "features.json"),
|
|
20
19
|
join(cwd, ".xray", "features.json"),
|
|
20
|
+
join(cwd, ".opencode", "xray", "features.json"),
|
|
21
21
|
];
|
|
22
22
|
for (const path of candidates) {
|
|
23
23
|
if (existsSync(path)) {
|
package/dist/cli/index.js
CHANGED
|
@@ -453,14 +453,14 @@ program
|
|
|
453
453
|
// Check configuration - check for opencode.json or .xray/ (min compat .xray/ fallback for prior 0xRay 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 configDirExists = fs.existsSync(
|
|
458
|
+
const configDirExists = fs.existsSync(xrayDir);
|
|
459
459
|
if (opencodeExists) {
|
|
460
460
|
console.log("✅ opencode configuration found");
|
|
461
461
|
}
|
|
462
462
|
else if (configDirExists) {
|
|
463
|
-
console.log(`✅ Configuration directory found: ${
|
|
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)");
|
|
@@ -865,15 +865,20 @@ program
|
|
|
865
865
|
program
|
|
866
866
|
.command('mcp')
|
|
867
867
|
.description('Run an MCP server subprocess (used by Grok/OpenCode .mcp.json)')
|
|
868
|
-
.argument('<server>', 'Server name: governance
|
|
868
|
+
.argument('<server>', 'Server name: governance, skills, researcher, code-review, architect-tools, enforcer, orchestrator')
|
|
869
869
|
.action(async (server) => {
|
|
870
870
|
const serverMap = {
|
|
871
871
|
governance: 'dist/mcps/governance.server.js',
|
|
872
872
|
skills: 'dist/mcps/knowledge-skills/skill-invocation.server.js',
|
|
873
|
+
researcher: 'dist/mcps/researcher.server.js',
|
|
874
|
+
'code-review': 'dist/mcps/knowledge-skills/code-review.server.js',
|
|
875
|
+
'architect-tools': 'dist/mcps/architect-tools.server.js',
|
|
876
|
+
enforcer: 'dist/mcps/enforcer-tools.server.js',
|
|
877
|
+
orchestrator: 'dist/mcps/orchestrator.server.js',
|
|
873
878
|
};
|
|
874
879
|
const relPath = serverMap[server];
|
|
875
880
|
if (!relPath) {
|
|
876
|
-
console.error(`Unknown MCP server: ${server}. Use: governance, skills`);
|
|
881
|
+
console.error(`Unknown MCP server: ${server}. Use: governance, skills, researcher, code-review, architect-tools, enforcer, orchestrator`);
|
|
877
882
|
process.exit(1);
|
|
878
883
|
}
|
|
879
884
|
const serverPath = resolve(join(packageRoot, relPath));
|
|
@@ -883,7 +888,8 @@ program
|
|
|
883
888
|
}
|
|
884
889
|
const env = { ...process.env };
|
|
885
890
|
if (server === 'governance') {
|
|
886
|
-
env.
|
|
891
|
+
env.XRAY_FORCE_MCP_GOVERNANCE = 'true';
|
|
892
|
+
env.XRAY_FORCE_MCP_GOVERNANCE = 'true';
|
|
887
893
|
}
|
|
888
894
|
const child = spawn(process.execPath, [serverPath], { stdio: 'inherit', env });
|
|
889
895
|
child.on('exit', (code) => process.exit(code ?? 0));
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* - Test results
|
|
10
10
|
*
|
|
11
11
|
* Enable/Disable via:
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* XRAY_ACTIVITY_LOGGING=true (enable)
|
|
13
|
+
* XRAY_ACTIVITY_LOGGING=false (disable, default)
|
|
14
14
|
*
|
|
15
15
|
* @module core/activity-logger
|
|
16
16
|
* @version 1.0.0
|
|
@@ -21,7 +21,7 @@ import * as zlib from "zlib";
|
|
|
21
21
|
import { frameworkLogger } from "./framework-logger.js";
|
|
22
22
|
const MAX_LOG_SIZE_BYTES = 5 * 1024 * 1024; // 5MB before rotation
|
|
23
23
|
// Global state
|
|
24
|
-
let activityLoggerEnabled = process.env.
|
|
24
|
+
let activityLoggerEnabled = process.env.XRAY_ACTIVITY_LOGGING !== "false";
|
|
25
25
|
let activityLogPath;
|
|
26
26
|
let sessionId;
|
|
27
27
|
let sessionStartTime;
|
|
@@ -184,7 +184,7 @@ export function logActivity(category, level, action, message, details, options)
|
|
|
184
184
|
// Write to report JSON
|
|
185
185
|
writeToReportFile(record);
|
|
186
186
|
// Console output for debug mode
|
|
187
|
-
if (process.env.
|
|
187
|
+
if (process.env.XRAY_ACTIVITY_CONSOLE === "true") {
|
|
188
188
|
frameworkLogger.log("activity-logger", "console-output", "info", { message: `[${record.timestamp}] [${record.category}] ${level.toUpperCase()}: ${message}`, details: details || "" });
|
|
189
189
|
}
|
|
190
190
|
}
|
|
@@ -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 0xRay
|
|
5
5
|
* (OpenCode, Hermes, or any other MCP-compatible host).
|
|
6
6
|
*
|
|
7
7
|
* Purpose:
|