0xray 2.1.1 → 2.1.2

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.1",
2
+ "version": "2.1.2",
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
  ],
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.1.0 Release Polish
89
+ ## Session: v2.1.2 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/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.1.0 Release Polish
89
+ ## Session: v2.1.2 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0xray",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Multi-agent orchestration and Codex governance for OpenCode, Hermes, Grok Build, and OpenClaw",
5
5
  "readme": "README.md",
6
6
  "license": "MIT",
@@ -52,7 +52,7 @@
52
52
  "postinstall": "node scripts/node/postinstall.cjs",
53
53
  "prepare": "npm run build",
54
54
  "prebuild": "rm -rf dist tsconfig.tsbuildinfo tsconfig.*.tsbuildinfo",
55
- "build": "tsc && mkdir -p dist/public dist/scripts && cp -r public/* dist/public/ && cp scripts/hooks/pre-command dist/scripts/ && cp scripts/hooks/pre-command.mjs dist/scripts/ && cp README.md AGENTS.md CHANGELOG.md LICENSE dist/ && find src -name '*.mjs' ! -path '*/__tests__/*' | while read f; do tgt=\"dist/${f#src/}\"; mkdir -p \"$(dirname $tgt)\"; cp \"$f\" \"$tgt\"; done && for dir in skills integrations mcps; do find src/$dir -type f ! -name '*.ts' ! -path '*/.pytest_cache/*' | while read f; do tgt=\"dist/${f#src/}\"; mkdir -p \"$(dirname $tgt)\"; cp \"$f\" \"$tgt\"; done; done && mkdir -p dist/plugin && (find dist/plugin -name '*codex-injection*.js' -exec cp {} dist/plugin/xray-codex-injection.js \\; 2>/dev/null || true) && cp -r src/opencode/ .opencode/ && rm -rf .opencode/xray 2>/dev/null; mkdir -p .opencode/xray && cp xray/codex.json .opencode/xray/codex.json 2>/dev/null || true",
55
+ "build": "tsc && mkdir -p dist/public dist/scripts && cp -r public/* dist/public/ && cp scripts/hooks/pre-command dist/scripts/ && cp scripts/hooks/pre-command.mjs dist/scripts/ && cp README.md AGENTS.md CHANGELOG.md LICENSE dist/ && find src -name '*.mjs' ! -path '*/__tests__/*' | while read f; do tgt=\"dist/${f#src/}\"; mkdir -p \"$(dirname $tgt)\"; cp \"$f\" \"$tgt\"; done && for dir in skills integrations mcps; do find src/$dir -type f ! -name '*.ts' ! -path '*/.pytest_cache/*' | while read f; do tgt=\"dist/${f#src/}\"; mkdir -p \"$(dirname $tgt)\"; cp \"$f\" \"$tgt\"; done; done && mkdir -p dist/plugin && (find dist/plugin -name '*codex-injection*.js' -exec cp {} dist/plugin/xray-codex-injection.js \\; 2>/dev/null || true) && cp -r src/opencode/ .opencode/ && rm -rf .opencode/xray 2>/dev/null; mkdir -p .opencode/xray && cp xray/codex.json .opencode/xray/codex.json 2>/dev/null; cp xray/features.json .opencode/xray/features.json 2>/dev/null || true",
56
56
  "build:all": "npm run build",
57
57
  "ci-install": "npm ci",
58
58
  "clean": "rm -rf dist tsconfig.tsbuildinfo tsconfig.*.tsbuildinfo",
@@ -130,6 +130,7 @@
130
130
  "src/integrations/grok/plugin/0xray/",
131
131
  "src/skills/",
132
132
  "src/mcps/",
133
+ "xray/",
133
134
  ".opencode/agents/",
134
135
  ".opencode/commands/",
135
136
  ".opencode/hooks/",
