0xray 4.0.39 → 4.0.41

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.
Files changed (71) hide show
  1. package/.grok-plugin/plugin.json +1 -1
  2. package/.xray/features.json +1 -1
  3. package/dist/CHANGELOG.md +29 -0
  4. package/dist/integrations/grok/hooks/grok-hook-utils.js +21 -1
  5. package/dist/integrations/grok/hooks/session-start.js +2 -20
  6. package/dist/integrations/hooks/goggles-mcp.mjs +36 -4
  7. package/dist/integrations/hooks/goggles-pipeline.mjs +55 -15
  8. package/dist/integrations/hooks/goggles-planes.json +10 -4
  9. package/dist/integrations/hooks/plates.cjs +22 -0
  10. package/dist/integrations/hooks/session-note-index.cjs +298 -0
  11. package/dist/integrations/hooks/session-note-index.mjs +22 -0
  12. package/dist/integrations/hooks/sleeve.cjs +335 -0
  13. package/dist/integrations/hooks/sleeve.mjs +18 -0
  14. package/dist/integrations/hooks/station-hook-runtime.cjs +205 -9
  15. package/dist/integrations/hooks/wake-cascade.cjs +102 -0
  16. package/dist/integrations/hooks/wake-cascade.mjs +16 -0
  17. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  18. package/dist/memory-routing/plates.d.ts +1 -1
  19. package/dist/memory-routing/plates.js +1 -0
  20. package/docs-site/docs/plates/activity-log.md +1 -1
  21. package/docs-site/docs/plates/boot.md +2 -0
  22. package/docs-site/docs/plates/centrifuge.md +30 -0
  23. package/docs-site/docs/plates/cursor-compact.md +1 -1
  24. package/docs-site/docs/plates/glossary.md +1 -2
  25. package/docs-site/docs/plates/goggles.md +4 -0
  26. package/docs-site/docs/plates/governance.md +2 -0
  27. package/docs-site/docs/plates/grok-compact.md +1 -1
  28. package/docs-site/docs/plates/grokbot.md +1 -1
  29. package/docs-site/docs/plates/host-pack.md +2 -0
  30. package/docs-site/docs/plates/house.md +1 -1
  31. package/docs-site/docs/plates/index.md +4 -2
  32. package/docs-site/docs/plates/inference-files.md +1 -1
  33. package/docs-site/docs/plates/kept-line.md +1 -1
  34. package/docs-site/docs/plates/kits.md +2 -0
  35. package/docs-site/docs/plates/lens-gate.md +1 -1
  36. package/docs-site/docs/plates/lens-page.md +1 -1
  37. package/docs-site/docs/plates/live-mesh.md +41 -0
  38. package/docs-site/docs/plates/memory-recall.md +4 -0
  39. package/docs-site/docs/plates/notes-page.md +2 -1
  40. package/docs-site/docs/plates/orchestration.md +2 -0
  41. package/docs-site/docs/plates/package-face.md +1 -1
  42. package/docs-site/docs/plates/payload-heat.md +1 -1
  43. package/docs-site/docs/plates/pickup-stamp.md +1 -1
  44. package/docs-site/docs/plates/pre-tool.md +1 -1
  45. package/docs-site/docs/plates/processor.md +2 -0
  46. package/docs-site/docs/plates/record-map.md +2 -1
  47. package/docs-site/docs/plates/reflection-page.md +1 -1
  48. package/docs-site/docs/plates/reporting.md +2 -0
  49. package/docs-site/docs/plates/review.md +1 -1
  50. package/docs-site/docs/plates/routing.md +2 -0
  51. package/docs-site/docs/plates/session-capture.md +1 -1
  52. package/docs-site/docs/plates/site-manual.md +1 -1
  53. package/docs-site/docs/plates/stamp-plate.md +1 -1
  54. package/docs-site/docs/plates/station-card.md +4 -1
  55. package/docs-site/docs/plates/station-heat.md +1 -1
  56. package/docs-site/docs/plates/suit-organs.md +1 -1
  57. package/docs-site/docs/plates/suit-settings.md +1 -1
  58. package/docs-site/docs/plates/suit-wear.md +3 -1
  59. package/docs-site/docs/plates/suit.md +2 -0
  60. package/docs-site/docs/plates/trail-state.md +1 -1
  61. package/docs-site/docs/plates/work-fresh.md +1 -1
  62. package/docs-site/docs/plates/write-home.md +1 -1
  63. package/package.json +2 -1
  64. package/scripts/node/bridge-mcp-wiring.cjs +37 -4
  65. package/scripts/node/install-bridges.cjs +172 -19
  66. package/scripts/node/playwright-smoke-server.cjs +27 -0
  67. package/scripts/node/setup.cjs +2 -46
  68. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  69. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js +4 -1
  70. package/vendor/@0xray/repertoire/dist/paths.js +3 -0
  71. package/xray/features.json +1 -1
