0xray 3.0.14 → 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 +10 -4
- package/.plugin/plugin.json +11 -0
- package/AGENTS-consumer.md +46 -0
- package/AGENTS.md +10 -10
- package/LICENSE +1 -1
- package/README.md +8 -8
- package/SKILLS.md +140 -0
- package/dist/.gitignore.default +59 -0
- package/dist/AGENTS.md +10 -10
- package/dist/CHANGELOG.md +34 -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 +4 -3
- 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 +12 -4
- package/dist/cli/commands/mcp-install.js +1 -1
- package/dist/cli/commands/openclaw-install.js +10 -1
- package/dist/cli/commands/opencode-install.js +22 -0
- 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 +39 -2
- package/dist/cli/commands/status.js +8 -3
- package/dist/cli/commands/storyteller.js +2 -2
- package/dist/cli/index.js +17 -11
- package/dist/cli/server.js +4 -4
- package/dist/core/activity-logger.js +4 -4
- package/dist/core/agent-spawn-gate.js +1 -1
- package/dist/core/boot-orchestrator.js +30 -31
- package/dist/core/bridge.mjs +26 -26
- package/dist/core/codex-formatter.js +2 -3
- package/dist/core/codex-injector.js +7 -7
- package/dist/core/config-loader.js +3 -2
- package/dist/core/config-paths.js +38 -31
- package/dist/core/context-loader.js +5 -5
- 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 +2 -2
- package/dist/core/system-prompt-generator.js +2 -2
- package/dist/core/xray-activation.js +42 -41
- package/dist/delegation/agent-delegator.js +3 -3
- package/dist/enforcement/enforcer-tools.js +4 -4
- 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 +223 -0
- package/dist/index.js +6 -6
- package/dist/inference/deploy-verifier.js +1 -1
- package/dist/inference/inference-cycle.js +16 -16
- 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 +90 -79
- package/dist/integrations/hermes-agent/after-install.md +14 -14
- package/dist/integrations/hermes-agent/bridge.mjs +60 -25
- package/dist/integrations/hermes-agent/plugin.yaml +5 -5
- package/dist/integrations/hermes-agent/schemas.py +61 -12
- package/dist/integrations/hermes-agent/test_plugin.py +124 -124
- package/dist/integrations/hermes-agent/tools.py +129 -25
- 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 +3 -3
- 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/config/server-config-registry.js +10 -10
- package/dist/mcps/connection/mcp-connection.js +1 -1
- 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 +9 -8
- 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 +14 -39
- 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 +14 -44
- 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 +5 -4
- package/dist/mcps/lint.server.js +4 -4
- package/dist/mcps/mcp-client.js +5 -5
- package/dist/mcps/model-health-check.server.js +3 -2
- package/dist/mcps/orchestrator/server.js +4 -3
- 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 +14 -39
- package/dist/mcps/security-scan.server.js +2 -2
- package/dist/mcps/simulation/server-simulations.js +3 -3
- 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 +4 -4
- package/dist/orchestrator/intelligent-commit-batcher.js +2 -3
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js +9 -9
- package/dist/orchestrator/orchestrator.js +9 -8
- package/dist/orchestrator/universal-registry-bridge.js +4 -4
- package/dist/postprocessor/PostProcessor.js +9 -9
- package/dist/postprocessor/services/RegressionAnalysisService.js +4 -4
- package/dist/postprocessor/triggers/GitHookTrigger.js +18 -18
- package/dist/processors/implementations/agents-md-validation-processor.js +2 -2
- package/dist/processors/implementations/inference-improvement-processor.js +1 -2
- package/dist/processors/implementations/log-protection-processor.js +2 -2
- package/dist/processors/implementations/publish-preflight-processor.js +2 -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 +1 -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 +4 -4
- package/dist/scripts/pre-command +1 -1
- package/dist/services/inference-tuner.js +2 -2
- 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 +42 -42
- 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 +1 -1
- package/dist/state/state-manager.js +3 -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 +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/pre-publish-guard.js +13 -9
- 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/__tests__/server-config-registry.test.ts +12 -12
- package/src/mcps/config/config-loader.ts +50 -11
- package/src/mcps/config/server-config-registry.ts +10 -10
- package/src/mcps/connection/mcp-connection.ts +1 -1
- 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 +9 -8
- 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 +21 -36
- 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 +21 -40
- 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 +5 -4
- package/src/mcps/lint.server.ts +4 -4
- package/src/mcps/mcp-client.ts +5 -5
- package/src/mcps/model-health-check.server.ts +2 -2
- package/src/mcps/orchestrator/server.ts +4 -3
- 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 +21 -36
- package/src/mcps/security-scan.server.ts +2 -2
- package/src/mcps/simulation/server-simulations.ts +3 -3
- 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 +42 -42
- 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
|
@@ -98,7 +98,7 @@ ${data.recommendations.map((rec) => `- ${rec}`).join("\n")}
|
|
|
98
98
|
4. **Performance Monitoring**: Track rule enforcement effectiveness metrics
|
|
99
99
|
|
|
100
100
|
---
|
|
101
|
-
*Consumer runtime compat shim from prior
|
|
101
|
+
*Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + .xray fallbacks)*
|
|
102
102
|
*Framework Status: Operational*
|
|
103
103
|
`;
|
|
104
104
|
}
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* Observes the full pipeline in action.
|
|
6
6
|
*/
|
|
7
7
|
import { AgentDelegator } from '../delegation/agent-delegator.js';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { XrayStateManager } from '../state/state-manager.js';
|
|
9
|
+
import { xrayConfigLoader } from '../core/config-loader.js';
|
|
10
10
|
import { routingOutcomeTracker } from '../delegation/analytics/outcome-tracker.js';
|
|
11
11
|
import { patternPerformanceTracker } from '../analytics/pattern-performance-tracker.js';
|
|
12
|
-
const stateManager = new
|
|
13
|
-
const delegator = new AgentDelegator(stateManager,
|
|
12
|
+
const stateManager = new XrayStateManager();
|
|
13
|
+
const delegator = new AgentDelegator(stateManager, xrayConfigLoader);
|
|
14
14
|
console.log('=== KERNEL PIPELINE ACTIVATION TEST ===\n');
|
|
15
15
|
// Test cases designed to trigger kernel patterns
|
|
16
16
|
const testCases = [
|
package/dist/scripts/pre-command
CHANGED
|
@@ -181,9 +181,9 @@ export class InferenceTuner {
|
|
|
181
181
|
*/
|
|
182
182
|
resolveMappingsPath() {
|
|
183
183
|
const candidates = [
|
|
184
|
-
path.resolve(process.cwd(), ".
|
|
184
|
+
path.resolve(process.cwd(), ".xray/routing-mappings.json"),
|
|
185
185
|
path.resolve(process.cwd(), "xray/routing-mappings.json"),
|
|
186
|
-
path.resolve(process.cwd(), ".
|
|
186
|
+
path.resolve(process.cwd(), ".xray/routing-mappings.json"),
|
|
187
187
|
path.resolve(process.cwd(), "routing-mappings.json"),
|
|
188
188
|
];
|
|
189
189
|
for (const p of candidates) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
source: framework
|
|
3
3
|
name: code-analyzer
|
|
4
4
|
description: Deep code analysis, metrics extraction, and pattern detection (CONSOLIDATED - combines analyzer, explore, and original code-analyzer)
|
|
5
|
-
author:
|
|
5
|
+
author: Xray Framework
|
|
6
6
|
version: 1.0.0
|
|
7
7
|
schema_version: "1.0"
|
|
8
8
|
tags: [analysis, metrics, code-quality, patterns]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
source: framework
|
|
3
3
|
name: code-review
|
|
4
4
|
description: Perform comprehensive code quality assessment and provide improvement suggestions
|
|
5
|
-
author:
|
|
5
|
+
author: Xray Framework
|
|
6
6
|
version: 1.0.0
|
|
7
7
|
schema_version: "1.0"
|
|
8
8
|
tags: [review, quality, assessment, improvement]
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hermes-agent
|
|
3
|
-
description: Manage
|
|
3
|
+
description: Manage 0xRay framework from Hermes Agent via the native xray-hermes plugin. Covers the 4 plugin tools (validate, codex_check, health, hooks), lifecycle hooks, slash commands, bridge architecture, and CLI fallback.
|
|
4
4
|
version: 2.1.0
|
|
5
|
-
author:
|
|
5
|
+
author: 0xRay AI
|
|
6
6
|
metadata:
|
|
7
7
|
hermes:
|
|
8
|
-
tags: [
|
|
8
|
+
tags: [0xRay, Plugin, Validation, Codex, GitHooks, Bridge]
|
|
9
9
|
related_skills: []
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# 0xRay Hermes Plugin (xray-hermes)
|
|
13
13
|
|
|
14
|
-
Native Hermes plugin providing
|
|
14
|
+
Native Hermes plugin providing 0xRay framework integration — quality gates, codex enforcement, git hooks, and full pre/post processing pipeline. Runs via a Node.js bridge to compiled framework components.
|
|
15
15
|
|
|
16
16
|
## When to Use
|
|
17
17
|
|
|
18
|
-
- User asks about
|
|
18
|
+
- User asks about 0xRay health, validation, or codex checks
|
|
19
19
|
- User wants to install/manage git hooks for automated enforcement
|
|
20
20
|
- User asks about the plugin's tools, hooks, or slash commands
|
|
21
21
|
- User asks about bridge errors or framework not loading
|
|
@@ -24,11 +24,11 @@ Native Hermes plugin providing StringRay framework integration — quality gates
|
|
|
24
24
|
## Plugin Architecture
|
|
25
25
|
|
|
26
26
|
```
|
|
27
|
-
~/.hermes/plugins/
|
|
27
|
+
~/.hermes/plugins/xray-hermes/
|
|
28
28
|
├── __init__.py # Plugin registration, hooks, slash commands
|
|
29
29
|
├── tools.py # 4 tool handlers (validate, codex_check, health, hooks)
|
|
30
30
|
├── schemas.py # JSON schemas the LLM sees
|
|
31
|
-
├── bridge.mjs # Node.js bridge to compiled
|
|
31
|
+
├── bridge.mjs # Node.js bridge to compiled 0xRay framework
|
|
32
32
|
├── plugin.yaml # Plugin metadata (name, version, tools, hooks)
|
|
33
33
|
├── types.py # TypeScript-equivalent type definitions
|
|
34
34
|
├── after-install.md # Post-install instructions
|
|
@@ -43,17 +43,17 @@ Native Hermes plugin providing StringRay framework integration — quality gates
|
|
|
43
43
|
|
|
44
44
|
**Fallback:** When bridge is unavailable, tools fall back to `npx 0xray` CLI commands.
|
|
45
45
|
|
|
46
|
-
**Config path resolution:** `
|
|
46
|
+
**Config path resolution:** `XRAY_CONFIG_DIR/` > `.xray/` > built-in defaults.
|
|
47
47
|
|
|
48
48
|
## 4 Tools
|
|
49
49
|
|
|
50
|
-
###
|
|
50
|
+
### xray_validate
|
|
51
51
|
|
|
52
52
|
Run pre-commit validation on files. Uses bridge quality gate + processor pipeline, falls back to CLI.
|
|
53
53
|
|
|
54
54
|
```
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
xray_validate(files=["src/my-module.ts"], operation="commit")
|
|
56
|
+
xray_validate(files=["src/auth.ts", "src/auth.test.ts"], operation="modify")
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Parameters:
|
|
@@ -62,13 +62,13 @@ Parameters:
|
|
|
62
62
|
|
|
63
63
|
Returns: pass/fail with per-file results and violations.
|
|
64
64
|
|
|
65
|
-
###
|
|
65
|
+
### xray_codex_check
|
|
66
66
|
|
|
67
67
|
Validate code against the 60-term Universal Development Codex. Checks error-handling, type-safety, performance, security, architecture.
|
|
68
68
|
|
|
69
69
|
```
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
xray_codex_check(code="const x: any = foo()", operation="create")
|
|
71
|
+
xray_codex_check(code=snippet, operation="modify", focus_areas=["security", "error-handling"])
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
Parameters:
|
|
@@ -78,25 +78,25 @@ Parameters:
|
|
|
78
78
|
|
|
79
79
|
Returns: violations list with actionable remediation.
|
|
80
80
|
|
|
81
|
-
###
|
|
81
|
+
### xray_health
|
|
82
82
|
|
|
83
83
|
Framework health check. Returns version, loaded components, project root.
|
|
84
84
|
|
|
85
85
|
```
|
|
86
|
-
|
|
86
|
+
xray_health()
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
Returns: framework status, version, component availability, node version.
|
|
90
90
|
|
|
91
|
-
###
|
|
91
|
+
### xray_hooks
|
|
92
92
|
|
|
93
|
-
Manage
|
|
93
|
+
Manage 0xRay git hooks (install, uninstall, list, status).
|
|
94
94
|
|
|
95
95
|
```
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
xray_hooks(action="install")
|
|
97
|
+
xray_hooks(action="status")
|
|
98
|
+
xray_hooks(action="list")
|
|
99
|
+
xray_hooks(action="uninstall", hooks=["pre-commit"])
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
Parameters:
|
|
@@ -122,7 +122,7 @@ Fires before ANY tool executes:
|
|
|
122
122
|
1. Tracks session stats
|
|
123
123
|
2. Logs tool-start event to `logs/framework/plugin-tool-events.log`
|
|
124
124
|
3. For code-producing tools (write_file, patch, execute_code, write, edit): runs quality gate + pre-processors via bridge
|
|
125
|
-
4. For other tools: nudges when a
|
|
125
|
+
4. For other tools: nudges when a 0xRay MCP alternative exists (e.g., grep → search_codebase, eslint → xray_lint)
|
|
126
126
|
|
|
127
127
|
### post_tool_call
|
|
128
128
|
|
|
@@ -137,16 +137,16 @@ Fires when a new session starts. Resets stats and logs to disk. Registration is
|
|
|
137
137
|
## Slash Command
|
|
138
138
|
|
|
139
139
|
```
|
|
140
|
-
/
|
|
141
|
-
/
|
|
142
|
-
/
|
|
140
|
+
/xray status — Plugin and framework health (calls bridge)
|
|
141
|
+
/xray stats — Session pipeline statistics
|
|
142
|
+
/xray help — Show available commands
|
|
143
143
|
/sr status — Alias
|
|
144
144
|
```
|
|
145
145
|
|
|
146
146
|
## Session Stats (tracked automatically)
|
|
147
147
|
|
|
148
|
-
The plugin tracks per-session counters visible via `/
|
|
149
|
-
- total_tool_calls, code_operations,
|
|
148
|
+
The plugin tracks per-session counters visible via `/xray stats`:
|
|
149
|
+
- total_tool_calls, code_operations, xray_mcp_calls, native_tool_calls
|
|
150
150
|
- quality_gate_runs, quality_gate_blocks
|
|
151
151
|
- pre_processor_runs, post_processor_runs
|
|
152
152
|
- bridge_calls, bridge_errors
|
|
@@ -164,13 +164,13 @@ All logs go to `logs/framework/` in the project root:
|
|
|
164
164
|
|
|
165
165
|
| User Says | Tool / Command |
|
|
166
166
|
|----------|---------------|
|
|
167
|
-
| "Is
|
|
168
|
-
| "Check these files before I commit" | `
|
|
169
|
-
| "Is this code codex compliant?" | `
|
|
170
|
-
| "Set up git hooks" | `
|
|
171
|
-
| "What hooks are installed?" | `
|
|
172
|
-
| "Show session stats" | `/
|
|
173
|
-
| "Why is the bridge failing?" | Check `
|
|
167
|
+
| "Is 0xRay working?" | `xray_health()` or `/xray status` |
|
|
168
|
+
| "Check these files before I commit" | `xray_validate(files=[...], operation="commit")` |
|
|
169
|
+
| "Is this code codex compliant?" | `xray_codex_check(code=..., operation="create")` |
|
|
170
|
+
| "Set up git hooks" | `xray_hooks(action="install")` |
|
|
171
|
+
| "What hooks are installed?" | `xray_hooks(action="status")` |
|
|
172
|
+
| "Show session stats" | `/xray stats` |
|
|
173
|
+
| "Why is the bridge failing?" | Check `xray_health()` → if `framework: "not_loaded"`, verify `dist/` symlink |
|
|
174
174
|
|
|
175
175
|
## Bridge Commands (internal)
|
|
176
176
|
|
|
@@ -188,8 +188,8 @@ These are called by the Python tools via `bridge.mjs`, not directly by the LLM:
|
|
|
188
188
|
|
|
189
189
|
Bridge can be invoked directly for debugging:
|
|
190
190
|
```bash
|
|
191
|
-
echo '{"command":"health"}' | node ~/.hermes/plugins/
|
|
192
|
-
node ~/.hermes/plugins/
|
|
191
|
+
echo '{"command":"health"}' | node ~/.hermes/plugins/xray-hermes/bridge.mjs
|
|
192
|
+
node ~/.hermes/plugins/xray-hermes/bridge.mjs health --cwd /path/to/project
|
|
193
193
|
```
|
|
194
194
|
|
|
195
195
|
## Relationship to MCP Servers
|
|
@@ -198,15 +198,15 @@ The plugin and MCP servers are complementary:
|
|
|
198
198
|
- **Plugin tools** = offline-first, always available, lightweight (validate, codex check, health, hooks)
|
|
199
199
|
- **MCP servers** = deeper analysis requiring running Node.js (lint, security scan, architecture assessment, orchestration, codebase search)
|
|
200
200
|
|
|
201
|
-
The plugin's pre_tool_call hook nudges when an MCP alternative exists (e.g., "use
|
|
201
|
+
The plugin's pre_tool_call hook nudges when an MCP alternative exists (e.g., "use mcp_xray_lint_lint instead of raw eslint"). This is advisory, not blocking.
|
|
202
202
|
|
|
203
203
|
## Pitfalls
|
|
204
204
|
|
|
205
205
|
- Plugin requires restart after install/edit: Hermes loads plugins once at session start.
|
|
206
206
|
- Bridge needs `dist/` symlink: The bridge loads compiled `.js` from `dist/` → `node_modules/0xray/dist/`. If the symlink breaks, bridge returns `framework: "not_loaded"`.
|
|
207
|
-
- `
|
|
207
|
+
- `xray_codex_check` without `code` param returns health, not a codex check. Pass `code` for actual validation.
|
|
208
208
|
- CLI fallback requires `npx 0xray` in PATH. If bridge fails and CLI isn't available, tools return errors.
|
|
209
209
|
- Quality gate blocks are logged but NOT enforced (advisory). The tool returns violations; the agent decides what to do.
|
|
210
|
-
- Git hooks use symlinks from `.git/hooks/` → `hooks/`. If the `hooks/` directory doesn't exist in the project, `
|
|
211
|
-
- Project root detection walks up from CWD looking for `node_modules/0xray`, `.
|
|
210
|
+
- Git hooks use symlinks from `.git/hooks/` → `hooks/`. If the `hooks/` directory doesn't exist in the project, `xray_hooks(action="install")` skips those hooks.
|
|
211
|
+
- Project root detection walks up from CWD looking for `node_modules/0xray`, `.xray/features.json`, or `package.json`. Override with `XRAY_PROJECT_ROOT` env var.
|
|
212
212
|
- `logs/framework/` is created automatically. Never breaks the agent if permissions fail.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
source: framework
|
|
3
3
|
name: inference-improve
|
|
4
4
|
description: Autonomous inference improvement through collaborative agent analysis
|
|
5
|
-
author:
|
|
5
|
+
author: Xray Framework
|
|
6
6
|
version: 1.0.0
|
|
7
7
|
schema_version: "1.0"
|
|
8
8
|
tags: [inference, improvement, autonomous, learning]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
source: framework
|
|
3
3
|
name: multimodal-looker
|
|
4
4
|
description: Visual content analysis for diagrams, screenshots, and UI mockups
|
|
5
|
-
author:
|
|
5
|
+
author: Xray Framework
|
|
6
6
|
version: 1.0.0
|
|
7
7
|
schema_version: "1.0"
|
|
8
8
|
tags: [visual, diagrams, screenshots, accessibility, ui-analysis]
|
|
@@ -96,7 +96,7 @@ codex_terms: [5, 7, 32] # Related Codex term numbers
|
|
|
96
96
|
```markdown
|
|
97
97
|
## What Next?
|
|
98
98
|
|
|
99
|
-
- Related Codex terms: [codex.json](
|
|
99
|
+
- Related Codex terms: [codex.json](../../../../.xray/codex.json)
|
|
100
100
|
- Next story to write: [suggestion]
|
|
101
101
|
```
|
|
102
102
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
source: framework
|
|
3
3
|
name: ui-ux-design
|
|
4
4
|
description: User interface and user experience design with mobile-first approach, cognitive simplicity, and accessibility-first principles
|
|
5
|
-
author:
|
|
5
|
+
author: Xray Framework
|
|
6
6
|
version: 2.1.0
|
|
7
7
|
schema_version: "1.0"
|
|
8
8
|
tags: [design, ui, ux, accessibility, mobile-first, visual-hierarchy, wcag, contrast, color-theory, dont-make-me-think]
|
package/dist/state/index.js
CHANGED
|
@@ -4,4 +4,4 @@ export * from "./state-manager.js";
|
|
|
4
4
|
export * from "./context-providers.js";
|
|
5
5
|
export * from "./state-types.js";
|
|
6
6
|
// Re-export commonly used state utilities
|
|
7
|
-
export {
|
|
7
|
+
export { XrayStateManager } from "./state-manager.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
2
2
|
import { resolveStateFilePath } from "../core/config-paths.js";
|
|
3
|
-
export class
|
|
3
|
+
export class XrayStateManager {
|
|
4
4
|
store = new Map();
|
|
5
5
|
persistencePath;
|
|
6
6
|
persistenceEnabled;
|
|
@@ -190,7 +190,7 @@ export class StringRayStateManager {
|
|
|
190
190
|
}
|
|
191
191
|
// Enterprise features for advanced state management
|
|
192
192
|
getStateVersion() {
|
|
193
|
-
return
|
|
193
|
+
return XrayStateManager.VERSION || "1.1.1";
|
|
194
194
|
}
|
|
195
195
|
getAuditLog() {
|
|
196
196
|
return []; // Simplified implementation for testing
|
|
@@ -204,5 +204,4 @@ export class StringRayStateManager {
|
|
|
204
204
|
return conflict.value2; // Prefer the second value as newer
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
// Export alias for scripts expecting
|
|
208
|
-
export { StringRayStateManager as StrRayStateManager };
|
|
207
|
+
// Export alias for scripts expecting XrayStateManager
|
|
@@ -77,7 +77,7 @@ export class ImportResolver {
|
|
|
77
77
|
detectInstalled() {
|
|
78
78
|
return (this.currentDir.includes("/node_modules/") ||
|
|
79
79
|
this.currentDir.includes("\\node_modules\\") ||
|
|
80
|
-
(this.currentDir.includes("
|
|
80
|
+
(this.currentDir.includes("xray") &&
|
|
81
81
|
!this.currentDir.includes(this.projectRoot)));
|
|
82
82
|
}
|
|
83
83
|
detectTesting() {
|
|
@@ -52,7 +52,7 @@ export class PathResolver {
|
|
|
52
52
|
detectBuilt() {
|
|
53
53
|
return (this.currentDir.includes("/dist/") ||
|
|
54
54
|
this.currentDir.includes("\\dist\\") ||
|
|
55
|
-
(this.currentDir.includes("
|
|
55
|
+
(this.currentDir.includes("xray") && !this.detectDevelopment()));
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Detect if we're running in installed package environment
|
|
@@ -60,7 +60,7 @@ export class PathResolver {
|
|
|
60
60
|
detectInstalled() {
|
|
61
61
|
return (this.currentDir.includes("/node_modules/") ||
|
|
62
62
|
this.currentDir.includes("\\node_modules\\") ||
|
|
63
|
-
(this.currentDir.includes("
|
|
63
|
+
(this.currentDir.includes("xray") && this.detectBuilt()));
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Resolve agent import path for current environment
|
|
@@ -3,7 +3,7 @@ import * as path from "path";
|
|
|
3
3
|
import { resolveConfigPath } from "../core/config-paths.js";
|
|
4
4
|
export class TokenManager {
|
|
5
5
|
config;
|
|
6
|
-
constructor(configPath = resolveConfigPath("config.json") || path.join(process.cwd(), ".
|
|
6
|
+
constructor(configPath = resolveConfigPath("config.json") || path.join(process.cwd(), ".xray", "config.json")) {
|
|
7
7
|
this.config = this.loadConfig(configPath);
|
|
8
8
|
}
|
|
9
9
|
loadConfig(configPath) {
|