@@ -37,6 +37,38 @@ if (hasHermes) {
37
37
  * Extended header for next high-value package (code-review). src/skills/code-review/SKILL.md canonical SSOT; .opencode/skills/code-review/ built mirror of this sync logic. See paired guarded fw log "P3-SKILLS-FOLLOW-02-code-review-ssot-preferred" in status.ts getSkillsList (inserted after researcher block) + rich append docs/reflections/p3-skills-follow-02-code-review-2026-05-27.md (per AGENTS) + CGT/Governance-visible for YML @ harness-codex verification + 0 hot + 3-hot re-establish + all ties to spawn command + deep ref + pivot + Term 61 + 6/6+7/7 + YML + ps 0 + this P3-SKILLS-FOLLOW-02 full work (2-file surgical, harness post green tsc 0 new on touched, mapping append after latest, todo advance exactly 1, spawn replacement to maintain 3-hot, self-audit 100%) + verification + "the box contains its builders. The relay is hot.". 2 files max total for this follow-02. Highly modular (100% prior P3-SKILLS/YML/7th pattern reuse exactly inside existing sync logic). Fully reversible (targeted delete of notes restores exact prior). fw/echo discipline. AGENTS org (scripts/ for sh/cjs). Term 61 surgical forward motion held (no bloat, pure on actual dedup). "the box contains its builders". Green + ready. Subagent ID for resume.
38
38
  */
39
39
 
40
+ /* 0. Deploy xray/ config files (features.json, codex.json, etc.) to consumer .xray/ */
41
+ const xrayConfigSource = path.join(packageRoot, "xray");
42
+ const xrayConfigDest = path.join(targetDir, ".xray");
43
+ if (fs.existsSync(xrayConfigSource)) {
44
+ try {
45
+ if (!fs.existsSync(xrayConfigDest)) fs.mkdirSync(xrayConfigDest, { recursive: true });
46
+ const entries = fs.readdirSync(xrayConfigSource);
47
+ let copied = 0;
48
+ for (const entry of entries) {
49
+ const srcPath = path.join(xrayConfigSource, entry);
50
+ const dstPath = path.join(xrayConfigDest, entry);
51
+ if (fs.statSync(srcPath).isFile()) {
52
+ if (!fs.existsSync(dstPath) || fs.statSync(srcPath).mtime > fs.statSync(dstPath).mtime) {
53
+ fs.copyFileSync(srcPath, dstPath);
54
+ copied++;
55
+ }
56
+ }
57
+ }
58
+ if (copied > 0) console.log(`✅ .xray/: ${copied} config files deployed`);
59
+ else console.log(`ℹ️ .xray/: up to date`);
60
+ } catch (e) { console.warn(`⚠️ .xray/ deploy: ${e.message}`); }
61
+ }
62
+
63
+ // 0b. Ensure logs/framework/ directory exists
64
+ const logsDir = path.join(targetDir, "logs", "framework");
65
+ try {
66
+ if (!fs.existsSync(logsDir)) {
67
+ fs.mkdirSync(logsDir, { recursive: true });
68
+ console.log("✅ logs/framework/: created");
69
+ }
70
+ } catch (e) { console.warn(`⚠️ logs/framework/: ${e.message}`); }
71
+
40
72
  /* 1. Sync core skills from src/skills/ (dev) or dist/skills/ (consumer) → .opencode/skills/ [P3-SKILLS-DE-DUP-SCOPE-AND-EXEC-01: orchestrator package SSOT canonical src/skills/orchestrator/SKILL.md; mirror .opencode/skills/orchestrator/ is built output of this logic; see paired guarded fw in status.ts getSkillsList + mapping append + deep ref 2026-05-26 authority for one-package dedup under pivoted surgical plan]
41
73
  [P3-SKILLS-DE-DUP-RESEARCHER-FOLLOW-01: researcher package SSOT canonical src/skills/researcher/SKILL.md (high-value per deep ref + YML precedent + playbook P3-SKILLS-FOLLOW-01); mirror .opencode/skills/researcher/ is built output of this logic; see paired guarded fw in status.ts + rich append + YML @ harness-codex verification (FORCE exercised P3-YML + codex-enforcement + 100/60/0 + 3 subagents tracked + 0 hot + 3-hot re-establish + all prior green) + deep ref 2026-05-26 + Phase 3 Pivot + Term 61 + user's "create a todo list. spawn subagents..." + 6/6+7/7 + YML. Governance-visible hook for skills SSOT at install layer. Silent, additive, reversible, no behavior change, fw/echo only.]
42
74
  [P3-SKILLS-FOLLOW-02: code-review package SSOT canonical src/skills/code-review/SKILL.md (next high-value per deep ref "parallel small batches" + @architect scoping rec 2 + YML @ "Ready for next" + this P3-SKILLS-FOLLOW-02 on user's spawn command); mirror .opencode/skills/code-review/ is built output of this logic; see paired guarded fw "P3-SKILLS-FOLLOW-02-code-review-ssot-preferred" in status.ts (after researcher) + rich append docs/reflections/p3-skills-follow-02-code-review-2026-05-27.md + YML @ harness-codex verification + 0 hot + 3-hot + all ties + ps 0 + this work (2-file surgical edit, harness post, mapping append after latest ~17099+, todo advance 1, spawn replacement, self-audit 100%, green + ready) + deep ref 2026-05-26 + Phase 3 Pivot + Term 61 + 6/6+7/7 + YML. Governance-visible hook for skills SSOT at install layer for code-review. Silent, additive, reversible, no behavior change, fw/echo only. "The box contains its builders. The relay is hot."] */
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.1",
2
+ "version": "2.1.2",
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
  ],