@@ -4,37 +4,7 @@ const fs = require("fs");
4
4
  const path = require("path");
5
5
 
6
6
  function syncSetupSkillsAndRootLinks(packageRoot, targetDir) {
7
- /* 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]
8
- [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.]
9
- [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."] */
10
- const skillsSource = fs.existsSync(path.join(packageRoot, "src", "skills"))
11
- ? path.join(packageRoot, "src", "skills")
12
- : path.join(packageRoot, "dist", "skills");
13
- const skillsDest = path.join(targetDir, ".opencode", "skills");
14
-
15
- if (fs.existsSync(skillsSource)) {
16
- try {
17
- if (!fs.existsSync(skillsDest)) fs.mkdirSync(skillsDest, { recursive: true });
18
- const skillDirs = fs.readdirSync(skillsSource, { withFileTypes: true });
19
- let copied = 0, skipped = 0;
20
- for (const entry of skillDirs) {
21
- if (!entry.isDirectory()) continue;
22
- const skillMd = path.join(skillsSource, entry.name, "SKILL.md");
23
- if (!fs.existsSync(skillMd)) continue;
24
- const destMd = path.join(skillsDest, entry.name, "SKILL.md");
25
- const destDir = path.dirname(destMd);
26
- if (!fs.existsSync(destDir)) fs.mkdirSync(destDir, { recursive: true });
27
- if (fs.existsSync(destMd)) {
28
- const destContent = fs.readFileSync(destMd, "utf8");
29
- if (destContent.includes("source: community")) { skipped++; continue; }
30
- if (fs.statSync(skillMd).mtime <= fs.statSync(destMd).mtime) continue;
31
- }
32
- fs.copyFileSync(skillMd, destMd);
33
- copied++;
34
- }
35
- console.log(`✅ Skills: ${copied} updated, ${skipped} community skills preserved`);
36
- } catch (e) { console.warn(`⚠️ Skills sync: ${e.message}`); }
37
- }
7
+ // Mint fastens mill and inspect. The role-skill mirror stays in the package.
38
8
 
39
9
  // 4. Create scripts symlink
40
10
  const scriptsSource = path.join(packageRoot, "scripts");
@@ -106,21 +76,7 @@ if (hasHermes) {
106
76
  console.log("🔍 Hermes Agent detected");
107
77
  }
108
78
 
109
- /**
110
- * P3-SKILLS-DE-DUP-SCOPE-AND-EXEC-01 (supporting header in sync owner) — Small-Batch Surgical Skills Deduplication (one package: orchestrator).
111
- * This file (scripts/node/setup.cjs) is the canonical sync owner enforcing src/skills/ (or dist/skills/) → .opencode/skills/ mirror for framework core skills.
112
- * Rich CGT + ties modeled on paired edit in src/cli/commands/status.ts + P3-YML-AGENT-SURFACES-UNIFICATION-01 + P3-7TH-GAP-DEEPER-01 + deep ref 2026-05-26 + Phase 3 Pivot + Term 61 + user's "create a todo list. spawn subagents..." + 6/6+7/7 + YML live.
113
- * Highly modular header only (no behavior change). Fully reversible (delete header). fw discipline + AGENTS org. 2 files total for this micro-slice (status.ts primary with fw guard + this header).
114
- * Governance-visible: documents the SSOT ownership for orchestrator package dedup at the build/install layer.
115
- * The box contains its builders. Term 61 held. Pure momentum.
116
- *
117
- * P3-SKILLS-DE-DUP-RESEARCHER-FOLLOW-01 (follow-on small-batch per deep ref "parallel small batches on skills deduplication (one package)" + YML @ "skills follow-on" + playbook P3-SKILLS-FOLLOW-01 + YML @ harness-codex verification 16982–17045 + FORCE + codex 100/60/0 + 3 subagents tracked + 0 hot + 3-hot re-establish + all prior completions + user's spawn command + deep ref 2026-05-26 + Phase 3 Pivot + Term 61 + 6/6+7/7 + YML):
118
- * Extended header for next high-value package (researcher). src/skills/researcher/SKILL.md canonical SSOT; .opencode/skills/researcher/ built mirror of this sync logic. See paired guarded fw log "P3-SKILLS-DE-DUP-RESEARCHER-FOLLOW-01-researcher-ssot-preferred" in status.ts getSkillsList + rich append docs/reflections/p3-skills-dedup-researcher-follow-01-2026-05-27.md + CGT/Governance-visible for YML @ harness-codex verification + 0 hot + 3-hot + all ties. 2 files max total for this follow-on. Highly modular. Fully reversible. fw/echo discipline. AGENTS org (scripts/ for sh/cjs). Term 61 surgical forward motion held. "the box contains its builders". Green + ready.
119
- *
120
- * P3-SKILLS-FOLLOW-02 (follow-on small-batch per deep ref "parallel small batches on skills deduplication (one package)" + @architect scoping rec 2 + YML @ "Ready for next" + this execution on user's "create a todo list. spawn subagents to complete todos. maintain todo list. do not ask questions. do not stop. you have the full plan."; modeled exactly on "orchestrator" + researcher precedent):
121
- * 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.
122
- */
123
-
79
+ // Mint fastens mill and inspect. The links below are scripts and dist.
124
80
  syncSetupSkillsAndRootLinks(packageRoot, targetDir);
125
81
 
126
82
  // 2. Handle opencode.json merge
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xray-pre-tool",
3
- "version": "4.0.39",
3
+ "version": "4.0.41",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "0xRay constitution + temperament PreToolUse for OpenClaw",
@@ -94,7 +94,10 @@ export class RepertoireOrchestratorBridge {
94
94
  const repertoireContext = this.buildRoutingContext(operation);
95
95
  const adjustedScore = this.injector.adjustComplexityScore(complexityScore, repertoireContext, confidenceContext);
96
96
  let agent = baseAgent;
97
- if (confidenceContext.highConfidenceTrapPresent && adjustedScore >= 26) {
97
+ // Trap name alone must not change the agent. Crossing the architect line
98
+ // (debug / investigate / redesign / explicit architect) may route to architect.
99
+ const crossesArchitectLine = /\b(debug|investigate|redesign|architect)\b/i.test(operation);
100
+ if (confidenceContext.highConfidenceTrapPresent && adjustedScore >= 26 && crossesArchitectLine) {
98
101
  agent = 'architect';
99
102
  }
100
103
  else if (repertoireContext.matchedTags.includes('provenance-failure') &&
@@ -421,6 +421,9 @@ export function reloadOpProc(cwd = process.cwd()) {
421
421
  }
422
422
  function mergeProjectOverlays(destPath) {
423
423
  mergeStackOverlay(destPath);
424
+ // Suit wake / REPERTOIRE_SUBJECT_OVERLAY=0 keeps repo-* subject flesh off the project file.
425
+ if (process.env.REPERTOIRE_SUBJECT_OVERLAY === '0')
426
+ return;
424
427
  mergeSubjectOverlay(destPath);
425
428
  }
426
429
  export function hydrateWritableSignals(seedPath, cwd = process.cwd()) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "./features.schema.json",
3
- "version": "4.0.39",
3
+ "version": "4.0.41",
4
4
  "description": "0xRay Framework - Unified Feature Configuration",
5
5
  "suit_temperament": {
6
6
  "profile": "auto",