@@ -0,0 +1,109 @@
1
+ # StringRay AI v1.15.1 – Agent Context & Universal Development Codex
2
+
3
+ **Framework Version**: 1.14.0
4
+ **Codex Version**: 1.7.5 (condensed)
5
+ **Last Updated**: 2026-03-23
6
+ **Purpose**: Systematic error prevention and production-ready AI-assisted development
7
+
8
+ ## 🎯 CRITICAL RULES – ZERO TOLERANCE (MANDATORY)
9
+
10
+ 1. **Full File Reading Before Edit**
11
+ ALWAYS read the ENTIRE file using the `read` tool before ANY edit, refactor, or write.
12
+ Understand complete structure, imports, dependencies, and context.
13
+ Partial/contextual edits are strictly forbidden.
14
+
15
+ 2. **Verify Changes Actually Applied**
16
+ After every edit/write: use `read` to confirm the exact changes are present.
17
+ Check for regressions and unintended modifications.
18
+ NEVER declare success without observable verification.
19
+
20
+ 3. **Command & Tool Output Review**
21
+ Immediately review ALL command/tool outputs.
22
+ Identify errors, warnings, or anomalies.
23
+ Add TODO for course correction if issues found.
24
+ Do not proceed until critical problems are resolved.
25
+
26
+ 4. **No False Success Claims**
27
+ Only report "completed", "edited", or "fixed" after verification steps confirm success.
28
+ Prohibited: assuming success, subjective "looks correct", skipping checks for "trivial" changes.
29
+
30
+ 5. **Surgical & Progressive Fixes**
31
+ Fix root causes minimally – no patches, stubs, or over-engineering.
32
+ All code must be production-ready from first commit.
33
+
34
+ 6. **Error & Loop Prevention**
35
+ Resolve all errors before continuing (90%+ runtime prevention target).
36
+ Every loop/async must have clear termination/timeout.
37
+
38
+ 7. **Type Safety & Immutability First**
39
+ No `any`, `@ts-ignore`. Prefer immutable patterns and early returns/guards.
40
+
41
+ 8. **DRY, YAGNI, Separation of Concerns**
42
+ No duplication. No unnecessary features. One responsibility per module/function.
43
+
44
+ 9. **Test & Performance Awareness**
45
+ >85% behavioral coverage target. Respect bundle <2MB, FCP <2s budgets.
46
+
47
+ 10. **Security & Input Validation**
48
+ Validate/sanitize all inputs. Security by design.
49
+
50
+ ## Core Codex Terms (Top 20 – Enforced)
51
+
52
+ 1. Progressive production-ready code
53
+ 2. No patches/stubs/bridge code
54
+ 3. Avoid over-engineering
55
+ 4. Fit-for-purpose prod-level code
56
+ 5. Surgical root-cause fixes
57
+ 6. Batched introspection cycles
58
+ 7. Resolve all errors (90% prevention)
59
+ 8. Prevent infinite loops/timeouts
60
+ 9. Shared global state / single source of truth
61
+ 10. Type safety first (no `any`)
62
+ 11. Early returns & guard clauses
63
+ 12. Error boundaries & graceful degradation
64
+ 13. Immutability preferred
65
+ 14. Separation of concerns
66
+ 15. DRY – eliminate duplication
67
+ 16. YAGNI – no speculative features
68
+ 17. Meaningful, self-documenting names
69
+ 18. Small, focused functions (<30 lines ideal)
70
+ 19. Consistent style (linter enforced)
71
+ 20. Test coverage >85% (behavioral focus)
72
+
73
+ ## Agent Capabilities Matrix
74
+
75
+ | Agent | Role | Complexity | Key Tools | Strategy |
76
+ |---------------------------|-----------------------------------|------------|----------------------------------------|-------------------|
77
+ | enforcer | Codex & error prevention | All | read, grep, lsp_*, bash | Block violations |
78
+ | orchestrator | Workflow coordination | Enterprise | read, grep, call_omo_agent, session_* | Consensus |
79
+ | architect | Design & decisions | High | read, grep, lsp_*, background_task | Expert priority |
80
+ | bug-triage-specialist | Error investigation & fixes | Debug | read, grep, ast_grep_* | Majority vote |
81
+ | code-reviewer | Quality & standards | Changes | read, grep, lsp_diagnostics | Expert priority |
82
+ | security-auditor | Vulnerabilities & compliance | Security | read, grep, grep_app_searchGitHub | Block critical |
83
+ | refactorer | Debt & consolidation | Refactor | read, grep, lsp_rename, ast_grep_* | Majority vote |
84
+ | testing-lead | Testing strategy & coverage | Tests | read, grep, lsp_* | Expert priority |
85
+ | storyteller | Narrative deep reflections | Narrative | read, grep, write | Expert priority |
86
+ | researcher | Codebase exploration | Research | read, grep, codesearch, websearch | Expert priority |
87
+
88
+ ## Complexity Routing Summary
89
+
90
+ Score = (files×2 + change/10 + deps×3 + duration/10) × operation_weight × risk_mult
91
+ - Operation weights: debug 2.0, refactor 1.8, analyze 1.5, modify 1.2, others 1.0
92
+ - Risk multipliers: critical 1.6, high 1.3, medium 1.0, low 0.8
93
+ Thresholds:
94
+ - ≤15 → single agent
95
+ - 16–50 → multi-agent possible
96
+ - 51+ → orchestrator-led
97
+
98
+ ## Operational Guidelines
99
+
100
+ - Evaluate complexity before execution
101
+ - Always verify: read full file → apply change → read again → confirm no regressions
102
+ - Use `call_omo_agent` or `task()` for delegation
103
+ - Log JobId for traceability
104
+ - Enforce codex compliance on every operation
105
+
106
+ **Codex Enforcement**: All actions validated against these rules. Violations block progress until resolved.
107
+ **Target**: 99.6% systematic error prevention through verification-first behavior.
108
+
109
+ (End of file - total 105 lines)